diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..03a84a53 Binary files /dev/null and b/.DS_Store differ diff --git a/.obsidian/app.json b/.obsidian/app.json new file mode 100644 index 00000000..dc969401 --- /dev/null +++ b/.obsidian/app.json @@ -0,0 +1,3 @@ +{ + "showInlineTitle": false +} \ No newline at end of file diff --git a/.obsidian/appearance.json b/.obsidian/appearance.json new file mode 100644 index 00000000..efcca76c --- /dev/null +++ b/.obsidian/appearance.json @@ -0,0 +1,8 @@ +{ + "accentColor": "#a747f5", + "theme": "moonstone", + "cssTheme": "Minimal", + "interfaceFontFamily": "Atkinson Hyperlegible", + "textFontFamily": "Atkinson Hyperlegible", + "baseFontSize": 17 +} \ No newline at end of file diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json new file mode 100644 index 00000000..c92a880d --- /dev/null +++ b/.obsidian/community-plugins.json @@ -0,0 +1,6 @@ +[ + "obsidian-git", + "obsidian-minimal-settings", + "obsidian-smart-typography", + "vscode-editor" +] \ No newline at end of file diff --git a/.obsidian/core-plugins-migration.json b/.obsidian/core-plugins-migration.json new file mode 100644 index 00000000..881bc38e --- /dev/null +++ b/.obsidian/core-plugins-migration.json @@ -0,0 +1,30 @@ +{ + "file-explorer": true, + "global-search": true, + "switcher": true, + "graph": true, + "backlink": true, + "canvas": true, + "outgoing-link": true, + "tag-pane": true, + "properties": false, + "page-preview": true, + "daily-notes": true, + "templates": true, + "note-composer": true, + "command-palette": true, + "slash-command": false, + "editor-status": true, + "bookmarks": true, + "markdown-importer": false, + "zk-prefixer": false, + "random-note": false, + "outline": true, + "word-count": true, + "slides": false, + "audio-recorder": false, + "workspaces": false, + "file-recovery": true, + "publish": false, + "sync": true +} \ No newline at end of file diff --git a/.obsidian/core-plugins.json b/.obsidian/core-plugins.json new file mode 100644 index 00000000..6eb4b171 --- /dev/null +++ b/.obsidian/core-plugins.json @@ -0,0 +1,21 @@ +[ + "file-explorer", + "global-search", + "switcher", + "graph", + "backlink", + "canvas", + "outgoing-link", + "tag-pane", + "page-preview", + "daily-notes", + "templates", + "note-composer", + "command-palette", + "editor-status", + "bookmarks", + "outline", + "word-count", + "file-recovery", + "sync" +] \ No newline at end of file diff --git a/.obsidian/hotkeys.json b/.obsidian/hotkeys.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/.obsidian/hotkeys.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-git/data.json b/.obsidian/plugins/obsidian-git/data.json new file mode 100644 index 00000000..b3409c68 --- /dev/null +++ b/.obsidian/plugins/obsidian-git/data.json @@ -0,0 +1,56 @@ +{ + "commitMessage": "vault backup: {{date}}", + "commitDateFormat": "YYYY-MM-DD HH:mm:ss", + "autoSaveInterval": 0, + "autoPushInterval": 0, + "autoPullInterval": 0, + "autoPullOnBoot": false, + "disablePush": false, + "pullBeforePush": true, + "disablePopups": false, + "disablePopupsForNoChanges": false, + "listChangedFilesInMessageBody": false, + "showStatusBar": true, + "updateSubmodules": false, + "syncMethod": "merge", + "customMessageOnAutoBackup": false, + "autoBackupAfterFileChange": false, + "treeStructure": false, + "refreshSourceControl": true, + "basePath": "", + "differentIntervalCommitAndPush": false, + "changedFilesInStatusBar": false, + "showedMobileNotice": true, + "refreshSourceControlTimer": 7000, + "showBranchStatusBar": true, + "setLastSaveToLastCommit": false, + "submoduleRecurseCheckout": false, + "gitDir": "", + "showFileMenu": true, + "authorInHistoryView": "hide", + "dateInHistoryView": false, + "lineAuthor": { + "show": false, + "followMovement": "inactive", + "authorDisplay": "initials", + "showCommitHash": false, + "dateTimeFormatOptions": "date", + "dateTimeFormatCustomString": "YYYY-MM-DD HH:mm", + "dateTimeTimezone": "viewer-local", + "coloringMaxAge": "1y", + "colorNew": { + "r": 255, + "g": 150, + "b": 150 + }, + "colorOld": { + "r": 120, + "g": 160, + "b": 255 + }, + "textColorCss": "var(--text-muted)", + "ignoreWhitespace": false, + "gutterSpacingFallbackLength": 5 + }, + "autoCommitMessage": "vault backup: {{date}}" +} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-git/main.js b/.obsidian/plugins/obsidian-git/main.js new file mode 100644 index 00000000..5b1b9f22 --- /dev/null +++ b/.obsidian/plugins/obsidian-git/main.js @@ -0,0 +1,45279 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source visit the plugins github repository (https://github.com/denolehov/obsidian-git) +*/ + +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value; +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key2 of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key2) && key2 !== except) + __defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var __publicField = (obj, key2, value) => { + __defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value); + return value; +}; + +// node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js +var require_base64_js = __commonJS({ + "node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js"(exports2) { + "use strict"; + init_polyfill_buffer(); + exports2.byteLength = byteLength; + exports2.toByteArray = toByteArray; + exports2.fromByteArray = fromByteArray; + var lookup = []; + var revLookup = []; + var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array; + var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + for (i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; + } + var i; + var len; + revLookup["-".charCodeAt(0)] = 62; + revLookup["_".charCodeAt(0)] = 63; + function getLens(b64) { + var len2 = b64.length; + if (len2 % 4 > 0) { + throw new Error("Invalid string. Length must be a multiple of 4"); + } + var validLen = b64.indexOf("="); + if (validLen === -1) + validLen = len2; + var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4; + return [validLen, placeHoldersLen]; + } + function byteLength(b64) { + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; + } + function _byteLength(b64, validLen, placeHoldersLen) { + return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; + } + function toByteArray(b64) { + var tmp; + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)); + var curByte = 0; + var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen; + var i2; + for (i2 = 0; i2 < len2; i2 += 4) { + tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)]; + arr[curByte++] = tmp >> 16 & 255; + arr[curByte++] = tmp >> 8 & 255; + arr[curByte++] = tmp & 255; + } + if (placeHoldersLen === 2) { + tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4; + arr[curByte++] = tmp & 255; + } + if (placeHoldersLen === 1) { + tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2; + arr[curByte++] = tmp >> 8 & 255; + arr[curByte++] = tmp & 255; + } + return arr; + } + function tripletToBase64(num2) { + return lookup[num2 >> 18 & 63] + lookup[num2 >> 12 & 63] + lookup[num2 >> 6 & 63] + lookup[num2 & 63]; + } + function encodeChunk(uint8, start, end) { + var tmp; + var output = []; + for (var i2 = start; i2 < end; i2 += 3) { + tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255); + output.push(tripletToBase64(tmp)); + } + return output.join(""); + } + function fromByteArray(uint8) { + var tmp; + var len2 = uint8.length; + var extraBytes = len2 % 3; + var parts = []; + var maxChunkLength = 16383; + for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) { + parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength)); + } + if (extraBytes === 1) { + tmp = uint8[len2 - 1]; + parts.push( + lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "==" + ); + } else if (extraBytes === 2) { + tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1]; + parts.push( + lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "=" + ); + } + return parts.join(""); + } + } +}); + +// node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js +var require_ieee754 = __commonJS({ + "node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js"(exports2) { + init_polyfill_buffer(); + exports2.read = function(buffer2, offset, isLE, mLen, nBytes) { + var e, m; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = -7; + var i = isLE ? nBytes - 1 : 0; + var d = isLE ? -1 : 1; + var s = buffer2[offset + i]; + i += d; + e = s & (1 << -nBits) - 1; + s >>= -nBits; + nBits += eLen; + for (; nBits > 0; e = e * 256 + buffer2[offset + i], i += d, nBits -= 8) { + } + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer2[offset + i], i += d, nBits -= 8) { + } + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : (s ? -1 : 1) * Infinity; + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen); + }; + exports2.write = function(buffer2, value, offset, isLE, mLen, nBytes) { + var e, m, c; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; + var i = isLE ? 0 : nBytes - 1; + var d = isLE ? 1 : -1; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + value = Math.abs(value); + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer2[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) { + } + e = e << mLen | m; + eLen += mLen; + for (; eLen > 0; buffer2[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) { + } + buffer2[offset + i - d] |= s * 128; + }; + } +}); + +// node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js +var require_buffer = __commonJS({ + "node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js"(exports2) { + "use strict"; + init_polyfill_buffer(); + var base64 = require_base64_js(); + var ieee754 = require_ieee754(); + var customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") : null; + exports2.Buffer = Buffer2; + exports2.SlowBuffer = SlowBuffer; + exports2.INSPECT_MAX_BYTES = 50; + var K_MAX_LENGTH = 2147483647; + exports2.kMaxLength = K_MAX_LENGTH; + Buffer2.TYPED_ARRAY_SUPPORT = typedArraySupport(); + if (!Buffer2.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") { + console.error( + "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support." + ); + } + function typedArraySupport() { + try { + const arr = new Uint8Array(1); + const proto = { foo: function() { + return 42; + } }; + Object.setPrototypeOf(proto, Uint8Array.prototype); + Object.setPrototypeOf(arr, proto); + return arr.foo() === 42; + } catch (e) { + return false; + } + } + Object.defineProperty(Buffer2.prototype, "parent", { + enumerable: true, + get: function() { + if (!Buffer2.isBuffer(this)) + return void 0; + return this.buffer; + } + }); + Object.defineProperty(Buffer2.prototype, "offset", { + enumerable: true, + get: function() { + if (!Buffer2.isBuffer(this)) + return void 0; + return this.byteOffset; + } + }); + function createBuffer(length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"'); + } + const buf = new Uint8Array(length); + Object.setPrototypeOf(buf, Buffer2.prototype); + return buf; + } + function Buffer2(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + if (typeof encodingOrOffset === "string") { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ); + } + return allocUnsafe(arg); + } + return from(arg, encodingOrOffset, length); + } + Buffer2.poolSize = 8192; + function from(value, encodingOrOffset, length) { + if (typeof value === "string") { + return fromString2(value, encodingOrOffset); + } + if (ArrayBuffer.isView(value)) { + return fromArrayView(value); + } + if (value == null) { + throw new TypeError( + "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value + ); + } + if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) { + return fromArrayBuffer(value, encodingOrOffset, length); + } + if (typeof SharedArrayBuffer !== "undefined" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length); + } + if (typeof value === "number") { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ); + } + const valueOf = value.valueOf && value.valueOf(); + if (valueOf != null && valueOf !== value) { + return Buffer2.from(valueOf, encodingOrOffset, length); + } + const b = fromObject(value); + if (b) + return b; + if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") { + return Buffer2.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length); + } + throw new TypeError( + "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value + ); + } + Buffer2.from = function(value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length); + }; + Object.setPrototypeOf(Buffer2.prototype, Uint8Array.prototype); + Object.setPrototypeOf(Buffer2, Uint8Array); + function assertSize(size) { + if (typeof size !== "number") { + throw new TypeError('"size" argument must be of type number'); + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"'); + } + } + function alloc(size, fill, encoding) { + assertSize(size); + if (size <= 0) { + return createBuffer(size); + } + if (fill !== void 0) { + return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill); + } + return createBuffer(size); + } + Buffer2.alloc = function(size, fill, encoding) { + return alloc(size, fill, encoding); + }; + function allocUnsafe(size) { + assertSize(size); + return createBuffer(size < 0 ? 0 : checked(size) | 0); + } + Buffer2.allocUnsafe = function(size) { + return allocUnsafe(size); + }; + Buffer2.allocUnsafeSlow = function(size) { + return allocUnsafe(size); + }; + function fromString2(string, encoding) { + if (typeof encoding !== "string" || encoding === "") { + encoding = "utf8"; + } + if (!Buffer2.isEncoding(encoding)) { + throw new TypeError("Unknown encoding: " + encoding); + } + const length = byteLength(string, encoding) | 0; + let buf = createBuffer(length); + const actual = buf.write(string, encoding); + if (actual !== length) { + buf = buf.slice(0, actual); + } + return buf; + } + function fromArrayLike(array) { + const length = array.length < 0 ? 0 : checked(array.length) | 0; + const buf = createBuffer(length); + for (let i = 0; i < length; i += 1) { + buf[i] = array[i] & 255; + } + return buf; + } + function fromArrayView(arrayView) { + if (isInstance(arrayView, Uint8Array)) { + const copy2 = new Uint8Array(arrayView); + return fromArrayBuffer(copy2.buffer, copy2.byteOffset, copy2.byteLength); + } + return fromArrayLike(arrayView); + } + function fromArrayBuffer(array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds'); + } + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds'); + } + let buf; + if (byteOffset === void 0 && length === void 0) { + buf = new Uint8Array(array); + } else if (length === void 0) { + buf = new Uint8Array(array, byteOffset); + } else { + buf = new Uint8Array(array, byteOffset, length); + } + Object.setPrototypeOf(buf, Buffer2.prototype); + return buf; + } + function fromObject(obj) { + if (Buffer2.isBuffer(obj)) { + const len = checked(obj.length) | 0; + const buf = createBuffer(len); + if (buf.length === 0) { + return buf; + } + obj.copy(buf, 0, 0, len); + return buf; + } + if (obj.length !== void 0) { + if (typeof obj.length !== "number" || numberIsNaN(obj.length)) { + return createBuffer(0); + } + return fromArrayLike(obj); + } + if (obj.type === "Buffer" && Array.isArray(obj.data)) { + return fromArrayLike(obj.data); + } + } + function checked(length) { + if (length >= K_MAX_LENGTH) { + throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes"); + } + return length | 0; + } + function SlowBuffer(length) { + if (+length != length) { + length = 0; + } + return Buffer2.alloc(+length); + } + Buffer2.isBuffer = function isBuffer(b) { + return b != null && b._isBuffer === true && b !== Buffer2.prototype; + }; + Buffer2.compare = function compare(a, b) { + if (isInstance(a, Uint8Array)) + a = Buffer2.from(a, a.offset, a.byteLength); + if (isInstance(b, Uint8Array)) + b = Buffer2.from(b, b.offset, b.byteLength); + if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ); + } + if (a === b) + return 0; + let x = a.length; + let y = b.length; + for (let i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break; + } + } + if (x < y) + return -1; + if (y < x) + return 1; + return 0; + }; + Buffer2.isEncoding = function isEncoding(encoding) { + switch (String(encoding).toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "latin1": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return true; + default: + return false; + } + }; + Buffer2.concat = function concat(list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers'); + } + if (list.length === 0) { + return Buffer2.alloc(0); + } + let i; + if (length === void 0) { + length = 0; + for (i = 0; i < list.length; ++i) { + length += list[i].length; + } + } + const buffer2 = Buffer2.allocUnsafe(length); + let pos = 0; + for (i = 0; i < list.length; ++i) { + let buf = list[i]; + if (isInstance(buf, Uint8Array)) { + if (pos + buf.length > buffer2.length) { + if (!Buffer2.isBuffer(buf)) + buf = Buffer2.from(buf); + buf.copy(buffer2, pos); + } else { + Uint8Array.prototype.set.call( + buffer2, + buf, + pos + ); + } + } else if (!Buffer2.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers'); + } else { + buf.copy(buffer2, pos); + } + pos += buf.length; + } + return buffer2; + }; + function byteLength(string, encoding) { + if (Buffer2.isBuffer(string)) { + return string.length; + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength; + } + if (typeof string !== "string") { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string + ); + } + const len = string.length; + const mustMatch = arguments.length > 2 && arguments[2] === true; + if (!mustMatch && len === 0) + return 0; + let loweredCase = false; + for (; ; ) { + switch (encoding) { + case "ascii": + case "latin1": + case "binary": + return len; + case "utf8": + case "utf-8": + return utf8ToBytes(string).length; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return len * 2; + case "hex": + return len >>> 1; + case "base64": + return base64ToBytes(string).length; + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length; + } + encoding = ("" + encoding).toLowerCase(); + loweredCase = true; + } + } + } + Buffer2.byteLength = byteLength; + function slowToString(encoding, start, end) { + let loweredCase = false; + if (start === void 0 || start < 0) { + start = 0; + } + if (start > this.length) { + return ""; + } + if (end === void 0 || end > this.length) { + end = this.length; + } + if (end <= 0) { + return ""; + } + end >>>= 0; + start >>>= 0; + if (end <= start) { + return ""; + } + if (!encoding) + encoding = "utf8"; + while (true) { + switch (encoding) { + case "hex": + return hexSlice(this, start, end); + case "utf8": + case "utf-8": + return utf8Slice(this, start, end); + case "ascii": + return asciiSlice(this, start, end); + case "latin1": + case "binary": + return latin1Slice(this, start, end); + case "base64": + return base64Slice(this, start, end); + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return utf16leSlice(this, start, end); + default: + if (loweredCase) + throw new TypeError("Unknown encoding: " + encoding); + encoding = (encoding + "").toLowerCase(); + loweredCase = true; + } + } + } + Buffer2.prototype._isBuffer = true; + function swap(b, n, m) { + const i = b[n]; + b[n] = b[m]; + b[m] = i; + } + Buffer2.prototype.swap16 = function swap16() { + const len = this.length; + if (len % 2 !== 0) { + throw new RangeError("Buffer size must be a multiple of 16-bits"); + } + for (let i = 0; i < len; i += 2) { + swap(this, i, i + 1); + } + return this; + }; + Buffer2.prototype.swap32 = function swap32() { + const len = this.length; + if (len % 4 !== 0) { + throw new RangeError("Buffer size must be a multiple of 32-bits"); + } + for (let i = 0; i < len; i += 4) { + swap(this, i, i + 3); + swap(this, i + 1, i + 2); + } + return this; + }; + Buffer2.prototype.swap64 = function swap64() { + const len = this.length; + if (len % 8 !== 0) { + throw new RangeError("Buffer size must be a multiple of 64-bits"); + } + for (let i = 0; i < len; i += 8) { + swap(this, i, i + 7); + swap(this, i + 1, i + 6); + swap(this, i + 2, i + 5); + swap(this, i + 3, i + 4); + } + return this; + }; + Buffer2.prototype.toString = function toString() { + const length = this.length; + if (length === 0) + return ""; + if (arguments.length === 0) + return utf8Slice(this, 0, length); + return slowToString.apply(this, arguments); + }; + Buffer2.prototype.toLocaleString = Buffer2.prototype.toString; + Buffer2.prototype.equals = function equals3(b) { + if (!Buffer2.isBuffer(b)) + throw new TypeError("Argument must be a Buffer"); + if (this === b) + return true; + return Buffer2.compare(this, b) === 0; + }; + Buffer2.prototype.inspect = function inspect() { + let str = ""; + const max = exports2.INSPECT_MAX_BYTES; + str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim(); + if (this.length > max) + str += " ... "; + return ""; + }; + if (customInspectSymbol) { + Buffer2.prototype[customInspectSymbol] = Buffer2.prototype.inspect; + } + Buffer2.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer2.from(target, target.offset, target.byteLength); + } + if (!Buffer2.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target + ); + } + if (start === void 0) { + start = 0; + } + if (end === void 0) { + end = target ? target.length : 0; + } + if (thisStart === void 0) { + thisStart = 0; + } + if (thisEnd === void 0) { + thisEnd = this.length; + } + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError("out of range index"); + } + if (thisStart >= thisEnd && start >= end) { + return 0; + } + if (thisStart >= thisEnd) { + return -1; + } + if (start >= end) { + return 1; + } + start >>>= 0; + end >>>= 0; + thisStart >>>= 0; + thisEnd >>>= 0; + if (this === target) + return 0; + let x = thisEnd - thisStart; + let y = end - start; + const len = Math.min(x, y); + const thisCopy = this.slice(thisStart, thisEnd); + const targetCopy = target.slice(start, end); + for (let i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i]; + y = targetCopy[i]; + break; + } + } + if (x < y) + return -1; + if (y < x) + return 1; + return 0; + }; + function bidirectionalIndexOf(buffer2, val, byteOffset, encoding, dir) { + if (buffer2.length === 0) + return -1; + if (typeof byteOffset === "string") { + encoding = byteOffset; + byteOffset = 0; + } else if (byteOffset > 2147483647) { + byteOffset = 2147483647; + } else if (byteOffset < -2147483648) { + byteOffset = -2147483648; + } + byteOffset = +byteOffset; + if (numberIsNaN(byteOffset)) { + byteOffset = dir ? 0 : buffer2.length - 1; + } + if (byteOffset < 0) + byteOffset = buffer2.length + byteOffset; + if (byteOffset >= buffer2.length) { + if (dir) + return -1; + else + byteOffset = buffer2.length - 1; + } else if (byteOffset < 0) { + if (dir) + byteOffset = 0; + else + return -1; + } + if (typeof val === "string") { + val = Buffer2.from(val, encoding); + } + if (Buffer2.isBuffer(val)) { + if (val.length === 0) { + return -1; + } + return arrayIndexOf(buffer2, val, byteOffset, encoding, dir); + } else if (typeof val === "number") { + val = val & 255; + if (typeof Uint8Array.prototype.indexOf === "function") { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer2, val, byteOffset); + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer2, val, byteOffset); + } + } + return arrayIndexOf(buffer2, [val], byteOffset, encoding, dir); + } + throw new TypeError("val must be string, number or Buffer"); + } + function arrayIndexOf(arr, val, byteOffset, encoding, dir) { + let indexSize = 1; + let arrLength = arr.length; + let valLength = val.length; + if (encoding !== void 0) { + encoding = String(encoding).toLowerCase(); + if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") { + if (arr.length < 2 || val.length < 2) { + return -1; + } + indexSize = 2; + arrLength /= 2; + valLength /= 2; + byteOffset /= 2; + } + } + function read(buf, i2) { + if (indexSize === 1) { + return buf[i2]; + } else { + return buf.readUInt16BE(i2 * indexSize); + } + } + let i; + if (dir) { + let foundIndex = -1; + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) + foundIndex = i; + if (i - foundIndex + 1 === valLength) + return foundIndex * indexSize; + } else { + if (foundIndex !== -1) + i -= i - foundIndex; + foundIndex = -1; + } + } + } else { + if (byteOffset + valLength > arrLength) + byteOffset = arrLength - valLength; + for (i = byteOffset; i >= 0; i--) { + let found = true; + for (let j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false; + break; + } + } + if (found) + return i; + } + } + return -1; + } + Buffer2.prototype.includes = function includes(val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1; + }; + Buffer2.prototype.indexOf = function indexOf(val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true); + }; + Buffer2.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false); + }; + function hexWrite(buf, string, offset, length) { + offset = Number(offset) || 0; + const remaining = buf.length - offset; + if (!length) { + length = remaining; + } else { + length = Number(length); + if (length > remaining) { + length = remaining; + } + } + const strLen = string.length; + if (length > strLen / 2) { + length = strLen / 2; + } + let i; + for (i = 0; i < length; ++i) { + const parsed = parseInt(string.substr(i * 2, 2), 16); + if (numberIsNaN(parsed)) + return i; + buf[offset + i] = parsed; + } + return i; + } + function utf8Write(buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length); + } + function asciiWrite(buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length); + } + function base64Write(buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length); + } + function ucs2Write(buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length); + } + Buffer2.prototype.write = function write(string, offset, length, encoding) { + if (offset === void 0) { + encoding = "utf8"; + length = this.length; + offset = 0; + } else if (length === void 0 && typeof offset === "string") { + encoding = offset; + length = this.length; + offset = 0; + } else if (isFinite(offset)) { + offset = offset >>> 0; + if (isFinite(length)) { + length = length >>> 0; + if (encoding === void 0) + encoding = "utf8"; + } else { + encoding = length; + length = void 0; + } + } else { + throw new Error( + "Buffer.write(string, encoding, offset[, length]) is no longer supported" + ); + } + const remaining = this.length - offset; + if (length === void 0 || length > remaining) + length = remaining; + if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) { + throw new RangeError("Attempt to write outside buffer bounds"); + } + if (!encoding) + encoding = "utf8"; + let loweredCase = false; + for (; ; ) { + switch (encoding) { + case "hex": + return hexWrite(this, string, offset, length); + case "utf8": + case "utf-8": + return utf8Write(this, string, offset, length); + case "ascii": + case "latin1": + case "binary": + return asciiWrite(this, string, offset, length); + case "base64": + return base64Write(this, string, offset, length); + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return ucs2Write(this, string, offset, length); + default: + if (loweredCase) + throw new TypeError("Unknown encoding: " + encoding); + encoding = ("" + encoding).toLowerCase(); + loweredCase = true; + } + } + }; + Buffer2.prototype.toJSON = function toJSON() { + return { + type: "Buffer", + data: Array.prototype.slice.call(this._arr || this, 0) + }; + }; + function base64Slice(buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf); + } else { + return base64.fromByteArray(buf.slice(start, end)); + } + } + function utf8Slice(buf, start, end) { + end = Math.min(buf.length, end); + const res = []; + let i = start; + while (i < end) { + const firstByte = buf[i]; + let codePoint = null; + let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1; + if (i + bytesPerSequence <= end) { + let secondByte, thirdByte, fourthByte, tempCodePoint; + switch (bytesPerSequence) { + case 1: + if (firstByte < 128) { + codePoint = firstByte; + } + break; + case 2: + secondByte = buf[i + 1]; + if ((secondByte & 192) === 128) { + tempCodePoint = (firstByte & 31) << 6 | secondByte & 63; + if (tempCodePoint > 127) { + codePoint = tempCodePoint; + } + } + break; + case 3: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) { + tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63; + if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) { + codePoint = tempCodePoint; + } + } + break; + case 4: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + fourthByte = buf[i + 3]; + if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) { + tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63; + if (tempCodePoint > 65535 && tempCodePoint < 1114112) { + codePoint = tempCodePoint; + } + } + } + } + if (codePoint === null) { + codePoint = 65533; + bytesPerSequence = 1; + } else if (codePoint > 65535) { + codePoint -= 65536; + res.push(codePoint >>> 10 & 1023 | 55296); + codePoint = 56320 | codePoint & 1023; + } + res.push(codePoint); + i += bytesPerSequence; + } + return decodeCodePointsArray(res); + } + var MAX_ARGUMENTS_LENGTH = 4096; + function decodeCodePointsArray(codePoints) { + const len = codePoints.length; + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints); + } + let res = ""; + let i = 0; + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ); + } + return res; + } + function asciiSlice(buf, start, end) { + let ret = ""; + end = Math.min(buf.length, end); + for (let i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 127); + } + return ret; + } + function latin1Slice(buf, start, end) { + let ret = ""; + end = Math.min(buf.length, end); + for (let i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]); + } + return ret; + } + function hexSlice(buf, start, end) { + const len = buf.length; + if (!start || start < 0) + start = 0; + if (!end || end < 0 || end > len) + end = len; + let out = ""; + for (let i = start; i < end; ++i) { + out += hexSliceLookupTable[buf[i]]; + } + return out; + } + function utf16leSlice(buf, start, end) { + const bytes = buf.slice(start, end); + let res = ""; + for (let i = 0; i < bytes.length - 1; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); + } + return res; + } + Buffer2.prototype.slice = function slice(start, end) { + const len = this.length; + start = ~~start; + end = end === void 0 ? len : ~~end; + if (start < 0) { + start += len; + if (start < 0) + start = 0; + } else if (start > len) { + start = len; + } + if (end < 0) { + end += len; + if (end < 0) + end = 0; + } else if (end > len) { + end = len; + } + if (end < start) + end = start; + const newBuf = this.subarray(start, end); + Object.setPrototypeOf(newBuf, Buffer2.prototype); + return newBuf; + }; + function checkOffset(offset, ext, length) { + if (offset % 1 !== 0 || offset < 0) + throw new RangeError("offset is not uint"); + if (offset + ext > length) + throw new RangeError("Trying to access beyond buffer length"); + } + Buffer2.prototype.readUintLE = Buffer2.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) { + offset = offset >>> 0; + byteLength2 = byteLength2 >>> 0; + if (!noAssert) + checkOffset(offset, byteLength2, this.length); + let val = this[offset]; + let mul = 1; + let i = 0; + while (++i < byteLength2 && (mul *= 256)) { + val += this[offset + i] * mul; + } + return val; + }; + Buffer2.prototype.readUintBE = Buffer2.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) { + offset = offset >>> 0; + byteLength2 = byteLength2 >>> 0; + if (!noAssert) { + checkOffset(offset, byteLength2, this.length); + } + let val = this[offset + --byteLength2]; + let mul = 1; + while (byteLength2 > 0 && (mul *= 256)) { + val += this[offset + --byteLength2] * mul; + } + return val; + }; + Buffer2.prototype.readUint8 = Buffer2.prototype.readUInt8 = function readUInt8(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 1, this.length); + return this[offset]; + }; + Buffer2.prototype.readUint16LE = Buffer2.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 2, this.length); + return this[offset] | this[offset + 1] << 8; + }; + Buffer2.prototype.readUint16BE = Buffer2.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 2, this.length); + return this[offset] << 8 | this[offset + 1]; + }; + Buffer2.prototype.readUint32LE = Buffer2.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 4, this.length); + return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216; + }; + Buffer2.prototype.readUint32BE = Buffer2.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 4, this.length); + return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); + }; + Buffer2.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) { + offset = offset >>> 0; + validateNumber(offset, "offset"); + const first2 = this[offset]; + const last2 = this[offset + 7]; + if (first2 === void 0 || last2 === void 0) { + boundsError(offset, this.length - 8); + } + const lo = first2 + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24; + const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last2 * 2 ** 24; + return BigInt(lo) + (BigInt(hi) << BigInt(32)); + }); + Buffer2.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) { + offset = offset >>> 0; + validateNumber(offset, "offset"); + const first2 = this[offset]; + const last2 = this[offset + 7]; + if (first2 === void 0 || last2 === void 0) { + boundsError(offset, this.length - 8); + } + const hi = first2 * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset]; + const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last2; + return (BigInt(hi) << BigInt(32)) + BigInt(lo); + }); + Buffer2.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) { + offset = offset >>> 0; + byteLength2 = byteLength2 >>> 0; + if (!noAssert) + checkOffset(offset, byteLength2, this.length); + let val = this[offset]; + let mul = 1; + let i = 0; + while (++i < byteLength2 && (mul *= 256)) { + val += this[offset + i] * mul; + } + mul *= 128; + if (val >= mul) + val -= Math.pow(2, 8 * byteLength2); + return val; + }; + Buffer2.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) { + offset = offset >>> 0; + byteLength2 = byteLength2 >>> 0; + if (!noAssert) + checkOffset(offset, byteLength2, this.length); + let i = byteLength2; + let mul = 1; + let val = this[offset + --i]; + while (i > 0 && (mul *= 256)) { + val += this[offset + --i] * mul; + } + mul *= 128; + if (val >= mul) + val -= Math.pow(2, 8 * byteLength2); + return val; + }; + Buffer2.prototype.readInt8 = function readInt8(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 1, this.length); + if (!(this[offset] & 128)) + return this[offset]; + return (255 - this[offset] + 1) * -1; + }; + Buffer2.prototype.readInt16LE = function readInt16LE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 2, this.length); + const val = this[offset] | this[offset + 1] << 8; + return val & 32768 ? val | 4294901760 : val; + }; + Buffer2.prototype.readInt16BE = function readInt16BE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 2, this.length); + const val = this[offset + 1] | this[offset] << 8; + return val & 32768 ? val | 4294901760 : val; + }; + Buffer2.prototype.readInt32LE = function readInt32LE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 4, this.length); + return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; + }; + Buffer2.prototype.readInt32BE = function readInt32BE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 4, this.length); + return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; + }; + Buffer2.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) { + offset = offset >>> 0; + validateNumber(offset, "offset"); + const first2 = this[offset]; + const last2 = this[offset + 7]; + if (first2 === void 0 || last2 === void 0) { + boundsError(offset, this.length - 8); + } + const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last2 << 24); + return (BigInt(val) << BigInt(32)) + BigInt(first2 + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24); + }); + Buffer2.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) { + offset = offset >>> 0; + validateNumber(offset, "offset"); + const first2 = this[offset]; + const last2 = this[offset + 7]; + if (first2 === void 0 || last2 === void 0) { + boundsError(offset, this.length - 8); + } + const val = (first2 << 24) + // Overflow + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset]; + return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last2); + }); + Buffer2.prototype.readFloatLE = function readFloatLE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 4, this.length); + return ieee754.read(this, offset, true, 23, 4); + }; + Buffer2.prototype.readFloatBE = function readFloatBE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 4, this.length); + return ieee754.read(this, offset, false, 23, 4); + }; + Buffer2.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 8, this.length); + return ieee754.read(this, offset, true, 52, 8); + }; + Buffer2.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) + checkOffset(offset, 8, this.length); + return ieee754.read(this, offset, false, 52, 8); + }; + function checkInt(buf, value, offset, ext, max, min) { + if (!Buffer2.isBuffer(buf)) + throw new TypeError('"buffer" argument must be a Buffer instance'); + if (value > max || value < min) + throw new RangeError('"value" argument is out of bounds'); + if (offset + ext > buf.length) + throw new RangeError("Index out of range"); + } + Buffer2.prototype.writeUintLE = Buffer2.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) { + value = +value; + offset = offset >>> 0; + byteLength2 = byteLength2 >>> 0; + if (!noAssert) { + const maxBytes = Math.pow(2, 8 * byteLength2) - 1; + checkInt(this, value, offset, byteLength2, maxBytes, 0); + } + let mul = 1; + let i = 0; + this[offset] = value & 255; + while (++i < byteLength2 && (mul *= 256)) { + this[offset + i] = value / mul & 255; + } + return offset + byteLength2; + }; + Buffer2.prototype.writeUintBE = Buffer2.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) { + value = +value; + offset = offset >>> 0; + byteLength2 = byteLength2 >>> 0; + if (!noAssert) { + const maxBytes = Math.pow(2, 8 * byteLength2) - 1; + checkInt(this, value, offset, byteLength2, maxBytes, 0); + } + let i = byteLength2 - 1; + let mul = 1; + this[offset + i] = value & 255; + while (--i >= 0 && (mul *= 256)) { + this[offset + i] = value / mul & 255; + } + return offset + byteLength2; + }; + Buffer2.prototype.writeUint8 = Buffer2.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) + checkInt(this, value, offset, 1, 255, 0); + this[offset] = value & 255; + return offset + 1; + }; + Buffer2.prototype.writeUint16LE = Buffer2.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) + checkInt(this, value, offset, 2, 65535, 0); + this[offset] = value & 255; + this[offset + 1] = value >>> 8; + return offset + 2; + }; + Buffer2.prototype.writeUint16BE = Buffer2.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) + checkInt(this, value, offset, 2, 65535, 0); + this[offset] = value >>> 8; + this[offset + 1] = value & 255; + return offset + 2; + }; + Buffer2.prototype.writeUint32LE = Buffer2.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) + checkInt(this, value, offset, 4, 4294967295, 0); + this[offset + 3] = value >>> 24; + this[offset + 2] = value >>> 16; + this[offset + 1] = value >>> 8; + this[offset] = value & 255; + return offset + 4; + }; + Buffer2.prototype.writeUint32BE = Buffer2.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) + checkInt(this, value, offset, 4, 4294967295, 0); + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 255; + return offset + 4; + }; + function wrtBigUInt64LE(buf, value, offset, min, max) { + checkIntBI(value, min, max, buf, offset, 7); + let lo = Number(value & BigInt(4294967295)); + buf[offset++] = lo; + lo = lo >> 8; + buf[offset++] = lo; + lo = lo >> 8; + buf[offset++] = lo; + lo = lo >> 8; + buf[offset++] = lo; + let hi = Number(value >> BigInt(32) & BigInt(4294967295)); + buf[offset++] = hi; + hi = hi >> 8; + buf[offset++] = hi; + hi = hi >> 8; + buf[offset++] = hi; + hi = hi >> 8; + buf[offset++] = hi; + return offset; + } + function wrtBigUInt64BE(buf, value, offset, min, max) { + checkIntBI(value, min, max, buf, offset, 7); + let lo = Number(value & BigInt(4294967295)); + buf[offset + 7] = lo; + lo = lo >> 8; + buf[offset + 6] = lo; + lo = lo >> 8; + buf[offset + 5] = lo; + lo = lo >> 8; + buf[offset + 4] = lo; + let hi = Number(value >> BigInt(32) & BigInt(4294967295)); + buf[offset + 3] = hi; + hi = hi >> 8; + buf[offset + 2] = hi; + hi = hi >> 8; + buf[offset + 1] = hi; + hi = hi >> 8; + buf[offset] = hi; + return offset + 8; + } + Buffer2.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset = 0) { + return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff")); + }); + Buffer2.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset = 0) { + return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff")); + }); + Buffer2.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + const limit = Math.pow(2, 8 * byteLength2 - 1); + checkInt(this, value, offset, byteLength2, limit - 1, -limit); + } + let i = 0; + let mul = 1; + let sub = 0; + this[offset] = value & 255; + while (++i < byteLength2 && (mul *= 256)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1; + } + this[offset + i] = (value / mul >> 0) - sub & 255; + } + return offset + byteLength2; + }; + Buffer2.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + const limit = Math.pow(2, 8 * byteLength2 - 1); + checkInt(this, value, offset, byteLength2, limit - 1, -limit); + } + let i = byteLength2 - 1; + let mul = 1; + let sub = 0; + this[offset + i] = value & 255; + while (--i >= 0 && (mul *= 256)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1; + } + this[offset + i] = (value / mul >> 0) - sub & 255; + } + return offset + byteLength2; + }; + Buffer2.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) + checkInt(this, value, offset, 1, 127, -128); + if (value < 0) + value = 255 + value + 1; + this[offset] = value & 255; + return offset + 1; + }; + Buffer2.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) + checkInt(this, value, offset, 2, 32767, -32768); + this[offset] = value & 255; + this[offset + 1] = value >>> 8; + return offset + 2; + }; + Buffer2.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) + checkInt(this, value, offset, 2, 32767, -32768); + this[offset] = value >>> 8; + this[offset + 1] = value & 255; + return offset + 2; + }; + Buffer2.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) + checkInt(this, value, offset, 4, 2147483647, -2147483648); + this[offset] = value & 255; + this[offset + 1] = value >>> 8; + this[offset + 2] = value >>> 16; + this[offset + 3] = value >>> 24; + return offset + 4; + }; + Buffer2.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) + checkInt(this, value, offset, 4, 2147483647, -2147483648); + if (value < 0) + value = 4294967295 + value + 1; + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 255; + return offset + 4; + }; + Buffer2.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset = 0) { + return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); + }); + Buffer2.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset = 0) { + return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff")); + }); + function checkIEEE754(buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) + throw new RangeError("Index out of range"); + if (offset < 0) + throw new RangeError("Index out of range"); + } + function writeFloat(buf, value, offset, littleEndian, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 34028234663852886e22, -34028234663852886e22); + } + ieee754.write(buf, value, offset, littleEndian, 23, 4); + return offset + 4; + } + Buffer2.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert); + }; + Buffer2.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert); + }; + function writeDouble(buf, value, offset, littleEndian, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 17976931348623157e292, -17976931348623157e292); + } + ieee754.write(buf, value, offset, littleEndian, 52, 8); + return offset + 8; + } + Buffer2.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert); + }; + Buffer2.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert); + }; + Buffer2.prototype.copy = function copy2(target, targetStart, start, end) { + if (!Buffer2.isBuffer(target)) + throw new TypeError("argument should be a Buffer"); + if (!start) + start = 0; + if (!end && end !== 0) + end = this.length; + if (targetStart >= target.length) + targetStart = target.length; + if (!targetStart) + targetStart = 0; + if (end > 0 && end < start) + end = start; + if (end === start) + return 0; + if (target.length === 0 || this.length === 0) + return 0; + if (targetStart < 0) { + throw new RangeError("targetStart out of bounds"); + } + if (start < 0 || start >= this.length) + throw new RangeError("Index out of range"); + if (end < 0) + throw new RangeError("sourceEnd out of bounds"); + if (end > this.length) + end = this.length; + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start; + } + const len = end - start; + if (this === target && typeof Uint8Array.prototype.copyWithin === "function") { + this.copyWithin(targetStart, start, end); + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ); + } + return len; + }; + Buffer2.prototype.fill = function fill(val, start, end, encoding) { + if (typeof val === "string") { + if (typeof start === "string") { + encoding = start; + start = 0; + end = this.length; + } else if (typeof end === "string") { + encoding = end; + end = this.length; + } + if (encoding !== void 0 && typeof encoding !== "string") { + throw new TypeError("encoding must be a string"); + } + if (typeof encoding === "string" && !Buffer2.isEncoding(encoding)) { + throw new TypeError("Unknown encoding: " + encoding); + } + if (val.length === 1) { + const code = val.charCodeAt(0); + if (encoding === "utf8" && code < 128 || encoding === "latin1") { + val = code; + } + } + } else if (typeof val === "number") { + val = val & 255; + } else if (typeof val === "boolean") { + val = Number(val); + } + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError("Out of range index"); + } + if (end <= start) { + return this; + } + start = start >>> 0; + end = end === void 0 ? this.length : end >>> 0; + if (!val) + val = 0; + let i; + if (typeof val === "number") { + for (i = start; i < end; ++i) { + this[i] = val; + } + } else { + const bytes = Buffer2.isBuffer(val) ? val : Buffer2.from(val, encoding); + const len = bytes.length; + if (len === 0) { + throw new TypeError('The value "' + val + '" is invalid for argument "value"'); + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len]; + } + } + return this; + }; + var errors = {}; + function E(sym, getMessage, Base) { + errors[sym] = class NodeError extends Base { + constructor() { + super(); + Object.defineProperty(this, "message", { + value: getMessage.apply(this, arguments), + writable: true, + configurable: true + }); + this.name = `${this.name} [${sym}]`; + this.stack; + delete this.name; + } + get code() { + return sym; + } + set code(value) { + Object.defineProperty(this, "code", { + configurable: true, + enumerable: true, + value, + writable: true + }); + } + toString() { + return `${this.name} [${sym}]: ${this.message}`; + } + }; + } + E( + "ERR_BUFFER_OUT_OF_BOUNDS", + function(name) { + if (name) { + return `${name} is outside of buffer bounds`; + } + return "Attempt to access memory outside buffer bounds"; + }, + RangeError + ); + E( + "ERR_INVALID_ARG_TYPE", + function(name, actual) { + return `The "${name}" argument must be of type number. Received type ${typeof actual}`; + }, + TypeError + ); + E( + "ERR_OUT_OF_RANGE", + function(str, range, input) { + let msg = `The value of "${str}" is out of range.`; + let received = input; + if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) { + received = addNumericalSeparator(String(input)); + } else if (typeof input === "bigint") { + received = String(input); + if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) { + received = addNumericalSeparator(received); + } + received += "n"; + } + msg += ` It must be ${range}. Received ${received}`; + return msg; + }, + RangeError + ); + function addNumericalSeparator(val) { + let res = ""; + let i = val.length; + const start = val[0] === "-" ? 1 : 0; + for (; i >= start + 4; i -= 3) { + res = `_${val.slice(i - 3, i)}${res}`; + } + return `${val.slice(0, i)}${res}`; + } + function checkBounds(buf, offset, byteLength2) { + validateNumber(offset, "offset"); + if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) { + boundsError(offset, buf.length - (byteLength2 + 1)); + } + } + function checkIntBI(value, min, max, buf, offset, byteLength2) { + if (value > max || value < min) { + const n = typeof min === "bigint" ? "n" : ""; + let range; + if (byteLength2 > 3) { + if (min === 0 || min === BigInt(0)) { + range = `>= 0${n} and < 2${n} ** ${(byteLength2 + 1) * 8}${n}`; + } else { + range = `>= -(2${n} ** ${(byteLength2 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n}`; + } + } else { + range = `>= ${min}${n} and <= ${max}${n}`; + } + throw new errors.ERR_OUT_OF_RANGE("value", range, value); + } + checkBounds(buf, offset, byteLength2); + } + function validateNumber(value, name) { + if (typeof value !== "number") { + throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value); + } + } + function boundsError(value, length, type) { + if (Math.floor(value) !== value) { + validateNumber(value, type); + throw new errors.ERR_OUT_OF_RANGE(type || "offset", "an integer", value); + } + if (length < 0) { + throw new errors.ERR_BUFFER_OUT_OF_BOUNDS(); + } + throw new errors.ERR_OUT_OF_RANGE( + type || "offset", + `>= ${type ? 1 : 0} and <= ${length}`, + value + ); + } + var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g; + function base64clean(str) { + str = str.split("=")[0]; + str = str.trim().replace(INVALID_BASE64_RE, ""); + if (str.length < 2) + return ""; + while (str.length % 4 !== 0) { + str = str + "="; + } + return str; + } + function utf8ToBytes(string, units) { + units = units || Infinity; + let codePoint; + const length = string.length; + let leadSurrogate = null; + const bytes = []; + for (let i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i); + if (codePoint > 55295 && codePoint < 57344) { + if (!leadSurrogate) { + if (codePoint > 56319) { + if ((units -= 3) > -1) + bytes.push(239, 191, 189); + continue; + } else if (i + 1 === length) { + if ((units -= 3) > -1) + bytes.push(239, 191, 189); + continue; + } + leadSurrogate = codePoint; + continue; + } + if (codePoint < 56320) { + if ((units -= 3) > -1) + bytes.push(239, 191, 189); + leadSurrogate = codePoint; + continue; + } + codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536; + } else if (leadSurrogate) { + if ((units -= 3) > -1) + bytes.push(239, 191, 189); + } + leadSurrogate = null; + if (codePoint < 128) { + if ((units -= 1) < 0) + break; + bytes.push(codePoint); + } else if (codePoint < 2048) { + if ((units -= 2) < 0) + break; + bytes.push( + codePoint >> 6 | 192, + codePoint & 63 | 128 + ); + } else if (codePoint < 65536) { + if ((units -= 3) < 0) + break; + bytes.push( + codePoint >> 12 | 224, + codePoint >> 6 & 63 | 128, + codePoint & 63 | 128 + ); + } else if (codePoint < 1114112) { + if ((units -= 4) < 0) + break; + bytes.push( + codePoint >> 18 | 240, + codePoint >> 12 & 63 | 128, + codePoint >> 6 & 63 | 128, + codePoint & 63 | 128 + ); + } else { + throw new Error("Invalid code point"); + } + } + return bytes; + } + function asciiToBytes(str) { + const byteArray = []; + for (let i = 0; i < str.length; ++i) { + byteArray.push(str.charCodeAt(i) & 255); + } + return byteArray; + } + function utf16leToBytes(str, units) { + let c, hi, lo; + const byteArray = []; + for (let i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) + break; + c = str.charCodeAt(i); + hi = c >> 8; + lo = c % 256; + byteArray.push(lo); + byteArray.push(hi); + } + return byteArray; + } + function base64ToBytes(str) { + return base64.toByteArray(base64clean(str)); + } + function blitBuffer(src, dst, offset, length) { + let i; + for (i = 0; i < length; ++i) { + if (i + offset >= dst.length || i >= src.length) + break; + dst[i + offset] = src[i]; + } + return i; + } + function isInstance(obj, type) { + return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name; + } + function numberIsNaN(obj) { + return obj !== obj; + } + var hexSliceLookupTable = function() { + const alphabet = "0123456789abcdef"; + const table = new Array(256); + for (let i = 0; i < 16; ++i) { + const i16 = i * 16; + for (let j = 0; j < 16; ++j) { + table[i16 + j] = alphabet[i] + alphabet[j]; + } + } + return table; + }(); + function defineBigIntMethod(fn) { + return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn; + } + function BufferBigIntNotDefined() { + throw new Error("BigInt not supported"); + } + } +}); + +// polyfill_buffer.js +var import_obsidian, buffer, Buffer; +var init_polyfill_buffer = __esm({ + "polyfill_buffer.js"() { + import_obsidian = require("obsidian"); + if (import_obsidian.Platform.isMobileApp) { + buffer = require_buffer().Buffer; + } else { + buffer = global.Buffer; + } + Buffer = buffer; + } +}); + +// node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/lib/index.js +var require_lib = __commonJS({ + "node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/lib/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var AsyncLock2 = function(opts) { + opts = opts || {}; + this.Promise = opts.Promise || Promise; + this.queues = /* @__PURE__ */ Object.create(null); + this.domainReentrant = opts.domainReentrant || false; + if (this.domainReentrant) { + if (typeof process === "undefined" || typeof process.domain === "undefined") { + throw new Error( + "Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, use a NodeJS version that still implements Domain, or install a browser polyfill." + ); + } + this.domains = /* @__PURE__ */ Object.create(null); + } + this.timeout = opts.timeout || AsyncLock2.DEFAULT_TIMEOUT; + this.maxOccupationTime = opts.maxOccupationTime || AsyncLock2.DEFAULT_MAX_OCCUPATION_TIME; + this.maxExecutionTime = opts.maxExecutionTime || AsyncLock2.DEFAULT_MAX_EXECUTION_TIME; + if (opts.maxPending === Infinity || Number.isInteger(opts.maxPending) && opts.maxPending >= 0) { + this.maxPending = opts.maxPending; + } else { + this.maxPending = AsyncLock2.DEFAULT_MAX_PENDING; + } + }; + AsyncLock2.DEFAULT_TIMEOUT = 0; + AsyncLock2.DEFAULT_MAX_OCCUPATION_TIME = 0; + AsyncLock2.DEFAULT_MAX_EXECUTION_TIME = 0; + AsyncLock2.DEFAULT_MAX_PENDING = 1e3; + AsyncLock2.prototype.acquire = function(key2, fn, cb, opts) { + if (Array.isArray(key2)) { + return this._acquireBatch(key2, fn, cb, opts); + } + if (typeof fn !== "function") { + throw new Error("You must pass a function to execute"); + } + var deferredResolve = null; + var deferredReject = null; + var deferred2 = null; + if (typeof cb !== "function") { + opts = cb; + cb = null; + deferred2 = new this.Promise(function(resolve, reject) { + deferredResolve = resolve; + deferredReject = reject; + }); + } + opts = opts || {}; + var resolved = false; + var timer = null; + var occupationTimer = null; + var executionTimer = null; + var self2 = this; + var done = function(locked, err, ret) { + if (occupationTimer) { + clearTimeout(occupationTimer); + occupationTimer = null; + } + if (executionTimer) { + clearTimeout(executionTimer); + executionTimer = null; + } + if (locked) { + if (!!self2.queues[key2] && self2.queues[key2].length === 0) { + delete self2.queues[key2]; + } + if (self2.domainReentrant) { + delete self2.domains[key2]; + } + } + if (!resolved) { + if (!deferred2) { + if (typeof cb === "function") { + cb(err, ret); + } + } else { + if (err) { + deferredReject(err); + } else { + deferredResolve(ret); + } + } + resolved = true; + } + if (locked) { + if (!!self2.queues[key2] && self2.queues[key2].length > 0) { + self2.queues[key2].shift()(); + } + } + }; + var exec = function(locked) { + if (resolved) { + return done(locked); + } + if (timer) { + clearTimeout(timer); + timer = null; + } + if (self2.domainReentrant && locked) { + self2.domains[key2] = process.domain; + } + var maxExecutionTime = opts.maxExecutionTime || self2.maxExecutionTime; + if (maxExecutionTime) { + executionTimer = setTimeout(function() { + if (!!self2.queues[key2]) { + done(locked, new Error("Maximum execution time is exceeded " + key2)); + } + }, maxExecutionTime); + } + if (fn.length === 1) { + var called = false; + try { + fn(function(err, ret) { + if (!called) { + called = true; + done(locked, err, ret); + } + }); + } catch (err) { + if (!called) { + called = true; + done(locked, err); + } + } + } else { + self2._promiseTry(function() { + return fn(); + }).then(function(ret) { + done(locked, void 0, ret); + }, function(error) { + done(locked, error); + }); + } + }; + if (self2.domainReentrant && !!process.domain) { + exec = process.domain.bind(exec); + } + var maxPending = opts.maxPending || self2.maxPending; + if (!self2.queues[key2]) { + self2.queues[key2] = []; + exec(true); + } else if (self2.domainReentrant && !!process.domain && process.domain === self2.domains[key2]) { + exec(false); + } else if (self2.queues[key2].length >= maxPending) { + done(false, new Error("Too many pending tasks in queue " + key2)); + } else { + var taskFn = function() { + exec(true); + }; + if (opts.skipQueue) { + self2.queues[key2].unshift(taskFn); + } else { + self2.queues[key2].push(taskFn); + } + var timeout = opts.timeout || self2.timeout; + if (timeout) { + timer = setTimeout(function() { + timer = null; + done(false, new Error("async-lock timed out in queue " + key2)); + }, timeout); + } + } + var maxOccupationTime = opts.maxOccupationTime || self2.maxOccupationTime; + if (maxOccupationTime) { + occupationTimer = setTimeout(function() { + if (!!self2.queues[key2]) { + done(false, new Error("Maximum occupation time is exceeded in queue " + key2)); + } + }, maxOccupationTime); + } + if (deferred2) { + return deferred2; + } + }; + AsyncLock2.prototype._acquireBatch = function(keys, fn, cb, opts) { + if (typeof cb !== "function") { + opts = cb; + cb = null; + } + var self2 = this; + var getFn = function(key2, fn2) { + return function(cb2) { + self2.acquire(key2, fn2, cb2, opts); + }; + }; + var fnx = keys.reduceRight(function(prev, key2) { + return getFn(key2, prev); + }, fn); + if (typeof cb === "function") { + fnx(cb); + } else { + return new this.Promise(function(resolve, reject) { + if (fnx.length === 1) { + fnx(function(err, ret) { + if (err) { + reject(err); + } else { + resolve(ret); + } + }); + } else { + resolve(fnx()); + } + }); + } + }; + AsyncLock2.prototype.isBusy = function(key2) { + if (!key2) { + return Object.keys(this.queues).length > 0; + } else { + return !!this.queues[key2]; + } + }; + AsyncLock2.prototype._promiseTry = function(fn) { + try { + return this.Promise.resolve(fn()); + } catch (e) { + return this.Promise.reject(e); + } + }; + module2.exports = AsyncLock2; + } +}); + +// node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/index.js +var require_async_lock = __commonJS({ + "node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = require_lib(); + } +}); + +// node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js +var require_inherits_browser = __commonJS({ + "node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports2, module2) { + init_polyfill_buffer(); + if (typeof Object.create === "function") { + module2.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + }; + } else { + module2.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } + }; + } + } +}); + +// node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js +var require_safe_buffer = __commonJS({ + "node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js"(exports2, module2) { + init_polyfill_buffer(); + var buffer2 = require_buffer(); + var Buffer2 = buffer2.Buffer; + function copyProps(src, dst) { + for (var key2 in src) { + dst[key2] = src[key2]; + } + } + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module2.exports = buffer2; + } else { + copyProps(buffer2, exports2); + exports2.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + SafeBuffer.prototype = Object.create(Buffer2.prototype); + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + } else { + buf.fill(0); + } + return buf; + }; + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return Buffer2(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer2.SlowBuffer(size); + }; + } +}); + +// node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/hash.js +var require_hash = __commonJS({ + "node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/hash.js"(exports2, module2) { + init_polyfill_buffer(); + var Buffer2 = require_safe_buffer().Buffer; + function Hash2(blockSize, finalSize) { + this._block = Buffer2.alloc(blockSize); + this._finalSize = finalSize; + this._blockSize = blockSize; + this._len = 0; + } + Hash2.prototype.update = function(data, enc) { + if (typeof data === "string") { + enc = enc || "utf8"; + data = Buffer2.from(data, enc); + } + var block = this._block; + var blockSize = this._blockSize; + var length = data.length; + var accum = this._len; + for (var offset = 0; offset < length; ) { + var assigned = accum % blockSize; + var remainder = Math.min(length - offset, blockSize - assigned); + for (var i = 0; i < remainder; i++) { + block[assigned + i] = data[offset + i]; + } + accum += remainder; + offset += remainder; + if (accum % blockSize === 0) { + this._update(block); + } + } + this._len += length; + return this; + }; + Hash2.prototype.digest = function(enc) { + var rem = this._len % this._blockSize; + this._block[rem] = 128; + this._block.fill(0, rem + 1); + if (rem >= this._finalSize) { + this._update(this._block); + this._block.fill(0); + } + var bits = this._len * 8; + if (bits <= 4294967295) { + this._block.writeUInt32BE(bits, this._blockSize - 4); + } else { + var lowBits = (bits & 4294967295) >>> 0; + var highBits = (bits - lowBits) / 4294967296; + this._block.writeUInt32BE(highBits, this._blockSize - 8); + this._block.writeUInt32BE(lowBits, this._blockSize - 4); + } + this._update(this._block); + var hash2 = this._hash(); + return enc ? hash2.toString(enc) : hash2; + }; + Hash2.prototype._update = function() { + throw new Error("_update must be implemented by subclass"); + }; + module2.exports = Hash2; + } +}); + +// node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha1.js +var require_sha1 = __commonJS({ + "node_modules/.pnpm/sha.js@2.4.11/node_modules/sha.js/sha1.js"(exports2, module2) { + init_polyfill_buffer(); + var inherits = require_inherits_browser(); + var Hash2 = require_hash(); + var Buffer2 = require_safe_buffer().Buffer; + var K2 = [ + 1518500249, + 1859775393, + 2400959708 | 0, + 3395469782 | 0 + ]; + var W = new Array(80); + function Sha1() { + this.init(); + this._w = W; + Hash2.call(this, 64, 56); + } + inherits(Sha1, Hash2); + Sha1.prototype.init = function() { + this._a = 1732584193; + this._b = 4023233417; + this._c = 2562383102; + this._d = 271733878; + this._e = 3285377520; + return this; + }; + function rotl1(num2) { + return num2 << 1 | num2 >>> 31; + } + function rotl5(num2) { + return num2 << 5 | num2 >>> 27; + } + function rotl30(num2) { + return num2 << 30 | num2 >>> 2; + } + function ft(s, b, c, d) { + if (s === 0) + return b & c | ~b & d; + if (s === 2) + return b & c | b & d | c & d; + return b ^ c ^ d; + } + Sha1.prototype._update = function(M) { + var W2 = this._w; + var a = this._a | 0; + var b = this._b | 0; + var c = this._c | 0; + var d = this._d | 0; + var e = this._e | 0; + for (var i = 0; i < 16; ++i) + W2[i] = M.readInt32BE(i * 4); + for (; i < 80; ++i) + W2[i] = rotl1(W2[i - 3] ^ W2[i - 8] ^ W2[i - 14] ^ W2[i - 16]); + for (var j = 0; j < 80; ++j) { + var s = ~~(j / 20); + var t = rotl5(a) + ft(s, b, c, d) + e + W2[j] + K2[s] | 0; + e = d; + d = c; + c = rotl30(b); + b = a; + a = t; + } + this._a = a + this._a | 0; + this._b = b + this._b | 0; + this._c = c + this._c | 0; + this._d = d + this._d | 0; + this._e = e + this._e | 0; + }; + Sha1.prototype._hash = function() { + var H = Buffer2.allocUnsafe(20); + H.writeInt32BE(this._a | 0, 0); + H.writeInt32BE(this._b | 0, 4); + H.writeInt32BE(this._c | 0, 8); + H.writeInt32BE(this._d | 0, 12); + H.writeInt32BE(this._e | 0, 16); + return H; + }; + module2.exports = Sha1; + } +}); + +// node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/crc32.js +var require_crc32 = __commonJS({ + "node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/crc32.js"(exports2) { + init_polyfill_buffer(); + var CRC32; + (function(factory) { + if (typeof DO_NOT_EXPORT_CRC === "undefined") { + if ("object" === typeof exports2) { + factory(exports2); + } else if ("function" === typeof define && define.amd) { + define(function() { + var module3 = {}; + factory(module3); + return module3; + }); + } else { + factory(CRC32 = {}); + } + } else { + factory(CRC32 = {}); + } + })(function(CRC322) { + CRC322.version = "1.2.2"; + function signed_crc_table() { + var c = 0, table = new Array(256); + for (var n = 0; n != 256; ++n) { + c = n; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + table[n] = c; + } + return typeof Int32Array !== "undefined" ? new Int32Array(table) : table; + } + var T0 = signed_crc_table(); + function slice_by_16_tables(T) { + var c = 0, v = 0, n = 0, table = typeof Int32Array !== "undefined" ? new Int32Array(4096) : new Array(4096); + for (n = 0; n != 256; ++n) + table[n] = T[n]; + for (n = 0; n != 256; ++n) { + v = T[n]; + for (c = 256 + n; c < 4096; c += 256) + v = table[c] = v >>> 8 ^ T[v & 255]; + } + var out = []; + for (n = 1; n != 16; ++n) + out[n - 1] = typeof Int32Array !== "undefined" ? table.subarray(n * 256, n * 256 + 256) : table.slice(n * 256, n * 256 + 256); + return out; + } + var TT = slice_by_16_tables(T0); + var T1 = TT[0], T2 = TT[1], T3 = TT[2], T4 = TT[3], T5 = TT[4]; + var T6 = TT[5], T7 = TT[6], T8 = TT[7], T9 = TT[8], Ta = TT[9]; + var Tb = TT[10], Tc = TT[11], Td = TT[12], Te = TT[13], Tf = TT[14]; + function crc32_bstr(bstr, seed) { + var C = seed ^ -1; + for (var i = 0, L = bstr.length; i < L; ) + C = C >>> 8 ^ T0[(C ^ bstr.charCodeAt(i++)) & 255]; + return ~C; + } + function crc32_buf(B, seed) { + var C = seed ^ -1, L = B.length - 15, i = 0; + for (; i < L; ) + C = Tf[B[i++] ^ C & 255] ^ Te[B[i++] ^ C >> 8 & 255] ^ Td[B[i++] ^ C >> 16 & 255] ^ Tc[B[i++] ^ C >>> 24] ^ Tb[B[i++]] ^ Ta[B[i++]] ^ T9[B[i++]] ^ T8[B[i++]] ^ T7[B[i++]] ^ T6[B[i++]] ^ T5[B[i++]] ^ T4[B[i++]] ^ T3[B[i++]] ^ T2[B[i++]] ^ T1[B[i++]] ^ T0[B[i++]]; + L += 15; + while (i < L) + C = C >>> 8 ^ T0[(C ^ B[i++]) & 255]; + return ~C; + } + function crc32_str(str, seed) { + var C = seed ^ -1; + for (var i = 0, L = str.length, c = 0, d = 0; i < L; ) { + c = str.charCodeAt(i++); + if (c < 128) { + C = C >>> 8 ^ T0[(C ^ c) & 255]; + } else if (c < 2048) { + C = C >>> 8 ^ T0[(C ^ (192 | c >> 6 & 31)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | c & 63)) & 255]; + } else if (c >= 55296 && c < 57344) { + c = (c & 1023) + 64; + d = str.charCodeAt(i++) & 1023; + C = C >>> 8 ^ T0[(C ^ (240 | c >> 8 & 7)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | c >> 2 & 63)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | d >> 6 & 15 | (c & 3) << 4)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | d & 63)) & 255]; + } else { + C = C >>> 8 ^ T0[(C ^ (224 | c >> 12 & 15)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | c >> 6 & 63)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | c & 63)) & 255]; + } + } + return ~C; + } + CRC322.table = T0; + CRC322.bstr = crc32_bstr; + CRC322.buf = crc32_buf; + CRC322.str = crc32_str; + }); + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/common.js +var require_common = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/common.js"(exports2) { + "use strict"; + init_polyfill_buffer(); + var TYPED_OK = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Int32Array !== "undefined"; + function _has(obj, key2) { + return Object.prototype.hasOwnProperty.call(obj, key2); + } + exports2.assign = function(obj) { + var sources = Array.prototype.slice.call(arguments, 1); + while (sources.length) { + var source = sources.shift(); + if (!source) { + continue; + } + if (typeof source !== "object") { + throw new TypeError(source + "must be non-object"); + } + for (var p in source) { + if (_has(source, p)) { + obj[p] = source[p]; + } + } + } + return obj; + }; + exports2.shrinkBuf = function(buf, size) { + if (buf.length === size) { + return buf; + } + if (buf.subarray) { + return buf.subarray(0, size); + } + buf.length = size; + return buf; + }; + var fnTyped = { + arraySet: function(dest, src, src_offs, len, dest_offs) { + if (src.subarray && dest.subarray) { + dest.set(src.subarray(src_offs, src_offs + len), dest_offs); + return; + } + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function(chunks) { + var i, l, len, pos, chunk, result; + len = 0; + for (i = 0, l = chunks.length; i < l; i++) { + len += chunks[i].length; + } + result = new Uint8Array(len); + pos = 0; + for (i = 0, l = chunks.length; i < l; i++) { + chunk = chunks[i]; + result.set(chunk, pos); + pos += chunk.length; + } + return result; + } + }; + var fnUntyped = { + arraySet: function(dest, src, src_offs, len, dest_offs) { + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function(chunks) { + return [].concat.apply([], chunks); + } + }; + exports2.setTyped = function(on) { + if (on) { + exports2.Buf8 = Uint8Array; + exports2.Buf16 = Uint16Array; + exports2.Buf32 = Int32Array; + exports2.assign(exports2, fnTyped); + } else { + exports2.Buf8 = Array; + exports2.Buf16 = Array; + exports2.Buf32 = Array; + exports2.assign(exports2, fnUntyped); + } + }; + exports2.setTyped(TYPED_OK); + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/trees.js +var require_trees = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/trees.js"(exports2) { + "use strict"; + init_polyfill_buffer(); + var utils = require_common(); + var Z_FIXED = 4; + var Z_BINARY = 0; + var Z_TEXT = 1; + var Z_UNKNOWN = 2; + function zero(buf) { + var len = buf.length; + while (--len >= 0) { + buf[len] = 0; + } + } + var STORED_BLOCK = 0; + var STATIC_TREES = 1; + var DYN_TREES = 2; + var MIN_MATCH = 3; + var MAX_MATCH = 258; + var LENGTH_CODES = 29; + var LITERALS = 256; + var L_CODES = LITERALS + 1 + LENGTH_CODES; + var D_CODES = 30; + var BL_CODES = 19; + var HEAP_SIZE = 2 * L_CODES + 1; + var MAX_BITS = 15; + var Buf_size = 16; + var MAX_BL_BITS = 7; + var END_BLOCK = 256; + var REP_3_6 = 16; + var REPZ_3_10 = 17; + var REPZ_11_138 = 18; + var extra_lbits = ( + /* extra bits for each length code */ + [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0] + ); + var extra_dbits = ( + /* extra bits for each distance code */ + [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13] + ); + var extra_blbits = ( + /* extra bits for each bit length code */ + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7] + ); + var bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; + var DIST_CODE_LEN = 512; + var static_ltree = new Array((L_CODES + 2) * 2); + zero(static_ltree); + var static_dtree = new Array(D_CODES * 2); + zero(static_dtree); + var _dist_code = new Array(DIST_CODE_LEN); + zero(_dist_code); + var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); + zero(_length_code); + var base_length = new Array(LENGTH_CODES); + zero(base_length); + var base_dist = new Array(D_CODES); + zero(base_dist); + function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { + this.static_tree = static_tree; + this.extra_bits = extra_bits; + this.extra_base = extra_base; + this.elems = elems; + this.max_length = max_length; + this.has_stree = static_tree && static_tree.length; + } + var static_l_desc; + var static_d_desc; + var static_bl_desc; + function TreeDesc(dyn_tree, stat_desc) { + this.dyn_tree = dyn_tree; + this.max_code = 0; + this.stat_desc = stat_desc; + } + function d_code(dist) { + return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; + } + function put_short(s, w) { + s.pending_buf[s.pending++] = w & 255; + s.pending_buf[s.pending++] = w >>> 8 & 255; + } + function send_bits(s, value, length) { + if (s.bi_valid > Buf_size - length) { + s.bi_buf |= value << s.bi_valid & 65535; + put_short(s, s.bi_buf); + s.bi_buf = value >> Buf_size - s.bi_valid; + s.bi_valid += length - Buf_size; + } else { + s.bi_buf |= value << s.bi_valid & 65535; + s.bi_valid += length; + } + } + function send_code(s, c, tree) { + send_bits( + s, + tree[c * 2], + tree[c * 2 + 1] + /*.Len*/ + ); + } + function bi_reverse(code, len) { + var res = 0; + do { + res |= code & 1; + code >>>= 1; + res <<= 1; + } while (--len > 0); + return res >>> 1; + } + function bi_flush(s) { + if (s.bi_valid === 16) { + put_short(s, s.bi_buf); + s.bi_buf = 0; + s.bi_valid = 0; + } else if (s.bi_valid >= 8) { + s.pending_buf[s.pending++] = s.bi_buf & 255; + s.bi_buf >>= 8; + s.bi_valid -= 8; + } + } + function gen_bitlen(s, desc) { + var tree = desc.dyn_tree; + var max_code = desc.max_code; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var extra = desc.stat_desc.extra_bits; + var base = desc.stat_desc.extra_base; + var max_length = desc.stat_desc.max_length; + var h; + var n, m; + var bits; + var xbits; + var f; + var overflow = 0; + for (bits = 0; bits <= MAX_BITS; bits++) { + s.bl_count[bits] = 0; + } + tree[s.heap[s.heap_max] * 2 + 1] = 0; + for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { + n = s.heap[h]; + bits = tree[tree[n * 2 + 1] * 2 + 1] + 1; + if (bits > max_length) { + bits = max_length; + overflow++; + } + tree[n * 2 + 1] = bits; + if (n > max_code) { + continue; + } + s.bl_count[bits]++; + xbits = 0; + if (n >= base) { + xbits = extra[n - base]; + } + f = tree[n * 2]; + s.opt_len += f * (bits + xbits); + if (has_stree) { + s.static_len += f * (stree[n * 2 + 1] + xbits); + } + } + if (overflow === 0) { + return; + } + do { + bits = max_length - 1; + while (s.bl_count[bits] === 0) { + bits--; + } + s.bl_count[bits]--; + s.bl_count[bits + 1] += 2; + s.bl_count[max_length]--; + overflow -= 2; + } while (overflow > 0); + for (bits = max_length; bits !== 0; bits--) { + n = s.bl_count[bits]; + while (n !== 0) { + m = s.heap[--h]; + if (m > max_code) { + continue; + } + if (tree[m * 2 + 1] !== bits) { + s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2]; + tree[m * 2 + 1] = bits; + } + n--; + } + } + } + function gen_codes(tree, max_code, bl_count) { + var next_code = new Array(MAX_BITS + 1); + var code = 0; + var bits; + var n; + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = code + bl_count[bits - 1] << 1; + } + for (n = 0; n <= max_code; n++) { + var len = tree[n * 2 + 1]; + if (len === 0) { + continue; + } + tree[n * 2] = bi_reverse(next_code[len]++, len); + } + } + function tr_static_init() { + var n; + var bits; + var length; + var code; + var dist; + var bl_count = new Array(MAX_BITS + 1); + length = 0; + for (code = 0; code < LENGTH_CODES - 1; code++) { + base_length[code] = length; + for (n = 0; n < 1 << extra_lbits[code]; n++) { + _length_code[length++] = code; + } + } + _length_code[length - 1] = code; + dist = 0; + for (code = 0; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < 1 << extra_dbits[code]; n++) { + _dist_code[dist++] = code; + } + } + dist >>= 7; + for (; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < 1 << extra_dbits[code] - 7; n++) { + _dist_code[256 + dist++] = code; + } + } + for (bits = 0; bits <= MAX_BITS; bits++) { + bl_count[bits] = 0; + } + n = 0; + while (n <= 143) { + static_ltree[n * 2 + 1] = 8; + n++; + bl_count[8]++; + } + while (n <= 255) { + static_ltree[n * 2 + 1] = 9; + n++; + bl_count[9]++; + } + while (n <= 279) { + static_ltree[n * 2 + 1] = 7; + n++; + bl_count[7]++; + } + while (n <= 287) { + static_ltree[n * 2 + 1] = 8; + n++; + bl_count[8]++; + } + gen_codes(static_ltree, L_CODES + 1, bl_count); + for (n = 0; n < D_CODES; n++) { + static_dtree[n * 2 + 1] = 5; + static_dtree[n * 2] = bi_reverse(n, 5); + } + static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); + static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); + static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); + } + function init_block(s) { + var n; + for (n = 0; n < L_CODES; n++) { + s.dyn_ltree[n * 2] = 0; + } + for (n = 0; n < D_CODES; n++) { + s.dyn_dtree[n * 2] = 0; + } + for (n = 0; n < BL_CODES; n++) { + s.bl_tree[n * 2] = 0; + } + s.dyn_ltree[END_BLOCK * 2] = 1; + s.opt_len = s.static_len = 0; + s.last_lit = s.matches = 0; + } + function bi_windup(s) { + if (s.bi_valid > 8) { + put_short(s, s.bi_buf); + } else if (s.bi_valid > 0) { + s.pending_buf[s.pending++] = s.bi_buf; + } + s.bi_buf = 0; + s.bi_valid = 0; + } + function copy_block(s, buf, len, header) { + bi_windup(s); + if (header) { + put_short(s, len); + put_short(s, ~len); + } + utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); + s.pending += len; + } + function smaller(tree, n, m, depth) { + var _n2 = n * 2; + var _m2 = m * 2; + return tree[_n2] < tree[_m2] || tree[_n2] === tree[_m2] && depth[n] <= depth[m]; + } + function pqdownheap(s, tree, k) { + var v = s.heap[k]; + var j = k << 1; + while (j <= s.heap_len) { + if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { + j++; + } + if (smaller(tree, v, s.heap[j], s.depth)) { + break; + } + s.heap[k] = s.heap[j]; + k = j; + j <<= 1; + } + s.heap[k] = v; + } + function compress_block(s, ltree, dtree) { + var dist; + var lc; + var lx = 0; + var code; + var extra; + if (s.last_lit !== 0) { + do { + dist = s.pending_buf[s.d_buf + lx * 2] << 8 | s.pending_buf[s.d_buf + lx * 2 + 1]; + lc = s.pending_buf[s.l_buf + lx]; + lx++; + if (dist === 0) { + send_code(s, lc, ltree); + } else { + code = _length_code[lc]; + send_code(s, code + LITERALS + 1, ltree); + extra = extra_lbits[code]; + if (extra !== 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); + } + dist--; + code = d_code(dist); + send_code(s, code, dtree); + extra = extra_dbits[code]; + if (extra !== 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); + } + } + } while (lx < s.last_lit); + } + send_code(s, END_BLOCK, ltree); + } + function build_tree(s, desc) { + var tree = desc.dyn_tree; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var elems = desc.stat_desc.elems; + var n, m; + var max_code = -1; + var node; + s.heap_len = 0; + s.heap_max = HEAP_SIZE; + for (n = 0; n < elems; n++) { + if (tree[n * 2] !== 0) { + s.heap[++s.heap_len] = max_code = n; + s.depth[n] = 0; + } else { + tree[n * 2 + 1] = 0; + } + } + while (s.heap_len < 2) { + node = s.heap[++s.heap_len] = max_code < 2 ? ++max_code : 0; + tree[node * 2] = 1; + s.depth[node] = 0; + s.opt_len--; + if (has_stree) { + s.static_len -= stree[node * 2 + 1]; + } + } + desc.max_code = max_code; + for (n = s.heap_len >> 1; n >= 1; n--) { + pqdownheap(s, tree, n); + } + node = elems; + do { + n = s.heap[ + 1 + /*SMALLEST*/ + ]; + s.heap[ + 1 + /*SMALLEST*/ + ] = s.heap[s.heap_len--]; + pqdownheap( + s, + tree, + 1 + /*SMALLEST*/ + ); + m = s.heap[ + 1 + /*SMALLEST*/ + ]; + s.heap[--s.heap_max] = n; + s.heap[--s.heap_max] = m; + tree[node * 2] = tree[n * 2] + tree[m * 2]; + s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; + tree[n * 2 + 1] = tree[m * 2 + 1] = node; + s.heap[ + 1 + /*SMALLEST*/ + ] = node++; + pqdownheap( + s, + tree, + 1 + /*SMALLEST*/ + ); + } while (s.heap_len >= 2); + s.heap[--s.heap_max] = s.heap[ + 1 + /*SMALLEST*/ + ]; + gen_bitlen(s, desc); + gen_codes(tree, max_code, s.bl_count); + } + function scan_tree(s, tree, max_code) { + var n; + var prevlen = -1; + var curlen; + var nextlen = tree[0 * 2 + 1]; + var count = 0; + var max_count = 7; + var min_count = 4; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + tree[(max_code + 1) * 2 + 1] = 65535; + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]; + if (++count < max_count && curlen === nextlen) { + continue; + } else if (count < min_count) { + s.bl_tree[curlen * 2] += count; + } else if (curlen !== 0) { + if (curlen !== prevlen) { + s.bl_tree[curlen * 2]++; + } + s.bl_tree[REP_3_6 * 2]++; + } else if (count <= 10) { + s.bl_tree[REPZ_3_10 * 2]++; + } else { + s.bl_tree[REPZ_11_138 * 2]++; + } + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + } else { + max_count = 7; + min_count = 4; + } + } + } + function send_tree(s, tree, max_code) { + var n; + var prevlen = -1; + var curlen; + var nextlen = tree[0 * 2 + 1]; + var count = 0; + var max_count = 7; + var min_count = 4; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]; + if (++count < max_count && curlen === nextlen) { + continue; + } else if (count < min_count) { + do { + send_code(s, curlen, s.bl_tree); + } while (--count !== 0); + } else if (curlen !== 0) { + if (curlen !== prevlen) { + send_code(s, curlen, s.bl_tree); + count--; + } + send_code(s, REP_3_6, s.bl_tree); + send_bits(s, count - 3, 2); + } else if (count <= 10) { + send_code(s, REPZ_3_10, s.bl_tree); + send_bits(s, count - 3, 3); + } else { + send_code(s, REPZ_11_138, s.bl_tree); + send_bits(s, count - 11, 7); + } + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + } else { + max_count = 7; + min_count = 4; + } + } + } + function build_bl_tree(s) { + var max_blindex; + scan_tree(s, s.dyn_ltree, s.l_desc.max_code); + scan_tree(s, s.dyn_dtree, s.d_desc.max_code); + build_tree(s, s.bl_desc); + for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { + if (s.bl_tree[bl_order[max_blindex] * 2 + 1] !== 0) { + break; + } + } + s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; + return max_blindex; + } + function send_all_trees(s, lcodes, dcodes, blcodes) { + var rank; + send_bits(s, lcodes - 257, 5); + send_bits(s, dcodes - 1, 5); + send_bits(s, blcodes - 4, 4); + for (rank = 0; rank < blcodes; rank++) { + send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1], 3); + } + send_tree(s, s.dyn_ltree, lcodes - 1); + send_tree(s, s.dyn_dtree, dcodes - 1); + } + function detect_data_type(s) { + var black_mask = 4093624447; + var n; + for (n = 0; n <= 31; n++, black_mask >>>= 1) { + if (black_mask & 1 && s.dyn_ltree[n * 2] !== 0) { + return Z_BINARY; + } + } + if (s.dyn_ltree[9 * 2] !== 0 || s.dyn_ltree[10 * 2] !== 0 || s.dyn_ltree[13 * 2] !== 0) { + return Z_TEXT; + } + for (n = 32; n < LITERALS; n++) { + if (s.dyn_ltree[n * 2] !== 0) { + return Z_TEXT; + } + } + return Z_BINARY; + } + var static_init_done = false; + function _tr_init(s) { + if (!static_init_done) { + tr_static_init(); + static_init_done = true; + } + s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); + s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); + s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); + s.bi_buf = 0; + s.bi_valid = 0; + init_block(s); + } + function _tr_stored_block(s, buf, stored_len, last2) { + send_bits(s, (STORED_BLOCK << 1) + (last2 ? 1 : 0), 3); + copy_block(s, buf, stored_len, true); + } + function _tr_align(s) { + send_bits(s, STATIC_TREES << 1, 3); + send_code(s, END_BLOCK, static_ltree); + bi_flush(s); + } + function _tr_flush_block(s, buf, stored_len, last2) { + var opt_lenb, static_lenb; + var max_blindex = 0; + if (s.level > 0) { + if (s.strm.data_type === Z_UNKNOWN) { + s.strm.data_type = detect_data_type(s); + } + build_tree(s, s.l_desc); + build_tree(s, s.d_desc); + max_blindex = build_bl_tree(s); + opt_lenb = s.opt_len + 3 + 7 >>> 3; + static_lenb = s.static_len + 3 + 7 >>> 3; + if (static_lenb <= opt_lenb) { + opt_lenb = static_lenb; + } + } else { + opt_lenb = static_lenb = stored_len + 5; + } + if (stored_len + 4 <= opt_lenb && buf !== -1) { + _tr_stored_block(s, buf, stored_len, last2); + } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { + send_bits(s, (STATIC_TREES << 1) + (last2 ? 1 : 0), 3); + compress_block(s, static_ltree, static_dtree); + } else { + send_bits(s, (DYN_TREES << 1) + (last2 ? 1 : 0), 3); + send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); + compress_block(s, s.dyn_ltree, s.dyn_dtree); + } + init_block(s); + if (last2) { + bi_windup(s); + } + } + function _tr_tally(s, dist, lc) { + s.pending_buf[s.d_buf + s.last_lit * 2] = dist >>> 8 & 255; + s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 255; + s.pending_buf[s.l_buf + s.last_lit] = lc & 255; + s.last_lit++; + if (dist === 0) { + s.dyn_ltree[lc * 2]++; + } else { + s.matches++; + dist--; + s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]++; + s.dyn_dtree[d_code(dist) * 2]++; + } + return s.last_lit === s.lit_bufsize - 1; + } + exports2._tr_init = _tr_init; + exports2._tr_stored_block = _tr_stored_block; + exports2._tr_flush_block = _tr_flush_block; + exports2._tr_tally = _tr_tally; + exports2._tr_align = _tr_align; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/adler32.js +var require_adler32 = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/adler32.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + function adler32(adler, buf, len, pos) { + var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0; + while (len !== 0) { + n = len > 2e3 ? 2e3 : len; + len -= n; + do { + s1 = s1 + buf[pos++] | 0; + s2 = s2 + s1 | 0; + } while (--n); + s1 %= 65521; + s2 %= 65521; + } + return s1 | s2 << 16 | 0; + } + module2.exports = adler32; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/crc32.js +var require_crc322 = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/crc32.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + function makeTable() { + var c, table = []; + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1; + } + table[n] = c; + } + return table; + } + var crcTable = makeTable(); + function crc322(crc, buf, len, pos) { + var t = crcTable, end = pos + len; + crc ^= -1; + for (var i = pos; i < end; i++) { + crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255]; + } + return crc ^ -1; + } + module2.exports = crc322; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/messages.js +var require_messages = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/messages.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = { + 2: "need dictionary", + /* Z_NEED_DICT 2 */ + 1: "stream end", + /* Z_STREAM_END 1 */ + 0: "", + /* Z_OK 0 */ + "-1": "file error", + /* Z_ERRNO (-1) */ + "-2": "stream error", + /* Z_STREAM_ERROR (-2) */ + "-3": "data error", + /* Z_DATA_ERROR (-3) */ + "-4": "insufficient memory", + /* Z_MEM_ERROR (-4) */ + "-5": "buffer error", + /* Z_BUF_ERROR (-5) */ + "-6": "incompatible version" + /* Z_VERSION_ERROR (-6) */ + }; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/deflate.js +var require_deflate = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/deflate.js"(exports2) { + "use strict"; + init_polyfill_buffer(); + var utils = require_common(); + var trees = require_trees(); + var adler32 = require_adler32(); + var crc322 = require_crc322(); + var msg = require_messages(); + var Z_NO_FLUSH = 0; + var Z_PARTIAL_FLUSH = 1; + var Z_FULL_FLUSH = 3; + var Z_FINISH = 4; + var Z_BLOCK = 5; + var Z_OK = 0; + var Z_STREAM_END = 1; + var Z_STREAM_ERROR = -2; + var Z_DATA_ERROR = -3; + var Z_BUF_ERROR = -5; + var Z_DEFAULT_COMPRESSION = -1; + var Z_FILTERED = 1; + var Z_HUFFMAN_ONLY = 2; + var Z_RLE = 3; + var Z_FIXED = 4; + var Z_DEFAULT_STRATEGY = 0; + var Z_UNKNOWN = 2; + var Z_DEFLATED = 8; + var MAX_MEM_LEVEL = 9; + var MAX_WBITS = 15; + var DEF_MEM_LEVEL = 8; + var LENGTH_CODES = 29; + var LITERALS = 256; + var L_CODES = LITERALS + 1 + LENGTH_CODES; + var D_CODES = 30; + var BL_CODES = 19; + var HEAP_SIZE = 2 * L_CODES + 1; + var MAX_BITS = 15; + var MIN_MATCH = 3; + var MAX_MATCH = 258; + var MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1; + var PRESET_DICT = 32; + var INIT_STATE = 42; + var EXTRA_STATE = 69; + var NAME_STATE = 73; + var COMMENT_STATE = 91; + var HCRC_STATE = 103; + var BUSY_STATE = 113; + var FINISH_STATE = 666; + var BS_NEED_MORE = 1; + var BS_BLOCK_DONE = 2; + var BS_FINISH_STARTED = 3; + var BS_FINISH_DONE = 4; + var OS_CODE = 3; + function err(strm, errorCode) { + strm.msg = msg[errorCode]; + return errorCode; + } + function rank(f) { + return (f << 1) - (f > 4 ? 9 : 0); + } + function zero(buf) { + var len = buf.length; + while (--len >= 0) { + buf[len] = 0; + } + } + function flush_pending(strm) { + var s = strm.state; + var len = s.pending; + if (len > strm.avail_out) { + len = strm.avail_out; + } + if (len === 0) { + return; + } + utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); + strm.next_out += len; + s.pending_out += len; + strm.total_out += len; + strm.avail_out -= len; + s.pending -= len; + if (s.pending === 0) { + s.pending_out = 0; + } + } + function flush_block_only(s, last2) { + trees._tr_flush_block(s, s.block_start >= 0 ? s.block_start : -1, s.strstart - s.block_start, last2); + s.block_start = s.strstart; + flush_pending(s.strm); + } + function put_byte(s, b) { + s.pending_buf[s.pending++] = b; + } + function putShortMSB(s, b) { + s.pending_buf[s.pending++] = b >>> 8 & 255; + s.pending_buf[s.pending++] = b & 255; + } + function read_buf(strm, buf, start, size) { + var len = strm.avail_in; + if (len > size) { + len = size; + } + if (len === 0) { + return 0; + } + strm.avail_in -= len; + utils.arraySet(buf, strm.input, strm.next_in, len, start); + if (strm.state.wrap === 1) { + strm.adler = adler32(strm.adler, buf, len, start); + } else if (strm.state.wrap === 2) { + strm.adler = crc322(strm.adler, buf, len, start); + } + strm.next_in += len; + strm.total_in += len; + return len; + } + function longest_match(s, cur_match) { + var chain_length = s.max_chain_length; + var scan = s.strstart; + var match; + var len; + var best_len = s.prev_length; + var nice_match = s.nice_match; + var limit = s.strstart > s.w_size - MIN_LOOKAHEAD ? s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0; + var _win = s.window; + var wmask = s.w_mask; + var prev = s.prev; + var strend = s.strstart + MAX_MATCH; + var scan_end1 = _win[scan + best_len - 1]; + var scan_end = _win[scan + best_len]; + if (s.prev_length >= s.good_match) { + chain_length >>= 2; + } + if (nice_match > s.lookahead) { + nice_match = s.lookahead; + } + do { + match = cur_match; + if (_win[match + best_len] !== scan_end || _win[match + best_len - 1] !== scan_end1 || _win[match] !== _win[scan] || _win[++match] !== _win[scan + 1]) { + continue; + } + scan += 2; + match++; + do { + } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend); + len = MAX_MATCH - (strend - scan); + scan = strend - MAX_MATCH; + if (len > best_len) { + s.match_start = cur_match; + best_len = len; + if (len >= nice_match) { + break; + } + scan_end1 = _win[scan + best_len - 1]; + scan_end = _win[scan + best_len]; + } + } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); + if (best_len <= s.lookahead) { + return best_len; + } + return s.lookahead; + } + function fill_window(s) { + var _w_size = s.w_size; + var p, n, m, more, str; + do { + more = s.window_size - s.lookahead - s.strstart; + if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { + utils.arraySet(s.window, s.window, _w_size, _w_size, 0); + s.match_start -= _w_size; + s.strstart -= _w_size; + s.block_start -= _w_size; + n = s.hash_size; + p = n; + do { + m = s.head[--p]; + s.head[p] = m >= _w_size ? m - _w_size : 0; + } while (--n); + n = _w_size; + p = n; + do { + m = s.prev[--p]; + s.prev[p] = m >= _w_size ? m - _w_size : 0; + } while (--n); + more += _w_size; + } + if (s.strm.avail_in === 0) { + break; + } + n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); + s.lookahead += n; + if (s.lookahead + s.insert >= MIN_MATCH) { + str = s.strstart - s.insert; + s.ins_h = s.window[str]; + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + 1]) & s.hash_mask; + while (s.insert) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + s.insert--; + if (s.lookahead + s.insert < MIN_MATCH) { + break; + } + } + } + } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); + } + function deflate_stored(s, flush2) { + var max_block_size = 65535; + if (max_block_size > s.pending_buf_size - 5) { + max_block_size = s.pending_buf_size - 5; + } + for (; ; ) { + if (s.lookahead <= 1) { + fill_window(s); + if (s.lookahead === 0 && flush2 === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + s.strstart += s.lookahead; + s.lookahead = 0; + var max_start = s.block_start + max_block_size; + if (s.strstart === 0 || s.strstart >= max_start) { + s.lookahead = s.strstart - max_start; + s.strstart = max_start; + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = 0; + if (flush2 === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.strstart > s.block_start) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_NEED_MORE; + } + function deflate_fast(s, flush2) { + var hash_head; + var bflush; + for (; ; ) { + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush2 === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + hash_head = 0; + if (s.lookahead >= MIN_MATCH) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } + if (hash_head !== 0 && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) { + s.match_length = longest_match(s, hash_head); + } + if (s.match_length >= MIN_MATCH) { + bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); + s.lookahead -= s.match_length; + if (s.match_length <= s.max_lazy_match && s.lookahead >= MIN_MATCH) { + s.match_length--; + do { + s.strstart++; + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } while (--s.match_length !== 0); + s.strstart++; + } else { + s.strstart += s.match_length; + s.match_length = 0; + s.ins_h = s.window[s.strstart]; + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask; + } + } else { + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + } + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush2 === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function deflate_slow(s, flush2) { + var hash_head; + var bflush; + var max_insert; + for (; ; ) { + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush2 === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + hash_head = 0; + if (s.lookahead >= MIN_MATCH) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } + s.prev_length = s.match_length; + s.prev_match = s.match_start; + s.match_length = MIN_MATCH - 1; + if (hash_head !== 0 && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) { + s.match_length = longest_match(s, hash_head); + if (s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096)) { + s.match_length = MIN_MATCH - 1; + } + } + if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { + max_insert = s.strstart + s.lookahead - MIN_MATCH; + bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); + s.lookahead -= s.prev_length - 1; + s.prev_length -= 2; + do { + if (++s.strstart <= max_insert) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } + } while (--s.prev_length !== 0); + s.match_available = 0; + s.match_length = MIN_MATCH - 1; + s.strstart++; + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } else if (s.match_available) { + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + if (bflush) { + flush_block_only(s, false); + } + s.strstart++; + s.lookahead--; + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } else { + s.match_available = 1; + s.strstart++; + s.lookahead--; + } + } + if (s.match_available) { + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + s.match_available = 0; + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush2 === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function deflate_rle(s, flush2) { + var bflush; + var prev; + var scan, strend; + var _win = s.window; + for (; ; ) { + if (s.lookahead <= MAX_MATCH) { + fill_window(s); + if (s.lookahead <= MAX_MATCH && flush2 === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + s.match_length = 0; + if (s.lookahead >= MIN_MATCH && s.strstart > 0) { + scan = s.strstart - 1; + prev = _win[scan]; + if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { + strend = s.strstart + MAX_MATCH; + do { + } while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend); + s.match_length = MAX_MATCH - (strend - scan); + if (s.match_length > s.lookahead) { + s.match_length = s.lookahead; + } + } + } + if (s.match_length >= MIN_MATCH) { + bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); + s.lookahead -= s.match_length; + s.strstart += s.match_length; + s.match_length = 0; + } else { + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + } + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = 0; + if (flush2 === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function deflate_huff(s, flush2) { + var bflush; + for (; ; ) { + if (s.lookahead === 0) { + fill_window(s); + if (s.lookahead === 0) { + if (flush2 === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + break; + } + } + s.match_length = 0; + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = 0; + if (flush2 === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function Config(good_length, max_lazy, nice_length, max_chain, func) { + this.good_length = good_length; + this.max_lazy = max_lazy; + this.nice_length = nice_length; + this.max_chain = max_chain; + this.func = func; + } + var configuration_table; + configuration_table = [ + /* good lazy nice chain */ + new Config(0, 0, 0, 0, deflate_stored), + /* 0 store only */ + new Config(4, 4, 8, 4, deflate_fast), + /* 1 max speed, no lazy matches */ + new Config(4, 5, 16, 8, deflate_fast), + /* 2 */ + new Config(4, 6, 32, 32, deflate_fast), + /* 3 */ + new Config(4, 4, 16, 16, deflate_slow), + /* 4 lazy matches */ + new Config(8, 16, 32, 32, deflate_slow), + /* 5 */ + new Config(8, 16, 128, 128, deflate_slow), + /* 6 */ + new Config(8, 32, 128, 256, deflate_slow), + /* 7 */ + new Config(32, 128, 258, 1024, deflate_slow), + /* 8 */ + new Config(32, 258, 258, 4096, deflate_slow) + /* 9 max compression */ + ]; + function lm_init(s) { + s.window_size = 2 * s.w_size; + zero(s.head); + s.max_lazy_match = configuration_table[s.level].max_lazy; + s.good_match = configuration_table[s.level].good_length; + s.nice_match = configuration_table[s.level].nice_length; + s.max_chain_length = configuration_table[s.level].max_chain; + s.strstart = 0; + s.block_start = 0; + s.lookahead = 0; + s.insert = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + s.ins_h = 0; + } + function DeflateState() { + this.strm = null; + this.status = 0; + this.pending_buf = null; + this.pending_buf_size = 0; + this.pending_out = 0; + this.pending = 0; + this.wrap = 0; + this.gzhead = null; + this.gzindex = 0; + this.method = Z_DEFLATED; + this.last_flush = -1; + this.w_size = 0; + this.w_bits = 0; + this.w_mask = 0; + this.window = null; + this.window_size = 0; + this.prev = null; + this.head = null; + this.ins_h = 0; + this.hash_size = 0; + this.hash_bits = 0; + this.hash_mask = 0; + this.hash_shift = 0; + this.block_start = 0; + this.match_length = 0; + this.prev_match = 0; + this.match_available = 0; + this.strstart = 0; + this.match_start = 0; + this.lookahead = 0; + this.prev_length = 0; + this.max_chain_length = 0; + this.max_lazy_match = 0; + this.level = 0; + this.strategy = 0; + this.good_match = 0; + this.nice_match = 0; + this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); + this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); + this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); + zero(this.dyn_ltree); + zero(this.dyn_dtree); + zero(this.bl_tree); + this.l_desc = null; + this.d_desc = null; + this.bl_desc = null; + this.bl_count = new utils.Buf16(MAX_BITS + 1); + this.heap = new utils.Buf16(2 * L_CODES + 1); + zero(this.heap); + this.heap_len = 0; + this.heap_max = 0; + this.depth = new utils.Buf16(2 * L_CODES + 1); + zero(this.depth); + this.l_buf = 0; + this.lit_bufsize = 0; + this.last_lit = 0; + this.d_buf = 0; + this.opt_len = 0; + this.static_len = 0; + this.matches = 0; + this.insert = 0; + this.bi_buf = 0; + this.bi_valid = 0; + } + function deflateResetKeep(strm) { + var s; + if (!strm || !strm.state) { + return err(strm, Z_STREAM_ERROR); + } + strm.total_in = strm.total_out = 0; + strm.data_type = Z_UNKNOWN; + s = strm.state; + s.pending = 0; + s.pending_out = 0; + if (s.wrap < 0) { + s.wrap = -s.wrap; + } + s.status = s.wrap ? INIT_STATE : BUSY_STATE; + strm.adler = s.wrap === 2 ? 0 : 1; + s.last_flush = Z_NO_FLUSH; + trees._tr_init(s); + return Z_OK; + } + function deflateReset(strm) { + var ret = deflateResetKeep(strm); + if (ret === Z_OK) { + lm_init(strm.state); + } + return ret; + } + function deflateSetHeader(strm, head) { + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + if (strm.state.wrap !== 2) { + return Z_STREAM_ERROR; + } + strm.state.gzhead = head; + return Z_OK; + } + function deflateInit2(strm, level, method2, windowBits, memLevel, strategy) { + if (!strm) { + return Z_STREAM_ERROR; + } + var wrap = 1; + if (level === Z_DEFAULT_COMPRESSION) { + level = 6; + } + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } else if (windowBits > 15) { + wrap = 2; + windowBits -= 16; + } + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method2 !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { + return err(strm, Z_STREAM_ERROR); + } + if (windowBits === 8) { + windowBits = 9; + } + var s = new DeflateState(); + strm.state = s; + s.strm = strm; + s.wrap = wrap; + s.gzhead = null; + s.w_bits = windowBits; + s.w_size = 1 << s.w_bits; + s.w_mask = s.w_size - 1; + s.hash_bits = memLevel + 7; + s.hash_size = 1 << s.hash_bits; + s.hash_mask = s.hash_size - 1; + s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); + s.window = new utils.Buf8(s.w_size * 2); + s.head = new utils.Buf16(s.hash_size); + s.prev = new utils.Buf16(s.w_size); + s.lit_bufsize = 1 << memLevel + 6; + s.pending_buf_size = s.lit_bufsize * 4; + s.pending_buf = new utils.Buf8(s.pending_buf_size); + s.d_buf = 1 * s.lit_bufsize; + s.l_buf = (1 + 2) * s.lit_bufsize; + s.level = level; + s.strategy = strategy; + s.method = method2; + return deflateReset(strm); + } + function deflateInit(strm, level) { + return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); + } + function deflate2(strm, flush2) { + var old_flush, s; + var beg, val; + if (!strm || !strm.state || flush2 > Z_BLOCK || flush2 < 0) { + return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; + } + s = strm.state; + if (!strm.output || !strm.input && strm.avail_in !== 0 || s.status === FINISH_STATE && flush2 !== Z_FINISH) { + return err(strm, strm.avail_out === 0 ? Z_BUF_ERROR : Z_STREAM_ERROR); + } + s.strm = strm; + old_flush = s.last_flush; + s.last_flush = flush2; + if (s.status === INIT_STATE) { + if (s.wrap === 2) { + strm.adler = 0; + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (!s.gzhead) { + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s.level === 9 ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0); + put_byte(s, OS_CODE); + s.status = BUSY_STATE; + } else { + put_byte( + s, + (s.gzhead.text ? 1 : 0) + (s.gzhead.hcrc ? 2 : 0) + (!s.gzhead.extra ? 0 : 4) + (!s.gzhead.name ? 0 : 8) + (!s.gzhead.comment ? 0 : 16) + ); + put_byte(s, s.gzhead.time & 255); + put_byte(s, s.gzhead.time >> 8 & 255); + put_byte(s, s.gzhead.time >> 16 & 255); + put_byte(s, s.gzhead.time >> 24 & 255); + put_byte(s, s.level === 9 ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0); + put_byte(s, s.gzhead.os & 255); + if (s.gzhead.extra && s.gzhead.extra.length) { + put_byte(s, s.gzhead.extra.length & 255); + put_byte(s, s.gzhead.extra.length >> 8 & 255); + } + if (s.gzhead.hcrc) { + strm.adler = crc322(strm.adler, s.pending_buf, s.pending, 0); + } + s.gzindex = 0; + s.status = EXTRA_STATE; + } + } else { + var header = Z_DEFLATED + (s.w_bits - 8 << 4) << 8; + var level_flags = -1; + if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { + level_flags = 0; + } else if (s.level < 6) { + level_flags = 1; + } else if (s.level === 6) { + level_flags = 2; + } else { + level_flags = 3; + } + header |= level_flags << 6; + if (s.strstart !== 0) { + header |= PRESET_DICT; + } + header += 31 - header % 31; + s.status = BUSY_STATE; + putShortMSB(s, header); + if (s.strstart !== 0) { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 65535); + } + strm.adler = 1; + } + } + if (s.status === EXTRA_STATE) { + if (s.gzhead.extra) { + beg = s.pending; + while (s.gzindex < (s.gzhead.extra.length & 65535)) { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc322(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + break; + } + } + put_byte(s, s.gzhead.extra[s.gzindex] & 255); + s.gzindex++; + } + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc322(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (s.gzindex === s.gzhead.extra.length) { + s.gzindex = 0; + s.status = NAME_STATE; + } + } else { + s.status = NAME_STATE; + } + } + if (s.status === NAME_STATE) { + if (s.gzhead.name) { + beg = s.pending; + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc322(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + if (s.gzindex < s.gzhead.name.length) { + val = s.gzhead.name.charCodeAt(s.gzindex++) & 255; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc322(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.gzindex = 0; + s.status = COMMENT_STATE; + } + } else { + s.status = COMMENT_STATE; + } + } + if (s.status === COMMENT_STATE) { + if (s.gzhead.comment) { + beg = s.pending; + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc322(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + if (s.gzindex < s.gzhead.comment.length) { + val = s.gzhead.comment.charCodeAt(s.gzindex++) & 255; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc322(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.status = HCRC_STATE; + } + } else { + s.status = HCRC_STATE; + } + } + if (s.status === HCRC_STATE) { + if (s.gzhead.hcrc) { + if (s.pending + 2 > s.pending_buf_size) { + flush_pending(strm); + } + if (s.pending + 2 <= s.pending_buf_size) { + put_byte(s, strm.adler & 255); + put_byte(s, strm.adler >> 8 & 255); + strm.adler = 0; + s.status = BUSY_STATE; + } + } else { + s.status = BUSY_STATE; + } + } + if (s.pending !== 0) { + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; + return Z_OK; + } + } else if (strm.avail_in === 0 && rank(flush2) <= rank(old_flush) && flush2 !== Z_FINISH) { + return err(strm, Z_BUF_ERROR); + } + if (s.status === FINISH_STATE && strm.avail_in !== 0) { + return err(strm, Z_BUF_ERROR); + } + if (strm.avail_in !== 0 || s.lookahead !== 0 || flush2 !== Z_NO_FLUSH && s.status !== FINISH_STATE) { + var bstate = s.strategy === Z_HUFFMAN_ONLY ? deflate_huff(s, flush2) : s.strategy === Z_RLE ? deflate_rle(s, flush2) : configuration_table[s.level].func(s, flush2); + if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { + s.status = FINISH_STATE; + } + if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { + if (strm.avail_out === 0) { + s.last_flush = -1; + } + return Z_OK; + } + if (bstate === BS_BLOCK_DONE) { + if (flush2 === Z_PARTIAL_FLUSH) { + trees._tr_align(s); + } else if (flush2 !== Z_BLOCK) { + trees._tr_stored_block(s, 0, 0, false); + if (flush2 === Z_FULL_FLUSH) { + zero(s.head); + if (s.lookahead === 0) { + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + } + } + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; + return Z_OK; + } + } + } + if (flush2 !== Z_FINISH) { + return Z_OK; + } + if (s.wrap <= 0) { + return Z_STREAM_END; + } + if (s.wrap === 2) { + put_byte(s, strm.adler & 255); + put_byte(s, strm.adler >> 8 & 255); + put_byte(s, strm.adler >> 16 & 255); + put_byte(s, strm.adler >> 24 & 255); + put_byte(s, strm.total_in & 255); + put_byte(s, strm.total_in >> 8 & 255); + put_byte(s, strm.total_in >> 16 & 255); + put_byte(s, strm.total_in >> 24 & 255); + } else { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 65535); + } + flush_pending(strm); + if (s.wrap > 0) { + s.wrap = -s.wrap; + } + return s.pending !== 0 ? Z_OK : Z_STREAM_END; + } + function deflateEnd(strm) { + var status2; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + status2 = strm.state.status; + if (status2 !== INIT_STATE && status2 !== EXTRA_STATE && status2 !== NAME_STATE && status2 !== COMMENT_STATE && status2 !== HCRC_STATE && status2 !== BUSY_STATE && status2 !== FINISH_STATE) { + return err(strm, Z_STREAM_ERROR); + } + strm.state = null; + return status2 === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; + } + function deflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + var s; + var str, n; + var wrap; + var avail; + var next; + var input; + var tmpDict; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + s = strm.state; + wrap = s.wrap; + if (wrap === 2 || wrap === 1 && s.status !== INIT_STATE || s.lookahead) { + return Z_STREAM_ERROR; + } + if (wrap === 1) { + strm.adler = adler32(strm.adler, dictionary, dictLength, 0); + } + s.wrap = 0; + if (dictLength >= s.w_size) { + if (wrap === 0) { + zero(s.head); + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + tmpDict = new utils.Buf8(s.w_size); + utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); + dictionary = tmpDict; + dictLength = s.w_size; + } + avail = strm.avail_in; + next = strm.next_in; + input = strm.input; + strm.avail_in = dictLength; + strm.next_in = 0; + strm.input = dictionary; + fill_window(s); + while (s.lookahead >= MIN_MATCH) { + str = s.strstart; + n = s.lookahead - (MIN_MATCH - 1); + do { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + } while (--n); + s.strstart = str; + s.lookahead = MIN_MATCH - 1; + fill_window(s); + } + s.strstart += s.lookahead; + s.block_start = s.strstart; + s.insert = s.lookahead; + s.lookahead = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + strm.next_in = next; + strm.input = input; + strm.avail_in = avail; + s.wrap = wrap; + return Z_OK; + } + exports2.deflateInit = deflateInit; + exports2.deflateInit2 = deflateInit2; + exports2.deflateReset = deflateReset; + exports2.deflateResetKeep = deflateResetKeep; + exports2.deflateSetHeader = deflateSetHeader; + exports2.deflate = deflate2; + exports2.deflateEnd = deflateEnd; + exports2.deflateSetDictionary = deflateSetDictionary; + exports2.deflateInfo = "pako deflate (from Nodeca project)"; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/strings.js +var require_strings = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/strings.js"(exports2) { + "use strict"; + init_polyfill_buffer(); + var utils = require_common(); + var STR_APPLY_OK = true; + var STR_APPLY_UIA_OK = true; + try { + String.fromCharCode.apply(null, [0]); + } catch (__) { + STR_APPLY_OK = false; + } + try { + String.fromCharCode.apply(null, new Uint8Array(1)); + } catch (__) { + STR_APPLY_UIA_OK = false; + } + var _utf8len = new utils.Buf8(256); + for (q = 0; q < 256; q++) { + _utf8len[q] = q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1; + } + var q; + _utf8len[254] = _utf8len[254] = 1; + exports2.string2buf = function(str) { + var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 64512) === 55296 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 64512) === 56320) { + c = 65536 + (c - 55296 << 10) + (c2 - 56320); + m_pos++; + } + } + buf_len += c < 128 ? 1 : c < 2048 ? 2 : c < 65536 ? 3 : 4; + } + buf = new utils.Buf8(buf_len); + for (i = 0, m_pos = 0; i < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 64512) === 55296 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 64512) === 56320) { + c = 65536 + (c - 55296 << 10) + (c2 - 56320); + m_pos++; + } + } + if (c < 128) { + buf[i++] = c; + } else if (c < 2048) { + buf[i++] = 192 | c >>> 6; + buf[i++] = 128 | c & 63; + } else if (c < 65536) { + buf[i++] = 224 | c >>> 12; + buf[i++] = 128 | c >>> 6 & 63; + buf[i++] = 128 | c & 63; + } else { + buf[i++] = 240 | c >>> 18; + buf[i++] = 128 | c >>> 12 & 63; + buf[i++] = 128 | c >>> 6 & 63; + buf[i++] = 128 | c & 63; + } + } + return buf; + }; + function buf2binstring(buf, len) { + if (len < 65534) { + if (buf.subarray && STR_APPLY_UIA_OK || !buf.subarray && STR_APPLY_OK) { + return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); + } + } + var result = ""; + for (var i = 0; i < len; i++) { + result += String.fromCharCode(buf[i]); + } + return result; + } + exports2.buf2binstring = function(buf) { + return buf2binstring(buf, buf.length); + }; + exports2.binstring2buf = function(str) { + var buf = new utils.Buf8(str.length); + for (var i = 0, len = buf.length; i < len; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; + }; + exports2.buf2string = function(buf, max) { + var i, out, c, c_len; + var len = max || buf.length; + var utf16buf = new Array(len * 2); + for (out = 0, i = 0; i < len; ) { + c = buf[i++]; + if (c < 128) { + utf16buf[out++] = c; + continue; + } + c_len = _utf8len[c]; + if (c_len > 4) { + utf16buf[out++] = 65533; + i += c_len - 1; + continue; + } + c &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7; + while (c_len > 1 && i < len) { + c = c << 6 | buf[i++] & 63; + c_len--; + } + if (c_len > 1) { + utf16buf[out++] = 65533; + continue; + } + if (c < 65536) { + utf16buf[out++] = c; + } else { + c -= 65536; + utf16buf[out++] = 55296 | c >> 10 & 1023; + utf16buf[out++] = 56320 | c & 1023; + } + } + return buf2binstring(utf16buf, out); + }; + exports2.utf8border = function(buf, max) { + var pos; + max = max || buf.length; + if (max > buf.length) { + max = buf.length; + } + pos = max - 1; + while (pos >= 0 && (buf[pos] & 192) === 128) { + pos--; + } + if (pos < 0) { + return max; + } + if (pos === 0) { + return max; + } + return pos + _utf8len[buf[pos]] > max ? pos : max; + }; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/zstream.js +var require_zstream = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/zstream.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + function ZStream() { + this.input = null; + this.next_in = 0; + this.avail_in = 0; + this.total_in = 0; + this.output = null; + this.next_out = 0; + this.avail_out = 0; + this.total_out = 0; + this.msg = ""; + this.state = null; + this.data_type = 2; + this.adler = 0; + } + module2.exports = ZStream; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/deflate.js +var require_deflate2 = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/deflate.js"(exports2) { + "use strict"; + init_polyfill_buffer(); + var zlib_deflate = require_deflate(); + var utils = require_common(); + var strings = require_strings(); + var msg = require_messages(); + var ZStream = require_zstream(); + var toString = Object.prototype.toString; + var Z_NO_FLUSH = 0; + var Z_FINISH = 4; + var Z_OK = 0; + var Z_STREAM_END = 1; + var Z_SYNC_FLUSH = 2; + var Z_DEFAULT_COMPRESSION = -1; + var Z_DEFAULT_STRATEGY = 0; + var Z_DEFLATED = 8; + function Deflate(options) { + if (!(this instanceof Deflate)) + return new Deflate(options); + this.options = utils.assign({ + level: Z_DEFAULT_COMPRESSION, + method: Z_DEFLATED, + chunkSize: 16384, + windowBits: 15, + memLevel: 8, + strategy: Z_DEFAULT_STRATEGY, + to: "" + }, options || {}); + var opt = this.options; + if (opt.raw && opt.windowBits > 0) { + opt.windowBits = -opt.windowBits; + } else if (opt.gzip && opt.windowBits > 0 && opt.windowBits < 16) { + opt.windowBits += 16; + } + this.err = 0; + this.msg = ""; + this.ended = false; + this.chunks = []; + this.strm = new ZStream(); + this.strm.avail_out = 0; + var status2 = zlib_deflate.deflateInit2( + this.strm, + opt.level, + opt.method, + opt.windowBits, + opt.memLevel, + opt.strategy + ); + if (status2 !== Z_OK) { + throw new Error(msg[status2]); + } + if (opt.header) { + zlib_deflate.deflateSetHeader(this.strm, opt.header); + } + if (opt.dictionary) { + var dict; + if (typeof opt.dictionary === "string") { + dict = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === "[object ArrayBuffer]") { + dict = new Uint8Array(opt.dictionary); + } else { + dict = opt.dictionary; + } + status2 = zlib_deflate.deflateSetDictionary(this.strm, dict); + if (status2 !== Z_OK) { + throw new Error(msg[status2]); + } + this._dict_set = true; + } + } + Deflate.prototype.push = function(data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var status2, _mode; + if (this.ended) { + return false; + } + _mode = mode === ~~mode ? mode : mode === true ? Z_FINISH : Z_NO_FLUSH; + if (typeof data === "string") { + strm.input = strings.string2buf(data); + } else if (toString.call(data) === "[object ArrayBuffer]") { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + strm.next_in = 0; + strm.avail_in = strm.input.length; + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status2 = zlib_deflate.deflate(strm, _mode); + if (status2 !== Z_STREAM_END && status2 !== Z_OK) { + this.onEnd(status2); + this.ended = true; + return false; + } + if (strm.avail_out === 0 || strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH)) { + if (this.options.to === "string") { + this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status2 !== Z_STREAM_END); + if (_mode === Z_FINISH) { + status2 = zlib_deflate.deflateEnd(this.strm); + this.onEnd(status2); + this.ended = true; + return status2 === Z_OK; + } + if (_mode === Z_SYNC_FLUSH) { + this.onEnd(Z_OK); + strm.avail_out = 0; + return true; + } + return true; + }; + Deflate.prototype.onData = function(chunk) { + this.chunks.push(chunk); + }; + Deflate.prototype.onEnd = function(status2) { + if (status2 === Z_OK) { + if (this.options.to === "string") { + this.result = this.chunks.join(""); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status2; + this.msg = this.strm.msg; + }; + function deflate2(input, options) { + var deflator = new Deflate(options); + deflator.push(input, true); + if (deflator.err) { + throw deflator.msg || msg[deflator.err]; + } + return deflator.result; + } + function deflateRaw(input, options) { + options = options || {}; + options.raw = true; + return deflate2(input, options); + } + function gzip(input, options) { + options = options || {}; + options.gzip = true; + return deflate2(input, options); + } + exports2.Deflate = Deflate; + exports2.deflate = deflate2; + exports2.deflateRaw = deflateRaw; + exports2.gzip = gzip; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inffast.js +var require_inffast = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inffast.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var BAD = 30; + var TYPE = 12; + module2.exports = function inflate_fast(strm, start) { + var state; + var _in; + var last2; + var _out; + var beg; + var end; + var dmax; + var wsize; + var whave; + var wnext; + var s_window; + var hold; + var bits; + var lcode; + var dcode; + var lmask; + var dmask; + var here; + var op; + var len; + var dist; + var from; + var from_source; + var input, output; + state = strm.state; + _in = strm.next_in; + input = strm.input; + last2 = _in + (strm.avail_in - 5); + _out = strm.next_out; + output = strm.output; + beg = _out - (start - strm.avail_out); + end = _out + (strm.avail_out - 257); + dmax = state.dmax; + wsize = state.wsize; + whave = state.whave; + wnext = state.wnext; + s_window = state.window; + hold = state.hold; + bits = state.bits; + lcode = state.lencode; + dcode = state.distcode; + lmask = (1 << state.lenbits) - 1; + dmask = (1 << state.distbits) - 1; + top: + do { + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = lcode[hold & lmask]; + dolen: + for (; ; ) { + op = here >>> 24; + hold >>>= op; + bits -= op; + op = here >>> 16 & 255; + if (op === 0) { + output[_out++] = here & 65535; + } else if (op & 16) { + len = here & 65535; + op &= 15; + if (op) { + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + len += hold & (1 << op) - 1; + hold >>>= op; + bits -= op; + } + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = dcode[hold & dmask]; + dodist: + for (; ; ) { + op = here >>> 24; + hold >>>= op; + bits -= op; + op = here >>> 16 & 255; + if (op & 16) { + dist = here & 65535; + op &= 15; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + } + dist += hold & (1 << op) - 1; + if (dist > dmax) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break top; + } + hold >>>= op; + bits -= op; + op = _out - beg; + if (dist > op) { + op = dist - op; + if (op > whave) { + if (state.sane) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break top; + } + } + from = 0; + from_source = s_window; + if (wnext === 0) { + from += wsize - op; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } else if (wnext < op) { + from += wsize + wnext - op; + op -= wnext; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = 0; + if (wnext < len) { + op = wnext; + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } + } else { + from += wnext - op; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } + while (len > 2) { + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + len -= 3; + } + if (len) { + output[_out++] = from_source[from++]; + if (len > 1) { + output[_out++] = from_source[from++]; + } + } + } else { + from = _out - dist; + do { + output[_out++] = output[from++]; + output[_out++] = output[from++]; + output[_out++] = output[from++]; + len -= 3; + } while (len > 2); + if (len) { + output[_out++] = output[from++]; + if (len > 1) { + output[_out++] = output[from++]; + } + } + } + } else if ((op & 64) === 0) { + here = dcode[(here & 65535) + (hold & (1 << op) - 1)]; + continue dodist; + } else { + strm.msg = "invalid distance code"; + state.mode = BAD; + break top; + } + break; + } + } else if ((op & 64) === 0) { + here = lcode[(here & 65535) + (hold & (1 << op) - 1)]; + continue dolen; + } else if (op & 32) { + state.mode = TYPE; + break top; + } else { + strm.msg = "invalid literal/length code"; + state.mode = BAD; + break top; + } + break; + } + } while (_in < last2 && _out < end); + len = bits >> 3; + _in -= len; + bits -= len << 3; + hold &= (1 << bits) - 1; + strm.next_in = _in; + strm.next_out = _out; + strm.avail_in = _in < last2 ? 5 + (last2 - _in) : 5 - (_in - last2); + strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end); + state.hold = hold; + state.bits = bits; + return; + }; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inftrees.js +var require_inftrees = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inftrees.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var utils = require_common(); + var MAXBITS = 15; + var ENOUGH_LENS = 852; + var ENOUGH_DISTS = 592; + var CODES = 0; + var LENS = 1; + var DISTS = 2; + var lbase = [ + /* Length codes 257..285 base */ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 13, + 15, + 17, + 19, + 23, + 27, + 31, + 35, + 43, + 51, + 59, + 67, + 83, + 99, + 115, + 131, + 163, + 195, + 227, + 258, + 0, + 0 + ]; + var lext = [ + /* Length codes 257..285 extra */ + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 17, + 17, + 17, + 18, + 18, + 18, + 18, + 19, + 19, + 19, + 19, + 20, + 20, + 20, + 20, + 21, + 21, + 21, + 21, + 16, + 72, + 78 + ]; + var dbase = [ + /* Distance codes 0..29 base */ + 1, + 2, + 3, + 4, + 5, + 7, + 9, + 13, + 17, + 25, + 33, + 49, + 65, + 97, + 129, + 193, + 257, + 385, + 513, + 769, + 1025, + 1537, + 2049, + 3073, + 4097, + 6145, + 8193, + 12289, + 16385, + 24577, + 0, + 0 + ]; + var dext = [ + /* Distance codes 0..29 extra */ + 16, + 16, + 16, + 16, + 17, + 17, + 18, + 18, + 19, + 19, + 20, + 20, + 21, + 21, + 22, + 22, + 23, + 23, + 24, + 24, + 25, + 25, + 26, + 26, + 27, + 27, + 28, + 28, + 29, + 29, + 64, + 64 + ]; + module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) { + var bits = opts.bits; + var len = 0; + var sym = 0; + var min = 0, max = 0; + var root2 = 0; + var curr = 0; + var drop = 0; + var left = 0; + var used = 0; + var huff = 0; + var incr; + var fill; + var low; + var mask; + var next; + var base = null; + var base_index = 0; + var end; + var count = new utils.Buf16(MAXBITS + 1); + var offs = new utils.Buf16(MAXBITS + 1); + var extra = null; + var extra_index = 0; + var here_bits, here_op, here_val; + for (len = 0; len <= MAXBITS; len++) { + count[len] = 0; + } + for (sym = 0; sym < codes; sym++) { + count[lens[lens_index + sym]]++; + } + root2 = bits; + for (max = MAXBITS; max >= 1; max--) { + if (count[max] !== 0) { + break; + } + } + if (root2 > max) { + root2 = max; + } + if (max === 0) { + table[table_index++] = 1 << 24 | 64 << 16 | 0; + table[table_index++] = 1 << 24 | 64 << 16 | 0; + opts.bits = 1; + return 0; + } + for (min = 1; min < max; min++) { + if (count[min] !== 0) { + break; + } + } + if (root2 < min) { + root2 = min; + } + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) { + return -1; + } + } + if (left > 0 && (type === CODES || max !== 1)) { + return -1; + } + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) { + offs[len + 1] = offs[len] + count[len]; + } + for (sym = 0; sym < codes; sym++) { + if (lens[lens_index + sym] !== 0) { + work[offs[lens[lens_index + sym]]++] = sym; + } + } + if (type === CODES) { + base = extra = work; + end = 19; + } else if (type === LENS) { + base = lbase; + base_index -= 257; + extra = lext; + extra_index -= 257; + end = 256; + } else { + base = dbase; + extra = dext; + end = -1; + } + huff = 0; + sym = 0; + len = min; + next = table_index; + curr = root2; + drop = 0; + low = -1; + used = 1 << root2; + mask = used - 1; + if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { + return 1; + } + for (; ; ) { + here_bits = len - drop; + if (work[sym] < end) { + here_op = 0; + here_val = work[sym]; + } else if (work[sym] > end) { + here_op = extra[extra_index + work[sym]]; + here_val = base[base_index + work[sym]]; + } else { + here_op = 32 + 64; + here_val = 0; + } + incr = 1 << len - drop; + fill = 1 << curr; + min = fill; + do { + fill -= incr; + table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0; + } while (fill !== 0); + incr = 1 << len - 1; + while (huff & incr) { + incr >>= 1; + } + if (incr !== 0) { + huff &= incr - 1; + huff += incr; + } else { + huff = 0; + } + sym++; + if (--count[len] === 0) { + if (len === max) { + break; + } + len = lens[lens_index + work[sym]]; + } + if (len > root2 && (huff & mask) !== low) { + if (drop === 0) { + drop = root2; + } + next += min; + curr = len - drop; + left = 1 << curr; + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) { + break; + } + curr++; + left <<= 1; + } + used += 1 << curr; + if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { + return 1; + } + low = huff & mask; + table[low] = root2 << 24 | curr << 16 | next - table_index | 0; + } + } + if (huff !== 0) { + table[next + huff] = len - drop << 24 | 64 << 16 | 0; + } + opts.bits = root2; + return 0; + }; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inflate.js +var require_inflate = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inflate.js"(exports2) { + "use strict"; + init_polyfill_buffer(); + var utils = require_common(); + var adler32 = require_adler32(); + var crc322 = require_crc322(); + var inflate_fast = require_inffast(); + var inflate_table = require_inftrees(); + var CODES = 0; + var LENS = 1; + var DISTS = 2; + var Z_FINISH = 4; + var Z_BLOCK = 5; + var Z_TREES = 6; + var Z_OK = 0; + var Z_STREAM_END = 1; + var Z_NEED_DICT = 2; + var Z_STREAM_ERROR = -2; + var Z_DATA_ERROR = -3; + var Z_MEM_ERROR = -4; + var Z_BUF_ERROR = -5; + var Z_DEFLATED = 8; + var HEAD = 1; + var FLAGS = 2; + var TIME = 3; + var OS = 4; + var EXLEN = 5; + var EXTRA2 = 6; + var NAME = 7; + var COMMENT = 8; + var HCRC = 9; + var DICTID = 10; + var DICT = 11; + var TYPE = 12; + var TYPEDO = 13; + var STORED = 14; + var COPY_ = 15; + var COPY = 16; + var TABLE = 17; + var LENLENS = 18; + var CODELENS = 19; + var LEN_ = 20; + var LEN = 21; + var LENEXT = 22; + var DIST = 23; + var DISTEXT = 24; + var MATCH = 25; + var LIT = 26; + var CHECK = 27; + var LENGTH = 28; + var DONE = 29; + var BAD = 30; + var MEM = 31; + var SYNC = 32; + var ENOUGH_LENS = 852; + var ENOUGH_DISTS = 592; + var MAX_WBITS = 15; + var DEF_WBITS = MAX_WBITS; + function zswap32(q) { + return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24); + } + function InflateState() { + this.mode = 0; + this.last = false; + this.wrap = 0; + this.havedict = false; + this.flags = 0; + this.dmax = 0; + this.check = 0; + this.total = 0; + this.head = null; + this.wbits = 0; + this.wsize = 0; + this.whave = 0; + this.wnext = 0; + this.window = null; + this.hold = 0; + this.bits = 0; + this.length = 0; + this.offset = 0; + this.extra = 0; + this.lencode = null; + this.distcode = null; + this.lenbits = 0; + this.distbits = 0; + this.ncode = 0; + this.nlen = 0; + this.ndist = 0; + this.have = 0; + this.next = null; + this.lens = new utils.Buf16(320); + this.work = new utils.Buf16(288); + this.lendyn = null; + this.distdyn = null; + this.sane = 0; + this.back = 0; + this.was = 0; + } + function inflateResetKeep(strm) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + strm.total_in = strm.total_out = state.total = 0; + strm.msg = ""; + if (state.wrap) { + strm.adler = state.wrap & 1; + } + state.mode = HEAD; + state.last = 0; + state.havedict = 0; + state.dmax = 32768; + state.head = null; + state.hold = 0; + state.bits = 0; + state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); + state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); + state.sane = 1; + state.back = -1; + return Z_OK; + } + function inflateReset(strm) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + state.wsize = 0; + state.whave = 0; + state.wnext = 0; + return inflateResetKeep(strm); + } + function inflateReset2(strm, windowBits) { + var wrap; + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } else { + wrap = (windowBits >> 4) + 1; + if (windowBits < 48) { + windowBits &= 15; + } + } + if (windowBits && (windowBits < 8 || windowBits > 15)) { + return Z_STREAM_ERROR; + } + if (state.window !== null && state.wbits !== windowBits) { + state.window = null; + } + state.wrap = wrap; + state.wbits = windowBits; + return inflateReset(strm); + } + function inflateInit2(strm, windowBits) { + var ret; + var state; + if (!strm) { + return Z_STREAM_ERROR; + } + state = new InflateState(); + strm.state = state; + state.window = null; + ret = inflateReset2(strm, windowBits); + if (ret !== Z_OK) { + strm.state = null; + } + return ret; + } + function inflateInit(strm) { + return inflateInit2(strm, DEF_WBITS); + } + var virgin = true; + var lenfix; + var distfix; + function fixedtables(state) { + if (virgin) { + var sym; + lenfix = new utils.Buf32(512); + distfix = new utils.Buf32(32); + sym = 0; + while (sym < 144) { + state.lens[sym++] = 8; + } + while (sym < 256) { + state.lens[sym++] = 9; + } + while (sym < 280) { + state.lens[sym++] = 7; + } + while (sym < 288) { + state.lens[sym++] = 8; + } + inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); + sym = 0; + while (sym < 32) { + state.lens[sym++] = 5; + } + inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); + virgin = false; + } + state.lencode = lenfix; + state.lenbits = 9; + state.distcode = distfix; + state.distbits = 5; + } + function updatewindow(strm, src, end, copy2) { + var dist; + var state = strm.state; + if (state.window === null) { + state.wsize = 1 << state.wbits; + state.wnext = 0; + state.whave = 0; + state.window = new utils.Buf8(state.wsize); + } + if (copy2 >= state.wsize) { + utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); + state.wnext = 0; + state.whave = state.wsize; + } else { + dist = state.wsize - state.wnext; + if (dist > copy2) { + dist = copy2; + } + utils.arraySet(state.window, src, end - copy2, dist, state.wnext); + copy2 -= dist; + if (copy2) { + utils.arraySet(state.window, src, end - copy2, copy2, 0); + state.wnext = copy2; + state.whave = state.wsize; + } else { + state.wnext += dist; + if (state.wnext === state.wsize) { + state.wnext = 0; + } + if (state.whave < state.wsize) { + state.whave += dist; + } + } + } + return 0; + } + function inflate2(strm, flush2) { + var state; + var input, output; + var next; + var put; + var have, left; + var hold; + var bits; + var _in, _out; + var copy2; + var from; + var from_source; + var here = 0; + var here_bits, here_op, here_val; + var last_bits, last_op, last_val; + var len; + var ret; + var hbuf = new utils.Buf8(4); + var opts; + var n; + var order = ( + /* permutation of code lengths */ + [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15] + ); + if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (state.mode === TYPE) { + state.mode = TYPEDO; + } + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + _in = have; + _out = left; + ret = Z_OK; + inf_leave: + for (; ; ) { + switch (state.mode) { + case HEAD: + if (state.wrap === 0) { + state.mode = TYPEDO; + break; + } + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.wrap & 2 && hold === 35615) { + state.check = 0; + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc322(state.check, hbuf, 2, 0); + hold = 0; + bits = 0; + state.mode = FLAGS; + break; + } + state.flags = 0; + if (state.head) { + state.head.done = false; + } + if (!(state.wrap & 1) || /* check if zlib header allowed */ + (((hold & 255) << 8) + (hold >> 8)) % 31) { + strm.msg = "incorrect header check"; + state.mode = BAD; + break; + } + if ((hold & 15) !== Z_DEFLATED) { + strm.msg = "unknown compression method"; + state.mode = BAD; + break; + } + hold >>>= 4; + bits -= 4; + len = (hold & 15) + 8; + if (state.wbits === 0) { + state.wbits = len; + } else if (len > state.wbits) { + strm.msg = "invalid window size"; + state.mode = BAD; + break; + } + state.dmax = 1 << len; + strm.adler = state.check = 1; + state.mode = hold & 512 ? DICTID : TYPE; + hold = 0; + bits = 0; + break; + case FLAGS: + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.flags = hold; + if ((state.flags & 255) !== Z_DEFLATED) { + strm.msg = "unknown compression method"; + state.mode = BAD; + break; + } + if (state.flags & 57344) { + strm.msg = "unknown header flags set"; + state.mode = BAD; + break; + } + if (state.head) { + state.head.text = hold >> 8 & 1; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc322(state.check, hbuf, 2, 0); + } + hold = 0; + bits = 0; + state.mode = TIME; + case TIME: + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.head) { + state.head.time = hold; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + hbuf[2] = hold >>> 16 & 255; + hbuf[3] = hold >>> 24 & 255; + state.check = crc322(state.check, hbuf, 4, 0); + } + hold = 0; + bits = 0; + state.mode = OS; + case OS: + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.head) { + state.head.xflags = hold & 255; + state.head.os = hold >> 8; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc322(state.check, hbuf, 2, 0); + } + hold = 0; + bits = 0; + state.mode = EXLEN; + case EXLEN: + if (state.flags & 1024) { + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.length = hold; + if (state.head) { + state.head.extra_len = hold; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc322(state.check, hbuf, 2, 0); + } + hold = 0; + bits = 0; + } else if (state.head) { + state.head.extra = null; + } + state.mode = EXTRA2; + case EXTRA2: + if (state.flags & 1024) { + copy2 = state.length; + if (copy2 > have) { + copy2 = have; + } + if (copy2) { + if (state.head) { + len = state.head.extra_len - state.length; + if (!state.head.extra) { + state.head.extra = new Array(state.head.extra_len); + } + utils.arraySet( + state.head.extra, + input, + next, + // extra field is limited to 65536 bytes + // - no need for additional size check + copy2, + /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ + len + ); + } + if (state.flags & 512) { + state.check = crc322(state.check, input, copy2, next); + } + have -= copy2; + next += copy2; + state.length -= copy2; + } + if (state.length) { + break inf_leave; + } + } + state.length = 0; + state.mode = NAME; + case NAME: + if (state.flags & 2048) { + if (have === 0) { + break inf_leave; + } + copy2 = 0; + do { + len = input[next + copy2++]; + if (state.head && len && state.length < 65536) { + state.head.name += String.fromCharCode(len); + } + } while (len && copy2 < have); + if (state.flags & 512) { + state.check = crc322(state.check, input, copy2, next); + } + have -= copy2; + next += copy2; + if (len) { + break inf_leave; + } + } else if (state.head) { + state.head.name = null; + } + state.length = 0; + state.mode = COMMENT; + case COMMENT: + if (state.flags & 4096) { + if (have === 0) { + break inf_leave; + } + copy2 = 0; + do { + len = input[next + copy2++]; + if (state.head && len && state.length < 65536) { + state.head.comment += String.fromCharCode(len); + } + } while (len && copy2 < have); + if (state.flags & 512) { + state.check = crc322(state.check, input, copy2, next); + } + have -= copy2; + next += copy2; + if (len) { + break inf_leave; + } + } else if (state.head) { + state.head.comment = null; + } + state.mode = HCRC; + case HCRC: + if (state.flags & 512) { + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (hold !== (state.check & 65535)) { + strm.msg = "header crc mismatch"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + if (state.head) { + state.head.hcrc = state.flags >> 9 & 1; + state.head.done = true; + } + strm.adler = state.check = 0; + state.mode = TYPE; + break; + case DICTID: + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + strm.adler = state.check = zswap32(hold); + hold = 0; + bits = 0; + state.mode = DICT; + case DICT: + if (state.havedict === 0) { + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + return Z_NEED_DICT; + } + strm.adler = state.check = 1; + state.mode = TYPE; + case TYPE: + if (flush2 === Z_BLOCK || flush2 === Z_TREES) { + break inf_leave; + } + case TYPEDO: + if (state.last) { + hold >>>= bits & 7; + bits -= bits & 7; + state.mode = CHECK; + break; + } + while (bits < 3) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.last = hold & 1; + hold >>>= 1; + bits -= 1; + switch (hold & 3) { + case 0: + state.mode = STORED; + break; + case 1: + fixedtables(state); + state.mode = LEN_; + if (flush2 === Z_TREES) { + hold >>>= 2; + bits -= 2; + break inf_leave; + } + break; + case 2: + state.mode = TABLE; + break; + case 3: + strm.msg = "invalid block type"; + state.mode = BAD; + } + hold >>>= 2; + bits -= 2; + break; + case STORED: + hold >>>= bits & 7; + bits -= bits & 7; + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if ((hold & 65535) !== (hold >>> 16 ^ 65535)) { + strm.msg = "invalid stored block lengths"; + state.mode = BAD; + break; + } + state.length = hold & 65535; + hold = 0; + bits = 0; + state.mode = COPY_; + if (flush2 === Z_TREES) { + break inf_leave; + } + case COPY_: + state.mode = COPY; + case COPY: + copy2 = state.length; + if (copy2) { + if (copy2 > have) { + copy2 = have; + } + if (copy2 > left) { + copy2 = left; + } + if (copy2 === 0) { + break inf_leave; + } + utils.arraySet(output, input, next, copy2, put); + have -= copy2; + next += copy2; + left -= copy2; + put += copy2; + state.length -= copy2; + break; + } + state.mode = TYPE; + break; + case TABLE: + while (bits < 14) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.nlen = (hold & 31) + 257; + hold >>>= 5; + bits -= 5; + state.ndist = (hold & 31) + 1; + hold >>>= 5; + bits -= 5; + state.ncode = (hold & 15) + 4; + hold >>>= 4; + bits -= 4; + if (state.nlen > 286 || state.ndist > 30) { + strm.msg = "too many length or distance symbols"; + state.mode = BAD; + break; + } + state.have = 0; + state.mode = LENLENS; + case LENLENS: + while (state.have < state.ncode) { + while (bits < 3) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.lens[order[state.have++]] = hold & 7; + hold >>>= 3; + bits -= 3; + } + while (state.have < 19) { + state.lens[order[state.have++]] = 0; + } + state.lencode = state.lendyn; + state.lenbits = 7; + opts = { bits: state.lenbits }; + ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + if (ret) { + strm.msg = "invalid code lengths set"; + state.mode = BAD; + break; + } + state.have = 0; + state.mode = CODELENS; + case CODELENS: + while (state.have < state.nlen + state.ndist) { + for (; ; ) { + here = state.lencode[hold & (1 << state.lenbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (here_val < 16) { + hold >>>= here_bits; + bits -= here_bits; + state.lens[state.have++] = here_val; + } else { + if (here_val === 16) { + n = here_bits + 2; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + if (state.have === 0) { + strm.msg = "invalid bit length repeat"; + state.mode = BAD; + break; + } + len = state.lens[state.have - 1]; + copy2 = 3 + (hold & 3); + hold >>>= 2; + bits -= 2; + } else if (here_val === 17) { + n = here_bits + 3; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + len = 0; + copy2 = 3 + (hold & 7); + hold >>>= 3; + bits -= 3; + } else { + n = here_bits + 7; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + len = 0; + copy2 = 11 + (hold & 127); + hold >>>= 7; + bits -= 7; + } + if (state.have + copy2 > state.nlen + state.ndist) { + strm.msg = "invalid bit length repeat"; + state.mode = BAD; + break; + } + while (copy2--) { + state.lens[state.have++] = len; + } + } + } + if (state.mode === BAD) { + break; + } + if (state.lens[256] === 0) { + strm.msg = "invalid code -- missing end-of-block"; + state.mode = BAD; + break; + } + state.lenbits = 9; + opts = { bits: state.lenbits }; + ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + if (ret) { + strm.msg = "invalid literal/lengths set"; + state.mode = BAD; + break; + } + state.distbits = 6; + state.distcode = state.distdyn; + opts = { bits: state.distbits }; + ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); + state.distbits = opts.bits; + if (ret) { + strm.msg = "invalid distances set"; + state.mode = BAD; + break; + } + state.mode = LEN_; + if (flush2 === Z_TREES) { + break inf_leave; + } + case LEN_: + state.mode = LEN; + case LEN: + if (have >= 6 && left >= 258) { + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + inflate_fast(strm, _out); + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + if (state.mode === TYPE) { + state.back = -1; + } + break; + } + state.back = 0; + for (; ; ) { + here = state.lencode[hold & (1 << state.lenbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (here_op && (here_op & 240) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (; ; ) { + here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (last_bits + here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= last_bits; + bits -= last_bits; + state.back += last_bits; + } + hold >>>= here_bits; + bits -= here_bits; + state.back += here_bits; + state.length = here_val; + if (here_op === 0) { + state.mode = LIT; + break; + } + if (here_op & 32) { + state.back = -1; + state.mode = TYPE; + break; + } + if (here_op & 64) { + strm.msg = "invalid literal/length code"; + state.mode = BAD; + break; + } + state.extra = here_op & 15; + state.mode = LENEXT; + case LENEXT: + if (state.extra) { + n = state.extra; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.length += hold & (1 << state.extra) - 1; + hold >>>= state.extra; + bits -= state.extra; + state.back += state.extra; + } + state.was = state.length; + state.mode = DIST; + case DIST: + for (; ; ) { + here = state.distcode[hold & (1 << state.distbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if ((here_op & 240) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (; ; ) { + here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (last_bits + here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= last_bits; + bits -= last_bits; + state.back += last_bits; + } + hold >>>= here_bits; + bits -= here_bits; + state.back += here_bits; + if (here_op & 64) { + strm.msg = "invalid distance code"; + state.mode = BAD; + break; + } + state.offset = here_val; + state.extra = here_op & 15; + state.mode = DISTEXT; + case DISTEXT: + if (state.extra) { + n = state.extra; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.offset += hold & (1 << state.extra) - 1; + hold >>>= state.extra; + bits -= state.extra; + state.back += state.extra; + } + if (state.offset > state.dmax) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break; + } + state.mode = MATCH; + case MATCH: + if (left === 0) { + break inf_leave; + } + copy2 = _out - left; + if (state.offset > copy2) { + copy2 = state.offset - copy2; + if (copy2 > state.whave) { + if (state.sane) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break; + } + } + if (copy2 > state.wnext) { + copy2 -= state.wnext; + from = state.wsize - copy2; + } else { + from = state.wnext - copy2; + } + if (copy2 > state.length) { + copy2 = state.length; + } + from_source = state.window; + } else { + from_source = output; + from = put - state.offset; + copy2 = state.length; + } + if (copy2 > left) { + copy2 = left; + } + left -= copy2; + state.length -= copy2; + do { + output[put++] = from_source[from++]; + } while (--copy2); + if (state.length === 0) { + state.mode = LEN; + } + break; + case LIT: + if (left === 0) { + break inf_leave; + } + output[put++] = state.length; + left--; + state.mode = LEN; + break; + case CHECK: + if (state.wrap) { + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold |= input[next++] << bits; + bits += 8; + } + _out -= left; + strm.total_out += _out; + state.total += _out; + if (_out) { + strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/ + state.flags ? crc322(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out); + } + _out = left; + if ((state.flags ? hold : zswap32(hold)) !== state.check) { + strm.msg = "incorrect data check"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + state.mode = LENGTH; + case LENGTH: + if (state.wrap && state.flags) { + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (hold !== (state.total & 4294967295)) { + strm.msg = "incorrect length check"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + state.mode = DONE; + case DONE: + ret = Z_STREAM_END; + break inf_leave; + case BAD: + ret = Z_DATA_ERROR; + break inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + default: + return Z_STREAM_ERROR; + } + } + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + if (state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush2 !== Z_FINISH)) { + if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { + state.mode = MEM; + return Z_MEM_ERROR; + } + } + _in -= strm.avail_in; + _out -= strm.avail_out; + strm.total_in += _in; + strm.total_out += _out; + state.total += _out; + if (state.wrap && _out) { + strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ + state.flags ? crc322(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out); + } + strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); + if ((_in === 0 && _out === 0 || flush2 === Z_FINISH) && ret === Z_OK) { + ret = Z_BUF_ERROR; + } + return ret; + } + function inflateEnd(strm) { + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + var state = strm.state; + if (state.window) { + state.window = null; + } + strm.state = null; + return Z_OK; + } + function inflateGetHeader(strm, head) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if ((state.wrap & 2) === 0) { + return Z_STREAM_ERROR; + } + state.head = head; + head.done = false; + return Z_OK; + } + function inflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + var state; + var dictid; + var ret; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (state.wrap !== 0 && state.mode !== DICT) { + return Z_STREAM_ERROR; + } + if (state.mode === DICT) { + dictid = 1; + dictid = adler32(dictid, dictionary, dictLength, 0); + if (dictid !== state.check) { + return Z_DATA_ERROR; + } + } + ret = updatewindow(strm, dictionary, dictLength, dictLength); + if (ret) { + state.mode = MEM; + return Z_MEM_ERROR; + } + state.havedict = 1; + return Z_OK; + } + exports2.inflateReset = inflateReset; + exports2.inflateReset2 = inflateReset2; + exports2.inflateResetKeep = inflateResetKeep; + exports2.inflateInit = inflateInit; + exports2.inflateInit2 = inflateInit2; + exports2.inflate = inflate2; + exports2.inflateEnd = inflateEnd; + exports2.inflateGetHeader = inflateGetHeader; + exports2.inflateSetDictionary = inflateSetDictionary; + exports2.inflateInfo = "pako inflate (from Nodeca project)"; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/constants.js +var require_constants = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/constants.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = { + /* Allowed flush values; see deflate() and inflate() below for details */ + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + /* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + //Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + //Z_VERSION_ERROR: -6, + /* compression levels */ + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + /* Possible values of the data_type field (though see inflate()) */ + Z_BINARY: 0, + Z_TEXT: 1, + //Z_ASCII: 1, // = Z_TEXT (deprecated) + Z_UNKNOWN: 2, + /* The deflate compression method */ + Z_DEFLATED: 8 + //Z_NULL: null // Use -1 or null inline, depending on var type + }; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/gzheader.js +var require_gzheader = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/gzheader.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + function GZheader() { + this.text = 0; + this.time = 0; + this.xflags = 0; + this.os = 0; + this.extra = null; + this.extra_len = 0; + this.name = ""; + this.comment = ""; + this.hcrc = 0; + this.done = false; + } + module2.exports = GZheader; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/inflate.js +var require_inflate2 = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/inflate.js"(exports2) { + "use strict"; + init_polyfill_buffer(); + var zlib_inflate = require_inflate(); + var utils = require_common(); + var strings = require_strings(); + var c = require_constants(); + var msg = require_messages(); + var ZStream = require_zstream(); + var GZheader = require_gzheader(); + var toString = Object.prototype.toString; + function Inflate(options) { + if (!(this instanceof Inflate)) + return new Inflate(options); + this.options = utils.assign({ + chunkSize: 16384, + windowBits: 0, + to: "" + }, options || {}); + var opt = this.options; + if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) { + opt.windowBits = -opt.windowBits; + if (opt.windowBits === 0) { + opt.windowBits = -15; + } + } + if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) { + opt.windowBits += 32; + } + if (opt.windowBits > 15 && opt.windowBits < 48) { + if ((opt.windowBits & 15) === 0) { + opt.windowBits |= 15; + } + } + this.err = 0; + this.msg = ""; + this.ended = false; + this.chunks = []; + this.strm = new ZStream(); + this.strm.avail_out = 0; + var status2 = zlib_inflate.inflateInit2( + this.strm, + opt.windowBits + ); + if (status2 !== c.Z_OK) { + throw new Error(msg[status2]); + } + this.header = new GZheader(); + zlib_inflate.inflateGetHeader(this.strm, this.header); + if (opt.dictionary) { + if (typeof opt.dictionary === "string") { + opt.dictionary = strings.string2buf(opt.dictionary); + } else if (toString.call(opt.dictionary) === "[object ArrayBuffer]") { + opt.dictionary = new Uint8Array(opt.dictionary); + } + if (opt.raw) { + status2 = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); + if (status2 !== c.Z_OK) { + throw new Error(msg[status2]); + } + } + } + } + Inflate.prototype.push = function(data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var dictionary = this.options.dictionary; + var status2, _mode; + var next_out_utf8, tail, utf8str; + var allowBufError = false; + if (this.ended) { + return false; + } + _mode = mode === ~~mode ? mode : mode === true ? c.Z_FINISH : c.Z_NO_FLUSH; + if (typeof data === "string") { + strm.input = strings.binstring2buf(data); + } else if (toString.call(data) === "[object ArrayBuffer]") { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + strm.next_in = 0; + strm.avail_in = strm.input.length; + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status2 = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); + if (status2 === c.Z_NEED_DICT && dictionary) { + status2 = zlib_inflate.inflateSetDictionary(this.strm, dictionary); + } + if (status2 === c.Z_BUF_ERROR && allowBufError === true) { + status2 = c.Z_OK; + allowBufError = false; + } + if (status2 !== c.Z_STREAM_END && status2 !== c.Z_OK) { + this.onEnd(status2); + this.ended = true; + return false; + } + if (strm.next_out) { + if (strm.avail_out === 0 || status2 === c.Z_STREAM_END || strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH)) { + if (this.options.to === "string") { + next_out_utf8 = strings.utf8border(strm.output, strm.next_out); + tail = strm.next_out - next_out_utf8; + utf8str = strings.buf2string(strm.output, next_out_utf8); + strm.next_out = tail; + strm.avail_out = chunkSize - tail; + if (tail) { + utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); + } + this.onData(utf8str); + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } + if (strm.avail_in === 0 && strm.avail_out === 0) { + allowBufError = true; + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status2 !== c.Z_STREAM_END); + if (status2 === c.Z_STREAM_END) { + _mode = c.Z_FINISH; + } + if (_mode === c.Z_FINISH) { + status2 = zlib_inflate.inflateEnd(this.strm); + this.onEnd(status2); + this.ended = true; + return status2 === c.Z_OK; + } + if (_mode === c.Z_SYNC_FLUSH) { + this.onEnd(c.Z_OK); + strm.avail_out = 0; + return true; + } + return true; + }; + Inflate.prototype.onData = function(chunk) { + this.chunks.push(chunk); + }; + Inflate.prototype.onEnd = function(status2) { + if (status2 === c.Z_OK) { + if (this.options.to === "string") { + this.result = this.chunks.join(""); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status2; + this.msg = this.strm.msg; + }; + function inflate2(input, options) { + var inflator = new Inflate(options); + inflator.push(input, true); + if (inflator.err) { + throw inflator.msg || msg[inflator.err]; + } + return inflator.result; + } + function inflateRaw(input, options) { + options = options || {}; + options.raw = true; + return inflate2(input, options); + } + exports2.Inflate = Inflate; + exports2.inflate = inflate2; + exports2.inflateRaw = inflateRaw; + exports2.ungzip = inflate2; + } +}); + +// node_modules/.pnpm/pako@1.0.11/node_modules/pako/index.js +var require_pako = __commonJS({ + "node_modules/.pnpm/pako@1.0.11/node_modules/pako/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var assign2 = require_common().assign; + var deflate2 = require_deflate2(); + var inflate2 = require_inflate2(); + var constants = require_constants(); + var pako2 = {}; + assign2(pako2, deflate2, inflate2, constants); + module2.exports = pako2; + } +}); + +// node_modules/.pnpm/pify@4.0.1/node_modules/pify/index.js +var require_pify = __commonJS({ + "node_modules/.pnpm/pify@4.0.1/node_modules/pify/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var processFn = (fn, options) => function(...args) { + const P = options.promiseModule; + return new P((resolve, reject) => { + if (options.multiArgs) { + args.push((...result) => { + if (options.errorFirst) { + if (result[0]) { + reject(result); + } else { + result.shift(); + resolve(result); + } + } else { + resolve(result); + } + }); + } else if (options.errorFirst) { + args.push((error, result) => { + if (error) { + reject(error); + } else { + resolve(result); + } + }); + } else { + args.push(resolve); + } + fn.apply(this, args); + }); + }; + module2.exports = (input, options) => { + options = Object.assign({ + exclude: [/.+(Sync|Stream)$/], + errorFirst: true, + promiseModule: Promise + }, options); + const objType = typeof input; + if (!(input !== null && (objType === "object" || objType === "function"))) { + throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${input === null ? "null" : objType}\``); + } + const filter = (key2) => { + const match = (pattern) => typeof pattern === "string" ? key2 === pattern : pattern.test(key2); + return options.include ? options.include.some(match) : !options.exclude.some(match); + }; + let ret; + if (objType === "function") { + ret = function(...args) { + return options.excludeMain ? input(...args) : processFn(input, options).apply(this, args); + }; + } else { + ret = Object.create(Object.getPrototypeOf(input)); + } + for (const key2 in input) { + const property = input[key2]; + ret[key2] = typeof property === "function" && filter(key2) ? processFn(property, options) : property; + } + return ret; + }; + } +}); + +// node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js +var require_ignore = __commonJS({ + "node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js"(exports2, module2) { + init_polyfill_buffer(); + function makeArray(subject) { + return Array.isArray(subject) ? subject : [subject]; + } + var EMPTY = ""; + var SPACE = " "; + var ESCAPE = "\\"; + var REGEX_TEST_BLANK_LINE = /^\s+$/; + var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; + var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; + var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; + var REGEX_SPLITALL_CRLF = /\r?\n/g; + var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + var SLASH = "/"; + var TMP_KEY_IGNORE = "node-ignore"; + if (typeof Symbol !== "undefined") { + TMP_KEY_IGNORE = Symbol.for("node-ignore"); + } + var KEY_IGNORE = TMP_KEY_IGNORE; + var define2 = (object, key2, value) => Object.defineProperty(object, key2, { value }); + var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; + var RETURN_FALSE = () => false; + var sanitizeRange = (range) => range.replace( + REGEX_REGEXP_RANGE, + (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY + ); + var cleanRangeBackSlash = (slashes) => { + const { length } = slashes; + return slashes.slice(0, length - length % 2); + }; + var REPLACERS = [ + [ + // remove BOM + // TODO: + // Other similar zero-width characters? + /^\uFEFF/, + () => EMPTY + ], + // > Trailing spaces are ignored unless they are quoted with backslash ("\") + [ + // (a\ ) -> (a ) + // (a ) -> (a) + // (a \ ) -> (a ) + /\\?\s+$/, + (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY + ], + // replace (\ ) with ' ' + [ + /\\\s/g, + () => SPACE + ], + // Escape metacharacters + // which is written down by users but means special for regular expressions. + // > There are 12 characters with special meanings: + // > - the backslash \, + // > - the caret ^, + // > - the dollar sign $, + // > - the period or dot ., + // > - the vertical bar or pipe symbol |, + // > - the question mark ?, + // > - the asterisk or star *, + // > - the plus sign +, + // > - the opening parenthesis (, + // > - the closing parenthesis ), + // > - and the opening square bracket [, + // > - the opening curly brace {, + // > These special characters are often called "metacharacters". + [ + /[\\$.|*+(){^]/g, + (match) => `\\${match}` + ], + [ + // > a question mark (?) matches a single character + /(?!\\)\?/g, + () => "[^/]" + ], + // leading slash + [ + // > A leading slash matches the beginning of the pathname. + // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". + // A leading slash matches the beginning of the pathname + /^\//, + () => "^" + ], + // replace special metacharacter slash after the leading slash + [ + /\//g, + () => "\\/" + ], + [ + // > A leading "**" followed by a slash means match in all directories. + // > For example, "**/foo" matches file or directory "foo" anywhere, + // > the same as pattern "foo". + // > "**/foo/bar" matches file or directory "bar" anywhere that is directly + // > under directory "foo". + // Notice that the '*'s have been replaced as '\\*' + /^\^*\\\*\\\*\\\//, + // '**/foo' <-> 'foo' + () => "^(?:.*\\/)?" + ], + // starting + [ + // there will be no leading '/' + // (which has been replaced by section "leading slash") + // If starts with '**', adding a '^' to the regular expression also works + /^(?=[^^])/, + function startingReplacer() { + return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; + } + ], + // two globstars + [ + // Use lookahead assertions so that we could match more than one `'/**'` + /\\\/\\\*\\\*(?=\\\/|$)/g, + // Zero, one or several directories + // should not use '*', or it will be replaced by the next replacer + // Check if it is not the last `'/**'` + (_, index2, str) => index2 + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+" + ], + // normal intermediate wildcards + [ + // Never replace escaped '*' + // ignore rule '\*' will match the path '*' + // 'abc.*/' -> go + // 'abc.*' -> skip this rule, + // coz trailing single wildcard will be handed by [trailing wildcard] + /(^|[^\\]+)(\\\*)+(?=.+)/g, + // '*.js' matches '.js' + // '*.js' doesn't match 'abc' + (_, p1, p2) => { + const unescaped = p2.replace(/\\\*/g, "[^\\/]*"); + return p1 + unescaped; + } + ], + [ + // unescape, revert step 3 except for back slash + // For example, if a user escape a '\\*', + // after step 3, the result will be '\\\\\\*' + /\\\\\\(?=[$.|*+(){^])/g, + () => ESCAPE + ], + [ + // '\\\\' -> '\\' + /\\\\/g, + () => ESCAPE + ], + [ + // > The range notation, e.g. [a-zA-Z], + // > can be used to match one of the characters in a range. + // `\` is escaped by step 3 + /(\\)?\[([^\]/]*?)(\\*)($|\])/g, + (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" + ], + // ending + [ + // 'js' will not match 'js.' + // 'ab' will not match 'abc' + /(?:[^*])$/, + // WTF! + // https://git-scm.com/docs/gitignore + // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) + // which re-fixes #24, #38 + // > If there is a separator at the end of the pattern then the pattern + // > will only match directories, otherwise the pattern can match both + // > files and directories. + // 'js*' will not match 'a.js' + // 'js/' will not match 'a.js' + // 'js' will match 'a.js' and 'a.js/' + (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` + ], + // trailing wildcard + [ + /(\^|\\\/)?\\\*$/, + (_, p1) => { + const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; + } + ] + ]; + var regexCache = /* @__PURE__ */ Object.create(null); + var makeRegex = (pattern, ignoreCase) => { + let source = regexCache[pattern]; + if (!source) { + source = REPLACERS.reduce( + (prev, current) => prev.replace(current[0], current[1].bind(pattern)), + pattern + ); + regexCache[pattern] = source; + } + return ignoreCase ? new RegExp(source, "i") : new RegExp(source); + }; + var isString = (subject) => typeof subject === "string"; + var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; + var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); + var IgnoreRule = class { + constructor(origin, pattern, negative, regex2) { + this.origin = origin; + this.pattern = pattern; + this.negative = negative; + this.regex = regex2; + } + }; + var createRule = (pattern, ignoreCase) => { + const origin = pattern; + let negative = false; + if (pattern.indexOf("!") === 0) { + negative = true; + pattern = pattern.substr(1); + } + pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); + const regex2 = makeRegex(pattern, ignoreCase); + return new IgnoreRule( + origin, + pattern, + negative, + regex2 + ); + }; + var throwError = (message, Ctor) => { + throw new Ctor(message); + }; + var checkPath = (path2, originalPath, doThrow) => { + if (!isString(path2)) { + return doThrow( + `path must be a string, but got \`${originalPath}\``, + TypeError + ); + } + if (!path2) { + return doThrow(`path must not be empty`, TypeError); + } + if (checkPath.isNotRelative(path2)) { + const r = "`path.relative()`d"; + return doThrow( + `path should be a ${r} string, but got "${originalPath}"`, + RangeError + ); + } + return true; + }; + var isNotRelative = (path2) => REGEX_TEST_INVALID_PATH.test(path2); + checkPath.isNotRelative = isNotRelative; + checkPath.convert = (p) => p; + var Ignore = class { + constructor({ + ignorecase = true, + ignoreCase = ignorecase, + allowRelativePaths = false + } = {}) { + define2(this, KEY_IGNORE, true); + this._rules = []; + this._ignoreCase = ignoreCase; + this._allowRelativePaths = allowRelativePaths; + this._initCache(); + } + _initCache() { + this._ignoreCache = /* @__PURE__ */ Object.create(null); + this._testCache = /* @__PURE__ */ Object.create(null); + } + _addPattern(pattern) { + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules); + this._added = true; + return; + } + if (checkPattern(pattern)) { + const rule = createRule(pattern, this._ignoreCase); + this._added = true; + this._rules.push(rule); + } + } + // @param {Array | string | Ignore} pattern + add(pattern) { + this._added = false; + makeArray( + isString(pattern) ? splitPattern(pattern) : pattern + ).forEach(this._addPattern, this); + if (this._added) { + this._initCache(); + } + return this; + } + // legacy + addPattern(pattern) { + return this.add(pattern); + } + // | ignored : unignored + // negative | 0:0 | 0:1 | 1:0 | 1:1 + // -------- | ------- | ------- | ------- | -------- + // 0 | TEST | TEST | SKIP | X + // 1 | TESTIF | SKIP | TEST | X + // - SKIP: always skip + // - TEST: always test + // - TESTIF: only test if checkUnignored + // - X: that never happen + // @param {boolean} whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + // @returns {TestResult} true if a file is ignored + _testOne(path2, checkUnignored) { + let ignored = false; + let unignored = false; + this._rules.forEach((rule) => { + const { negative } = rule; + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { + return; + } + const matched = rule.regex.test(path2); + if (matched) { + ignored = !negative; + unignored = negative; + } + }); + return { + ignored, + unignored + }; + } + // @returns {TestResult} + _test(originalPath, cache, checkUnignored, slices) { + const path2 = originalPath && checkPath.convert(originalPath); + checkPath( + path2, + originalPath, + this._allowRelativePaths ? RETURN_FALSE : throwError + ); + return this._t(path2, cache, checkUnignored, slices); + } + _t(path2, cache, checkUnignored, slices) { + if (path2 in cache) { + return cache[path2]; + } + if (!slices) { + slices = path2.split(SLASH); + } + slices.pop(); + if (!slices.length) { + return cache[path2] = this._testOne(path2, checkUnignored); + } + const parent = this._t( + slices.join(SLASH) + SLASH, + cache, + checkUnignored, + slices + ); + return cache[path2] = parent.ignored ? parent : this._testOne(path2, checkUnignored); + } + ignores(path2) { + return this._test(path2, this._ignoreCache, false).ignored; + } + createFilter() { + return (path2) => !this.ignores(path2); + } + filter(paths) { + return makeArray(paths).filter(this.createFilter()); + } + // @returns {TestResult} + test(path2) { + return this._test(path2, this._testCache, true); + } + }; + var factory = (options) => new Ignore(options); + var isPathValid = (path2) => checkPath(path2 && checkPath.convert(path2), path2, RETURN_FALSE); + factory.isPathValid = isPathValid; + factory.default = factory; + module2.exports = factory; + if ( + // Detect `process` so that it can run in browsers. + typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") + ) { + const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/"); + checkPath.convert = makePosix; + const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = (path2) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path2) || isNotRelative(path2); + } + } +}); + +// node_modules/.pnpm/clean-git-ref@2.0.1/node_modules/clean-git-ref/lib/index.js +var require_lib2 = __commonJS({ + "node_modules/.pnpm/clean-git-ref@2.0.1/node_modules/clean-git-ref/lib/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); + } + function replaceAll(str, search, replacement) { + search = search instanceof RegExp ? search : new RegExp(escapeRegExp(search), "g"); + return str.replace(search, replacement); + } + var CleanGitRef = { + clean: function clean(value) { + if (typeof value !== "string") { + throw new Error("Expected a string, received: " + value); + } + value = replaceAll(value, "./", "/"); + value = replaceAll(value, "..", "."); + value = replaceAll(value, " ", "-"); + value = replaceAll(value, /^[~^:?*\\\-]/g, ""); + value = replaceAll(value, /[~^:?*\\]/g, "-"); + value = replaceAll(value, /[~^:?*\\\-]$/g, ""); + value = replaceAll(value, "@{", "-"); + value = replaceAll(value, /\.$/g, ""); + value = replaceAll(value, /\/$/g, ""); + value = replaceAll(value, /\.lock$/g, ""); + return value; + } + }; + module2.exports = CleanGitRef; + } +}); + +// node_modules/.pnpm/diff3@0.0.3/node_modules/diff3/onp.js +var require_onp = __commonJS({ + "node_modules/.pnpm/diff3@0.0.3/node_modules/diff3/onp.js"(exports2, module2) { + init_polyfill_buffer(); + module2.exports = function(a_, b_) { + var a = a_, b = b_, m = a.length, n = b.length, reverse = false, ed = null, offset = m + 1, path2 = [], pathposi = [], ses = [], lcs = "", SES_DELETE = -1, SES_COMMON = 0, SES_ADD = 1; + var tmp1, tmp2; + var init3 = function() { + if (m >= n) { + tmp1 = a; + tmp2 = m; + a = b; + b = tmp1; + m = n; + n = tmp2; + reverse = true; + offset = m + 1; + } + }; + var P = function(x, y, k) { + return { + "x": x, + "y": y, + "k": k + }; + }; + var seselem = function(elem, t) { + return { + "elem": elem, + "t": t + }; + }; + var snake = function(k, p, pp) { + var r, x, y; + if (p > pp) { + r = path2[k - 1 + offset]; + } else { + r = path2[k + 1 + offset]; + } + y = Math.max(p, pp); + x = y - k; + while (x < m && y < n && a[x] === b[y]) { + ++x; + ++y; + } + path2[k + offset] = pathposi.length; + pathposi[pathposi.length] = new P(x, y, r); + return y; + }; + var recordseq = function(epc) { + var x_idx, y_idx, px_idx, py_idx, i; + x_idx = y_idx = 1; + px_idx = py_idx = 0; + for (i = epc.length - 1; i >= 0; --i) { + while (px_idx < epc[i].x || py_idx < epc[i].y) { + if (epc[i].y - epc[i].x > py_idx - px_idx) { + if (reverse) { + ses[ses.length] = new seselem(b[py_idx], SES_DELETE); + } else { + ses[ses.length] = new seselem(b[py_idx], SES_ADD); + } + ++y_idx; + ++py_idx; + } else if (epc[i].y - epc[i].x < py_idx - px_idx) { + if (reverse) { + ses[ses.length] = new seselem(a[px_idx], SES_ADD); + } else { + ses[ses.length] = new seselem(a[px_idx], SES_DELETE); + } + ++x_idx; + ++px_idx; + } else { + ses[ses.length] = new seselem(a[px_idx], SES_COMMON); + lcs += a[px_idx]; + ++x_idx; + ++y_idx; + ++px_idx; + ++py_idx; + } + } + } + }; + init3(); + return { + SES_DELETE: -1, + SES_COMMON: 0, + SES_ADD: 1, + editdistance: function() { + return ed; + }, + getlcs: function() { + return lcs; + }, + getses: function() { + return ses; + }, + compose: function() { + var delta, size, fp, p, r, epc, i, k; + delta = n - m; + size = m + n + 3; + fp = {}; + for (i = 0; i < size; ++i) { + fp[i] = -1; + path2[i] = -1; + } + p = -1; + do { + ++p; + for (k = -p; k <= delta - 1; ++k) { + fp[k + offset] = snake(k, fp[k - 1 + offset] + 1, fp[k + 1 + offset]); + } + for (k = delta + p; k >= delta + 1; --k) { + fp[k + offset] = snake(k, fp[k - 1 + offset] + 1, fp[k + 1 + offset]); + } + fp[delta + offset] = snake(delta, fp[delta - 1 + offset] + 1, fp[delta + 1 + offset]); + } while (fp[delta + offset] !== n); + ed = delta + 2 * p; + r = path2[delta + offset]; + epc = []; + while (r !== -1) { + epc[epc.length] = new P(pathposi[r].x, pathposi[r].y, null); + r = pathposi[r].k; + } + recordseq(epc); + } + }; + }; + } +}); + +// node_modules/.pnpm/diff3@0.0.3/node_modules/diff3/diff3.js +var require_diff3 = __commonJS({ + "node_modules/.pnpm/diff3@0.0.3/node_modules/diff3/diff3.js"(exports2, module2) { + init_polyfill_buffer(); + var onp = require_onp(); + function longestCommonSubsequence(file1, file2) { + var diff3 = new onp(file1, file2); + diff3.compose(); + var ses = diff3.getses(); + var root2; + var prev; + var file1RevIdx = file1.length - 1, file2RevIdx = file2.length - 1; + for (var i = ses.length - 1; i >= 0; --i) { + if (ses[i].t === diff3.SES_COMMON) { + if (prev) { + prev.chain = { + file1index: file1RevIdx, + file2index: file2RevIdx, + chain: null + }; + prev = prev.chain; + } else { + root2 = { + file1index: file1RevIdx, + file2index: file2RevIdx, + chain: null + }; + prev = root2; + } + file1RevIdx--; + file2RevIdx--; + } else if (ses[i].t === diff3.SES_DELETE) { + file1RevIdx--; + } else if (ses[i].t === diff3.SES_ADD) { + file2RevIdx--; + } + } + var tail = { + file1index: -1, + file2index: -1, + chain: null + }; + if (!prev) { + return tail; + } + prev.chain = tail; + return root2; + } + function diffIndices(file1, file2) { + var result = []; + var tail1 = file1.length; + var tail2 = file2.length; + for (var candidate = longestCommonSubsequence(file1, file2); candidate !== null; candidate = candidate.chain) { + var mismatchLength1 = tail1 - candidate.file1index - 1; + var mismatchLength2 = tail2 - candidate.file2index - 1; + tail1 = candidate.file1index; + tail2 = candidate.file2index; + if (mismatchLength1 || mismatchLength2) { + result.push({ + file1: [tail1 + 1, mismatchLength1], + file2: [tail2 + 1, mismatchLength2] + }); + } + } + result.reverse(); + return result; + } + function diff3MergeIndices(a, o, b) { + var i; + var m1 = diffIndices(o, a); + var m2 = diffIndices(o, b); + var hunks = []; + function addHunk(h, side2) { + hunks.push([h.file1[0], side2, h.file1[1], h.file2[0], h.file2[1]]); + } + for (i = 0; i < m1.length; i++) { + addHunk(m1[i], 0); + } + for (i = 0; i < m2.length; i++) { + addHunk(m2[i], 2); + } + hunks.sort(function(x, y) { + return x[0] - y[0]; + }); + var result = []; + var commonOffset = 0; + function copyCommon(targetOffset) { + if (targetOffset > commonOffset) { + result.push([1, commonOffset, targetOffset - commonOffset]); + commonOffset = targetOffset; + } + } + for (var hunkIndex = 0; hunkIndex < hunks.length; hunkIndex++) { + var firstHunkIndex = hunkIndex; + var hunk = hunks[hunkIndex]; + var regionLhs = hunk[0]; + var regionRhs = regionLhs + hunk[2]; + while (hunkIndex < hunks.length - 1) { + var maybeOverlapping = hunks[hunkIndex + 1]; + var maybeLhs = maybeOverlapping[0]; + if (maybeLhs > regionRhs) + break; + regionRhs = Math.max(regionRhs, maybeLhs + maybeOverlapping[2]); + hunkIndex++; + } + copyCommon(regionLhs); + if (firstHunkIndex == hunkIndex) { + if (hunk[4] > 0) { + result.push([hunk[1], hunk[3], hunk[4]]); + } + } else { + var regions = { + 0: [a.length, -1, o.length, -1], + 2: [b.length, -1, o.length, -1] + }; + for (i = firstHunkIndex; i <= hunkIndex; i++) { + hunk = hunks[i]; + var side = hunk[1]; + var r = regions[side]; + var oLhs = hunk[0]; + var oRhs = oLhs + hunk[2]; + var abLhs = hunk[3]; + var abRhs = abLhs + hunk[4]; + r[0] = Math.min(abLhs, r[0]); + r[1] = Math.max(abRhs, r[1]); + r[2] = Math.min(oLhs, r[2]); + r[3] = Math.max(oRhs, r[3]); + } + var aLhs = regions[0][0] + (regionLhs - regions[0][2]); + var aRhs = regions[0][1] + (regionRhs - regions[0][3]); + var bLhs = regions[2][0] + (regionLhs - regions[2][2]); + var bRhs = regions[2][1] + (regionRhs - regions[2][3]); + result.push([ + -1, + aLhs, + aRhs - aLhs, + regionLhs, + regionRhs - regionLhs, + bLhs, + bRhs - bLhs + ]); + } + commonOffset = regionRhs; + } + copyCommon(o.length); + return result; + } + function diff3Merge2(a, o, b) { + var result = []; + var files = [a, o, b]; + var indices = diff3MergeIndices(a, o, b); + var okLines = []; + function flushOk() { + if (okLines.length) { + result.push({ + ok: okLines + }); + } + okLines = []; + } + function pushOk(xs) { + for (var j = 0; j < xs.length; j++) { + okLines.push(xs[j]); + } + } + function isTrueConflict(rec) { + if (rec[2] != rec[6]) + return true; + var aoff = rec[1]; + var boff = rec[5]; + for (var j = 0; j < rec[2]; j++) { + if (a[j + aoff] != b[j + boff]) + return true; + } + return false; + } + for (var i = 0; i < indices.length; i++) { + var x = indices[i]; + var side = x[0]; + if (side == -1) { + if (!isTrueConflict(x)) { + pushOk(files[0].slice(x[1], x[1] + x[2])); + } else { + flushOk(); + result.push({ + conflict: { + a: a.slice(x[1], x[1] + x[2]), + aIndex: x[1], + o: o.slice(x[3], x[3] + x[4]), + oIndex: x[3], + b: b.slice(x[5], x[5] + x[6]), + bIndex: x[5] + } + }); + } + } else { + pushOk(files[side].slice(x[1], x[1] + x[2])); + } + } + flushOk(); + return result; + } + module2.exports = diff3Merge2; + } +}); + +// node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js +var require_ms = __commonJS({ + "node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports2, module2) { + init_polyfill_buffer(); + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + module2.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse2(val); + } else if (type === "number" && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) + ); + }; + function parse2(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || "ms").toLowerCase(); + switch (type) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "weeks": + case "week": + case "w": + return n * w; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; + } + } + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + "d"; + } + if (msAbs >= h) { + return Math.round(ms / h) + "h"; + } + if (msAbs >= m) { + return Math.round(ms / m) + "m"; + } + if (msAbs >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, "day"); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, "hour"); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, "minute"); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, "second"); + } + return ms + " ms"; + } + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); + } + } +}); + +// node_modules/.pnpm/debug@4.3.4_supports-color@9.4.0/node_modules/debug/src/common.js +var require_common2 = __commonJS({ + "node_modules/.pnpm/debug@4.3.4_supports-color@9.4.0/node_modules/debug/src/common.js"(exports2, module2) { + init_polyfill_buffer(); + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require_ms(); + createDebug.destroy = destroy; + Object.keys(env).forEach((key2) => { + createDebug[key2] = env[key2]; + }); + createDebug.names = []; + createDebug.skips = []; + createDebug.formatters = {}; + function selectColor(namespace) { + let hash2 = 0; + for (let i = 0; i < namespace.length; i++) { + hash2 = (hash2 << 5) - hash2 + namespace.charCodeAt(i); + hash2 |= 0; + } + return createDebug.colors[Math.abs(hash2) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + function debug3(...args) { + if (!debug3.enabled) { + return; + } + const self2 = debug3; + const curr = Number(/* @__PURE__ */ new Date()); + const ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + args[0] = createDebug.coerce(args[0]); + if (typeof args[0] !== "string") { + args.unshift("%O"); + } + let index2 = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + if (match === "%%") { + return "%"; + } + index2++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === "function") { + const val = args[index2]; + match = formatter.call(self2, val); + args.splice(index2, 1); + index2--; + } + return match; + }); + createDebug.formatArgs.call(self2, args); + const logFn = self2.log || createDebug.log; + logFn.apply(self2, args); + } + debug3.namespace = namespace; + debug3.useColors = createDebug.useColors(); + debug3.color = createDebug.selectColor(namespace); + debug3.extend = extend; + debug3.destroy = createDebug.destroy; + Object.defineProperty(debug3, "enabled", { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + return enabledCache; + }, + set: (v) => { + enableOverride = v; + } + }); + if (typeof createDebug.init === "function") { + createDebug.init(debug3); + } + return debug3; + } + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + createDebug.names = []; + createDebug.skips = []; + let i; + const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); + const len = split.length; + for (i = 0; i < len; i++) { + if (!split[i]) { + continue; + } + namespaces = split[i].replace(/\*/g, ".*?"); + if (namespaces[0] === "-") { + createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); + } else { + createDebug.names.push(new RegExp("^" + namespaces + "$")); + } + } + } + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) + ].join(","); + createDebug.enable(""); + return namespaces; + } + function enabled(name) { + if (name[name.length - 1] === "*") { + return true; + } + let i; + let len; + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + return false; + } + function toNamespace(regexp) { + return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); + } + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + function destroy() { + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + createDebug.enable(createDebug.load()); + return createDebug; + } + module2.exports = setup; + } +}); + +// node_modules/.pnpm/debug@4.3.4_supports-color@9.4.0/node_modules/debug/src/browser.js +var require_browser = __commonJS({ + "node_modules/.pnpm/debug@4.3.4_supports-color@9.4.0/node_modules/debug/src/browser.js"(exports2, module2) { + init_polyfill_buffer(); + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load; + exports2.useColors = useColors; + exports2.storage = localstorage(); + exports2.destroy = /* @__PURE__ */ (() => { + let warned = false; + return () => { + if (!warned) { + warned = true; + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + }; + })(); + exports2.colors = [ + "#0000CC", + "#0000FF", + "#0033CC", + "#0033FF", + "#0066CC", + "#0066FF", + "#0099CC", + "#0099FF", + "#00CC00", + "#00CC33", + "#00CC66", + "#00CC99", + "#00CCCC", + "#00CCFF", + "#3300CC", + "#3300FF", + "#3333CC", + "#3333FF", + "#3366CC", + "#3366FF", + "#3399CC", + "#3399FF", + "#33CC00", + "#33CC33", + "#33CC66", + "#33CC99", + "#33CCCC", + "#33CCFF", + "#6600CC", + "#6600FF", + "#6633CC", + "#6633FF", + "#66CC00", + "#66CC33", + "#9900CC", + "#9900FF", + "#9933CC", + "#9933FF", + "#99CC00", + "#99CC33", + "#CC0000", + "#CC0033", + "#CC0066", + "#CC0099", + "#CC00CC", + "#CC00FF", + "#CC3300", + "#CC3333", + "#CC3366", + "#CC3399", + "#CC33CC", + "#CC33FF", + "#CC6600", + "#CC6633", + "#CC9900", + "#CC9933", + "#CCCC00", + "#CCCC33", + "#FF0000", + "#FF0033", + "#FF0066", + "#FF0099", + "#FF00CC", + "#FF00FF", + "#FF3300", + "#FF3333", + "#FF3366", + "#FF3399", + "#FF33CC", + "#FF33FF", + "#FF6600", + "#FF6633", + "#FF9900", + "#FF9933", + "#FFCC00", + "#FFCC33" + ]; + function useColors() { + if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { + return true; + } + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + function formatArgs(args) { + args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); + if (!this.useColors) { + return; + } + const c = "color: " + this.color; + args.splice(1, 0, c, "color: inherit"); + let index2 = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, (match) => { + if (match === "%%") { + return; + } + index2++; + if (match === "%c") { + lastC = index2; + } + }); + args.splice(lastC, 0, c); + } + exports2.log = console.debug || console.log || (() => { + }); + function save(namespaces) { + try { + if (namespaces) { + exports2.storage.setItem("debug", namespaces); + } else { + exports2.storage.removeItem("debug"); + } + } catch (error) { + } + } + function load() { + let r; + try { + r = exports2.storage.getItem("debug"); + } catch (error) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; + } + function localstorage() { + try { + return localStorage; + } catch (error) { + } + } + module2.exports = require_common2()(exports2); + var { formatters } = module2.exports; + formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (error) { + return "[UnexpectedJSONParseError]: " + error.message; + } + }; + } +}); + +// node_modules/.pnpm/@kwsites+file-exists@1.1.1_supports-color@9.4.0/node_modules/@kwsites/file-exists/dist/src/index.js +var require_src = __commonJS({ + "node_modules/.pnpm/@kwsites+file-exists@1.1.1_supports-color@9.4.0/node_modules/@kwsites/file-exists/dist/src/index.js"(exports2) { + "use strict"; + init_polyfill_buffer(); + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var fs_1 = require("fs"); + var debug_1 = __importDefault(require_browser()); + var log2 = debug_1.default("@kwsites/file-exists"); + function check(path2, isFile, isDirectory) { + log2(`checking %s`, path2); + try { + const stat = fs_1.statSync(path2); + if (stat.isFile() && isFile) { + log2(`[OK] path represents a file`); + return true; + } + if (stat.isDirectory() && isDirectory) { + log2(`[OK] path represents a directory`); + return true; + } + log2(`[FAIL] path represents something other than a file or directory`); + return false; + } catch (e) { + if (e.code === "ENOENT") { + log2(`[FAIL] path is not accessible: %o`, e); + return false; + } + log2(`[FATAL] %o`, e); + throw e; + } + } + function exists2(path2, type = exports2.READABLE) { + return check(path2, (type & exports2.FILE) > 0, (type & exports2.FOLDER) > 0); + } + exports2.exists = exists2; + exports2.FILE = 1; + exports2.FOLDER = 2; + exports2.READABLE = exports2.FILE + exports2.FOLDER; + } +}); + +// node_modules/.pnpm/@kwsites+file-exists@1.1.1_supports-color@9.4.0/node_modules/@kwsites/file-exists/dist/index.js +var require_dist = __commonJS({ + "node_modules/.pnpm/@kwsites+file-exists@1.1.1_supports-color@9.4.0/node_modules/@kwsites/file-exists/dist/index.js"(exports2) { + "use strict"; + init_polyfill_buffer(); + function __export3(m) { + for (var p in m) + if (!exports2.hasOwnProperty(p)) + exports2[p] = m[p]; + } + Object.defineProperty(exports2, "__esModule", { value: true }); + __export3(require_src()); + } +}); + +// node_modules/.pnpm/@kwsites+promise-deferred@1.1.1/node_modules/@kwsites/promise-deferred/dist/index.js +var require_dist2 = __commonJS({ + "node_modules/.pnpm/@kwsites+promise-deferred@1.1.1/node_modules/@kwsites/promise-deferred/dist/index.js"(exports2) { + "use strict"; + init_polyfill_buffer(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createDeferred = exports2.deferred = void 0; + function deferred2() { + let done; + let fail; + let status2 = "pending"; + const promise2 = new Promise((_done, _fail) => { + done = _done; + fail = _fail; + }); + return { + promise: promise2, + done(result) { + if (status2 === "pending") { + status2 = "resolved"; + done(result); + } + }, + fail(error) { + if (status2 === "pending") { + status2 = "rejected"; + fail(error); + } + }, + get fulfilled() { + return status2 !== "pending"; + }, + get status() { + return status2; + } + }; + } + exports2.deferred = deferred2; + exports2.createDeferred = deferred2; + exports2.default = deferred2; + } +}); + +// node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js +var require_color_name = __commonJS({ + "node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] + }; + } +}); + +// node_modules/.pnpm/css-unit-converter@1.1.2/node_modules/css-unit-converter/index.js +var require_css_unit_converter = __commonJS({ + "node_modules/.pnpm/css-unit-converter@1.1.2/node_modules/css-unit-converter/index.js"(exports2, module2) { + init_polyfill_buffer(); + var conversions = { + // length + "px": { + "px": 1, + "cm": 96 / 2.54, + "mm": 96 / 25.4, + "in": 96, + "pt": 96 / 72, + "pc": 16 + }, + "cm": { + "px": 2.54 / 96, + "cm": 1, + "mm": 0.1, + "in": 2.54, + "pt": 2.54 / 72, + "pc": 2.54 / 6 + }, + "mm": { + "px": 25.4 / 96, + "cm": 10, + "mm": 1, + "in": 25.4, + "pt": 25.4 / 72, + "pc": 25.4 / 6 + }, + "in": { + "px": 1 / 96, + "cm": 1 / 2.54, + "mm": 1 / 25.4, + "in": 1, + "pt": 1 / 72, + "pc": 1 / 6 + }, + "pt": { + "px": 0.75, + "cm": 72 / 2.54, + "mm": 72 / 25.4, + "in": 72, + "pt": 1, + "pc": 12 + }, + "pc": { + "px": 6 / 96, + "cm": 6 / 2.54, + "mm": 6 / 25.4, + "in": 6, + "pt": 6 / 72, + "pc": 1 + }, + // angle + "deg": { + "deg": 1, + "grad": 0.9, + "rad": 180 / Math.PI, + "turn": 360 + }, + "grad": { + "deg": 400 / 360, + "grad": 1, + "rad": 200 / Math.PI, + "turn": 400 + }, + "rad": { + "deg": Math.PI / 180, + "grad": Math.PI / 200, + "rad": 1, + "turn": Math.PI * 2 + }, + "turn": { + "deg": 1 / 360, + "grad": 1 / 400, + "rad": 0.5 / Math.PI, + "turn": 1 + }, + // time + "s": { + "s": 1, + "ms": 1 / 1e3 + }, + "ms": { + "s": 1e3, + "ms": 1 + }, + // frequency + "Hz": { + "Hz": 1, + "kHz": 1e3 + }, + "kHz": { + "Hz": 1 / 1e3, + "kHz": 1 + }, + // resolution + "dpi": { + "dpi": 1, + "dpcm": 1 / 2.54, + "dppx": 1 / 96 + }, + "dpcm": { + "dpi": 2.54, + "dpcm": 1, + "dppx": 2.54 / 96 + }, + "dppx": { + "dpi": 96, + "dpcm": 96 / 2.54, + "dppx": 1 + } + }; + module2.exports = function(value, sourceUnit, targetUnit, precision) { + if (!conversions.hasOwnProperty(targetUnit)) + throw new Error("Cannot convert to " + targetUnit); + if (!conversions[targetUnit].hasOwnProperty(sourceUnit)) + throw new Error("Cannot convert from " + sourceUnit + " to " + targetUnit); + var converted = conversions[targetUnit][sourceUnit] * value; + if (precision !== false) { + precision = Math.pow(10, parseInt(precision) || 5); + return Math.round(converted * precision) / precision; + } + return converted; + }; + } +}); + +// node_modules/.pnpm/css-color-converter@2.0.0/node_modules/css-color-converter/lib/index.js +var require_lib3 = __commonJS({ + "node_modules/.pnpm/css-color-converter@2.0.0/node_modules/css-color-converter/lib/index.js"(exports2) { + "use strict"; + init_polyfill_buffer(); + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.fromRgba = fromRgba; + exports2.fromRgb = fromRgb; + exports2.fromHsla = fromHsla; + exports2.fromHsl = fromHsl; + exports2.fromString = fromString2; + exports2["default"] = void 0; + var _colorName = _interopRequireDefault(require_color_name()); + var _cssUnitConverter = _interopRequireDefault(require_css_unit_converter()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + function _classCallCheck(instance10, Constructor) { + if (!(instance10 instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) + _defineProperties(Constructor.prototype, protoProps); + if (staticProps) + _defineProperties(Constructor, staticProps); + return Constructor; + } + function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray2(arr, i) || _nonIterableRest(); + } + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _unsupportedIterableToArray2(o, minLen) { + if (!o) + return; + if (typeof o === "string") + return _arrayLikeToArray2(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) + n = o.constructor.name; + if (n === "Map" || n === "Set") + return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray2(o, minLen); + } + function _arrayLikeToArray2(arr, len) { + if (len == null || len > arr.length) + len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + return arr2; + } + function _iterableToArrayLimit(arr, i) { + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) + return; + var _arr = []; + var _n = true; + var _d = false; + var _e = void 0; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) + break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) + _i["return"](); + } finally { + if (_d) + throw _e; + } + } + return _arr; + } + function _arrayWithHoles(arr) { + if (Array.isArray(arr)) + return arr; + } + var hex = /^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?$/; + var shortHex = /^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])?$/; + var rgb = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/; + var rgbfn = /^rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/; + var rgbperc = /^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/; + var rgbpercfn = /^rgba?\(\s*(\d+%)\s+(\d+%)\s+(\d+%)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/; + var hsl = /^hsla?\(\s*(\d+)(deg|rad|grad|turn)?\s*,\s*(\d+)%\s*,\s*(\d+)%(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/; + function contains2(haystack, needle) { + return haystack.indexOf(needle) > -1; + } + function rgbToHsl(r, g, b) { + var rprim = r / 255; + var gprim = g / 255; + var bprim = b / 255; + var cmax = Math.max(rprim, gprim, bprim); + var cmin = Math.min(rprim, gprim, bprim); + var delta = cmax - cmin; + var l = (cmax + cmin) / 2; + if (delta === 0) { + return [0, 0, l * 100]; + } + var s = delta / (1 - Math.abs(2 * l - 1)); + var h = function() { + switch (cmax) { + case rprim: { + return (gprim - bprim) / delta % 6; + } + case gprim: { + return (bprim - rprim) / delta + 2; + } + default: { + return (rprim - gprim) / delta + 4; + } + } + }(); + return [h * 60, s * 100, l * 100]; + } + function hslToRgb(h, s, l) { + var hprim = h / 60; + var sprim = s / 100; + var lprim = l / 100; + var c = (1 - Math.abs(2 * lprim - 1)) * sprim; + var x = c * (1 - Math.abs(hprim % 2 - 1)); + var m = lprim - c / 2; + var _ref = function() { + if (hprim < 1) + return [c, x, 0]; + if (hprim < 2) + return [x, c, 0]; + if (hprim < 3) + return [0, c, x]; + if (hprim < 4) + return [0, x, c]; + if (hprim < 5) + return [x, 0, c]; + return [c, 0, x]; + }(), _ref2 = _slicedToArray(_ref, 3), rprim = _ref2[0], gprim = _ref2[1], bprim = _ref2[2]; + return [(rprim + m) * 255, (gprim + m) * 255, (bprim + m) * 255]; + } + var Color = /* @__PURE__ */ function() { + function Color2(_ref3) { + var _ref4 = _slicedToArray(_ref3, 4), r = _ref4[0], g = _ref4[1], b = _ref4[2], a = _ref4[3]; + _classCallCheck(this, Color2); + this.values = [Math.max(Math.min(parseInt(r, 10), 255), 0), Math.max(Math.min(parseInt(g, 10), 255), 0), Math.max(Math.min(parseInt(b, 10), 255), 0), a == null ? 1 : Math.max(Math.min(parseFloat(a), 255), 0)]; + } + _createClass(Color2, [{ + key: "toRgbString", + value: function toRgbString() { + var _this$values = _slicedToArray(this.values, 4), r = _this$values[0], g = _this$values[1], b = _this$values[2], a = _this$values[3]; + if (a === 1) { + return "rgb(".concat(r, ", ").concat(g, ", ").concat(b, ")"); + } + return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(a, ")"); + } + }, { + key: "toHslString", + value: function toHslString() { + var _this$toHslaArray = this.toHslaArray(), _this$toHslaArray2 = _slicedToArray(_this$toHslaArray, 4), h = _this$toHslaArray2[0], s = _this$toHslaArray2[1], l = _this$toHslaArray2[2], a = _this$toHslaArray2[3]; + if (a === 1) { + return "hsl(".concat(h, ", ").concat(s, "%, ").concat(l, "%)"); + } + return "hsla(".concat(h, ", ").concat(s, "%, ").concat(l, "%, ").concat(a, ")"); + } + }, { + key: "toHexString", + value: function toHexString() { + var _this$values2 = _slicedToArray(this.values, 4), r = _this$values2[0], g = _this$values2[1], b = _this$values2[2], a = _this$values2[3]; + r = Number(r).toString(16).padStart(2, "0"); + g = Number(g).toString(16).padStart(2, "0"); + b = Number(b).toString(16).padStart(2, "0"); + a = a < 1 ? parseInt(a * 255, 10).toString(16).padStart(2, "0") : ""; + return "#".concat(r).concat(g).concat(b).concat(a); + } + }, { + key: "toRgbaArray", + value: function toRgbaArray() { + return this.values; + } + }, { + key: "toHslaArray", + value: function toHslaArray() { + var _this$values3 = _slicedToArray(this.values, 4), r = _this$values3[0], g = _this$values3[1], b = _this$values3[2], a = _this$values3[3]; + var _rgbToHsl = rgbToHsl(r, g, b), _rgbToHsl2 = _slicedToArray(_rgbToHsl, 3), h = _rgbToHsl2[0], s = _rgbToHsl2[1], l = _rgbToHsl2[2]; + return [h, s, l, a]; + } + }]); + return Color2; + }(); + function fromRgba(_ref5) { + var _ref6 = _slicedToArray(_ref5, 4), r = _ref6[0], g = _ref6[1], b = _ref6[2], a = _ref6[3]; + return new Color([r, g, b, a]); + } + function fromRgb(_ref7) { + var _ref8 = _slicedToArray(_ref7, 3), r = _ref8[0], g = _ref8[1], b = _ref8[2]; + return fromRgba([r, g, b, 1]); + } + function fromHsla(_ref9) { + var _ref10 = _slicedToArray(_ref9, 4), h = _ref10[0], s = _ref10[1], l = _ref10[2], a = _ref10[3]; + var _hslToRgb = hslToRgb(h, s, l), _hslToRgb2 = _slicedToArray(_hslToRgb, 3), r = _hslToRgb2[0], g = _hslToRgb2[1], b = _hslToRgb2[2]; + return fromRgba([r, g, b, a]); + } + function fromHsl(_ref11) { + var _ref12 = _slicedToArray(_ref11, 3), h = _ref12[0], s = _ref12[1], l = _ref12[2]; + return fromHsla([h, s, l, 1]); + } + function fromHexString(str) { + var _ref13 = hex.exec(str) || shortHex.exec(str), _ref14 = _slicedToArray(_ref13, 5), r = _ref14[1], g = _ref14[2], b = _ref14[3], a = _ref14[4]; + r = parseInt(r.length < 2 ? r.repeat(2) : r, 16); + g = parseInt(g.length < 2 ? g.repeat(2) : g, 16); + b = parseInt(b.length < 2 ? b.repeat(2) : b, 16); + a = a && (parseInt(a.length < 2 ? a.repeat(2) : a, 16) / 255).toPrecision(1) || 1; + return fromRgba([r, g, b, a]); + } + function fromRgbString(str) { + var _ref15 = rgb.exec(str) || rgbperc.exec(str) || rgbfn.exec(str) || rgbpercfn.exec(str), _ref16 = _slicedToArray(_ref15, 5), r = _ref16[1], g = _ref16[2], b = _ref16[3], a = _ref16[4]; + r = contains2(r, "%") ? parseInt(r, 10) * 255 / 100 : parseInt(r, 10); + g = contains2(g, "%") ? parseInt(g, 10) * 255 / 100 : parseInt(g, 10); + b = contains2(b, "%") > 0 ? parseInt(b, 10) * 255 / 100 : parseInt(b, 10); + a = a === void 0 ? 1 : parseFloat(a) / (contains2(a, "%") ? 100 : 1); + return fromRgba([r, g, b, a]); + } + function fromHslString(str) { + var _hsl$exec = hsl.exec(str), _hsl$exec2 = _slicedToArray(_hsl$exec, 6), h = _hsl$exec2[1], unit = _hsl$exec2[2], s = _hsl$exec2[3], l = _hsl$exec2[4], a = _hsl$exec2[5]; + unit = unit || "deg"; + h = (0, _cssUnitConverter["default"])(parseFloat(h), unit, "deg"); + s = parseFloat(s); + l = parseFloat(l); + a = a === void 0 ? 1 : parseFloat(a) / (contains2(a, "%") ? 100 : 1); + return fromHsla([h, s, l, a]); + } + function fromString2(str) { + if (_colorName["default"][str]) { + return fromRgb(_colorName["default"][str]); + } + if (hex.test(str) || shortHex.test(str)) { + return fromHexString(str); + } + if (rgb.test(str) || rgbperc.test(str) || rgbfn.test(str) || rgbpercfn.test(str)) { + return fromRgbString(str); + } + if (hsl.test(str)) { + return fromHslString(str); + } + return null; + } + var _default = { + fromString: fromString2, + fromRgb, + fromRgba, + fromHsl, + fromHsla + }; + exports2["default"] = _default; + } +}); + +// node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js +var require_isArguments = __commonJS({ + "node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var toStr = Object.prototype.toString; + module2.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === "[object Arguments]"; + if (!isArgs) { + isArgs = str !== "[object Array]" && value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && toStr.call(value.callee) === "[object Function]"; + } + return isArgs; + }; + } +}); + +// node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js +var require_implementation = __commonJS({ + "node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var keysShim; + if (!Object.keys) { + has = Object.prototype.hasOwnProperty; + toStr = Object.prototype.toString; + isArgs = require_isArguments(); + isEnumerable = Object.prototype.propertyIsEnumerable; + hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString"); + hasProtoEnumBug = isEnumerable.call(function() { + }, "prototype"); + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ]; + equalsConstructorPrototype = function(o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + hasAutomationEqualityBug = function() { + if (typeof window === "undefined") { + return false; + } + for (var k in window) { + try { + if (!excludedKeys["$" + k] && has.call(window, k) && window[k] !== null && typeof window[k] === "object") { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }(); + equalsConstructorPrototypeIfNotBuggy = function(o) { + if (typeof window === "undefined" || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + keysShim = function keys(object) { + var isObject2 = object !== null && typeof object === "object"; + var isFunction2 = toStr.call(object) === "[object Function]"; + var isArguments = isArgs(object); + var isString = isObject2 && toStr.call(object) === "[object String]"; + var theKeys = []; + if (!isObject2 && !isFunction2 && !isArguments) { + throw new TypeError("Object.keys called on a non-object"); + } + var skipProto = hasProtoEnumBug && isFunction2; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === "prototype") && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === "constructor") && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; + } + var has; + var toStr; + var isArgs; + var isEnumerable; + var hasDontEnumBug; + var hasProtoEnumBug; + var dontEnums; + var equalsConstructorPrototype; + var excludedKeys; + var hasAutomationEqualityBug; + var equalsConstructorPrototypeIfNotBuggy; + module2.exports = keysShim; + } +}); + +// node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js +var require_object_keys = __commonJS({ + "node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var slice = Array.prototype.slice; + var isArgs = require_isArguments(); + var origKeys = Object.keys; + var keysShim = origKeys ? function keys(o) { + return origKeys(o); + } : require_implementation(); + var originalKeys = Object.keys; + keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = function() { + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; + }; + module2.exports = keysShim; + } +}); + +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js +var require_es_errors = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = Error; + } +}); + +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js +var require_eval = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = EvalError; + } +}); + +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js +var require_range = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = RangeError; + } +}); + +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js +var require_ref = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = ReferenceError; + } +}); + +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js +var require_syntax = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = SyntaxError; + } +}); + +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js +var require_type = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = TypeError; + } +}); + +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js +var require_uri = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = URIError; + } +}); + +// node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js +var require_shams = __commonJS({ + "node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = function hasSymbols() { + if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") { + return false; + } + if (typeof Symbol.iterator === "symbol") { + return true; + } + var obj = {}; + var sym = Symbol("test"); + var symObj = Object(sym); + if (typeof sym === "string") { + return false; + } + if (Object.prototype.toString.call(sym) !== "[object Symbol]") { + return false; + } + if (Object.prototype.toString.call(symObj) !== "[object Symbol]") { + return false; + } + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { + return false; + } + if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) { + return false; + } + if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) { + return false; + } + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { + return false; + } + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { + return false; + } + if (typeof Object.getOwnPropertyDescriptor === "function") { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { + return false; + } + } + return true; + }; + } +}); + +// node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js +var require_has_symbols = __commonJS({ + "node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var origSymbol = typeof Symbol !== "undefined" && Symbol; + var hasSymbolSham = require_shams(); + module2.exports = function hasNativeSymbols() { + if (typeof origSymbol !== "function") { + return false; + } + if (typeof Symbol !== "function") { + return false; + } + if (typeof origSymbol("foo") !== "symbol") { + return false; + } + if (typeof Symbol("bar") !== "symbol") { + return false; + } + return hasSymbolSham(); + }; + } +}); + +// node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js +var require_has_proto = __commonJS({ + "node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var test = { + foo: {} + }; + var $Object = Object; + module2.exports = function hasProto() { + return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object); + }; + } +}); + +// node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js +var require_implementation2 = __commonJS({ + "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; + var toStr = Object.prototype.toString; + var max = Math.max; + var funcType = "[object Function]"; + var concatty = function concatty2(a, b) { + var arr = []; + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + return arr; + }; + var slicy = function slicy2(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; + }; + var joiny = function(arr, joiner) { + var str = ""; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; + }; + module2.exports = function bind(that) { + var target = this; + if (typeof target !== "function" || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + var bound; + var binder = function() { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + }; + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = "$" + i; + } + bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder); + if (target.prototype) { + var Empty = function Empty2() { + }; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + return bound; + }; + } +}); + +// node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js +var require_function_bind = __commonJS({ + "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var implementation = require_implementation2(); + module2.exports = Function.prototype.bind || implementation; + } +}); + +// node_modules/.pnpm/hasown@2.0.1/node_modules/hasown/index.js +var require_hasown = __commonJS({ + "node_modules/.pnpm/hasown@2.0.1/node_modules/hasown/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var call = Function.prototype.call; + var $hasOwn = Object.prototype.hasOwnProperty; + var bind = require_function_bind(); + module2.exports = bind.call(call, $hasOwn); + } +}); + +// node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js +var require_get_intrinsic = __commonJS({ + "node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var undefined2; + var $Error = require_es_errors(); + var $EvalError = require_eval(); + var $RangeError = require_range(); + var $ReferenceError = require_ref(); + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var $URIError = require_uri(); + var $Function = Function; + var getEvalledConstructor = function(expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); + } catch (e) { + } + }; + var $gOPD = Object.getOwnPropertyDescriptor; + if ($gOPD) { + try { + $gOPD({}, ""); + } catch (e) { + $gOPD = null; + } + } + var throwTypeError = function() { + throw new $TypeError(); + }; + var ThrowTypeError = $gOPD ? function() { + try { + arguments.callee; + return throwTypeError; + } catch (calleeThrows) { + try { + return $gOPD(arguments, "callee").get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }() : throwTypeError; + var hasSymbols = require_has_symbols()(); + var hasProto = require_has_proto()(); + var getProto = Object.getPrototypeOf || (hasProto ? function(x) { + return x.__proto__; + } : null); + var needsEval = {}; + var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array); + var INTRINSICS = { + __proto__: null, + "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError, + "%Array%": Array, + "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer, + "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2, + "%AsyncFromSyncIteratorPrototype%": undefined2, + "%AsyncFunction%": needsEval, + "%AsyncGenerator%": needsEval, + "%AsyncGeneratorFunction%": needsEval, + "%AsyncIteratorPrototype%": needsEval, + "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics, + "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt, + "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array, + "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array, + "%Boolean%": Boolean, + "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView, + "%Date%": Date, + "%decodeURI%": decodeURI, + "%decodeURIComponent%": decodeURIComponent, + "%encodeURI%": encodeURI, + "%encodeURIComponent%": encodeURIComponent, + "%Error%": $Error, + "%eval%": eval, + // eslint-disable-line no-eval + "%EvalError%": $EvalError, + "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array, + "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array, + "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry, + "%Function%": $Function, + "%GeneratorFunction%": needsEval, + "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array, + "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array, + "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array, + "%isFinite%": isFinite, + "%isNaN%": isNaN, + "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2, + "%JSON%": typeof JSON === "object" ? JSON : undefined2, + "%Map%": typeof Map === "undefined" ? undefined2 : Map, + "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()), + "%Math%": Math, + "%Number%": Number, + "%Object%": Object, + "%parseFloat%": parseFloat, + "%parseInt%": parseInt, + "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise, + "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy, + "%RangeError%": $RangeError, + "%ReferenceError%": $ReferenceError, + "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect, + "%RegExp%": RegExp, + "%Set%": typeof Set === "undefined" ? undefined2 : Set, + "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()), + "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer, + "%String%": String, + "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2, + "%Symbol%": hasSymbols ? Symbol : undefined2, + "%SyntaxError%": $SyntaxError, + "%ThrowTypeError%": ThrowTypeError, + "%TypedArray%": TypedArray, + "%TypeError%": $TypeError, + "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array, + "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray, + "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array, + "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array, + "%URIError%": $URIError, + "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap, + "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef, + "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet + }; + if (getProto) { + try { + null.error; + } catch (e) { + errorProto = getProto(getProto(e)); + INTRINSICS["%Error.prototype%"] = errorProto; + } + } + var errorProto; + var doEval = function doEval2(name) { + var value; + if (name === "%AsyncFunction%") { + value = getEvalledConstructor("async function () {}"); + } else if (name === "%GeneratorFunction%") { + value = getEvalledConstructor("function* () {}"); + } else if (name === "%AsyncGeneratorFunction%") { + value = getEvalledConstructor("async function* () {}"); + } else if (name === "%AsyncGenerator%") { + var fn = doEval2("%AsyncGeneratorFunction%"); + if (fn) { + value = fn.prototype; + } + } else if (name === "%AsyncIteratorPrototype%") { + var gen = doEval2("%AsyncGenerator%"); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + INTRINSICS[name] = value; + return value; + }; + var LEGACY_ALIASES = { + __proto__: null, + "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], + "%ArrayPrototype%": ["Array", "prototype"], + "%ArrayProto_entries%": ["Array", "prototype", "entries"], + "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], + "%ArrayProto_keys%": ["Array", "prototype", "keys"], + "%ArrayProto_values%": ["Array", "prototype", "values"], + "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], + "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], + "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], + "%BooleanPrototype%": ["Boolean", "prototype"], + "%DataViewPrototype%": ["DataView", "prototype"], + "%DatePrototype%": ["Date", "prototype"], + "%ErrorPrototype%": ["Error", "prototype"], + "%EvalErrorPrototype%": ["EvalError", "prototype"], + "%Float32ArrayPrototype%": ["Float32Array", "prototype"], + "%Float64ArrayPrototype%": ["Float64Array", "prototype"], + "%FunctionPrototype%": ["Function", "prototype"], + "%Generator%": ["GeneratorFunction", "prototype"], + "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], + "%Int8ArrayPrototype%": ["Int8Array", "prototype"], + "%Int16ArrayPrototype%": ["Int16Array", "prototype"], + "%Int32ArrayPrototype%": ["Int32Array", "prototype"], + "%JSONParse%": ["JSON", "parse"], + "%JSONStringify%": ["JSON", "stringify"], + "%MapPrototype%": ["Map", "prototype"], + "%NumberPrototype%": ["Number", "prototype"], + "%ObjectPrototype%": ["Object", "prototype"], + "%ObjProto_toString%": ["Object", "prototype", "toString"], + "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], + "%PromisePrototype%": ["Promise", "prototype"], + "%PromiseProto_then%": ["Promise", "prototype", "then"], + "%Promise_all%": ["Promise", "all"], + "%Promise_reject%": ["Promise", "reject"], + "%Promise_resolve%": ["Promise", "resolve"], + "%RangeErrorPrototype%": ["RangeError", "prototype"], + "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], + "%RegExpPrototype%": ["RegExp", "prototype"], + "%SetPrototype%": ["Set", "prototype"], + "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], + "%StringPrototype%": ["String", "prototype"], + "%SymbolPrototype%": ["Symbol", "prototype"], + "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], + "%TypedArrayPrototype%": ["TypedArray", "prototype"], + "%TypeErrorPrototype%": ["TypeError", "prototype"], + "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], + "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], + "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], + "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], + "%URIErrorPrototype%": ["URIError", "prototype"], + "%WeakMapPrototype%": ["WeakMap", "prototype"], + "%WeakSetPrototype%": ["WeakSet", "prototype"] + }; + var bind = require_function_bind(); + var hasOwn = require_hasown(); + var $concat = bind.call(Function.call, Array.prototype.concat); + var $spliceApply = bind.call(Function.apply, Array.prototype.splice); + var $replace = bind.call(Function.call, String.prototype.replace); + var $strSlice = bind.call(Function.call, String.prototype.slice); + var $exec = bind.call(Function.call, RegExp.prototype.exec); + var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = function stringToPath2(string) { + var first2 = $strSlice(string, 0, 1); + var last2 = $strSlice(string, -1); + if (first2 === "%" && last2 !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`"); + } else if (last2 === "%" && first2 !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`"); + } + var result = []; + $replace(string, rePropName, function(match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match; + }); + return result; + }; + var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = "%" + alias[0] + "%"; + } + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === "undefined" && !allowMissing) { + throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!"); + } + return { + alias, + name: intrinsicName, + value + }; + } + throw new $SyntaxError("intrinsic " + name + " does not exist!"); + }; + module2.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== "string" || name.length === 0) { + throw new $TypeError("intrinsic name must be a non-empty string"); + } + if (arguments.length > 1 && typeof allowMissing !== "boolean") { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ""; + var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first2 = $strSlice(part, 0, 1); + var last2 = $strSlice(part, -1); + if ((first2 === '"' || first2 === "'" || first2 === "`" || (last2 === '"' || last2 === "'" || last2 === "`")) && first2 !== last2) { + throw new $SyntaxError("property names with quotes must have matching quotes"); + } + if (part === "constructor" || !isOwn) { + skipFurtherCaching = true; + } + intrinsicBaseName += "." + part; + intrinsicRealName = "%" + intrinsicBaseName + "%"; + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available."); + } + return void 0; + } + if ($gOPD && i + 1 >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + if (isOwn && "get" in desc && !("originalValue" in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; + }; + } +}); + +// node_modules/.pnpm/has-property-descriptors@1.0.1/node_modules/has-property-descriptors/index.js +var require_has_property_descriptors = __commonJS({ + "node_modules/.pnpm/has-property-descriptors@1.0.1/node_modules/has-property-descriptors/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var GetIntrinsic = require_get_intrinsic(); + var $defineProperty = GetIntrinsic("%Object.defineProperty%", true); + var hasPropertyDescriptors = function hasPropertyDescriptors2() { + if ($defineProperty) { + try { + $defineProperty({}, "a", { value: 1 }); + return true; + } catch (e) { + return false; + } + } + return false; + }; + hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], "length", { value: 1 }).length !== 1; + } catch (e) { + return true; + } + }; + module2.exports = hasPropertyDescriptors; + } +}); + +// node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js +var require_gopd = __commonJS({ + "node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var GetIntrinsic = require_get_intrinsic(); + var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true); + if ($gOPD) { + try { + $gOPD([], "length"); + } catch (e) { + $gOPD = null; + } + } + module2.exports = $gOPD; + } +}); + +// node_modules/.pnpm/define-data-property@1.1.2/node_modules/define-data-property/index.js +var require_define_data_property = __commonJS({ + "node_modules/.pnpm/define-data-property@1.1.2/node_modules/define-data-property/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var hasPropertyDescriptors = require_has_property_descriptors()(); + var GetIntrinsic = require_get_intrinsic(); + var $defineProperty = hasPropertyDescriptors && GetIntrinsic("%Object.defineProperty%", true); + if ($defineProperty) { + try { + $defineProperty({}, "a", { value: 1 }); + } catch (e) { + $defineProperty = false; + } + } + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var gopd = require_gopd(); + module2.exports = function defineDataProperty(obj, property, value) { + if (!obj || typeof obj !== "object" && typeof obj !== "function") { + throw new $TypeError("`obj` must be an object or a function`"); + } + if (typeof property !== "string" && typeof property !== "symbol") { + throw new $TypeError("`property` must be a string or a symbol`"); + } + if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) { + throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null"); + } + if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) { + throw new $TypeError("`nonWritable`, if provided, must be a boolean or null"); + } + if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) { + throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null"); + } + if (arguments.length > 6 && typeof arguments[6] !== "boolean") { + throw new $TypeError("`loose`, if provided, must be a boolean"); + } + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + var desc = !!gopd && gopd(obj, property); + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) { + obj[property] = value; + } else { + throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable."); + } + }; + } +}); + +// node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js +var require_define_properties = __commonJS({ + "node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var keys = require_object_keys(); + var hasSymbols = typeof Symbol === "function" && typeof Symbol("foo") === "symbol"; + var toStr = Object.prototype.toString; + var concat = Array.prototype.concat; + var defineDataProperty = require_define_data_property(); + var isFunction2 = function(fn) { + return typeof fn === "function" && toStr.call(fn) === "[object Function]"; + }; + var supportsDescriptors = require_has_property_descriptors()(); + var defineProperty = function(object, name, value, predicate) { + if (name in object) { + if (predicate === true) { + if (object[name] === value) { + return; + } + } else if (!isFunction2(predicate) || !predicate()) { + return; + } + } + if (supportsDescriptors) { + defineDataProperty(object, name, value, true); + } else { + defineDataProperty(object, name, value); + } + }; + var defineProperties = function(object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } + }; + defineProperties.supportsDescriptors = !!supportsDescriptors; + module2.exports = defineProperties; + } +}); + +// node_modules/.pnpm/set-function-length@1.2.1/node_modules/set-function-length/index.js +var require_set_function_length = __commonJS({ + "node_modules/.pnpm/set-function-length@1.2.1/node_modules/set-function-length/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var GetIntrinsic = require_get_intrinsic(); + var define2 = require_define_data_property(); + var hasDescriptors = require_has_property_descriptors()(); + var gOPD = require_gopd(); + var $TypeError = require_type(); + var $floor = GetIntrinsic("%Math.floor%"); + module2.exports = function setFunctionLength(fn, length) { + if (typeof fn !== "function") { + throw new $TypeError("`fn` is not a function"); + } + if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) { + throw new $TypeError("`length` must be a positive 32-bit integer"); + } + var loose = arguments.length > 2 && !!arguments[2]; + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ("length" in fn && gOPD) { + var desc = gOPD(fn, "length"); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define2( + /** @type {Parameters[0]} */ + fn, + "length", + length, + true, + true + ); + } else { + define2( + /** @type {Parameters[0]} */ + fn, + "length", + length + ); + } + } + return fn; + }; + } +}); + +// node_modules/.pnpm/call-bind@1.0.6/node_modules/call-bind/index.js +var require_call_bind = __commonJS({ + "node_modules/.pnpm/call-bind@1.0.6/node_modules/call-bind/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var bind = require_function_bind(); + var GetIntrinsic = require_get_intrinsic(); + var setFunctionLength = require_set_function_length(); + var $TypeError = require_type(); + var $apply = GetIntrinsic("%Function.prototype.apply%"); + var $call = GetIntrinsic("%Function.prototype.call%"); + var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply); + var $defineProperty = GetIntrinsic("%Object.defineProperty%", true); + var $max = GetIntrinsic("%Math.max%"); + if ($defineProperty) { + try { + $defineProperty({}, "a", { value: 1 }); + } catch (e) { + $defineProperty = null; + } + } + module2.exports = function callBind(originalFunction) { + if (typeof originalFunction !== "function") { + throw new $TypeError("a function is required"); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); + }; + var applyBind = function applyBind2() { + return $reflectApply(bind, $apply, arguments); + }; + if ($defineProperty) { + $defineProperty(module2.exports, "apply", { value: applyBind }); + } else { + module2.exports.apply = applyBind; + } + } +}); + +// node_modules/.pnpm/call-bind@1.0.6/node_modules/call-bind/callBound.js +var require_callBound = __commonJS({ + "node_modules/.pnpm/call-bind@1.0.6/node_modules/call-bind/callBound.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var GetIntrinsic = require_get_intrinsic(); + var callBind = require_call_bind(); + var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf")); + module2.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) { + return callBind(intrinsic); + } + return intrinsic; + }; + } +}); + +// node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/implementation.js +var require_implementation3 = __commonJS({ + "node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/implementation.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var objectKeys = require_object_keys(); + var hasSymbols = require_shams()(); + var callBound = require_callBound(); + var toObject = Object; + var $push = callBound("Array.prototype.push"); + var $propIsEnumerable = callBound("Object.prototype.propertyIsEnumerable"); + var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; + module2.exports = function assign2(target, source1) { + if (target == null) { + throw new TypeError("target must be an object"); + } + var to = toObject(target); + if (arguments.length === 1) { + return to; + } + for (var s = 1; s < arguments.length; ++s) { + var from = toObject(arguments[s]); + var keys = objectKeys(from); + var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); + if (getSymbols) { + var syms = getSymbols(from); + for (var j = 0; j < syms.length; ++j) { + var key2 = syms[j]; + if ($propIsEnumerable(from, key2)) { + $push(keys, key2); + } + } + } + for (var i = 0; i < keys.length; ++i) { + var nextKey = keys[i]; + if ($propIsEnumerable(from, nextKey)) { + var propValue = from[nextKey]; + to[nextKey] = propValue; + } + } + } + return to; + }; + } +}); + +// node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/polyfill.js +var require_polyfill = __commonJS({ + "node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/polyfill.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var implementation = require_implementation3(); + var lacksProperEnumerationOrder = function() { + if (!Object.assign) { + return false; + } + var str = "abcdefghijklmnopqrst"; + var letters = str.split(""); + var map = {}; + for (var i = 0; i < letters.length; ++i) { + map[letters[i]] = letters[i]; + } + var obj = Object.assign({}, map); + var actual = ""; + for (var k in obj) { + actual += k; + } + return str !== actual; + }; + var assignHasPendingExceptions = function() { + if (!Object.assign || !Object.preventExtensions) { + return false; + } + var thrower = Object.preventExtensions({ 1: 2 }); + try { + Object.assign(thrower, "xy"); + } catch (e) { + return thrower[1] === "y"; + } + return false; + }; + module2.exports = function getPolyfill() { + if (!Object.assign) { + return implementation; + } + if (lacksProperEnumerationOrder()) { + return implementation; + } + if (assignHasPendingExceptions()) { + return implementation; + } + return Object.assign; + }; + } +}); + +// node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/shim.js +var require_shim = __commonJS({ + "node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/shim.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var define2 = require_define_properties(); + var getPolyfill = require_polyfill(); + module2.exports = function shimAssign() { + var polyfill = getPolyfill(); + define2( + Object, + { assign: polyfill }, + { assign: function() { + return Object.assign !== polyfill; + } } + ); + return polyfill; + }; + } +}); + +// node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/index.js +var require_object = __commonJS({ + "node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var defineProperties = require_define_properties(); + var callBind = require_call_bind(); + var implementation = require_implementation3(); + var getPolyfill = require_polyfill(); + var shim = require_shim(); + var polyfill = callBind.apply(getPolyfill()); + var bound = function assign2(target, source1) { + return polyfill(Object, arguments); + }; + defineProperties(bound, { + getPolyfill, + implementation, + shim + }); + module2.exports = bound; + } +}); + +// node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js +var require_functions_have_names = __commonJS({ + "node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var functionsHaveNames = function functionsHaveNames2() { + return typeof function f() { + }.name === "string"; + }; + var gOPD = Object.getOwnPropertyDescriptor; + if (gOPD) { + try { + gOPD([], "length"); + } catch (e) { + gOPD = null; + } + } + functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() { + if (!functionsHaveNames() || !gOPD) { + return false; + } + var desc = gOPD(function() { + }, "name"); + return !!desc && !!desc.configurable; + }; + var $bind = Function.prototype.bind; + functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() { + return functionsHaveNames() && typeof $bind === "function" && function f() { + }.bind().name !== ""; + }; + module2.exports = functionsHaveNames; + } +}); + +// node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js +var require_set_function_name = __commonJS({ + "node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var define2 = require_define_data_property(); + var hasDescriptors = require_has_property_descriptors()(); + var functionsHaveConfigurableNames = require_functions_have_names().functionsHaveConfigurableNames(); + var $TypeError = TypeError; + module2.exports = function setFunctionName(fn, name) { + if (typeof fn !== "function") { + throw new $TypeError("`fn` is not a function"); + } + var loose = arguments.length > 2 && !!arguments[2]; + if (!loose || functionsHaveConfigurableNames) { + if (hasDescriptors) { + define2(fn, "name", name, true, true); + } else { + define2(fn, "name", name); + } + } + return fn; + }; + } +}); + +// node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/implementation.js +var require_implementation4 = __commonJS({ + "node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/implementation.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var setFunctionName = require_set_function_name(); + var $TypeError = require_type(); + var $Object = Object; + module2.exports = setFunctionName(function flags() { + if (this == null || this !== $Object(this)) { + throw new $TypeError("RegExp.prototype.flags getter called on non-object"); + } + var result = ""; + if (this.hasIndices) { + result += "d"; + } + if (this.global) { + result += "g"; + } + if (this.ignoreCase) { + result += "i"; + } + if (this.multiline) { + result += "m"; + } + if (this.dotAll) { + result += "s"; + } + if (this.unicode) { + result += "u"; + } + if (this.unicodeSets) { + result += "v"; + } + if (this.sticky) { + result += "y"; + } + return result; + }, "get flags", true); + } +}); + +// node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/polyfill.js +var require_polyfill2 = __commonJS({ + "node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/polyfill.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var implementation = require_implementation4(); + var supportsDescriptors = require_define_properties().supportsDescriptors; + var $gOPD = Object.getOwnPropertyDescriptor; + module2.exports = function getPolyfill() { + if (supportsDescriptors && /a/mig.flags === "gim") { + var descriptor = $gOPD(RegExp.prototype, "flags"); + if (descriptor && typeof descriptor.get === "function" && typeof RegExp.prototype.dotAll === "boolean" && typeof RegExp.prototype.hasIndices === "boolean") { + var calls = ""; + var o = {}; + Object.defineProperty(o, "hasIndices", { + get: function() { + calls += "d"; + } + }); + Object.defineProperty(o, "sticky", { + get: function() { + calls += "y"; + } + }); + if (calls === "dy") { + return descriptor.get; + } + } + } + return implementation; + }; + } +}); + +// node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/shim.js +var require_shim2 = __commonJS({ + "node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/shim.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var supportsDescriptors = require_define_properties().supportsDescriptors; + var getPolyfill = require_polyfill2(); + var gOPD = Object.getOwnPropertyDescriptor; + var defineProperty = Object.defineProperty; + var TypeErr = TypeError; + var getProto = Object.getPrototypeOf; + var regex2 = /a/; + module2.exports = function shimFlags() { + if (!supportsDescriptors || !getProto) { + throw new TypeErr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors"); + } + var polyfill = getPolyfill(); + var proto = getProto(regex2); + var descriptor = gOPD(proto, "flags"); + if (!descriptor || descriptor.get !== polyfill) { + defineProperty(proto, "flags", { + configurable: true, + enumerable: false, + get: polyfill + }); + } + return polyfill; + }; + } +}); + +// node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/index.js +var require_regexp_prototype = __commonJS({ + "node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var define2 = require_define_properties(); + var callBind = require_call_bind(); + var implementation = require_implementation4(); + var getPolyfill = require_polyfill2(); + var shim = require_shim2(); + var flagsBound = callBind(getPolyfill()); + define2(flagsBound, { + getPolyfill, + implementation, + shim + }); + module2.exports = flagsBound; + } +}); + +// node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js +var require_shams2 = __commonJS({ + "node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var hasSymbols = require_shams(); + module2.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; + }; + } +}); + +// node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js +var require_is_arguments = __commonJS({ + "node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var hasToStringTag = require_shams2()(); + var callBound = require_callBound(); + var $toString = callBound("Object.prototype.toString"); + var isStandardArguments = function isArguments(value) { + if (hasToStringTag && value && typeof value === "object" && Symbol.toStringTag in value) { + return false; + } + return $toString(value) === "[object Arguments]"; + }; + var isLegacyArguments = function isArguments(value) { + if (isStandardArguments(value)) { + return true; + } + return value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && $toString(value) !== "[object Array]" && $toString(value.callee) === "[object Function]"; + }; + var supportsStandardArguments = function() { + return isStandardArguments(arguments); + }(); + isStandardArguments.isLegacyArguments = isLegacyArguments; + module2.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments; + } +}); + +// (disabled):node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/util.inspect +var require_util = __commonJS({ + "(disabled):node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/util.inspect"() { + init_polyfill_buffer(); + } +}); + +// node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.js +var require_object_inspect = __commonJS({ + "node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.js"(exports2, module2) { + init_polyfill_buffer(); + var hasMap = typeof Map === "function" && Map.prototype; + var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null; + var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null; + var mapForEach = hasMap && Map.prototype.forEach; + var hasSet = typeof Set === "function" && Set.prototype; + var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null; + var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null; + var setForEach = hasSet && Set.prototype.forEach; + var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype; + var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; + var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype; + var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; + var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype; + var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; + var booleanValueOf = Boolean.prototype.valueOf; + var objectToString2 = Object.prototype.toString; + var functionToString = Function.prototype.toString; + var $match = String.prototype.match; + var $slice = String.prototype.slice; + var $replace = String.prototype.replace; + var $toUpperCase = String.prototype.toUpperCase; + var $toLowerCase = String.prototype.toLowerCase; + var $test = RegExp.prototype.test; + var $concat = Array.prototype.concat; + var $join = Array.prototype.join; + var $arrSlice = Array.prototype.slice; + var $floor = Math.floor; + var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null; + var gOPS = Object.getOwnPropertySymbols; + var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null; + var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object"; + var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null; + var isEnumerable = Object.prototype.propertyIsEnumerable; + var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) { + return O.__proto__; + } : null); + function addNumericSeparator(num2, str) { + if (num2 === Infinity || num2 === -Infinity || num2 !== num2 || num2 && num2 > -1e3 && num2 < 1e3 || $test.call(/e/, str)) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num2 === "number") { + var int = num2 < 0 ? -$floor(-num2) : $floor(num2); + if (int !== num2) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, ""); + } + } + return $replace.call(str, sepRegex, "$&_"); + } + var utilInspect = require_util(); + var inspectCustom = utilInspect.custom; + var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + module2.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + if (has(opts, "quoteStyle") && (opts.quoteStyle !== "single" && opts.quoteStyle !== "double")) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, "customInspect") ? opts.customInspect : true; + if (typeof customInspect !== "boolean" && customInspect !== "symbol") { + throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); + } + if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + if (typeof obj === "undefined") { + return "undefined"; + } + if (obj === null) { + return "null"; + } + if (typeof obj === "boolean") { + return obj ? "true" : "false"; + } + if (typeof obj === "string") { + return inspectString(obj, opts); + } + if (typeof obj === "number") { + if (obj === 0) { + return Infinity / obj > 0 ? "0" : "-0"; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === "bigint") { + var bigIntStr = String(obj) + "n"; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth; + if (typeof depth === "undefined") { + depth = 0; + } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") { + return isArray(obj) ? "[Array]" : "[Object]"; + } + var indent2 = getIndent(opts, depth); + if (typeof seen === "undefined") { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return "[Circular]"; + } + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, "quoteStyle")) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + if (typeof obj === "function" && !isRegExp(obj)) { + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : ""); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj); + return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = "<" + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts); + } + s += ">"; + if (obj.childNodes && obj.childNodes.length) { + s += "..."; + } + s += ""; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { + return "[]"; + } + var xs = arrObjKeys(obj, inspect); + if (indent2 && !singleLineValues(xs)) { + return "[" + indentedJoin(xs, indent2) + "]"; + } + return "[ " + $join.call(xs, ", ") + " ]"; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) { + return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }"; + } + if (parts.length === 0) { + return "[" + String(obj) + "]"; + } + return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }"; + } + if (typeof obj === "object" && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== "symbol" && typeof obj.inspect === "function") { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + if (mapForEach) { + mapForEach.call(obj, function(value, key2) { + mapParts.push(inspect(key2, obj, true) + " => " + inspect(value, obj)); + }); + } + return collectionOf("Map", mapSize.call(obj), mapParts, indent2); + } + if (isSet(obj)) { + var setParts = []; + if (setForEach) { + setForEach.call(obj, function(value) { + setParts.push(inspect(value, obj)); + }); + } + return collectionOf("Set", setSize.call(obj), setParts, indent2); + } + if (isWeakMap(obj)) { + return weakCollectionOf("WeakMap"); + } + if (isWeakSet(obj)) { + return weakCollectionOf("WeakSet"); + } + if (isWeakRef(obj)) { + return weakCollectionOf("WeakRef"); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + if (typeof window !== "undefined" && obj === window) { + return "{ [object Window] }"; + } + if (obj === global) { + return "{ [object globalThis] }"; + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? "" : "null prototype"; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : ""; + var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : ""; + var tag2 = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : ""); + if (ys.length === 0) { + return tag2 + "{}"; + } + if (indent2) { + return tag2 + "{" + indentedJoin(ys, indent2) + "}"; + } + return tag2 + "{ " + $join.call(ys, ", ") + " }"; + } + return String(obj); + }; + function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'"; + return quoteChar + s + quoteChar; + } + function quote(s) { + return $replace.call(String(s), /"/g, """); + } + function isArray(obj) { + return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isDate(obj) { + return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isRegExp(obj) { + return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isError(obj) { + return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isString(obj) { + return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isNumber(obj) { + return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isBoolean(obj) { + return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === "object" && obj instanceof Symbol; + } + if (typeof obj === "symbol") { + return true; + } + if (!obj || typeof obj !== "object" || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) { + } + return false; + } + function isBigInt(obj) { + if (!obj || typeof obj !== "object" || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj); + return true; + } catch (e) { + } + return false; + } + var hasOwn = Object.prototype.hasOwnProperty || function(key2) { + return key2 in this; + }; + function has(obj, key2) { + return hasOwn.call(obj, key2); + } + function toStr(obj) { + return objectToString2.call(obj); + } + function nameOf(f) { + if (f.name) { + return f.name; + } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { + return m[1]; + } + return null; + } + function indexOf(xs, x) { + if (xs.indexOf) { + return xs.indexOf(x); + } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { + return i; + } + } + return -1; + } + function isMap(x) { + if (!mapSize || !x || typeof x !== "object") { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; + } catch (e) { + } + return false; + } + function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== "object") { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; + } catch (e) { + } + return false; + } + function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== "object") { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) { + } + return false; + } + function isSet(x) { + if (!setSize || !x || typeof x !== "object") { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; + } catch (e) { + } + return false; + } + function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== "object") { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; + } catch (e) { + } + return false; + } + function isElement(x) { + if (!x || typeof x !== "object") { + return false; + } + if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === "string" && typeof x.getAttribute === "function"; + } + function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : ""); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + var s = $replace.call($replace.call(str, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, "single", opts); + } + function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: "b", + 9: "t", + 10: "n", + 12: "f", + 13: "r" + }[n]; + if (x) { + return "\\" + x; + } + return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16)); + } + function markBoxed(str) { + return "Object(" + str + ")"; + } + function weakCollectionOf(type) { + return type + " { ? }"; + } + function collectionOf(type, size, entries, indent2) { + var joinedEntries = indent2 ? indentedJoin(entries, indent2) : $join.call(entries, ", "); + return type + " (" + size + ") {" + joinedEntries + "}"; + } + function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], "\n") >= 0) { + return false; + } + } + return true; + } + function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === " ") { + baseIndent = " "; + } else if (typeof opts.indent === "number" && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), " "); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; + } + function indentedJoin(xs, indent2) { + if (xs.length === 0) { + return ""; + } + var lineJoiner = "\n" + indent2.prev + indent2.base; + return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent2.prev; + } + function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ""; + } + } + var syms = typeof gOPS === "function" ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap["$" + syms[k]] = syms[k]; + } + } + for (var key2 in obj) { + if (!has(obj, key2)) { + continue; + } + if (isArr && String(Number(key2)) === key2 && key2 < obj.length) { + continue; + } + if (hasShammedSymbols && symMap["$" + key2] instanceof Symbol) { + continue; + } else if ($test.call(/[^\w$]/, key2)) { + xs.push(inspect(key2, obj) + ": " + inspect(obj[key2], obj)); + } else { + xs.push(key2 + ": " + inspect(obj[key2], obj)); + } + } + if (typeof gOPS === "function") { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj)); + } + } + } + return xs; + } + } +}); + +// node_modules/.pnpm/side-channel@1.0.5/node_modules/side-channel/index.js +var require_side_channel = __commonJS({ + "node_modules/.pnpm/side-channel@1.0.5/node_modules/side-channel/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var GetIntrinsic = require_get_intrinsic(); + var callBound = require_callBound(); + var inspect = require_object_inspect(); + var $TypeError = require_type(); + var $WeakMap = GetIntrinsic("%WeakMap%", true); + var $Map = GetIntrinsic("%Map%", true); + var $weakMapGet = callBound("WeakMap.prototype.get", true); + var $weakMapSet = callBound("WeakMap.prototype.set", true); + var $weakMapHas = callBound("WeakMap.prototype.has", true); + var $mapGet = callBound("Map.prototype.get", true); + var $mapSet = callBound("Map.prototype.set", true); + var $mapHas = callBound("Map.prototype.has", true); + var listGetNode = function(list, key2) { + for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) { + if (curr.key === key2) { + prev.next = curr.next; + curr.next = list.next; + list.next = curr; + return curr; + } + } + }; + var listGet = function(objects, key2) { + var node = listGetNode(objects, key2); + return node && node.value; + }; + var listSet = function(objects, key2, value) { + var node = listGetNode(objects, key2); + if (node) { + node.value = value; + } else { + objects.next = { + // eslint-disable-line no-param-reassign + key: key2, + next: objects.next, + value + }; + } + }; + var listHas = function(objects, key2) { + return !!listGetNode(objects, key2); + }; + module2.exports = function getSideChannel() { + var $wm; + var $m; + var $o; + var channel = { + assert: function(key2) { + if (!channel.has(key2)) { + throw new $TypeError("Side channel does not contain " + inspect(key2)); + } + }, + get: function(key2) { + if ($WeakMap && key2 && (typeof key2 === "object" || typeof key2 === "function")) { + if ($wm) { + return $weakMapGet($wm, key2); + } + } else if ($Map) { + if ($m) { + return $mapGet($m, key2); + } + } else { + if ($o) { + return listGet($o, key2); + } + } + }, + has: function(key2) { + if ($WeakMap && key2 && (typeof key2 === "object" || typeof key2 === "function")) { + if ($wm) { + return $weakMapHas($wm, key2); + } + } else if ($Map) { + if ($m) { + return $mapHas($m, key2); + } + } else { + if ($o) { + return listHas($o, key2); + } + } + return false; + }, + set: function(key2, value) { + if ($WeakMap && key2 && (typeof key2 === "object" || typeof key2 === "function")) { + if (!$wm) { + $wm = new $WeakMap(); + } + $weakMapSet($wm, key2, value); + } else if ($Map) { + if (!$m) { + $m = new $Map(); + } + $mapSet($m, key2, value); + } else { + if (!$o) { + $o = { key: {}, next: null }; + } + listSet($o, key2, value); + } + } + }; + return channel; + }; + } +}); + +// node_modules/.pnpm/internal-slot@1.0.7/node_modules/internal-slot/index.js +var require_internal_slot = __commonJS({ + "node_modules/.pnpm/internal-slot@1.0.7/node_modules/internal-slot/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var hasOwn = require_hasown(); + var channel = require_side_channel()(); + var $TypeError = require_type(); + var SLOT = { + assert: function(O, slot) { + if (!O || typeof O !== "object" && typeof O !== "function") { + throw new $TypeError("`O` is not an object"); + } + if (typeof slot !== "string") { + throw new $TypeError("`slot` must be a string"); + } + channel.assert(O); + if (!SLOT.has(O, slot)) { + throw new $TypeError("`" + slot + "` is not present on `O`"); + } + }, + get: function(O, slot) { + if (!O || typeof O !== "object" && typeof O !== "function") { + throw new $TypeError("`O` is not an object"); + } + if (typeof slot !== "string") { + throw new $TypeError("`slot` must be a string"); + } + var slots = channel.get(O); + return slots && slots["$" + slot]; + }, + has: function(O, slot) { + if (!O || typeof O !== "object" && typeof O !== "function") { + throw new $TypeError("`O` is not an object"); + } + if (typeof slot !== "string") { + throw new $TypeError("`slot` must be a string"); + } + var slots = channel.get(O); + return !!slots && hasOwn(slots, "$" + slot); + }, + set: function(O, slot, V) { + if (!O || typeof O !== "object" && typeof O !== "function") { + throw new $TypeError("`O` is not an object"); + } + if (typeof slot !== "string") { + throw new $TypeError("`slot` must be a string"); + } + var slots = channel.get(O); + if (!slots) { + slots = {}; + channel.set(O, slots); + } + slots["$" + slot] = V; + } + }; + if (Object.freeze) { + Object.freeze(SLOT); + } + module2.exports = SLOT; + } +}); + +// node_modules/.pnpm/stop-iteration-iterator@1.0.0/node_modules/stop-iteration-iterator/index.js +var require_stop_iteration_iterator = __commonJS({ + "node_modules/.pnpm/stop-iteration-iterator@1.0.0/node_modules/stop-iteration-iterator/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var SLOT = require_internal_slot(); + var $SyntaxError = SyntaxError; + var $StopIteration = typeof StopIteration === "object" ? StopIteration : null; + module2.exports = function getStopIterationIterator(origIterator) { + if (!$StopIteration) { + throw new $SyntaxError("this environment lacks StopIteration"); + } + SLOT.set(origIterator, "[[Done]]", false); + var siIterator = { + next: function next() { + var iterator = SLOT.get(this, "[[Iterator]]"); + var done = SLOT.get(iterator, "[[Done]]"); + try { + return { + done, + value: done ? void 0 : iterator.next() + }; + } catch (e) { + SLOT.set(iterator, "[[Done]]", true); + if (e !== $StopIteration) { + throw e; + } + return { + done: true, + value: void 0 + }; + } + } + }; + SLOT.set(siIterator, "[[Iterator]]", origIterator); + return siIterator; + }; + } +}); + +// node_modules/.pnpm/isarray@2.0.5/node_modules/isarray/index.js +var require_isarray = __commonJS({ + "node_modules/.pnpm/isarray@2.0.5/node_modules/isarray/index.js"(exports2, module2) { + init_polyfill_buffer(); + var toString = {}.toString; + module2.exports = Array.isArray || function(arr) { + return toString.call(arr) == "[object Array]"; + }; + } +}); + +// node_modules/.pnpm/is-string@1.0.7/node_modules/is-string/index.js +var require_is_string = __commonJS({ + "node_modules/.pnpm/is-string@1.0.7/node_modules/is-string/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var strValue = String.prototype.valueOf; + var tryStringObject = function tryStringObject2(value) { + try { + strValue.call(value); + return true; + } catch (e) { + return false; + } + }; + var toStr = Object.prototype.toString; + var strClass = "[object String]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isString(value) { + if (typeof value === "string") { + return true; + } + if (typeof value !== "object") { + return false; + } + return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass; + }; + } +}); + +// node_modules/.pnpm/is-map@2.0.2/node_modules/is-map/index.js +var require_is_map = __commonJS({ + "node_modules/.pnpm/is-map@2.0.2/node_modules/is-map/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var $Map = typeof Map === "function" && Map.prototype ? Map : null; + var $Set = typeof Set === "function" && Set.prototype ? Set : null; + var exported; + if (!$Map) { + exported = function isMap(x) { + return false; + }; + } + var $mapHas = $Map ? Map.prototype.has : null; + var $setHas = $Set ? Set.prototype.has : null; + if (!exported && !$mapHas) { + exported = function isMap(x) { + return false; + }; + } + module2.exports = exported || function isMap(x) { + if (!x || typeof x !== "object") { + return false; + } + try { + $mapHas.call(x); + if ($setHas) { + try { + $setHas.call(x); + } catch (e) { + return true; + } + } + return x instanceof $Map; + } catch (e) { + } + return false; + }; + } +}); + +// node_modules/.pnpm/is-set@2.0.2/node_modules/is-set/index.js +var require_is_set = __commonJS({ + "node_modules/.pnpm/is-set@2.0.2/node_modules/is-set/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var $Map = typeof Map === "function" && Map.prototype ? Map : null; + var $Set = typeof Set === "function" && Set.prototype ? Set : null; + var exported; + if (!$Set) { + exported = function isSet(x) { + return false; + }; + } + var $mapHas = $Map ? Map.prototype.has : null; + var $setHas = $Set ? Set.prototype.has : null; + if (!exported && !$setHas) { + exported = function isSet(x) { + return false; + }; + } + module2.exports = exported || function isSet(x) { + if (!x || typeof x !== "object") { + return false; + } + try { + $setHas.call(x); + if ($mapHas) { + try { + $mapHas.call(x); + } catch (e) { + return true; + } + } + return x instanceof $Set; + } catch (e) { + } + return false; + }; + } +}); + +// node_modules/.pnpm/es-get-iterator@1.1.3/node_modules/es-get-iterator/index.js +var require_es_get_iterator = __commonJS({ + "node_modules/.pnpm/es-get-iterator@1.1.3/node_modules/es-get-iterator/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var isArguments = require_is_arguments(); + var getStopIterationIterator = require_stop_iteration_iterator(); + if (require_has_symbols()() || require_shams()()) { + $iterator = Symbol.iterator; + module2.exports = function getIterator3(iterable) { + if (iterable != null && typeof iterable[$iterator] !== "undefined") { + return iterable[$iterator](); + } + if (isArguments(iterable)) { + return Array.prototype[$iterator].call(iterable); + } + }; + } else { + isArray = require_isarray(); + isString = require_is_string(); + GetIntrinsic = require_get_intrinsic(); + $Map = GetIntrinsic("%Map%", true); + $Set = GetIntrinsic("%Set%", true); + callBound = require_callBound(); + $arrayPush = callBound("Array.prototype.push"); + $charCodeAt = callBound("String.prototype.charCodeAt"); + $stringSlice = callBound("String.prototype.slice"); + advanceStringIndex = function advanceStringIndex2(S, index2) { + var length = S.length; + if (index2 + 1 >= length) { + return index2 + 1; + } + var first2 = $charCodeAt(S, index2); + if (first2 < 55296 || first2 > 56319) { + return index2 + 1; + } + var second = $charCodeAt(S, index2 + 1); + if (second < 56320 || second > 57343) { + return index2 + 1; + } + return index2 + 2; + }; + getArrayIterator = function getArrayIterator2(arraylike) { + var i = 0; + return { + next: function next() { + var done = i >= arraylike.length; + var value; + if (!done) { + value = arraylike[i]; + i += 1; + } + return { + done, + value + }; + } + }; + }; + getNonCollectionIterator = function getNonCollectionIterator2(iterable, noPrimordialCollections) { + if (isArray(iterable) || isArguments(iterable)) { + return getArrayIterator(iterable); + } + if (isString(iterable)) { + var i = 0; + return { + next: function next() { + var nextIndex = advanceStringIndex(iterable, i); + var value = $stringSlice(iterable, i, nextIndex); + i = nextIndex; + return { + done: nextIndex > iterable.length, + value + }; + } + }; + } + if (noPrimordialCollections && typeof iterable["_es6-shim iterator_"] !== "undefined") { + return iterable["_es6-shim iterator_"](); + } + }; + if (!$Map && !$Set) { + module2.exports = function getIterator3(iterable) { + if (iterable != null) { + return getNonCollectionIterator(iterable, true); + } + }; + } else { + isMap = require_is_map(); + isSet = require_is_set(); + $mapForEach = callBound("Map.prototype.forEach", true); + $setForEach = callBound("Set.prototype.forEach", true); + if (typeof process === "undefined" || !process.versions || !process.versions.node) { + $mapIterator = callBound("Map.prototype.iterator", true); + $setIterator = callBound("Set.prototype.iterator", true); + } + $mapAtAtIterator = callBound("Map.prototype.@@iterator", true) || callBound("Map.prototype._es6-shim iterator_", true); + $setAtAtIterator = callBound("Set.prototype.@@iterator", true) || callBound("Set.prototype._es6-shim iterator_", true); + getCollectionIterator = function getCollectionIterator2(iterable) { + if (isMap(iterable)) { + if ($mapIterator) { + return getStopIterationIterator($mapIterator(iterable)); + } + if ($mapAtAtIterator) { + return $mapAtAtIterator(iterable); + } + if ($mapForEach) { + var entries = []; + $mapForEach(iterable, function(v, k) { + $arrayPush(entries, [k, v]); + }); + return getArrayIterator(entries); + } + } + if (isSet(iterable)) { + if ($setIterator) { + return getStopIterationIterator($setIterator(iterable)); + } + if ($setAtAtIterator) { + return $setAtAtIterator(iterable); + } + if ($setForEach) { + var values = []; + $setForEach(iterable, function(v) { + $arrayPush(values, v); + }); + return getArrayIterator(values); + } + } + }; + module2.exports = function getIterator3(iterable) { + return getCollectionIterator(iterable) || getNonCollectionIterator(iterable); + }; + } + } + var $iterator; + var isArray; + var isString; + var GetIntrinsic; + var $Map; + var $Set; + var callBound; + var $arrayPush; + var $charCodeAt; + var $stringSlice; + var advanceStringIndex; + var getArrayIterator; + var getNonCollectionIterator; + var isMap; + var isSet; + var $mapForEach; + var $setForEach; + var $mapIterator; + var $setIterator; + var $mapAtAtIterator; + var $setAtAtIterator; + var getCollectionIterator; + } +}); + +// node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/implementation.js +var require_implementation5 = __commonJS({ + "node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/implementation.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var numberIsNaN = function(value) { + return value !== value; + }; + module2.exports = function is(a, b) { + if (a === 0 && b === 0) { + return 1 / a === 1 / b; + } + if (a === b) { + return true; + } + if (numberIsNaN(a) && numberIsNaN(b)) { + return true; + } + return false; + }; + } +}); + +// node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/polyfill.js +var require_polyfill3 = __commonJS({ + "node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/polyfill.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var implementation = require_implementation5(); + module2.exports = function getPolyfill() { + return typeof Object.is === "function" ? Object.is : implementation; + }; + } +}); + +// node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/shim.js +var require_shim3 = __commonJS({ + "node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/shim.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var getPolyfill = require_polyfill3(); + var define2 = require_define_properties(); + module2.exports = function shimObjectIs() { + var polyfill = getPolyfill(); + define2(Object, { is: polyfill }, { + is: function testObjectIs() { + return Object.is !== polyfill; + } + }); + return polyfill; + }; + } +}); + +// node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/index.js +var require_object_is = __commonJS({ + "node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var define2 = require_define_properties(); + var callBind = require_call_bind(); + var implementation = require_implementation5(); + var getPolyfill = require_polyfill3(); + var shim = require_shim3(); + var polyfill = callBind(getPolyfill(), Object); + define2(polyfill, { + getPolyfill, + implementation, + shim + }); + module2.exports = polyfill; + } +}); + +// node_modules/.pnpm/is-array-buffer@3.0.4/node_modules/is-array-buffer/index.js +var require_is_array_buffer = __commonJS({ + "node_modules/.pnpm/is-array-buffer@3.0.4/node_modules/is-array-buffer/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var callBind = require_call_bind(); + var callBound = require_callBound(); + var GetIntrinsic = require_get_intrinsic(); + var $ArrayBuffer = GetIntrinsic("%ArrayBuffer%", true); + var $byteLength = callBound("ArrayBuffer.prototype.byteLength", true); + var $toString = callBound("Object.prototype.toString"); + var abSlice = !!$ArrayBuffer && !$byteLength && new $ArrayBuffer(0).slice; + var $abSlice = !!abSlice && callBind(abSlice); + module2.exports = $byteLength || $abSlice ? function isArrayBuffer(obj) { + if (!obj || typeof obj !== "object") { + return false; + } + try { + if ($byteLength) { + $byteLength(obj); + } else { + $abSlice(obj, 0); + } + return true; + } catch (e) { + return false; + } + } : $ArrayBuffer ? function isArrayBuffer(obj) { + return $toString(obj) === "[object ArrayBuffer]"; + } : function isArrayBuffer(obj) { + return false; + }; + } +}); + +// node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js +var require_is_date_object = __commonJS({ + "node_modules/.pnpm/is-date-object@1.0.5/node_modules/is-date-object/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var getDay = Date.prototype.getDay; + var tryDateObject = function tryDateGetDayCall(value) { + try { + getDay.call(value); + return true; + } catch (e) { + return false; + } + }; + var toStr = Object.prototype.toString; + var dateClass = "[object Date]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isDateObject(value) { + if (typeof value !== "object" || value === null) { + return false; + } + return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; + }; + } +}); + +// node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js +var require_is_regex = __commonJS({ + "node_modules/.pnpm/is-regex@1.1.4/node_modules/is-regex/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var callBound = require_callBound(); + var hasToStringTag = require_shams2()(); + var has; + var $exec; + var isRegexMarker; + var badStringifier; + if (hasToStringTag) { + has = callBound("Object.prototype.hasOwnProperty"); + $exec = callBound("RegExp.prototype.exec"); + isRegexMarker = {}; + throwRegexMarker = function() { + throw isRegexMarker; + }; + badStringifier = { + toString: throwRegexMarker, + valueOf: throwRegexMarker + }; + if (typeof Symbol.toPrimitive === "symbol") { + badStringifier[Symbol.toPrimitive] = throwRegexMarker; + } + } + var throwRegexMarker; + var $toString = callBound("Object.prototype.toString"); + var gOPD = Object.getOwnPropertyDescriptor; + var regexClass = "[object RegExp]"; + module2.exports = hasToStringTag ? function isRegex(value) { + if (!value || typeof value !== "object") { + return false; + } + var descriptor = gOPD(value, "lastIndex"); + var hasLastIndexDataProperty = descriptor && has(descriptor, "value"); + if (!hasLastIndexDataProperty) { + return false; + } + try { + $exec(value, badStringifier); + } catch (e) { + return e === isRegexMarker; + } + } : function isRegex(value) { + if (!value || typeof value !== "object" && typeof value !== "function") { + return false; + } + return $toString(value) === regexClass; + }; + } +}); + +// node_modules/.pnpm/is-shared-array-buffer@1.0.2/node_modules/is-shared-array-buffer/index.js +var require_is_shared_array_buffer = __commonJS({ + "node_modules/.pnpm/is-shared-array-buffer@1.0.2/node_modules/is-shared-array-buffer/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var callBound = require_callBound(); + var $byteLength = callBound("SharedArrayBuffer.prototype.byteLength", true); + module2.exports = $byteLength ? function isSharedArrayBuffer(obj) { + if (!obj || typeof obj !== "object") { + return false; + } + try { + $byteLength(obj); + return true; + } catch (e) { + return false; + } + } : function isSharedArrayBuffer(obj) { + return false; + }; + } +}); + +// node_modules/.pnpm/is-number-object@1.0.7/node_modules/is-number-object/index.js +var require_is_number_object = __commonJS({ + "node_modules/.pnpm/is-number-object@1.0.7/node_modules/is-number-object/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var numToStr = Number.prototype.toString; + var tryNumberObject = function tryNumberObject2(value) { + try { + numToStr.call(value); + return true; + } catch (e) { + return false; + } + }; + var toStr = Object.prototype.toString; + var numClass = "[object Number]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isNumberObject(value) { + if (typeof value === "number") { + return true; + } + if (typeof value !== "object") { + return false; + } + return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass; + }; + } +}); + +// node_modules/.pnpm/is-boolean-object@1.1.2/node_modules/is-boolean-object/index.js +var require_is_boolean_object = __commonJS({ + "node_modules/.pnpm/is-boolean-object@1.1.2/node_modules/is-boolean-object/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var callBound = require_callBound(); + var $boolToStr = callBound("Boolean.prototype.toString"); + var $toString = callBound("Object.prototype.toString"); + var tryBooleanObject = function booleanBrandCheck(value) { + try { + $boolToStr(value); + return true; + } catch (e) { + return false; + } + }; + var boolClass = "[object Boolean]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isBoolean(value) { + if (typeof value === "boolean") { + return true; + } + if (value === null || typeof value !== "object") { + return false; + } + return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass; + }; + } +}); + +// node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js +var require_is_symbol = __commonJS({ + "node_modules/.pnpm/is-symbol@1.0.4/node_modules/is-symbol/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var toStr = Object.prototype.toString; + var hasSymbols = require_has_symbols()(); + if (hasSymbols) { + symToStr = Symbol.prototype.toString; + symStringRegex = /^Symbol\(.*\)$/; + isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== "symbol") { + return false; + } + return symStringRegex.test(symToStr.call(value)); + }; + module2.exports = function isSymbol(value) { + if (typeof value === "symbol") { + return true; + } + if (toStr.call(value) !== "[object Symbol]") { + return false; + } + try { + return isSymbolObject(value); + } catch (e) { + return false; + } + }; + } else { + module2.exports = function isSymbol(value) { + return false; + }; + } + var symToStr; + var symStringRegex; + var isSymbolObject; + } +}); + +// node_modules/.pnpm/has-bigints@1.0.2/node_modules/has-bigints/index.js +var require_has_bigints = __commonJS({ + "node_modules/.pnpm/has-bigints@1.0.2/node_modules/has-bigints/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var $BigInt = typeof BigInt !== "undefined" && BigInt; + module2.exports = function hasNativeBigInts() { + return typeof $BigInt === "function" && typeof BigInt === "function" && typeof $BigInt(42) === "bigint" && typeof BigInt(42) === "bigint"; + }; + } +}); + +// node_modules/.pnpm/is-bigint@1.0.4/node_modules/is-bigint/index.js +var require_is_bigint = __commonJS({ + "node_modules/.pnpm/is-bigint@1.0.4/node_modules/is-bigint/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var hasBigInts = require_has_bigints()(); + if (hasBigInts) { + bigIntValueOf = BigInt.prototype.valueOf; + tryBigInt = function tryBigIntObject(value) { + try { + bigIntValueOf.call(value); + return true; + } catch (e) { + } + return false; + }; + module2.exports = function isBigInt(value) { + if (value === null || typeof value === "undefined" || typeof value === "boolean" || typeof value === "string" || typeof value === "number" || typeof value === "symbol" || typeof value === "function") { + return false; + } + if (typeof value === "bigint") { + return true; + } + return tryBigInt(value); + }; + } else { + module2.exports = function isBigInt(value) { + return false; + }; + } + var bigIntValueOf; + var tryBigInt; + } +}); + +// node_modules/.pnpm/which-boxed-primitive@1.0.2/node_modules/which-boxed-primitive/index.js +var require_which_boxed_primitive = __commonJS({ + "node_modules/.pnpm/which-boxed-primitive@1.0.2/node_modules/which-boxed-primitive/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var isString = require_is_string(); + var isNumber = require_is_number_object(); + var isBoolean = require_is_boolean_object(); + var isSymbol = require_is_symbol(); + var isBigInt = require_is_bigint(); + module2.exports = function whichBoxedPrimitive(value) { + if (value == null || typeof value !== "object" && typeof value !== "function") { + return null; + } + if (isString(value)) { + return "String"; + } + if (isNumber(value)) { + return "Number"; + } + if (isBoolean(value)) { + return "Boolean"; + } + if (isSymbol(value)) { + return "Symbol"; + } + if (isBigInt(value)) { + return "BigInt"; + } + }; + } +}); + +// node_modules/.pnpm/is-weakmap@2.0.1/node_modules/is-weakmap/index.js +var require_is_weakmap = __commonJS({ + "node_modules/.pnpm/is-weakmap@2.0.1/node_modules/is-weakmap/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var $WeakMap = typeof WeakMap === "function" && WeakMap.prototype ? WeakMap : null; + var $WeakSet = typeof WeakSet === "function" && WeakSet.prototype ? WeakSet : null; + var exported; + if (!$WeakMap) { + exported = function isWeakMap(x) { + return false; + }; + } + var $mapHas = $WeakMap ? $WeakMap.prototype.has : null; + var $setHas = $WeakSet ? $WeakSet.prototype.has : null; + if (!exported && !$mapHas) { + exported = function isWeakMap(x) { + return false; + }; + } + module2.exports = exported || function isWeakMap(x) { + if (!x || typeof x !== "object") { + return false; + } + try { + $mapHas.call(x, $mapHas); + if ($setHas) { + try { + $setHas.call(x, $setHas); + } catch (e) { + return true; + } + } + return x instanceof $WeakMap; + } catch (e) { + } + return false; + }; + } +}); + +// node_modules/.pnpm/is-weakset@2.0.2/node_modules/is-weakset/index.js +var require_is_weakset = __commonJS({ + "node_modules/.pnpm/is-weakset@2.0.2/node_modules/is-weakset/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var GetIntrinsic = require_get_intrinsic(); + var callBound = require_callBound(); + var $WeakSet = GetIntrinsic("%WeakSet%", true); + var $setHas = callBound("WeakSet.prototype.has", true); + if ($setHas) { + $mapHas = callBound("WeakMap.prototype.has", true); + module2.exports = function isWeakSet(x) { + if (!x || typeof x !== "object") { + return false; + } + try { + $setHas(x, $setHas); + if ($mapHas) { + try { + $mapHas(x, $mapHas); + } catch (e) { + return true; + } + } + return x instanceof $WeakSet; + } catch (e) { + } + return false; + }; + } else { + module2.exports = function isWeakSet(x) { + return false; + }; + } + var $mapHas; + } +}); + +// node_modules/.pnpm/which-collection@1.0.1/node_modules/which-collection/index.js +var require_which_collection = __commonJS({ + "node_modules/.pnpm/which-collection@1.0.1/node_modules/which-collection/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var isMap = require_is_map(); + var isSet = require_is_set(); + var isWeakMap = require_is_weakmap(); + var isWeakSet = require_is_weakset(); + module2.exports = function whichCollection(value) { + if (value && typeof value === "object") { + if (isMap(value)) { + return "Map"; + } + if (isSet(value)) { + return "Set"; + } + if (isWeakMap(value)) { + return "WeakMap"; + } + if (isWeakSet(value)) { + return "WeakSet"; + } + } + return false; + }; + } +}); + +// node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js +var require_is_callable = __commonJS({ + "node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var fnToStr = Function.prototype.toString; + var reflectApply = typeof Reflect === "object" && Reflect !== null && Reflect.apply; + var badArrayLike; + var isCallableMarker; + if (typeof reflectApply === "function" && typeof Object.defineProperty === "function") { + try { + badArrayLike = Object.defineProperty({}, "length", { + get: function() { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + reflectApply(function() { + throw 42; + }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } + } else { + reflectApply = null; + } + var constructorRegex = /^\s*class\b/; + var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; + } + }; + var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { + return false; + } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } + }; + var toStr = Object.prototype.toString; + var objectClass = "[object Object]"; + var fnClass = "[object Function]"; + var genClass = "[object GeneratorFunction]"; + var ddaClass = "[object HTMLAllCollection]"; + var ddaClass2 = "[object HTML document.all class]"; + var ddaClass3 = "[object HTMLCollection]"; + var hasToStringTag = typeof Symbol === "function" && !!Symbol.toStringTag; + var isIE68 = !(0 in [,]); + var isDDA = function isDocumentDotAll() { + return false; + }; + if (typeof document === "object") { + all = document.all; + if (toStr.call(all) === toStr.call(document.all)) { + isDDA = function isDocumentDotAll(value) { + if ((isIE68 || !value) && (typeof value === "undefined" || typeof value === "object")) { + try { + var str = toStr.call(value); + return (str === ddaClass || str === ddaClass2 || str === ddaClass3 || str === objectClass) && value("") == null; + } catch (e) { + } + } + return false; + }; + } + } + var all; + module2.exports = reflectApply ? function isCallable(value) { + if (isDDA(value)) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== "function" && typeof value !== "object") { + return false; + } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { + return false; + } + } + return !isES6ClassFn(value) && tryFunctionObject(value); + } : function isCallable(value) { + if (isDDA(value)) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== "function" && typeof value !== "object") { + return false; + } + if (hasToStringTag) { + return tryFunctionObject(value); + } + if (isES6ClassFn(value)) { + return false; + } + var strClass = toStr.call(value); + if (strClass !== fnClass && strClass !== genClass && !/^\[object HTML/.test(strClass)) { + return false; + } + return tryFunctionObject(value); + }; + } +}); + +// node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js +var require_for_each = __commonJS({ + "node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var isCallable = require_is_callable(); + var toStr = Object.prototype.toString; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var forEachArray = function forEachArray2(array, iterator, receiver) { + for (var i = 0, len = array.length; i < len; i++) { + if (hasOwnProperty.call(array, i)) { + if (receiver == null) { + iterator(array[i], i, array); + } else { + iterator.call(receiver, array[i], i, array); + } + } + } + }; + var forEachString = function forEachString2(string, iterator, receiver) { + for (var i = 0, len = string.length; i < len; i++) { + if (receiver == null) { + iterator(string.charAt(i), i, string); + } else { + iterator.call(receiver, string.charAt(i), i, string); + } + } + }; + var forEachObject = function forEachObject2(object, iterator, receiver) { + for (var k in object) { + if (hasOwnProperty.call(object, k)) { + if (receiver == null) { + iterator(object[k], k, object); + } else { + iterator.call(receiver, object[k], k, object); + } + } + } + }; + var forEach2 = function forEach3(list, iterator, thisArg) { + if (!isCallable(iterator)) { + throw new TypeError("iterator must be a function"); + } + var receiver; + if (arguments.length >= 3) { + receiver = thisArg; + } + if (toStr.call(list) === "[object Array]") { + forEachArray(list, iterator, receiver); + } else if (typeof list === "string") { + forEachString(list, iterator, receiver); + } else { + forEachObject(list, iterator, receiver); + } + }; + module2.exports = forEach2; + } +}); + +// node_modules/.pnpm/available-typed-arrays@1.0.6/node_modules/available-typed-arrays/index.js +var require_available_typed_arrays = __commonJS({ + "node_modules/.pnpm/available-typed-arrays@1.0.6/node_modules/available-typed-arrays/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var possibleNames = [ + "BigInt64Array", + "BigUint64Array", + "Float32Array", + "Float64Array", + "Int16Array", + "Int32Array", + "Int8Array", + "Uint16Array", + "Uint32Array", + "Uint8Array", + "Uint8ClampedArray" + ]; + var g = typeof globalThis === "undefined" ? global : globalThis; + module2.exports = function availableTypedArrays() { + var out = []; + for (var i = 0; i < possibleNames.length; i++) { + if (typeof g[possibleNames[i]] === "function") { + out[out.length] = possibleNames[i]; + } + } + return out; + }; + } +}); + +// node_modules/.pnpm/which-typed-array@1.1.14/node_modules/which-typed-array/index.js +var require_which_typed_array = __commonJS({ + "node_modules/.pnpm/which-typed-array@1.1.14/node_modules/which-typed-array/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var forEach2 = require_for_each(); + var availableTypedArrays = require_available_typed_arrays(); + var callBind = require_call_bind(); + var callBound = require_callBound(); + var gOPD = require_gopd(); + var $toString = callBound("Object.prototype.toString"); + var hasToStringTag = require_shams2()(); + var g = typeof globalThis === "undefined" ? global : globalThis; + var typedArrays = availableTypedArrays(); + var $slice = callBound("String.prototype.slice"); + var getPrototypeOf = Object.getPrototypeOf; + var $indexOf = callBound("Array.prototype.indexOf", true) || /** @type {(array: readonly unknown[], value: unknown) => keyof array} */ + function indexOf(array, value) { + for (var i = 0; i < array.length; i += 1) { + if (array[i] === value) { + return i; + } + } + return -1; + }; + var cache = { __proto__: null }; + if (hasToStringTag && gOPD && getPrototypeOf) { + forEach2(typedArrays, function(typedArray) { + var arr = new g[typedArray](); + if (Symbol.toStringTag in arr) { + var proto = getPrototypeOf(arr); + var descriptor = gOPD(proto, Symbol.toStringTag); + if (!descriptor) { + var superProto = getPrototypeOf(proto); + descriptor = gOPD(superProto, Symbol.toStringTag); + } + cache["$" + typedArray] = callBind(descriptor.get); + } + }); + } else { + forEach2(typedArrays, function(typedArray) { + var arr = new g[typedArray](); + var fn = arr.slice || arr.set; + if (fn) { + cache["$" + typedArray] = callBind(fn); + } + }); + } + var tryTypedArrays = function tryAllTypedArrays(value) { + var found = false; + forEach2( + // eslint-disable-next-line no-extra-parens + /** @type {Record<`\$${TypedArrayName}`, typeof cache>} */ + /** @type {any} */ + cache, + /** @type {(getter: typeof cache, name: `\$${TypedArrayName}`) => void} */ + function(getter, typedArray) { + if (!found) { + try { + if ("$" + getter(value) === typedArray) { + found = $slice(typedArray, 1); + } + } catch (e) { + } + } + } + ); + return found; + }; + var trySlices = function tryAllSlices(value) { + var found = false; + forEach2( + // eslint-disable-next-line no-extra-parens + /** @type {any} */ + cache, + /** @type {(getter: typeof cache, name: `\$${TypedArrayName}`) => void} */ + function(getter, name) { + if (!found) { + try { + getter(value); + found = $slice(name, 1); + } catch (e) { + } + } + } + ); + return found; + }; + module2.exports = function whichTypedArray(value) { + if (!value || typeof value !== "object") { + return false; + } + if (!hasToStringTag) { + var tag2 = $slice($toString(value), 8, -1); + if ($indexOf(typedArrays, tag2) > -1) { + return tag2; + } + if (tag2 !== "Object") { + return false; + } + return trySlices(value); + } + if (!gOPD) { + return null; + } + return tryTypedArrays(value); + }; + } +}); + +// node_modules/.pnpm/array-buffer-byte-length@1.0.1/node_modules/array-buffer-byte-length/index.js +var require_array_buffer_byte_length = __commonJS({ + "node_modules/.pnpm/array-buffer-byte-length@1.0.1/node_modules/array-buffer-byte-length/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var callBound = require_callBound(); + var $byteLength = callBound("ArrayBuffer.prototype.byteLength", true); + var isArrayBuffer = require_is_array_buffer(); + module2.exports = function byteLength(ab) { + if (!isArrayBuffer(ab)) { + return NaN; + } + return $byteLength ? $byteLength(ab) : ab.byteLength; + }; + } +}); + +// node_modules/.pnpm/deep-equal@2.2.3/node_modules/deep-equal/index.js +var require_deep_equal = __commonJS({ + "node_modules/.pnpm/deep-equal@2.2.3/node_modules/deep-equal/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var assign2 = require_object(); + var callBound = require_callBound(); + var flags = require_regexp_prototype(); + var GetIntrinsic = require_get_intrinsic(); + var getIterator3 = require_es_get_iterator(); + var getSideChannel = require_side_channel(); + var is = require_object_is(); + var isArguments = require_is_arguments(); + var isArray = require_isarray(); + var isArrayBuffer = require_is_array_buffer(); + var isDate = require_is_date_object(); + var isRegex = require_is_regex(); + var isSharedArrayBuffer = require_is_shared_array_buffer(); + var objectKeys = require_object_keys(); + var whichBoxedPrimitive = require_which_boxed_primitive(); + var whichCollection = require_which_collection(); + var whichTypedArray = require_which_typed_array(); + var byteLength = require_array_buffer_byte_length(); + var sabByteLength = callBound("SharedArrayBuffer.prototype.byteLength", true); + var $getTime = callBound("Date.prototype.getTime"); + var gPO = Object.getPrototypeOf; + var $objToString = callBound("Object.prototype.toString"); + var $Set = GetIntrinsic("%Set%", true); + var $mapHas = callBound("Map.prototype.has", true); + var $mapGet = callBound("Map.prototype.get", true); + var $mapSize = callBound("Map.prototype.size", true); + var $setAdd = callBound("Set.prototype.add", true); + var $setDelete = callBound("Set.prototype.delete", true); + var $setHas = callBound("Set.prototype.has", true); + var $setSize = callBound("Set.prototype.size", true); + function setHasEqualElement(set, val1, opts, channel) { + var i = getIterator3(set); + var result; + while ((result = i.next()) && !result.done) { + if (internalDeepEqual(val1, result.value, opts, channel)) { + $setDelete(set, result.value); + return true; + } + } + return false; + } + function findLooseMatchingPrimitives(prim) { + if (typeof prim === "undefined") { + return null; + } + if (typeof prim === "object") { + return void 0; + } + if (typeof prim === "symbol") { + return false; + } + if (typeof prim === "string" || typeof prim === "number") { + return +prim === +prim; + } + return true; + } + function mapMightHaveLoosePrim(a, b, prim, item, opts, channel) { + var altValue = findLooseMatchingPrimitives(prim); + if (altValue != null) { + return altValue; + } + var curB = $mapGet(b, altValue); + var looseOpts = assign2({}, opts, { strict: false }); + if (typeof curB === "undefined" && !$mapHas(b, altValue) || !internalDeepEqual(item, curB, looseOpts, channel)) { + return false; + } + return !$mapHas(a, altValue) && internalDeepEqual(item, curB, looseOpts, channel); + } + function setMightHaveLoosePrim(a, b, prim) { + var altValue = findLooseMatchingPrimitives(prim); + if (altValue != null) { + return altValue; + } + return $setHas(b, altValue) && !$setHas(a, altValue); + } + function mapHasEqualEntry(set, map, key1, item1, opts, channel) { + var i = getIterator3(set); + var result; + var key2; + while ((result = i.next()) && !result.done) { + key2 = result.value; + if ( + // eslint-disable-next-line no-use-before-define + internalDeepEqual(key1, key2, opts, channel) && internalDeepEqual(item1, $mapGet(map, key2), opts, channel) + ) { + $setDelete(set, key2); + return true; + } + } + return false; + } + function internalDeepEqual(actual, expected, options, channel) { + var opts = options || {}; + if (opts.strict ? is(actual, expected) : actual === expected) { + return true; + } + var actualBoxed = whichBoxedPrimitive(actual); + var expectedBoxed = whichBoxedPrimitive(expected); + if (actualBoxed !== expectedBoxed) { + return false; + } + if (!actual || !expected || typeof actual !== "object" && typeof expected !== "object") { + return opts.strict ? is(actual, expected) : actual == expected; + } + var hasActual = channel.has(actual); + var hasExpected = channel.has(expected); + var sentinel; + if (hasActual && hasExpected) { + if (channel.get(actual) === channel.get(expected)) { + return true; + } + } else { + sentinel = {}; + } + if (!hasActual) { + channel.set(actual, sentinel); + } + if (!hasExpected) { + channel.set(expected, sentinel); + } + return objEquiv(actual, expected, opts, channel); + } + function isBuffer(x) { + if (!x || typeof x !== "object" || typeof x.length !== "number") { + return false; + } + if (typeof x.copy !== "function" || typeof x.slice !== "function") { + return false; + } + if (x.length > 0 && typeof x[0] !== "number") { + return false; + } + return !!(x.constructor && x.constructor.isBuffer && x.constructor.isBuffer(x)); + } + function setEquiv(a, b, opts, channel) { + if ($setSize(a) !== $setSize(b)) { + return false; + } + var iA = getIterator3(a); + var iB = getIterator3(b); + var resultA; + var resultB; + var set; + while ((resultA = iA.next()) && !resultA.done) { + if (resultA.value && typeof resultA.value === "object") { + if (!set) { + set = new $Set(); + } + $setAdd(set, resultA.value); + } else if (!$setHas(b, resultA.value)) { + if (opts.strict) { + return false; + } + if (!setMightHaveLoosePrim(a, b, resultA.value)) { + return false; + } + if (!set) { + set = new $Set(); + } + $setAdd(set, resultA.value); + } + } + if (set) { + while ((resultB = iB.next()) && !resultB.done) { + if (resultB.value && typeof resultB.value === "object") { + if (!setHasEqualElement(set, resultB.value, opts.strict, channel)) { + return false; + } + } else if (!opts.strict && !$setHas(a, resultB.value) && !setHasEqualElement(set, resultB.value, opts.strict, channel)) { + return false; + } + } + return $setSize(set) === 0; + } + return true; + } + function mapEquiv(a, b, opts, channel) { + if ($mapSize(a) !== $mapSize(b)) { + return false; + } + var iA = getIterator3(a); + var iB = getIterator3(b); + var resultA; + var resultB; + var set; + var key2; + var item1; + var item2; + while ((resultA = iA.next()) && !resultA.done) { + key2 = resultA.value[0]; + item1 = resultA.value[1]; + if (key2 && typeof key2 === "object") { + if (!set) { + set = new $Set(); + } + $setAdd(set, key2); + } else { + item2 = $mapGet(b, key2); + if (typeof item2 === "undefined" && !$mapHas(b, key2) || !internalDeepEqual(item1, item2, opts, channel)) { + if (opts.strict) { + return false; + } + if (!mapMightHaveLoosePrim(a, b, key2, item1, opts, channel)) { + return false; + } + if (!set) { + set = new $Set(); + } + $setAdd(set, key2); + } + } + } + if (set) { + while ((resultB = iB.next()) && !resultB.done) { + key2 = resultB.value[0]; + item2 = resultB.value[1]; + if (key2 && typeof key2 === "object") { + if (!mapHasEqualEntry(set, a, key2, item2, opts, channel)) { + return false; + } + } else if (!opts.strict && (!a.has(key2) || !internalDeepEqual($mapGet(a, key2), item2, opts, channel)) && !mapHasEqualEntry(set, a, key2, item2, assign2({}, opts, { strict: false }), channel)) { + return false; + } + } + return $setSize(set) === 0; + } + return true; + } + function objEquiv(a, b, opts, channel) { + var i, key2; + if (typeof a !== typeof b) { + return false; + } + if (a == null || b == null) { + return false; + } + if ($objToString(a) !== $objToString(b)) { + return false; + } + if (isArguments(a) !== isArguments(b)) { + return false; + } + var aIsArray = isArray(a); + var bIsArray = isArray(b); + if (aIsArray !== bIsArray) { + return false; + } + var aIsError = a instanceof Error; + var bIsError = b instanceof Error; + if (aIsError !== bIsError) { + return false; + } + if (aIsError || bIsError) { + if (a.name !== b.name || a.message !== b.message) { + return false; + } + } + var aIsRegex = isRegex(a); + var bIsRegex = isRegex(b); + if (aIsRegex !== bIsRegex) { + return false; + } + if ((aIsRegex || bIsRegex) && (a.source !== b.source || flags(a) !== flags(b))) { + return false; + } + var aIsDate = isDate(a); + var bIsDate = isDate(b); + if (aIsDate !== bIsDate) { + return false; + } + if (aIsDate || bIsDate) { + if ($getTime(a) !== $getTime(b)) { + return false; + } + } + if (opts.strict && gPO && gPO(a) !== gPO(b)) { + return false; + } + var aWhich = whichTypedArray(a); + var bWhich = whichTypedArray(b); + if (aWhich !== bWhich) { + return false; + } + if (aWhich || bWhich) { + if (a.length !== b.length) { + return false; + } + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; + } + var aIsBuffer = isBuffer(a); + var bIsBuffer = isBuffer(b); + if (aIsBuffer !== bIsBuffer) { + return false; + } + if (aIsBuffer || bIsBuffer) { + if (a.length !== b.length) { + return false; + } + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; + } + var aIsArrayBuffer = isArrayBuffer(a); + var bIsArrayBuffer = isArrayBuffer(b); + if (aIsArrayBuffer !== bIsArrayBuffer) { + return false; + } + if (aIsArrayBuffer || bIsArrayBuffer) { + if (byteLength(a) !== byteLength(b)) { + return false; + } + return typeof Uint8Array === "function" && internalDeepEqual(new Uint8Array(a), new Uint8Array(b), opts, channel); + } + var aIsSAB = isSharedArrayBuffer(a); + var bIsSAB = isSharedArrayBuffer(b); + if (aIsSAB !== bIsSAB) { + return false; + } + if (aIsSAB || bIsSAB) { + if (sabByteLength(a) !== sabByteLength(b)) { + return false; + } + return typeof Uint8Array === "function" && internalDeepEqual(new Uint8Array(a), new Uint8Array(b), opts, channel); + } + if (typeof a !== typeof b) { + return false; + } + var ka = objectKeys(a); + var kb = objectKeys(b); + if (ka.length !== kb.length) { + return false; + } + ka.sort(); + kb.sort(); + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) { + return false; + } + } + for (i = ka.length - 1; i >= 0; i--) { + key2 = ka[i]; + if (!internalDeepEqual(a[key2], b[key2], opts, channel)) { + return false; + } + } + var aCollection = whichCollection(a); + var bCollection = whichCollection(b); + if (aCollection !== bCollection) { + return false; + } + if (aCollection === "Set" || bCollection === "Set") { + return setEquiv(a, b, opts, channel); + } + if (aCollection === "Map") { + return mapEquiv(a, b, opts, channel); + } + return true; + } + module2.exports = function deepEqual2(a, b, opts) { + return internalDeepEqual(a, b, opts, getSideChannel()); + }; + } +}); + +// node_modules/.pnpm/js-sha256@0.9.0/node_modules/js-sha256/src/sha256.js +var require_sha256 = __commonJS({ + "node_modules/.pnpm/js-sha256@0.9.0/node_modules/js-sha256/src/sha256.js"(exports, module) { + init_polyfill_buffer(); + (function() { + "use strict"; + var ERROR = "input is invalid type"; + var WINDOW = typeof window === "object"; + var root = WINDOW ? window : {}; + if (root.JS_SHA256_NO_WINDOW) { + WINDOW = false; + } + var WEB_WORKER = !WINDOW && typeof self === "object"; + var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === "object" && process.versions && process.versions.node; + if (NODE_JS) { + root = global; + } else if (WEB_WORKER) { + root = self; + } + var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === "object" && module.exports; + var AMD = typeof define === "function" && define.amd; + var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== "undefined"; + var HEX_CHARS = "0123456789abcdef".split(""); + var EXTRA = [-2147483648, 8388608, 32768, 128]; + var SHIFT = [24, 16, 8, 0]; + var K = [ + 1116352408, + 1899447441, + 3049323471, + 3921009573, + 961987163, + 1508970993, + 2453635748, + 2870763221, + 3624381080, + 310598401, + 607225278, + 1426881987, + 1925078388, + 2162078206, + 2614888103, + 3248222580, + 3835390401, + 4022224774, + 264347078, + 604807628, + 770255983, + 1249150122, + 1555081692, + 1996064986, + 2554220882, + 2821834349, + 2952996808, + 3210313671, + 3336571891, + 3584528711, + 113926993, + 338241895, + 666307205, + 773529912, + 1294757372, + 1396182291, + 1695183700, + 1986661051, + 2177026350, + 2456956037, + 2730485921, + 2820302411, + 3259730800, + 3345764771, + 3516065817, + 3600352804, + 4094571909, + 275423344, + 430227734, + 506948616, + 659060556, + 883997877, + 958139571, + 1322822218, + 1537002063, + 1747873779, + 1955562222, + 2024104815, + 2227730452, + 2361852424, + 2428436474, + 2756734187, + 3204031479, + 3329325298 + ]; + var OUTPUT_TYPES = ["hex", "array", "digest", "arrayBuffer"]; + var blocks = []; + if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) { + Array.isArray = function(obj) { + return Object.prototype.toString.call(obj) === "[object Array]"; + }; + } + if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) { + ArrayBuffer.isView = function(obj) { + return typeof obj === "object" && obj.buffer && obj.buffer.constructor === ArrayBuffer; + }; + } + var createOutputMethod = function(outputType, is2242) { + return function(message) { + return new Sha256(is2242, true).update(message)[outputType](); + }; + }; + var createMethod = function(is2242) { + var method2 = createOutputMethod("hex", is2242); + if (NODE_JS) { + method2 = nodeWrap(method2, is2242); + } + method2.create = function() { + return new Sha256(is2242); + }; + method2.update = function(message) { + return method2.create().update(message); + }; + for (var i = 0; i < OUTPUT_TYPES.length; ++i) { + var type = OUTPUT_TYPES[i]; + method2[type] = createOutputMethod(type, is2242); + } + return method2; + }; + var nodeWrap = function(method, is224) { + var crypto = eval("require('crypto')"); + var Buffer = eval("require('buffer').Buffer"); + var algorithm = is224 ? "sha224" : "sha256"; + var nodeMethod = function(message) { + if (typeof message === "string") { + return crypto.createHash(algorithm).update(message, "utf8").digest("hex"); + } else { + if (message === null || message === void 0) { + throw new Error(ERROR); + } else if (message.constructor === ArrayBuffer) { + message = new Uint8Array(message); + } + } + if (Array.isArray(message) || ArrayBuffer.isView(message) || message.constructor === Buffer) { + return crypto.createHash(algorithm).update(new Buffer(message)).digest("hex"); + } else { + return method(message); + } + }; + return nodeMethod; + }; + var createHmacOutputMethod = function(outputType, is2242) { + return function(key2, message) { + return new HmacSha256(key2, is2242, true).update(message)[outputType](); + }; + }; + var createHmacMethod = function(is2242) { + var method2 = createHmacOutputMethod("hex", is2242); + method2.create = function(key2) { + return new HmacSha256(key2, is2242); + }; + method2.update = function(key2, message) { + return method2.create(key2).update(message); + }; + for (var i = 0; i < OUTPUT_TYPES.length; ++i) { + var type = OUTPUT_TYPES[i]; + method2[type] = createHmacOutputMethod(type, is2242); + } + return method2; + }; + function Sha256(is2242, sharedMemory) { + if (sharedMemory) { + blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; + this.blocks = blocks; + } else { + this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + } + if (is2242) { + this.h0 = 3238371032; + this.h1 = 914150663; + this.h2 = 812702999; + this.h3 = 4144912697; + this.h4 = 4290775857; + this.h5 = 1750603025; + this.h6 = 1694076839; + this.h7 = 3204075428; + } else { + this.h0 = 1779033703; + this.h1 = 3144134277; + this.h2 = 1013904242; + this.h3 = 2773480762; + this.h4 = 1359893119; + this.h5 = 2600822924; + this.h6 = 528734635; + this.h7 = 1541459225; + } + this.block = this.start = this.bytes = this.hBytes = 0; + this.finalized = this.hashed = false; + this.first = true; + this.is224 = is2242; + } + Sha256.prototype.update = function(message) { + if (this.finalized) { + return; + } + var notString, type = typeof message; + if (type !== "string") { + if (type === "object") { + if (message === null) { + throw new Error(ERROR); + } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) { + message = new Uint8Array(message); + } else if (!Array.isArray(message)) { + if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) { + throw new Error(ERROR); + } + } + } else { + throw new Error(ERROR); + } + notString = true; + } + var code, index2 = 0, i, length = message.length, blocks2 = this.blocks; + while (index2 < length) { + if (this.hashed) { + this.hashed = false; + blocks2[0] = this.block; + blocks2[16] = blocks2[1] = blocks2[2] = blocks2[3] = blocks2[4] = blocks2[5] = blocks2[6] = blocks2[7] = blocks2[8] = blocks2[9] = blocks2[10] = blocks2[11] = blocks2[12] = blocks2[13] = blocks2[14] = blocks2[15] = 0; + } + if (notString) { + for (i = this.start; index2 < length && i < 64; ++index2) { + blocks2[i >> 2] |= message[index2] << SHIFT[i++ & 3]; + } + } else { + for (i = this.start; index2 < length && i < 64; ++index2) { + code = message.charCodeAt(index2); + if (code < 128) { + blocks2[i >> 2] |= code << SHIFT[i++ & 3]; + } else if (code < 2048) { + blocks2[i >> 2] |= (192 | code >> 6) << SHIFT[i++ & 3]; + blocks2[i >> 2] |= (128 | code & 63) << SHIFT[i++ & 3]; + } else if (code < 55296 || code >= 57344) { + blocks2[i >> 2] |= (224 | code >> 12) << SHIFT[i++ & 3]; + blocks2[i >> 2] |= (128 | code >> 6 & 63) << SHIFT[i++ & 3]; + blocks2[i >> 2] |= (128 | code & 63) << SHIFT[i++ & 3]; + } else { + code = 65536 + ((code & 1023) << 10 | message.charCodeAt(++index2) & 1023); + blocks2[i >> 2] |= (240 | code >> 18) << SHIFT[i++ & 3]; + blocks2[i >> 2] |= (128 | code >> 12 & 63) << SHIFT[i++ & 3]; + blocks2[i >> 2] |= (128 | code >> 6 & 63) << SHIFT[i++ & 3]; + blocks2[i >> 2] |= (128 | code & 63) << SHIFT[i++ & 3]; + } + } + } + this.lastByteIndex = i; + this.bytes += i - this.start; + if (i >= 64) { + this.block = blocks2[16]; + this.start = i - 64; + this.hash(); + this.hashed = true; + } else { + this.start = i; + } + } + if (this.bytes > 4294967295) { + this.hBytes += this.bytes / 4294967296 << 0; + this.bytes = this.bytes % 4294967296; + } + return this; + }; + Sha256.prototype.finalize = function() { + if (this.finalized) { + return; + } + this.finalized = true; + var blocks2 = this.blocks, i = this.lastByteIndex; + blocks2[16] = this.block; + blocks2[i >> 2] |= EXTRA[i & 3]; + this.block = blocks2[16]; + if (i >= 56) { + if (!this.hashed) { + this.hash(); + } + blocks2[0] = this.block; + blocks2[16] = blocks2[1] = blocks2[2] = blocks2[3] = blocks2[4] = blocks2[5] = blocks2[6] = blocks2[7] = blocks2[8] = blocks2[9] = blocks2[10] = blocks2[11] = blocks2[12] = blocks2[13] = blocks2[14] = blocks2[15] = 0; + } + blocks2[14] = this.hBytes << 3 | this.bytes >>> 29; + blocks2[15] = this.bytes << 3; + this.hash(); + }; + Sha256.prototype.hash = function() { + var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6, h = this.h7, blocks2 = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc; + for (j = 16; j < 64; ++j) { + t1 = blocks2[j - 15]; + s0 = (t1 >>> 7 | t1 << 25) ^ (t1 >>> 18 | t1 << 14) ^ t1 >>> 3; + t1 = blocks2[j - 2]; + s1 = (t1 >>> 17 | t1 << 15) ^ (t1 >>> 19 | t1 << 13) ^ t1 >>> 10; + blocks2[j] = blocks2[j - 16] + s0 + blocks2[j - 7] + s1 << 0; + } + bc = b & c; + for (j = 0; j < 64; j += 4) { + if (this.first) { + if (this.is224) { + ab = 300032; + t1 = blocks2[0] - 1413257819; + h = t1 - 150054599 << 0; + d = t1 + 24177077 << 0; + } else { + ab = 704751109; + t1 = blocks2[0] - 210244248; + h = t1 - 1521486534 << 0; + d = t1 + 143694565 << 0; + } + this.first = false; + } else { + s0 = (a >>> 2 | a << 30) ^ (a >>> 13 | a << 19) ^ (a >>> 22 | a << 10); + s1 = (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7); + ab = a & b; + maj = ab ^ a & c ^ bc; + ch = e & f ^ ~e & g; + t1 = h + s1 + ch + K[j] + blocks2[j]; + t2 = s0 + maj; + h = d + t1 << 0; + d = t1 + t2 << 0; + } + s0 = (d >>> 2 | d << 30) ^ (d >>> 13 | d << 19) ^ (d >>> 22 | d << 10); + s1 = (h >>> 6 | h << 26) ^ (h >>> 11 | h << 21) ^ (h >>> 25 | h << 7); + da = d & a; + maj = da ^ d & b ^ ab; + ch = h & e ^ ~h & f; + t1 = g + s1 + ch + K[j + 1] + blocks2[j + 1]; + t2 = s0 + maj; + g = c + t1 << 0; + c = t1 + t2 << 0; + s0 = (c >>> 2 | c << 30) ^ (c >>> 13 | c << 19) ^ (c >>> 22 | c << 10); + s1 = (g >>> 6 | g << 26) ^ (g >>> 11 | g << 21) ^ (g >>> 25 | g << 7); + cd = c & d; + maj = cd ^ c & a ^ da; + ch = g & h ^ ~g & e; + t1 = f + s1 + ch + K[j + 2] + blocks2[j + 2]; + t2 = s0 + maj; + f = b + t1 << 0; + b = t1 + t2 << 0; + s0 = (b >>> 2 | b << 30) ^ (b >>> 13 | b << 19) ^ (b >>> 22 | b << 10); + s1 = (f >>> 6 | f << 26) ^ (f >>> 11 | f << 21) ^ (f >>> 25 | f << 7); + bc = b & c; + maj = bc ^ b & d ^ cd; + ch = f & g ^ ~f & h; + t1 = e + s1 + ch + K[j + 3] + blocks2[j + 3]; + t2 = s0 + maj; + e = a + t1 << 0; + a = t1 + t2 << 0; + } + this.h0 = this.h0 + a << 0; + this.h1 = this.h1 + b << 0; + this.h2 = this.h2 + c << 0; + this.h3 = this.h3 + d << 0; + this.h4 = this.h4 + e << 0; + this.h5 = this.h5 + f << 0; + this.h6 = this.h6 + g << 0; + this.h7 = this.h7 + h << 0; + }; + Sha256.prototype.hex = function() { + this.finalize(); + var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, h6 = this.h6, h7 = this.h7; + var hex = HEX_CHARS[h0 >> 28 & 15] + HEX_CHARS[h0 >> 24 & 15] + HEX_CHARS[h0 >> 20 & 15] + HEX_CHARS[h0 >> 16 & 15] + HEX_CHARS[h0 >> 12 & 15] + HEX_CHARS[h0 >> 8 & 15] + HEX_CHARS[h0 >> 4 & 15] + HEX_CHARS[h0 & 15] + HEX_CHARS[h1 >> 28 & 15] + HEX_CHARS[h1 >> 24 & 15] + HEX_CHARS[h1 >> 20 & 15] + HEX_CHARS[h1 >> 16 & 15] + HEX_CHARS[h1 >> 12 & 15] + HEX_CHARS[h1 >> 8 & 15] + HEX_CHARS[h1 >> 4 & 15] + HEX_CHARS[h1 & 15] + HEX_CHARS[h2 >> 28 & 15] + HEX_CHARS[h2 >> 24 & 15] + HEX_CHARS[h2 >> 20 & 15] + HEX_CHARS[h2 >> 16 & 15] + HEX_CHARS[h2 >> 12 & 15] + HEX_CHARS[h2 >> 8 & 15] + HEX_CHARS[h2 >> 4 & 15] + HEX_CHARS[h2 & 15] + HEX_CHARS[h3 >> 28 & 15] + HEX_CHARS[h3 >> 24 & 15] + HEX_CHARS[h3 >> 20 & 15] + HEX_CHARS[h3 >> 16 & 15] + HEX_CHARS[h3 >> 12 & 15] + HEX_CHARS[h3 >> 8 & 15] + HEX_CHARS[h3 >> 4 & 15] + HEX_CHARS[h3 & 15] + HEX_CHARS[h4 >> 28 & 15] + HEX_CHARS[h4 >> 24 & 15] + HEX_CHARS[h4 >> 20 & 15] + HEX_CHARS[h4 >> 16 & 15] + HEX_CHARS[h4 >> 12 & 15] + HEX_CHARS[h4 >> 8 & 15] + HEX_CHARS[h4 >> 4 & 15] + HEX_CHARS[h4 & 15] + HEX_CHARS[h5 >> 28 & 15] + HEX_CHARS[h5 >> 24 & 15] + HEX_CHARS[h5 >> 20 & 15] + HEX_CHARS[h5 >> 16 & 15] + HEX_CHARS[h5 >> 12 & 15] + HEX_CHARS[h5 >> 8 & 15] + HEX_CHARS[h5 >> 4 & 15] + HEX_CHARS[h5 & 15] + HEX_CHARS[h6 >> 28 & 15] + HEX_CHARS[h6 >> 24 & 15] + HEX_CHARS[h6 >> 20 & 15] + HEX_CHARS[h6 >> 16 & 15] + HEX_CHARS[h6 >> 12 & 15] + HEX_CHARS[h6 >> 8 & 15] + HEX_CHARS[h6 >> 4 & 15] + HEX_CHARS[h6 & 15]; + if (!this.is224) { + hex += HEX_CHARS[h7 >> 28 & 15] + HEX_CHARS[h7 >> 24 & 15] + HEX_CHARS[h7 >> 20 & 15] + HEX_CHARS[h7 >> 16 & 15] + HEX_CHARS[h7 >> 12 & 15] + HEX_CHARS[h7 >> 8 & 15] + HEX_CHARS[h7 >> 4 & 15] + HEX_CHARS[h7 & 15]; + } + return hex; + }; + Sha256.prototype.toString = Sha256.prototype.hex; + Sha256.prototype.digest = function() { + this.finalize(); + var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, h6 = this.h6, h7 = this.h7; + var arr = [ + h0 >> 24 & 255, + h0 >> 16 & 255, + h0 >> 8 & 255, + h0 & 255, + h1 >> 24 & 255, + h1 >> 16 & 255, + h1 >> 8 & 255, + h1 & 255, + h2 >> 24 & 255, + h2 >> 16 & 255, + h2 >> 8 & 255, + h2 & 255, + h3 >> 24 & 255, + h3 >> 16 & 255, + h3 >> 8 & 255, + h3 & 255, + h4 >> 24 & 255, + h4 >> 16 & 255, + h4 >> 8 & 255, + h4 & 255, + h5 >> 24 & 255, + h5 >> 16 & 255, + h5 >> 8 & 255, + h5 & 255, + h6 >> 24 & 255, + h6 >> 16 & 255, + h6 >> 8 & 255, + h6 & 255 + ]; + if (!this.is224) { + arr.push(h7 >> 24 & 255, h7 >> 16 & 255, h7 >> 8 & 255, h7 & 255); + } + return arr; + }; + Sha256.prototype.array = Sha256.prototype.digest; + Sha256.prototype.arrayBuffer = function() { + this.finalize(); + var buffer2 = new ArrayBuffer(this.is224 ? 28 : 32); + var dataView = new DataView(buffer2); + dataView.setUint32(0, this.h0); + dataView.setUint32(4, this.h1); + dataView.setUint32(8, this.h2); + dataView.setUint32(12, this.h3); + dataView.setUint32(16, this.h4); + dataView.setUint32(20, this.h5); + dataView.setUint32(24, this.h6); + if (!this.is224) { + dataView.setUint32(28, this.h7); + } + return buffer2; + }; + function HmacSha256(key2, is2242, sharedMemory) { + var i, type = typeof key2; + if (type === "string") { + var bytes = [], length = key2.length, index2 = 0, code; + for (i = 0; i < length; ++i) { + code = key2.charCodeAt(i); + if (code < 128) { + bytes[index2++] = code; + } else if (code < 2048) { + bytes[index2++] = 192 | code >> 6; + bytes[index2++] = 128 | code & 63; + } else if (code < 55296 || code >= 57344) { + bytes[index2++] = 224 | code >> 12; + bytes[index2++] = 128 | code >> 6 & 63; + bytes[index2++] = 128 | code & 63; + } else { + code = 65536 + ((code & 1023) << 10 | key2.charCodeAt(++i) & 1023); + bytes[index2++] = 240 | code >> 18; + bytes[index2++] = 128 | code >> 12 & 63; + bytes[index2++] = 128 | code >> 6 & 63; + bytes[index2++] = 128 | code & 63; + } + } + key2 = bytes; + } else { + if (type === "object") { + if (key2 === null) { + throw new Error(ERROR); + } else if (ARRAY_BUFFER && key2.constructor === ArrayBuffer) { + key2 = new Uint8Array(key2); + } else if (!Array.isArray(key2)) { + if (!ARRAY_BUFFER || !ArrayBuffer.isView(key2)) { + throw new Error(ERROR); + } + } + } else { + throw new Error(ERROR); + } + } + if (key2.length > 64) { + key2 = new Sha256(is2242, true).update(key2).array(); + } + var oKeyPad = [], iKeyPad = []; + for (i = 0; i < 64; ++i) { + var b = key2[i] || 0; + oKeyPad[i] = 92 ^ b; + iKeyPad[i] = 54 ^ b; + } + Sha256.call(this, is2242, sharedMemory); + this.update(iKeyPad); + this.oKeyPad = oKeyPad; + this.inner = true; + this.sharedMemory = sharedMemory; + } + HmacSha256.prototype = new Sha256(); + HmacSha256.prototype.finalize = function() { + Sha256.prototype.finalize.call(this); + if (this.inner) { + this.inner = false; + var innerHash = this.array(); + Sha256.call(this, this.is224, this.sharedMemory); + this.update(this.oKeyPad); + this.update(innerHash); + Sha256.prototype.finalize.call(this); + } + }; + var exports = createMethod(); + exports.sha256 = exports; + exports.sha224 = createMethod(true); + exports.sha256.hmac = createHmacMethod(); + exports.sha224.hmac = createHmacMethod(true); + if (COMMON_JS) { + module.exports = exports; + } else { + root.sha256 = exports.sha256; + root.sha224 = exports.sha224; + if (AMD) { + define(function() { + return exports; + }); + } + } + })(); + } +}); + +// node_modules/.pnpm/hogan.js@3.0.2/node_modules/hogan.js/lib/compiler.js +var require_compiler = __commonJS({ + "node_modules/.pnpm/hogan.js@3.0.2/node_modules/hogan.js/lib/compiler.js"(exports2) { + init_polyfill_buffer(); + (function(Hogan4) { + var rIsWhitespace = /\S/, rQuot = /\"/g, rNewline = /\n/g, rCr = /\r/g, rSlash = /\\/g, rLineSep = /\u2028/, rParagraphSep = /\u2029/; + Hogan4.tags = { + "#": 1, + "^": 2, + "<": 3, + "$": 4, + "/": 5, + "!": 6, + ">": 7, + "=": 8, + "_v": 9, + "{": 10, + "&": 11, + "_t": 12 + }; + Hogan4.scan = function scan(text2, delimiters) { + var len = text2.length, IN_TEXT = 0, IN_TAG_TYPE = 1, IN_TAG = 2, state = IN_TEXT, tagType = null, tag2 = null, buf = "", tokens = [], seenTag = false, i = 0, lineStart = 0, otag = "{{", ctag = "}}"; + function addBuf() { + if (buf.length > 0) { + tokens.push({ tag: "_t", text: new String(buf) }); + buf = ""; + } + } + function lineIsWhitespace() { + var isAllWhitespace = true; + for (var j = lineStart; j < tokens.length; j++) { + isAllWhitespace = Hogan4.tags[tokens[j].tag] < Hogan4.tags["_v"] || tokens[j].tag == "_t" && tokens[j].text.match(rIsWhitespace) === null; + if (!isAllWhitespace) { + return false; + } + } + return isAllWhitespace; + } + function filterLine(haveSeenTag, noNewLine) { + addBuf(); + if (haveSeenTag && lineIsWhitespace()) { + for (var j = lineStart, next; j < tokens.length; j++) { + if (tokens[j].text) { + if ((next = tokens[j + 1]) && next.tag == ">") { + next.indent = tokens[j].text.toString(); + } + tokens.splice(j, 1); + } + } + } else if (!noNewLine) { + tokens.push({ tag: "\n" }); + } + seenTag = false; + lineStart = tokens.length; + } + function changeDelimiters(text3, index2) { + var close = "=" + ctag, closeIndex = text3.indexOf(close, index2), delimiters2 = trim( + text3.substring(text3.indexOf("=", index2) + 1, closeIndex) + ).split(" "); + otag = delimiters2[0]; + ctag = delimiters2[delimiters2.length - 1]; + return closeIndex + close.length - 1; + } + if (delimiters) { + delimiters = delimiters.split(" "); + otag = delimiters[0]; + ctag = delimiters[1]; + } + for (i = 0; i < len; i++) { + if (state == IN_TEXT) { + if (tagChange(otag, text2, i)) { + --i; + addBuf(); + state = IN_TAG_TYPE; + } else { + if (text2.charAt(i) == "\n") { + filterLine(seenTag); + } else { + buf += text2.charAt(i); + } + } + } else if (state == IN_TAG_TYPE) { + i += otag.length - 1; + tag2 = Hogan4.tags[text2.charAt(i + 1)]; + tagType = tag2 ? text2.charAt(i + 1) : "_v"; + if (tagType == "=") { + i = changeDelimiters(text2, i); + state = IN_TEXT; + } else { + if (tag2) { + i++; + } + state = IN_TAG; + } + seenTag = i; + } else { + if (tagChange(ctag, text2, i)) { + tokens.push({ + tag: tagType, + n: trim(buf), + otag, + ctag, + i: tagType == "/" ? seenTag - otag.length : i + ctag.length + }); + buf = ""; + i += ctag.length - 1; + state = IN_TEXT; + if (tagType == "{") { + if (ctag == "}}") { + i++; + } else { + cleanTripleStache(tokens[tokens.length - 1]); + } + } + } else { + buf += text2.charAt(i); + } + } + } + filterLine(seenTag, true); + return tokens; + }; + function cleanTripleStache(token) { + if (token.n.substr(token.n.length - 1) === "}") { + token.n = token.n.substring(0, token.n.length - 1); + } + } + function trim(s) { + if (s.trim) { + return s.trim(); + } + return s.replace(/^\s*|\s*$/g, ""); + } + function tagChange(tag2, text2, index2) { + if (text2.charAt(index2) != tag2.charAt(0)) { + return false; + } + for (var i = 1, l = tag2.length; i < l; i++) { + if (text2.charAt(index2 + i) != tag2.charAt(i)) { + return false; + } + } + return true; + } + var allowedInSuper = { "_t": true, "\n": true, "$": true, "/": true }; + function buildTree(tokens, kind, stack, customTags) { + var instructions = [], opener = null, tail = null, token = null; + tail = stack[stack.length - 1]; + while (tokens.length > 0) { + token = tokens.shift(); + if (tail && tail.tag == "<" && !(token.tag in allowedInSuper)) { + throw new Error("Illegal content in < super tag."); + } + if (Hogan4.tags[token.tag] <= Hogan4.tags["$"] || isOpener(token, customTags)) { + stack.push(token); + token.nodes = buildTree(tokens, token.tag, stack, customTags); + } else if (token.tag == "/") { + if (stack.length === 0) { + throw new Error("Closing tag without opener: /" + token.n); + } + opener = stack.pop(); + if (token.n != opener.n && !isCloser(token.n, opener.n, customTags)) { + throw new Error("Nesting error: " + opener.n + " vs. " + token.n); + } + opener.end = token.i; + return instructions; + } else if (token.tag == "\n") { + token.last = tokens.length == 0 || tokens[0].tag == "\n"; + } + instructions.push(token); + } + if (stack.length > 0) { + throw new Error("missing closing tag: " + stack.pop().n); + } + return instructions; + } + function isOpener(token, tags) { + for (var i = 0, l = tags.length; i < l; i++) { + if (tags[i].o == token.n) { + token.tag = "#"; + return true; + } + } + } + function isCloser(close, open, tags) { + for (var i = 0, l = tags.length; i < l; i++) { + if (tags[i].c == close && tags[i].o == open) { + return true; + } + } + } + function stringifySubstitutions(obj) { + var items = []; + for (var key2 in obj) { + items.push('"' + esc(key2) + '": function(c,p,t,i) {' + obj[key2] + "}"); + } + return "{ " + items.join(",") + " }"; + } + function stringifyPartials(codeObj) { + var partials = []; + for (var key2 in codeObj.partials) { + partials.push('"' + esc(key2) + '":{name:"' + esc(codeObj.partials[key2].name) + '", ' + stringifyPartials(codeObj.partials[key2]) + "}"); + } + return "partials: {" + partials.join(",") + "}, subs: " + stringifySubstitutions(codeObj.subs); + } + Hogan4.stringify = function(codeObj, text2, options) { + return "{code: function (c,p,i) { " + Hogan4.wrapMain(codeObj.code) + " }," + stringifyPartials(codeObj) + "}"; + }; + var serialNo = 0; + Hogan4.generate = function(tree, text2, options) { + serialNo = 0; + var context = { code: "", subs: {}, partials: {} }; + Hogan4.walk(tree, context); + if (options.asString) { + return this.stringify(context, text2, options); + } + return this.makeTemplate(context, text2, options); + }; + Hogan4.wrapMain = function(code) { + return 'var t=this;t.b(i=i||"");' + code + "return t.fl();"; + }; + Hogan4.template = Hogan4.Template; + Hogan4.makeTemplate = function(codeObj, text2, options) { + var template = this.makePartials(codeObj); + template.code = new Function("c", "p", "i", this.wrapMain(codeObj.code)); + return new this.template(template, text2, this, options); + }; + Hogan4.makePartials = function(codeObj) { + var key2, template = { subs: {}, partials: codeObj.partials, name: codeObj.name }; + for (key2 in template.partials) { + template.partials[key2] = this.makePartials(template.partials[key2]); + } + for (key2 in codeObj.subs) { + template.subs[key2] = new Function("c", "p", "t", "i", codeObj.subs[key2]); + } + return template; + }; + function esc(s) { + return s.replace(rSlash, "\\\\").replace(rQuot, '\\"').replace(rNewline, "\\n").replace(rCr, "\\r").replace(rLineSep, "\\u2028").replace(rParagraphSep, "\\u2029"); + } + function chooseMethod(s) { + return ~s.indexOf(".") ? "d" : "f"; + } + function createPartial(node, context) { + var prefix = "<" + (context.prefix || ""); + var sym = prefix + node.n + serialNo++; + context.partials[sym] = { name: node.n, partials: {} }; + context.code += 't.b(t.rp("' + esc(sym) + '",c,p,"' + (node.indent || "") + '"));'; + return sym; + } + Hogan4.codegen = { + "#": function(node, context) { + context.code += "if(t.s(t." + chooseMethod(node.n) + '("' + esc(node.n) + '",c,p,1),c,p,0,' + node.i + "," + node.end + ',"' + node.otag + " " + node.ctag + '")){t.rs(c,p,function(c,p,t){'; + Hogan4.walk(node.nodes, context); + context.code += "});c.pop();}"; + }, + "^": function(node, context) { + context.code += "if(!t.s(t." + chooseMethod(node.n) + '("' + esc(node.n) + '",c,p,1),c,p,1,0,0,"")){'; + Hogan4.walk(node.nodes, context); + context.code += "};"; + }, + ">": createPartial, + "<": function(node, context) { + var ctx = { partials: {}, code: "", subs: {}, inPartial: true }; + Hogan4.walk(node.nodes, ctx); + var template = context.partials[createPartial(node, context)]; + template.subs = ctx.subs; + template.partials = ctx.partials; + }, + "$": function(node, context) { + var ctx = { subs: {}, code: "", partials: context.partials, prefix: node.n }; + Hogan4.walk(node.nodes, ctx); + context.subs[node.n] = ctx.code; + if (!context.inPartial) { + context.code += 't.sub("' + esc(node.n) + '",c,p,i);'; + } + }, + "\n": function(node, context) { + context.code += write('"\\n"' + (node.last ? "" : " + i")); + }, + "_v": function(node, context) { + context.code += "t.b(t.v(t." + chooseMethod(node.n) + '("' + esc(node.n) + '",c,p,0)));'; + }, + "_t": function(node, context) { + context.code += write('"' + esc(node.text) + '"'); + }, + "{": tripleStache, + "&": tripleStache + }; + function tripleStache(node, context) { + context.code += "t.b(t.t(t." + chooseMethod(node.n) + '("' + esc(node.n) + '",c,p,0)));'; + } + function write(s) { + return "t.b(" + s + ");"; + } + Hogan4.walk = function(nodelist, context) { + var func; + for (var i = 0, l = nodelist.length; i < l; i++) { + func = Hogan4.codegen[nodelist[i].tag]; + func && func(nodelist[i], context); + } + return context; + }; + Hogan4.parse = function(tokens, text2, options) { + options = options || {}; + return buildTree(tokens, "", [], options.sectionTags || []); + }; + Hogan4.cache = {}; + Hogan4.cacheKey = function(text2, options) { + return [text2, !!options.asString, !!options.disableLambda, options.delimiters, !!options.modelGet].join("||"); + }; + Hogan4.compile = function(text2, options) { + options = options || {}; + var key2 = Hogan4.cacheKey(text2, options); + var template = this.cache[key2]; + if (template) { + var partials = template.partials; + for (var name in partials) { + delete partials[name].instance; + } + return template; + } + template = this.generate(this.parse(this.scan(text2, options.delimiters), text2, options), text2, options); + return this.cache[key2] = template; + }; + })(typeof exports2 !== "undefined" ? exports2 : Hogan); + } +}); + +// node_modules/.pnpm/hogan.js@3.0.2/node_modules/hogan.js/lib/template.js +var require_template = __commonJS({ + "node_modules/.pnpm/hogan.js@3.0.2/node_modules/hogan.js/lib/template.js"(exports2) { + init_polyfill_buffer(); + var Hogan4 = {}; + (function(Hogan5) { + Hogan5.Template = function(codeObj, text2, compiler, options) { + codeObj = codeObj || {}; + this.r = codeObj.code || this.r; + this.c = compiler; + this.options = options || {}; + this.text = text2 || ""; + this.partials = codeObj.partials || {}; + this.subs = codeObj.subs || {}; + this.buf = ""; + }; + Hogan5.Template.prototype = { + // render: replaced by generated code. + r: function(context, partials, indent2) { + return ""; + }, + // variable escaping + v: hoganEscape, + // triple stache + t: coerceToString, + render: function render(context, partials, indent2) { + return this.ri([context], partials || {}, indent2); + }, + // render internal -- a hook for overrides that catches partials too + ri: function(context, partials, indent2) { + return this.r(context, partials, indent2); + }, + // ensurePartial + ep: function(symbol, partials) { + var partial = this.partials[symbol]; + var template = partials[partial.name]; + if (partial.instance && partial.base == template) { + return partial.instance; + } + if (typeof template == "string") { + if (!this.c) { + throw new Error("No compiler available."); + } + template = this.c.compile(template, this.options); + } + if (!template) { + return null; + } + this.partials[symbol].base = template; + if (partial.subs) { + if (!partials.stackText) + partials.stackText = {}; + for (key in partial.subs) { + if (!partials.stackText[key]) { + partials.stackText[key] = this.activeSub !== void 0 && partials.stackText[this.activeSub] ? partials.stackText[this.activeSub] : this.text; + } + } + template = createSpecializedPartial( + template, + partial.subs, + partial.partials, + this.stackSubs, + this.stackPartials, + partials.stackText + ); + } + this.partials[symbol].instance = template; + return template; + }, + // tries to find a partial in the current scope and render it + rp: function(symbol, context, partials, indent2) { + var partial = this.ep(symbol, partials); + if (!partial) { + return ""; + } + return partial.ri(context, partials, indent2); + }, + // render a section + rs: function(context, partials, section) { + var tail = context[context.length - 1]; + if (!isArray(tail)) { + section(context, partials, this); + return; + } + for (var i = 0; i < tail.length; i++) { + context.push(tail[i]); + section(context, partials, this); + context.pop(); + } + }, + // maybe start a section + s: function(val, ctx, partials, inverted, start, end, tags) { + var pass; + if (isArray(val) && val.length === 0) { + return false; + } + if (typeof val == "function") { + val = this.ms(val, ctx, partials, inverted, start, end, tags); + } + pass = !!val; + if (!inverted && pass && ctx) { + ctx.push(typeof val == "object" ? val : ctx[ctx.length - 1]); + } + return pass; + }, + // find values with dotted names + d: function(key2, ctx, partials, returnFound) { + var found, names = key2.split("."), val = this.f(names[0], ctx, partials, returnFound), doModelGet = this.options.modelGet, cx = null; + if (key2 === "." && isArray(ctx[ctx.length - 2])) { + val = ctx[ctx.length - 1]; + } else { + for (var i = 1; i < names.length; i++) { + found = findInScope(names[i], val, doModelGet); + if (found !== void 0) { + cx = val; + val = found; + } else { + val = ""; + } + } + } + if (returnFound && !val) { + return false; + } + if (!returnFound && typeof val == "function") { + ctx.push(cx); + val = this.mv(val, ctx, partials); + ctx.pop(); + } + return val; + }, + // find values with normal names + f: function(key2, ctx, partials, returnFound) { + var val = false, v = null, found = false, doModelGet = this.options.modelGet; + for (var i = ctx.length - 1; i >= 0; i--) { + v = ctx[i]; + val = findInScope(key2, v, doModelGet); + if (val !== void 0) { + found = true; + break; + } + } + if (!found) { + return returnFound ? false : ""; + } + if (!returnFound && typeof val == "function") { + val = this.mv(val, ctx, partials); + } + return val; + }, + // higher order templates + ls: function(func, cx, partials, text2, tags) { + var oldTags = this.options.delimiters; + this.options.delimiters = tags; + this.b(this.ct(coerceToString(func.call(cx, text2)), cx, partials)); + this.options.delimiters = oldTags; + return false; + }, + // compile text + ct: function(text2, cx, partials) { + if (this.options.disableLambda) { + throw new Error("Lambda features disabled."); + } + return this.c.compile(text2, this.options).render(cx, partials); + }, + // template result buffering + b: function(s) { + this.buf += s; + }, + fl: function() { + var r = this.buf; + this.buf = ""; + return r; + }, + // method replace section + ms: function(func, ctx, partials, inverted, start, end, tags) { + var textSource, cx = ctx[ctx.length - 1], result = func.call(cx); + if (typeof result == "function") { + if (inverted) { + return true; + } else { + textSource = this.activeSub && this.subsText && this.subsText[this.activeSub] ? this.subsText[this.activeSub] : this.text; + return this.ls(result, cx, partials, textSource.substring(start, end), tags); + } + } + return result; + }, + // method replace variable + mv: function(func, ctx, partials) { + var cx = ctx[ctx.length - 1]; + var result = func.call(cx); + if (typeof result == "function") { + return this.ct(coerceToString(result.call(cx)), cx, partials); + } + return result; + }, + sub: function(name, context, partials, indent2) { + var f = this.subs[name]; + if (f) { + this.activeSub = name; + f(context, partials, this, indent2); + this.activeSub = false; + } + } + }; + function findInScope(key2, scope, doModelGet) { + var val; + if (scope && typeof scope == "object") { + if (scope[key2] !== void 0) { + val = scope[key2]; + } else if (doModelGet && scope.get && typeof scope.get == "function") { + val = scope.get(key2); + } + } + return val; + } + function createSpecializedPartial(instance10, subs, partials, stackSubs, stackPartials, stackText) { + function PartialTemplate() { + } + ; + PartialTemplate.prototype = instance10; + function Substitutions() { + } + ; + Substitutions.prototype = instance10.subs; + var key2; + var partial = new PartialTemplate(); + partial.subs = new Substitutions(); + partial.subsText = {}; + partial.buf = ""; + stackSubs = stackSubs || {}; + partial.stackSubs = stackSubs; + partial.subsText = stackText; + for (key2 in subs) { + if (!stackSubs[key2]) + stackSubs[key2] = subs[key2]; + } + for (key2 in stackSubs) { + partial.subs[key2] = stackSubs[key2]; + } + stackPartials = stackPartials || {}; + partial.stackPartials = stackPartials; + for (key2 in partials) { + if (!stackPartials[key2]) + stackPartials[key2] = partials[key2]; + } + for (key2 in stackPartials) { + partial.partials[key2] = stackPartials[key2]; + } + return partial; + } + var rAmp = /&/g, rLt = //g, rApos = /\'/g, rQuot = /\"/g, hChars = /[&<>\"\']/; + function coerceToString(val) { + return String(val === null || val === void 0 ? "" : val); + } + function hoganEscape(str) { + str = coerceToString(str); + return hChars.test(str) ? str.replace(rAmp, "&").replace(rLt, "<").replace(rGt, ">").replace(rApos, "'").replace(rQuot, """) : str; + } + var isArray = Array.isArray || function(a) { + return Object.prototype.toString.call(a) === "[object Array]"; + }; + })(typeof exports2 !== "undefined" ? exports2 : Hogan4); + } +}); + +// node_modules/.pnpm/hogan.js@3.0.2/node_modules/hogan.js/lib/hogan.js +var require_hogan = __commonJS({ + "node_modules/.pnpm/hogan.js@3.0.2/node_modules/hogan.js/lib/hogan.js"(exports2, module2) { + init_polyfill_buffer(); + var Hogan4 = require_compiler(); + Hogan4.Template = require_template().Template; + Hogan4.template = Hogan4.Template; + module2.exports = Hogan4; + } +}); + +// node_modules/.pnpm/feather-icons@4.29.1/node_modules/feather-icons/dist/feather.js +var require_feather = __commonJS({ + "node_modules/.pnpm/feather-icons@4.29.1/node_modules/feather-icons/dist/feather.js"(exports2, module2) { + init_polyfill_buffer(); + (function webpackUniversalModuleDefinition(root2, factory) { + if (typeof exports2 === "object" && typeof module2 === "object") + module2.exports = factory(); + else if (typeof define === "function" && define.amd) + define([], factory); + else if (typeof exports2 === "object") + exports2["feather"] = factory(); + else + root2["feather"] = factory(); + })(typeof self !== "undefined" ? self : exports2, function() { + return ( + /******/ + function(modules) { + var installedModules = {}; + function __webpack_require__(moduleId) { + if (installedModules[moduleId]) { + return installedModules[moduleId].exports; + } + var module3 = installedModules[moduleId] = { + /******/ + i: moduleId, + /******/ + l: false, + /******/ + exports: {} + /******/ + }; + modules[moduleId].call(module3.exports, module3, module3.exports, __webpack_require__); + module3.l = true; + return module3.exports; + } + __webpack_require__.m = modules; + __webpack_require__.c = installedModules; + __webpack_require__.d = function(exports3, name, getter) { + if (!__webpack_require__.o(exports3, name)) { + Object.defineProperty(exports3, name, { + /******/ + configurable: false, + /******/ + enumerable: true, + /******/ + get: getter + /******/ + }); + } + }; + __webpack_require__.r = function(exports3) { + Object.defineProperty(exports3, "__esModule", { value: true }); + }; + __webpack_require__.n = function(module3) { + var getter = module3 && module3.__esModule ? ( + /******/ + function getDefault() { + return module3["default"]; + } + ) : ( + /******/ + function getModuleExports() { + return module3; + } + ); + __webpack_require__.d(getter, "a", getter); + return getter; + }; + __webpack_require__.o = function(object, property) { + return Object.prototype.hasOwnProperty.call(object, property); + }; + __webpack_require__.p = ""; + return __webpack_require__(__webpack_require__.s = 0); + }({ + /***/ + "./dist/icons.json": ( + /*!*************************!*\ + !*** ./dist/icons.json ***! + \*************************/ + /*! exports provided: activity, airplay, alert-circle, alert-octagon, alert-triangle, align-center, align-justify, align-left, align-right, anchor, aperture, archive, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, award, bar-chart-2, bar-chart, battery-charging, battery, bell-off, bell, bluetooth, bold, book-open, book, bookmark, box, briefcase, calendar, camera-off, camera, cast, check-circle, check-square, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, chrome, circle, clipboard, clock, cloud-drizzle, cloud-lightning, cloud-off, cloud-rain, cloud-snow, cloud, code, codepen, codesandbox, coffee, columns, command, compass, copy, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, cpu, credit-card, crop, crosshair, database, delete, disc, divide-circle, divide-square, divide, dollar-sign, download-cloud, download, dribbble, droplet, edit-2, edit-3, edit, external-link, eye-off, eye, facebook, fast-forward, feather, figma, file-minus, file-plus, file-text, file, film, filter, flag, folder-minus, folder-plus, folder, framer, frown, gift, git-branch, git-commit, git-merge, git-pull-request, github, gitlab, globe, grid, hard-drive, hash, headphones, heart, help-circle, hexagon, home, image, inbox, info, instagram, italic, key, layers, layout, life-buoy, link-2, link, linkedin, list, loader, lock, log-in, log-out, mail, map-pin, map, maximize-2, maximize, meh, menu, message-circle, message-square, mic-off, mic, minimize-2, minimize, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, mouse-pointer, move, music, navigation-2, navigation, octagon, package, paperclip, pause-circle, pause, pen-tool, percent, phone-call, phone-forwarded, phone-incoming, phone-missed, phone-off, phone-outgoing, phone, pie-chart, play-circle, play, plus-circle, plus-square, plus, pocket, power, printer, radio, refresh-ccw, refresh-cw, repeat, rewind, rotate-ccw, rotate-cw, rss, save, scissors, search, send, server, settings, share-2, share, shield-off, shield, shopping-bag, shopping-cart, shuffle, sidebar, skip-back, skip-forward, slack, slash, sliders, smartphone, smile, speaker, square, star, stop-circle, sun, sunrise, sunset, table, tablet, tag, target, terminal, thermometer, thumbs-down, thumbs-up, toggle-left, toggle-right, tool, trash-2, trash, trello, trending-down, trending-up, triangle, truck, tv, twitch, twitter, type, umbrella, underline, unlock, upload-cloud, upload, user-check, user-minus, user-plus, user-x, user, users, video-off, video, voicemail, volume-1, volume-2, volume-x, volume, watch, wifi-off, wifi, wind, x-circle, x-octagon, x-square, x, youtube, zap-off, zap, zoom-in, zoom-out, default */ + /***/ + function(module3) { + module3.exports = { "activity": '', "airplay": '', "alert-circle": '', "alert-octagon": '', "alert-triangle": '', "align-center": '', "align-justify": '', "align-left": '', "align-right": '', "anchor": '', "aperture": '', "archive": '', "arrow-down-circle": '', "arrow-down-left": '', "arrow-down-right": '', "arrow-down": '', "arrow-left-circle": '', "arrow-left": '', "arrow-right-circle": '', "arrow-right": '', "arrow-up-circle": '', "arrow-up-left": '', "arrow-up-right": '', "arrow-up": '', "at-sign": '', "award": '', "bar-chart-2": '', "bar-chart": '', "battery-charging": '', "battery": '', "bell-off": '', "bell": '', "bluetooth": '', "bold": '', "book-open": '', "book": '', "bookmark": '', "box": '', "briefcase": '', "calendar": '', "camera-off": '', "camera": '', "cast": '', "check-circle": '', "check-square": '', "check": '', "chevron-down": '', "chevron-left": '', "chevron-right": '', "chevron-up": '', "chevrons-down": '', "chevrons-left": '', "chevrons-right": '', "chevrons-up": '', "chrome": '', "circle": '', "clipboard": '', "clock": '', "cloud-drizzle": '', "cloud-lightning": '', "cloud-off": '', "cloud-rain": '', "cloud-snow": '', "cloud": '', "code": '', "codepen": '', "codesandbox": '', "coffee": '', "columns": '', "command": '', "compass": '', "copy": '', "corner-down-left": '', "corner-down-right": '', "corner-left-down": '', "corner-left-up": '', "corner-right-down": '', "corner-right-up": '', "corner-up-left": '', "corner-up-right": '', "cpu": '', "credit-card": '', "crop": '', "crosshair": '', "database": '', "delete": '', "disc": '', "divide-circle": '', "divide-square": '', "divide": '', "dollar-sign": '', "download-cloud": '', "download": '', "dribbble": '', "droplet": '', "edit-2": '', "edit-3": '', "edit": '', "external-link": '', "eye-off": '', "eye": '', "facebook": '', "fast-forward": '', "feather": '', "figma": '', "file-minus": '', "file-plus": '', "file-text": '', "file": '', "film": '', "filter": '', "flag": '', "folder-minus": '', "folder-plus": '', "folder": '', "framer": '', "frown": '', "gift": '', "git-branch": '', "git-commit": '', "git-merge": '', "git-pull-request": '', "github": '', "gitlab": '', "globe": '', "grid": '', "hard-drive": '', "hash": '', "headphones": '', "heart": '', "help-circle": '', "hexagon": '', "home": '', "image": '', "inbox": '', "info": '', "instagram": '', "italic": '', "key": '', "layers": '', "layout": '', "life-buoy": '', "link-2": '', "link": '', "linkedin": '', "list": '', "loader": '', "lock": '', "log-in": '', "log-out": '', "mail": '', "map-pin": '', "map": '', "maximize-2": '', "maximize": '', "meh": '', "menu": '', "message-circle": '', "message-square": '', "mic-off": '', "mic": '', "minimize-2": '', "minimize": '', "minus-circle": '', "minus-square": '', "minus": '', "monitor": '', "moon": '', "more-horizontal": '', "more-vertical": '', "mouse-pointer": '', "move": '', "music": '', "navigation-2": '', "navigation": '', "octagon": '', "package": '', "paperclip": '', "pause-circle": '', "pause": '', "pen-tool": '', "percent": '', "phone-call": '', "phone-forwarded": '', "phone-incoming": '', "phone-missed": '', "phone-off": '', "phone-outgoing": '', "phone": '', "pie-chart": '', "play-circle": '', "play": '', "plus-circle": '', "plus-square": '', "plus": '', "pocket": '', "power": '', "printer": '', "radio": '', "refresh-ccw": '', "refresh-cw": '', "repeat": '', "rewind": '', "rotate-ccw": '', "rotate-cw": '', "rss": '', "save": '', "scissors": '', "search": '', "send": '', "server": '', "settings": '', "share-2": '', "share": '', "shield-off": '', "shield": '', "shopping-bag": '', "shopping-cart": '', "shuffle": '', "sidebar": '', "skip-back": '', "skip-forward": '', "slack": '', "slash": '', "sliders": '', "smartphone": '', "smile": '', "speaker": '', "square": '', "star": '', "stop-circle": '', "sun": '', "sunrise": '', "sunset": '', "table": '', "tablet": '', "tag": '', "target": '', "terminal": '', "thermometer": '', "thumbs-down": '', "thumbs-up": '', "toggle-left": '', "toggle-right": '', "tool": '', "trash-2": '', "trash": '', "trello": '', "trending-down": '', "trending-up": '', "triangle": '', "truck": '', "tv": '', "twitch": '', "twitter": '', "type": '', "umbrella": '', "underline": '', "unlock": '', "upload-cloud": '', "upload": '', "user-check": '', "user-minus": '', "user-plus": '', "user-x": '', "user": '', "users": '', "video-off": '', "video": '', "voicemail": '', "volume-1": '', "volume-2": '', "volume-x": '', "volume": '', "watch": '', "wifi-off": '', "wifi": '', "wind": '', "x-circle": '', "x-octagon": '', "x-square": '', "x": '', "youtube": '', "zap-off": '', "zap": '', "zoom-in": '', "zoom-out": '' }; + } + ), + /***/ + "./node_modules/classnames/dedupe.js": ( + /*!*******************************************!*\ + !*** ./node_modules/classnames/dedupe.js ***! + \*******************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; + (function() { + "use strict"; + var classNames = function() { + function StorageObject() { + } + StorageObject.prototype = /* @__PURE__ */ Object.create(null); + function _parseArray(resultSet, array) { + var length = array.length; + for (var i = 0; i < length; ++i) { + _parse(resultSet, array[i]); + } + } + var hasOwn = {}.hasOwnProperty; + function _parseNumber(resultSet, num2) { + resultSet[num2] = true; + } + function _parseObject(resultSet, object) { + for (var k in object) { + if (hasOwn.call(object, k)) { + resultSet[k] = !!object[k]; + } + } + } + var SPACE = /\s+/; + function _parseString(resultSet, str) { + var array = str.split(SPACE); + var length = array.length; + for (var i = 0; i < length; ++i) { + resultSet[array[i]] = true; + } + } + function _parse(resultSet, arg) { + if (!arg) + return; + var argType = typeof arg; + if (argType === "string") { + _parseString(resultSet, arg); + } else if (Array.isArray(arg)) { + _parseArray(resultSet, arg); + } else if (argType === "object") { + _parseObject(resultSet, arg); + } else if (argType === "number") { + _parseNumber(resultSet, arg); + } + } + function _classNames() { + var len = arguments.length; + var args = Array(len); + for (var i = 0; i < len; i++) { + args[i] = arguments[i]; + } + var classSet = new StorageObject(); + _parseArray(classSet, args); + var list = []; + for (var k in classSet) { + if (classSet[k]) { + list.push(k); + } + } + return list.join(" "); + } + return _classNames; + }(); + if (typeof module3 !== "undefined" && module3.exports) { + module3.exports = classNames; + } else if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() { + return classNames; + }.apply(exports3, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== void 0 && (module3.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { + } + })(); + } + ), + /***/ + "./node_modules/core-js/es/array/from.js": ( + /*!***********************************************!*\ + !*** ./node_modules/core-js/es/array/from.js ***! + \***********************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + __webpack_require__( + /*! ../../modules/es.string.iterator */ + "./node_modules/core-js/modules/es.string.iterator.js" + ); + __webpack_require__( + /*! ../../modules/es.array.from */ + "./node_modules/core-js/modules/es.array.from.js" + ); + var path2 = __webpack_require__( + /*! ../../internals/path */ + "./node_modules/core-js/internals/path.js" + ); + module3.exports = path2.Array.from; + } + ), + /***/ + "./node_modules/core-js/internals/a-function.js": ( + /*!******************************************************!*\ + !*** ./node_modules/core-js/internals/a-function.js ***! + \******************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + module3.exports = function(it) { + if (typeof it != "function") { + throw TypeError(String(it) + " is not a function"); + } + return it; + }; + } + ), + /***/ + "./node_modules/core-js/internals/an-object.js": ( + /*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/an-object.js ***! + \*****************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var isObject2 = __webpack_require__( + /*! ../internals/is-object */ + "./node_modules/core-js/internals/is-object.js" + ); + module3.exports = function(it) { + if (!isObject2(it)) { + throw TypeError(String(it) + " is not an object"); + } + return it; + }; + } + ), + /***/ + "./node_modules/core-js/internals/array-from.js": ( + /*!******************************************************!*\ + !*** ./node_modules/core-js/internals/array-from.js ***! + \******************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + "use strict"; + var bind = __webpack_require__( + /*! ../internals/bind-context */ + "./node_modules/core-js/internals/bind-context.js" + ); + var toObject = __webpack_require__( + /*! ../internals/to-object */ + "./node_modules/core-js/internals/to-object.js" + ); + var callWithSafeIterationClosing = __webpack_require__( + /*! ../internals/call-with-safe-iteration-closing */ + "./node_modules/core-js/internals/call-with-safe-iteration-closing.js" + ); + var isArrayIteratorMethod = __webpack_require__( + /*! ../internals/is-array-iterator-method */ + "./node_modules/core-js/internals/is-array-iterator-method.js" + ); + var toLength = __webpack_require__( + /*! ../internals/to-length */ + "./node_modules/core-js/internals/to-length.js" + ); + var createProperty = __webpack_require__( + /*! ../internals/create-property */ + "./node_modules/core-js/internals/create-property.js" + ); + var getIteratorMethod = __webpack_require__( + /*! ../internals/get-iterator-method */ + "./node_modules/core-js/internals/get-iterator-method.js" + ); + module3.exports = function from(arrayLike) { + var O = toObject(arrayLike); + var C = typeof this == "function" ? this : Array; + var argumentsLength = arguments.length; + var mapfn = argumentsLength > 1 ? arguments[1] : void 0; + var mapping = mapfn !== void 0; + var index2 = 0; + var iteratorMethod = getIteratorMethod(O); + var length, result, step, iterator; + if (mapping) + mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : void 0, 2); + if (iteratorMethod != void 0 && !(C == Array && isArrayIteratorMethod(iteratorMethod))) { + iterator = iteratorMethod.call(O); + result = new C(); + for (; !(step = iterator.next()).done; index2++) { + createProperty( + result, + index2, + mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index2], true) : step.value + ); + } + } else { + length = toLength(O.length); + result = new C(length); + for (; length > index2; index2++) { + createProperty(result, index2, mapping ? mapfn(O[index2], index2) : O[index2]); + } + } + result.length = index2; + return result; + }; + } + ), + /***/ + "./node_modules/core-js/internals/array-includes.js": ( + /*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/array-includes.js ***! + \**********************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var toIndexedObject = __webpack_require__( + /*! ../internals/to-indexed-object */ + "./node_modules/core-js/internals/to-indexed-object.js" + ); + var toLength = __webpack_require__( + /*! ../internals/to-length */ + "./node_modules/core-js/internals/to-length.js" + ); + var toAbsoluteIndex = __webpack_require__( + /*! ../internals/to-absolute-index */ + "./node_modules/core-js/internals/to-absolute-index.js" + ); + module3.exports = function(IS_INCLUDES) { + return function($this, el, fromIndex) { + var O = toIndexedObject($this); + var length = toLength(O.length); + var index2 = toAbsoluteIndex(fromIndex, length); + var value; + if (IS_INCLUDES && el != el) + while (length > index2) { + value = O[index2++]; + if (value != value) + return true; + } + else + for (; length > index2; index2++) + if (IS_INCLUDES || index2 in O) { + if (O[index2] === el) + return IS_INCLUDES || index2 || 0; + } + return !IS_INCLUDES && -1; + }; + }; + } + ), + /***/ + "./node_modules/core-js/internals/bind-context.js": ( + /*!********************************************************!*\ + !*** ./node_modules/core-js/internals/bind-context.js ***! + \********************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var aFunction = __webpack_require__( + /*! ../internals/a-function */ + "./node_modules/core-js/internals/a-function.js" + ); + module3.exports = function(fn, that, length) { + aFunction(fn); + if (that === void 0) + return fn; + switch (length) { + case 0: + return function() { + return fn.call(that); + }; + case 1: + return function(a) { + return fn.call(that, a); + }; + case 2: + return function(a, b) { + return fn.call(that, a, b); + }; + case 3: + return function(a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function() { + return fn.apply(that, arguments); + }; + }; + } + ), + /***/ + "./node_modules/core-js/internals/call-with-safe-iteration-closing.js": ( + /*!****************************************************************************!*\ + !*** ./node_modules/core-js/internals/call-with-safe-iteration-closing.js ***! + \****************************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var anObject = __webpack_require__( + /*! ../internals/an-object */ + "./node_modules/core-js/internals/an-object.js" + ); + module3.exports = function(iterator, fn, value, ENTRIES) { + try { + return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); + } catch (error) { + var returnMethod = iterator["return"]; + if (returnMethod !== void 0) + anObject(returnMethod.call(iterator)); + throw error; + } + }; + } + ), + /***/ + "./node_modules/core-js/internals/check-correctness-of-iteration.js": ( + /*!**************************************************************************!*\ + !*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***! + \**************************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var wellKnownSymbol = __webpack_require__( + /*! ../internals/well-known-symbol */ + "./node_modules/core-js/internals/well-known-symbol.js" + ); + var ITERATOR = wellKnownSymbol("iterator"); + var SAFE_CLOSING = false; + try { + var called = 0; + var iteratorWithReturn = { + next: function() { + return { done: !!called++ }; + }, + "return": function() { + SAFE_CLOSING = true; + } + }; + iteratorWithReturn[ITERATOR] = function() { + return this; + }; + Array.from(iteratorWithReturn, function() { + throw 2; + }); + } catch (error) { + } + module3.exports = function(exec, SKIP_CLOSING) { + if (!SKIP_CLOSING && !SAFE_CLOSING) + return false; + var ITERATION_SUPPORT = false; + try { + var object = {}; + object[ITERATOR] = function() { + return { + next: function() { + return { done: ITERATION_SUPPORT = true }; + } + }; + }; + exec(object); + } catch (error) { + } + return ITERATION_SUPPORT; + }; + } + ), + /***/ + "./node_modules/core-js/internals/classof-raw.js": ( + /*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/classof-raw.js ***! + \*******************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + var toString = {}.toString; + module3.exports = function(it) { + return toString.call(it).slice(8, -1); + }; + } + ), + /***/ + "./node_modules/core-js/internals/classof.js": ( + /*!***************************************************!*\ + !*** ./node_modules/core-js/internals/classof.js ***! + \***************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var classofRaw = __webpack_require__( + /*! ../internals/classof-raw */ + "./node_modules/core-js/internals/classof-raw.js" + ); + var wellKnownSymbol = __webpack_require__( + /*! ../internals/well-known-symbol */ + "./node_modules/core-js/internals/well-known-symbol.js" + ); + var TO_STRING_TAG = wellKnownSymbol("toStringTag"); + var CORRECT_ARGUMENTS = classofRaw(/* @__PURE__ */ function() { + return arguments; + }()) == "Arguments"; + var tryGet = function(it, key2) { + try { + return it[key2]; + } catch (error) { + } + }; + module3.exports = function(it) { + var O, tag2, result; + return it === void 0 ? "Undefined" : it === null ? "Null" : typeof (tag2 = tryGet(O = Object(it), TO_STRING_TAG)) == "string" ? tag2 : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) == "Object" && typeof O.callee == "function" ? "Arguments" : result; + }; + } + ), + /***/ + "./node_modules/core-js/internals/copy-constructor-properties.js": ( + /*!***********************************************************************!*\ + !*** ./node_modules/core-js/internals/copy-constructor-properties.js ***! + \***********************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var has = __webpack_require__( + /*! ../internals/has */ + "./node_modules/core-js/internals/has.js" + ); + var ownKeys = __webpack_require__( + /*! ../internals/own-keys */ + "./node_modules/core-js/internals/own-keys.js" + ); + var getOwnPropertyDescriptorModule = __webpack_require__( + /*! ../internals/object-get-own-property-descriptor */ + "./node_modules/core-js/internals/object-get-own-property-descriptor.js" + ); + var definePropertyModule = __webpack_require__( + /*! ../internals/object-define-property */ + "./node_modules/core-js/internals/object-define-property.js" + ); + module3.exports = function(target, source) { + var keys = ownKeys(source); + var defineProperty = definePropertyModule.f; + var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; + for (var i = 0; i < keys.length; i++) { + var key2 = keys[i]; + if (!has(target, key2)) + defineProperty(target, key2, getOwnPropertyDescriptor(source, key2)); + } + }; + } + ), + /***/ + "./node_modules/core-js/internals/correct-prototype-getter.js": ( + /*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***! + \********************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var fails = __webpack_require__( + /*! ../internals/fails */ + "./node_modules/core-js/internals/fails.js" + ); + module3.exports = !fails(function() { + function F() { + } + F.prototype.constructor = null; + return Object.getPrototypeOf(new F()) !== F.prototype; + }); + } + ), + /***/ + "./node_modules/core-js/internals/create-iterator-constructor.js": ( + /*!***********************************************************************!*\ + !*** ./node_modules/core-js/internals/create-iterator-constructor.js ***! + \***********************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + "use strict"; + var IteratorPrototype = __webpack_require__( + /*! ../internals/iterators-core */ + "./node_modules/core-js/internals/iterators-core.js" + ).IteratorPrototype; + var create = __webpack_require__( + /*! ../internals/object-create */ + "./node_modules/core-js/internals/object-create.js" + ); + var createPropertyDescriptor = __webpack_require__( + /*! ../internals/create-property-descriptor */ + "./node_modules/core-js/internals/create-property-descriptor.js" + ); + var setToStringTag = __webpack_require__( + /*! ../internals/set-to-string-tag */ + "./node_modules/core-js/internals/set-to-string-tag.js" + ); + var Iterators = __webpack_require__( + /*! ../internals/iterators */ + "./node_modules/core-js/internals/iterators.js" + ); + var returnThis = function() { + return this; + }; + module3.exports = function(IteratorConstructor, NAME, next) { + var TO_STRING_TAG = NAME + " Iterator"; + IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) }); + setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); + Iterators[TO_STRING_TAG] = returnThis; + return IteratorConstructor; + }; + } + ), + /***/ + "./node_modules/core-js/internals/create-property-descriptor.js": ( + /*!**********************************************************************!*\ + !*** ./node_modules/core-js/internals/create-property-descriptor.js ***! + \**********************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + module3.exports = function(bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value + }; + }; + } + ), + /***/ + "./node_modules/core-js/internals/create-property.js": ( + /*!***********************************************************!*\ + !*** ./node_modules/core-js/internals/create-property.js ***! + \***********************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + "use strict"; + var toPrimitive = __webpack_require__( + /*! ../internals/to-primitive */ + "./node_modules/core-js/internals/to-primitive.js" + ); + var definePropertyModule = __webpack_require__( + /*! ../internals/object-define-property */ + "./node_modules/core-js/internals/object-define-property.js" + ); + var createPropertyDescriptor = __webpack_require__( + /*! ../internals/create-property-descriptor */ + "./node_modules/core-js/internals/create-property-descriptor.js" + ); + module3.exports = function(object, key2, value) { + var propertyKey = toPrimitive(key2); + if (propertyKey in object) + definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value)); + else + object[propertyKey] = value; + }; + } + ), + /***/ + "./node_modules/core-js/internals/define-iterator.js": ( + /*!***********************************************************!*\ + !*** ./node_modules/core-js/internals/define-iterator.js ***! + \***********************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + "use strict"; + var $ = __webpack_require__( + /*! ../internals/export */ + "./node_modules/core-js/internals/export.js" + ); + var createIteratorConstructor = __webpack_require__( + /*! ../internals/create-iterator-constructor */ + "./node_modules/core-js/internals/create-iterator-constructor.js" + ); + var getPrototypeOf = __webpack_require__( + /*! ../internals/object-get-prototype-of */ + "./node_modules/core-js/internals/object-get-prototype-of.js" + ); + var setPrototypeOf = __webpack_require__( + /*! ../internals/object-set-prototype-of */ + "./node_modules/core-js/internals/object-set-prototype-of.js" + ); + var setToStringTag = __webpack_require__( + /*! ../internals/set-to-string-tag */ + "./node_modules/core-js/internals/set-to-string-tag.js" + ); + var hide = __webpack_require__( + /*! ../internals/hide */ + "./node_modules/core-js/internals/hide.js" + ); + var redefine = __webpack_require__( + /*! ../internals/redefine */ + "./node_modules/core-js/internals/redefine.js" + ); + var wellKnownSymbol = __webpack_require__( + /*! ../internals/well-known-symbol */ + "./node_modules/core-js/internals/well-known-symbol.js" + ); + var IS_PURE = __webpack_require__( + /*! ../internals/is-pure */ + "./node_modules/core-js/internals/is-pure.js" + ); + var Iterators = __webpack_require__( + /*! ../internals/iterators */ + "./node_modules/core-js/internals/iterators.js" + ); + var IteratorsCore = __webpack_require__( + /*! ../internals/iterators-core */ + "./node_modules/core-js/internals/iterators-core.js" + ); + var IteratorPrototype = IteratorsCore.IteratorPrototype; + var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; + var ITERATOR = wellKnownSymbol("iterator"); + var KEYS = "keys"; + var VALUES = "values"; + var ENTRIES = "entries"; + var returnThis = function() { + return this; + }; + module3.exports = function(Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { + createIteratorConstructor(IteratorConstructor, NAME, next); + var getIterationMethod = function(KIND) { + if (KIND === DEFAULT && defaultIterator) + return defaultIterator; + if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) + return IterablePrototype[KIND]; + switch (KIND) { + case KEYS: + return function keys() { + return new IteratorConstructor(this, KIND); + }; + case VALUES: + return function values() { + return new IteratorConstructor(this, KIND); + }; + case ENTRIES: + return function entries() { + return new IteratorConstructor(this, KIND); + }; + } + return function() { + return new IteratorConstructor(this); + }; + }; + var TO_STRING_TAG = NAME + " Iterator"; + var INCORRECT_VALUES_NAME = false; + var IterablePrototype = Iterable.prototype; + var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype["@@iterator"] || DEFAULT && IterablePrototype[DEFAULT]; + var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); + var anyNativeIterator = NAME == "Array" ? IterablePrototype.entries || nativeIterator : nativeIterator; + var CurrentIteratorPrototype, methods, KEY; + if (anyNativeIterator) { + CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); + if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { + if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { + if (setPrototypeOf) { + setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); + } else if (typeof CurrentIteratorPrototype[ITERATOR] != "function") { + hide(CurrentIteratorPrototype, ITERATOR, returnThis); + } + } + setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); + if (IS_PURE) + Iterators[TO_STRING_TAG] = returnThis; + } + } + if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { + INCORRECT_VALUES_NAME = true; + defaultIterator = function values() { + return nativeIterator.call(this); + }; + } + if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { + hide(IterablePrototype, ITERATOR, defaultIterator); + } + Iterators[NAME] = defaultIterator; + if (DEFAULT) { + methods = { + values: getIterationMethod(VALUES), + keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), + entries: getIterationMethod(ENTRIES) + }; + if (FORCED) + for (KEY in methods) { + if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { + redefine(IterablePrototype, KEY, methods[KEY]); + } + } + else + $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); + } + return methods; + }; + } + ), + /***/ + "./node_modules/core-js/internals/descriptors.js": ( + /*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/descriptors.js ***! + \*******************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var fails = __webpack_require__( + /*! ../internals/fails */ + "./node_modules/core-js/internals/fails.js" + ); + module3.exports = !fails(function() { + return Object.defineProperty({}, "a", { get: function() { + return 7; + } }).a != 7; + }); + } + ), + /***/ + "./node_modules/core-js/internals/document-create-element.js": ( + /*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/document-create-element.js ***! + \*******************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__( + /*! ../internals/global */ + "./node_modules/core-js/internals/global.js" + ); + var isObject2 = __webpack_require__( + /*! ../internals/is-object */ + "./node_modules/core-js/internals/is-object.js" + ); + var document2 = global2.document; + var exist = isObject2(document2) && isObject2(document2.createElement); + module3.exports = function(it) { + return exist ? document2.createElement(it) : {}; + }; + } + ), + /***/ + "./node_modules/core-js/internals/enum-bug-keys.js": ( + /*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/enum-bug-keys.js ***! + \*********************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + module3.exports = [ + "constructor", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "toLocaleString", + "toString", + "valueOf" + ]; + } + ), + /***/ + "./node_modules/core-js/internals/export.js": ( + /*!**************************************************!*\ + !*** ./node_modules/core-js/internals/export.js ***! + \**************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__( + /*! ../internals/global */ + "./node_modules/core-js/internals/global.js" + ); + var getOwnPropertyDescriptor = __webpack_require__( + /*! ../internals/object-get-own-property-descriptor */ + "./node_modules/core-js/internals/object-get-own-property-descriptor.js" + ).f; + var hide = __webpack_require__( + /*! ../internals/hide */ + "./node_modules/core-js/internals/hide.js" + ); + var redefine = __webpack_require__( + /*! ../internals/redefine */ + "./node_modules/core-js/internals/redefine.js" + ); + var setGlobal = __webpack_require__( + /*! ../internals/set-global */ + "./node_modules/core-js/internals/set-global.js" + ); + var copyConstructorProperties = __webpack_require__( + /*! ../internals/copy-constructor-properties */ + "./node_modules/core-js/internals/copy-constructor-properties.js" + ); + var isForced = __webpack_require__( + /*! ../internals/is-forced */ + "./node_modules/core-js/internals/is-forced.js" + ); + module3.exports = function(options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key2, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global2; + } else if (STATIC) { + target = global2[TARGET] || setGlobal(TARGET, {}); + } else { + target = (global2[TARGET] || {}).prototype; + } + if (target) + for (key2 in source) { + sourceProperty = source[key2]; + if (options.noTargetGet) { + descriptor = getOwnPropertyDescriptor(target, key2); + targetProperty = descriptor && descriptor.value; + } else + targetProperty = target[key2]; + FORCED = isForced(GLOBAL ? key2 : TARGET + (STATIC ? "." : "#") + key2, options.forced); + if (!FORCED && targetProperty !== void 0) { + if (typeof sourceProperty === typeof targetProperty) + continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + if (options.sham || targetProperty && targetProperty.sham) { + hide(sourceProperty, "sham", true); + } + redefine(target, key2, sourceProperty, options); + } + }; + } + ), + /***/ + "./node_modules/core-js/internals/fails.js": ( + /*!*************************************************!*\ + !*** ./node_modules/core-js/internals/fails.js ***! + \*************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + module3.exports = function(exec) { + try { + return !!exec(); + } catch (error) { + return true; + } + }; + } + ), + /***/ + "./node_modules/core-js/internals/function-to-string.js": ( + /*!**************************************************************!*\ + !*** ./node_modules/core-js/internals/function-to-string.js ***! + \**************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var shared = __webpack_require__( + /*! ../internals/shared */ + "./node_modules/core-js/internals/shared.js" + ); + module3.exports = shared("native-function-to-string", Function.toString); + } + ), + /***/ + "./node_modules/core-js/internals/get-iterator-method.js": ( + /*!***************************************************************!*\ + !*** ./node_modules/core-js/internals/get-iterator-method.js ***! + \***************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var classof = __webpack_require__( + /*! ../internals/classof */ + "./node_modules/core-js/internals/classof.js" + ); + var Iterators = __webpack_require__( + /*! ../internals/iterators */ + "./node_modules/core-js/internals/iterators.js" + ); + var wellKnownSymbol = __webpack_require__( + /*! ../internals/well-known-symbol */ + "./node_modules/core-js/internals/well-known-symbol.js" + ); + var ITERATOR = wellKnownSymbol("iterator"); + module3.exports = function(it) { + if (it != void 0) + return it[ITERATOR] || it["@@iterator"] || Iterators[classof(it)]; + }; + } + ), + /***/ + "./node_modules/core-js/internals/global.js": ( + /*!**************************************************!*\ + !*** ./node_modules/core-js/internals/global.js ***! + \**************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + (function(global2) { + var O = "object"; + var check = function(it) { + return it && it.Math == Math && it; + }; + module3.exports = // eslint-disable-next-line no-undef + check(typeof globalThis == O && globalThis) || check(typeof window == O && window) || check(typeof self == O && self) || check(typeof global2 == O && global2) || // eslint-disable-next-line no-new-func + Function("return this")(); + }).call(this, __webpack_require__( + /*! ./../../webpack/buildin/global.js */ + "./node_modules/webpack/buildin/global.js" + )); + } + ), + /***/ + "./node_modules/core-js/internals/has.js": ( + /*!***********************************************!*\ + !*** ./node_modules/core-js/internals/has.js ***! + \***********************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + var hasOwnProperty = {}.hasOwnProperty; + module3.exports = function(it, key2) { + return hasOwnProperty.call(it, key2); + }; + } + ), + /***/ + "./node_modules/core-js/internals/hidden-keys.js": ( + /*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/hidden-keys.js ***! + \*******************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + module3.exports = {}; + } + ), + /***/ + "./node_modules/core-js/internals/hide.js": ( + /*!************************************************!*\ + !*** ./node_modules/core-js/internals/hide.js ***! + \************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var DESCRIPTORS = __webpack_require__( + /*! ../internals/descriptors */ + "./node_modules/core-js/internals/descriptors.js" + ); + var definePropertyModule = __webpack_require__( + /*! ../internals/object-define-property */ + "./node_modules/core-js/internals/object-define-property.js" + ); + var createPropertyDescriptor = __webpack_require__( + /*! ../internals/create-property-descriptor */ + "./node_modules/core-js/internals/create-property-descriptor.js" + ); + module3.exports = DESCRIPTORS ? function(object, key2, value) { + return definePropertyModule.f(object, key2, createPropertyDescriptor(1, value)); + } : function(object, key2, value) { + object[key2] = value; + return object; + }; + } + ), + /***/ + "./node_modules/core-js/internals/html.js": ( + /*!************************************************!*\ + !*** ./node_modules/core-js/internals/html.js ***! + \************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__( + /*! ../internals/global */ + "./node_modules/core-js/internals/global.js" + ); + var document2 = global2.document; + module3.exports = document2 && document2.documentElement; + } + ), + /***/ + "./node_modules/core-js/internals/ie8-dom-define.js": ( + /*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/ie8-dom-define.js ***! + \**********************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var DESCRIPTORS = __webpack_require__( + /*! ../internals/descriptors */ + "./node_modules/core-js/internals/descriptors.js" + ); + var fails = __webpack_require__( + /*! ../internals/fails */ + "./node_modules/core-js/internals/fails.js" + ); + var createElement = __webpack_require__( + /*! ../internals/document-create-element */ + "./node_modules/core-js/internals/document-create-element.js" + ); + module3.exports = !DESCRIPTORS && !fails(function() { + return Object.defineProperty(createElement("div"), "a", { + get: function() { + return 7; + } + }).a != 7; + }); + } + ), + /***/ + "./node_modules/core-js/internals/indexed-object.js": ( + /*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/indexed-object.js ***! + \**********************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var fails = __webpack_require__( + /*! ../internals/fails */ + "./node_modules/core-js/internals/fails.js" + ); + var classof = __webpack_require__( + /*! ../internals/classof-raw */ + "./node_modules/core-js/internals/classof-raw.js" + ); + var split = "".split; + module3.exports = fails(function() { + return !Object("z").propertyIsEnumerable(0); + }) ? function(it) { + return classof(it) == "String" ? split.call(it, "") : Object(it); + } : Object; + } + ), + /***/ + "./node_modules/core-js/internals/internal-state.js": ( + /*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/internal-state.js ***! + \**********************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var NATIVE_WEAK_MAP = __webpack_require__( + /*! ../internals/native-weak-map */ + "./node_modules/core-js/internals/native-weak-map.js" + ); + var global2 = __webpack_require__( + /*! ../internals/global */ + "./node_modules/core-js/internals/global.js" + ); + var isObject2 = __webpack_require__( + /*! ../internals/is-object */ + "./node_modules/core-js/internals/is-object.js" + ); + var hide = __webpack_require__( + /*! ../internals/hide */ + "./node_modules/core-js/internals/hide.js" + ); + var objectHas = __webpack_require__( + /*! ../internals/has */ + "./node_modules/core-js/internals/has.js" + ); + var sharedKey = __webpack_require__( + /*! ../internals/shared-key */ + "./node_modules/core-js/internals/shared-key.js" + ); + var hiddenKeys = __webpack_require__( + /*! ../internals/hidden-keys */ + "./node_modules/core-js/internals/hidden-keys.js" + ); + var WeakMap2 = global2.WeakMap; + var set, get, has; + var enforce = function(it) { + return has(it) ? get(it) : set(it, {}); + }; + var getterFor = function(TYPE) { + return function(it) { + var state; + if (!isObject2(it) || (state = get(it)).type !== TYPE) { + throw TypeError("Incompatible receiver, " + TYPE + " required"); + } + return state; + }; + }; + if (NATIVE_WEAK_MAP) { + var store = new WeakMap2(); + var wmget = store.get; + var wmhas = store.has; + var wmset = store.set; + set = function(it, metadata) { + wmset.call(store, it, metadata); + return metadata; + }; + get = function(it) { + return wmget.call(store, it) || {}; + }; + has = function(it) { + return wmhas.call(store, it); + }; + } else { + var STATE = sharedKey("state"); + hiddenKeys[STATE] = true; + set = function(it, metadata) { + hide(it, STATE, metadata); + return metadata; + }; + get = function(it) { + return objectHas(it, STATE) ? it[STATE] : {}; + }; + has = function(it) { + return objectHas(it, STATE); + }; + } + module3.exports = { + set, + get, + has, + enforce, + getterFor + }; + } + ), + /***/ + "./node_modules/core-js/internals/is-array-iterator-method.js": ( + /*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/is-array-iterator-method.js ***! + \********************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var wellKnownSymbol = __webpack_require__( + /*! ../internals/well-known-symbol */ + "./node_modules/core-js/internals/well-known-symbol.js" + ); + var Iterators = __webpack_require__( + /*! ../internals/iterators */ + "./node_modules/core-js/internals/iterators.js" + ); + var ITERATOR = wellKnownSymbol("iterator"); + var ArrayPrototype = Array.prototype; + module3.exports = function(it) { + return it !== void 0 && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); + }; + } + ), + /***/ + "./node_modules/core-js/internals/is-forced.js": ( + /*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/is-forced.js ***! + \*****************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var fails = __webpack_require__( + /*! ../internals/fails */ + "./node_modules/core-js/internals/fails.js" + ); + var replacement = /#|\.prototype\./; + var isForced = function(feature, detection) { + var value = data[normalize2(feature)]; + return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == "function" ? fails(detection) : !!detection; + }; + var normalize2 = isForced.normalize = function(string) { + return String(string).replace(replacement, ".").toLowerCase(); + }; + var data = isForced.data = {}; + var NATIVE = isForced.NATIVE = "N"; + var POLYFILL = isForced.POLYFILL = "P"; + module3.exports = isForced; + } + ), + /***/ + "./node_modules/core-js/internals/is-object.js": ( + /*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/is-object.js ***! + \*****************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + module3.exports = function(it) { + return typeof it === "object" ? it !== null : typeof it === "function"; + }; + } + ), + /***/ + "./node_modules/core-js/internals/is-pure.js": ( + /*!***************************************************!*\ + !*** ./node_modules/core-js/internals/is-pure.js ***! + \***************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + module3.exports = false; + } + ), + /***/ + "./node_modules/core-js/internals/iterators-core.js": ( + /*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/iterators-core.js ***! + \**********************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + "use strict"; + var getPrototypeOf = __webpack_require__( + /*! ../internals/object-get-prototype-of */ + "./node_modules/core-js/internals/object-get-prototype-of.js" + ); + var hide = __webpack_require__( + /*! ../internals/hide */ + "./node_modules/core-js/internals/hide.js" + ); + var has = __webpack_require__( + /*! ../internals/has */ + "./node_modules/core-js/internals/has.js" + ); + var wellKnownSymbol = __webpack_require__( + /*! ../internals/well-known-symbol */ + "./node_modules/core-js/internals/well-known-symbol.js" + ); + var IS_PURE = __webpack_require__( + /*! ../internals/is-pure */ + "./node_modules/core-js/internals/is-pure.js" + ); + var ITERATOR = wellKnownSymbol("iterator"); + var BUGGY_SAFARI_ITERATORS = false; + var returnThis = function() { + return this; + }; + var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; + if ([].keys) { + arrayIterator = [].keys(); + if (!("next" in arrayIterator)) + BUGGY_SAFARI_ITERATORS = true; + else { + PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); + if (PrototypeOfArrayIteratorPrototype !== Object.prototype) + IteratorPrototype = PrototypeOfArrayIteratorPrototype; + } + } + if (IteratorPrototype == void 0) + IteratorPrototype = {}; + if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) + hide(IteratorPrototype, ITERATOR, returnThis); + module3.exports = { + IteratorPrototype, + BUGGY_SAFARI_ITERATORS + }; + } + ), + /***/ + "./node_modules/core-js/internals/iterators.js": ( + /*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/iterators.js ***! + \*****************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + module3.exports = {}; + } + ), + /***/ + "./node_modules/core-js/internals/native-symbol.js": ( + /*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/native-symbol.js ***! + \*********************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var fails = __webpack_require__( + /*! ../internals/fails */ + "./node_modules/core-js/internals/fails.js" + ); + module3.exports = !!Object.getOwnPropertySymbols && !fails(function() { + return !String(Symbol()); + }); + } + ), + /***/ + "./node_modules/core-js/internals/native-weak-map.js": ( + /*!***********************************************************!*\ + !*** ./node_modules/core-js/internals/native-weak-map.js ***! + \***********************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__( + /*! ../internals/global */ + "./node_modules/core-js/internals/global.js" + ); + var nativeFunctionToString = __webpack_require__( + /*! ../internals/function-to-string */ + "./node_modules/core-js/internals/function-to-string.js" + ); + var WeakMap2 = global2.WeakMap; + module3.exports = typeof WeakMap2 === "function" && /native code/.test(nativeFunctionToString.call(WeakMap2)); + } + ), + /***/ + "./node_modules/core-js/internals/object-create.js": ( + /*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/object-create.js ***! + \*********************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var anObject = __webpack_require__( + /*! ../internals/an-object */ + "./node_modules/core-js/internals/an-object.js" + ); + var defineProperties = __webpack_require__( + /*! ../internals/object-define-properties */ + "./node_modules/core-js/internals/object-define-properties.js" + ); + var enumBugKeys = __webpack_require__( + /*! ../internals/enum-bug-keys */ + "./node_modules/core-js/internals/enum-bug-keys.js" + ); + var hiddenKeys = __webpack_require__( + /*! ../internals/hidden-keys */ + "./node_modules/core-js/internals/hidden-keys.js" + ); + var html2 = __webpack_require__( + /*! ../internals/html */ + "./node_modules/core-js/internals/html.js" + ); + var documentCreateElement = __webpack_require__( + /*! ../internals/document-create-element */ + "./node_modules/core-js/internals/document-create-element.js" + ); + var sharedKey = __webpack_require__( + /*! ../internals/shared-key */ + "./node_modules/core-js/internals/shared-key.js" + ); + var IE_PROTO = sharedKey("IE_PROTO"); + var PROTOTYPE = "prototype"; + var Empty = function() { + }; + var createDict = function() { + var iframe = documentCreateElement("iframe"); + var length = enumBugKeys.length; + var lt = "<"; + var script = "script"; + var gt = ">"; + var js = "java" + script + ":"; + var iframeDocument; + iframe.style.display = "none"; + html2.appendChild(iframe); + iframe.src = String(js); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + script + gt + "document.F=Object" + lt + "/" + script + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (length--) + delete createDict[PROTOTYPE][enumBugKeys[length]]; + return createDict(); + }; + module3.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + result[IE_PROTO] = O; + } else + result = createDict(); + return Properties === void 0 ? result : defineProperties(result, Properties); + }; + hiddenKeys[IE_PROTO] = true; + } + ), + /***/ + "./node_modules/core-js/internals/object-define-properties.js": ( + /*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/object-define-properties.js ***! + \********************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var DESCRIPTORS = __webpack_require__( + /*! ../internals/descriptors */ + "./node_modules/core-js/internals/descriptors.js" + ); + var definePropertyModule = __webpack_require__( + /*! ../internals/object-define-property */ + "./node_modules/core-js/internals/object-define-property.js" + ); + var anObject = __webpack_require__( + /*! ../internals/an-object */ + "./node_modules/core-js/internals/an-object.js" + ); + var objectKeys = __webpack_require__( + /*! ../internals/object-keys */ + "./node_modules/core-js/internals/object-keys.js" + ); + module3.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = objectKeys(Properties); + var length = keys.length; + var i = 0; + var key2; + while (length > i) + definePropertyModule.f(O, key2 = keys[i++], Properties[key2]); + return O; + }; + } + ), + /***/ + "./node_modules/core-js/internals/object-define-property.js": ( + /*!******************************************************************!*\ + !*** ./node_modules/core-js/internals/object-define-property.js ***! + \******************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var DESCRIPTORS = __webpack_require__( + /*! ../internals/descriptors */ + "./node_modules/core-js/internals/descriptors.js" + ); + var IE8_DOM_DEFINE = __webpack_require__( + /*! ../internals/ie8-dom-define */ + "./node_modules/core-js/internals/ie8-dom-define.js" + ); + var anObject = __webpack_require__( + /*! ../internals/an-object */ + "./node_modules/core-js/internals/an-object.js" + ); + var toPrimitive = __webpack_require__( + /*! ../internals/to-primitive */ + "./node_modules/core-js/internals/to-primitive.js" + ); + var nativeDefineProperty = Object.defineProperty; + exports3.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return nativeDefineProperty(O, P, Attributes); + } catch (error) { + } + if ("get" in Attributes || "set" in Attributes) + throw TypeError("Accessors not supported"); + if ("value" in Attributes) + O[P] = Attributes.value; + return O; + }; + } + ), + /***/ + "./node_modules/core-js/internals/object-get-own-property-descriptor.js": ( + /*!******************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***! + \******************************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var DESCRIPTORS = __webpack_require__( + /*! ../internals/descriptors */ + "./node_modules/core-js/internals/descriptors.js" + ); + var propertyIsEnumerableModule = __webpack_require__( + /*! ../internals/object-property-is-enumerable */ + "./node_modules/core-js/internals/object-property-is-enumerable.js" + ); + var createPropertyDescriptor = __webpack_require__( + /*! ../internals/create-property-descriptor */ + "./node_modules/core-js/internals/create-property-descriptor.js" + ); + var toIndexedObject = __webpack_require__( + /*! ../internals/to-indexed-object */ + "./node_modules/core-js/internals/to-indexed-object.js" + ); + var toPrimitive = __webpack_require__( + /*! ../internals/to-primitive */ + "./node_modules/core-js/internals/to-primitive.js" + ); + var has = __webpack_require__( + /*! ../internals/has */ + "./node_modules/core-js/internals/has.js" + ); + var IE8_DOM_DEFINE = __webpack_require__( + /*! ../internals/ie8-dom-define */ + "./node_modules/core-js/internals/ie8-dom-define.js" + ); + var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + exports3.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) + try { + return nativeGetOwnPropertyDescriptor(O, P); + } catch (error) { + } + if (has(O, P)) + return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); + }; + } + ), + /***/ + "./node_modules/core-js/internals/object-get-own-property-names.js": ( + /*!*************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-own-property-names.js ***! + \*************************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var internalObjectKeys = __webpack_require__( + /*! ../internals/object-keys-internal */ + "./node_modules/core-js/internals/object-keys-internal.js" + ); + var enumBugKeys = __webpack_require__( + /*! ../internals/enum-bug-keys */ + "./node_modules/core-js/internals/enum-bug-keys.js" + ); + var hiddenKeys = enumBugKeys.concat("length", "prototype"); + exports3.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return internalObjectKeys(O, hiddenKeys); + }; + } + ), + /***/ + "./node_modules/core-js/internals/object-get-own-property-symbols.js": ( + /*!***************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***! + \***************************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + exports3.f = Object.getOwnPropertySymbols; + } + ), + /***/ + "./node_modules/core-js/internals/object-get-prototype-of.js": ( + /*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***! + \*******************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var has = __webpack_require__( + /*! ../internals/has */ + "./node_modules/core-js/internals/has.js" + ); + var toObject = __webpack_require__( + /*! ../internals/to-object */ + "./node_modules/core-js/internals/to-object.js" + ); + var sharedKey = __webpack_require__( + /*! ../internals/shared-key */ + "./node_modules/core-js/internals/shared-key.js" + ); + var CORRECT_PROTOTYPE_GETTER = __webpack_require__( + /*! ../internals/correct-prototype-getter */ + "./node_modules/core-js/internals/correct-prototype-getter.js" + ); + var IE_PROTO = sharedKey("IE_PROTO"); + var ObjectPrototype = Object.prototype; + module3.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function(O) { + O = toObject(O); + if (has(O, IE_PROTO)) + return O[IE_PROTO]; + if (typeof O.constructor == "function" && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectPrototype : null; + }; + } + ), + /***/ + "./node_modules/core-js/internals/object-keys-internal.js": ( + /*!****************************************************************!*\ + !*** ./node_modules/core-js/internals/object-keys-internal.js ***! + \****************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var has = __webpack_require__( + /*! ../internals/has */ + "./node_modules/core-js/internals/has.js" + ); + var toIndexedObject = __webpack_require__( + /*! ../internals/to-indexed-object */ + "./node_modules/core-js/internals/to-indexed-object.js" + ); + var arrayIncludes = __webpack_require__( + /*! ../internals/array-includes */ + "./node_modules/core-js/internals/array-includes.js" + ); + var hiddenKeys = __webpack_require__( + /*! ../internals/hidden-keys */ + "./node_modules/core-js/internals/hidden-keys.js" + ); + var arrayIndexOf = arrayIncludes(false); + module3.exports = function(object, names) { + var O = toIndexedObject(object); + var i = 0; + var result = []; + var key2; + for (key2 in O) + !has(hiddenKeys, key2) && has(O, key2) && result.push(key2); + while (names.length > i) + if (has(O, key2 = names[i++])) { + ~arrayIndexOf(result, key2) || result.push(key2); + } + return result; + }; + } + ), + /***/ + "./node_modules/core-js/internals/object-keys.js": ( + /*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/object-keys.js ***! + \*******************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var internalObjectKeys = __webpack_require__( + /*! ../internals/object-keys-internal */ + "./node_modules/core-js/internals/object-keys-internal.js" + ); + var enumBugKeys = __webpack_require__( + /*! ../internals/enum-bug-keys */ + "./node_modules/core-js/internals/enum-bug-keys.js" + ); + module3.exports = Object.keys || function keys(O) { + return internalObjectKeys(O, enumBugKeys); + }; + } + ), + /***/ + "./node_modules/core-js/internals/object-property-is-enumerable.js": ( + /*!*************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***! + \*************************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + "use strict"; + var nativePropertyIsEnumerable = {}.propertyIsEnumerable; + var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); + exports3.f = NASHORN_BUG ? function propertyIsEnumerable(V) { + var descriptor = getOwnPropertyDescriptor(this, V); + return !!descriptor && descriptor.enumerable; + } : nativePropertyIsEnumerable; + } + ), + /***/ + "./node_modules/core-js/internals/object-set-prototype-of.js": ( + /*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***! + \*******************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var validateSetPrototypeOfArguments = __webpack_require__( + /*! ../internals/validate-set-prototype-of-arguments */ + "./node_modules/core-js/internals/validate-set-prototype-of-arguments.js" + ); + module3.exports = Object.setPrototypeOf || ("__proto__" in {} ? function() { + var correctSetter = false; + var test = {}; + var setter; + try { + setter = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set; + setter.call(test, []); + correctSetter = test instanceof Array; + } catch (error) { + } + return function setPrototypeOf(O, proto) { + validateSetPrototypeOfArguments(O, proto); + if (correctSetter) + setter.call(O, proto); + else + O.__proto__ = proto; + return O; + }; + }() : void 0); + } + ), + /***/ + "./node_modules/core-js/internals/own-keys.js": ( + /*!****************************************************!*\ + !*** ./node_modules/core-js/internals/own-keys.js ***! + \****************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__( + /*! ../internals/global */ + "./node_modules/core-js/internals/global.js" + ); + var getOwnPropertyNamesModule = __webpack_require__( + /*! ../internals/object-get-own-property-names */ + "./node_modules/core-js/internals/object-get-own-property-names.js" + ); + var getOwnPropertySymbolsModule = __webpack_require__( + /*! ../internals/object-get-own-property-symbols */ + "./node_modules/core-js/internals/object-get-own-property-symbols.js" + ); + var anObject = __webpack_require__( + /*! ../internals/an-object */ + "./node_modules/core-js/internals/an-object.js" + ); + var Reflect2 = global2.Reflect; + module3.exports = Reflect2 && Reflect2.ownKeys || function ownKeys(it) { + var keys = getOwnPropertyNamesModule.f(anObject(it)); + var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; + return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; + }; + } + ), + /***/ + "./node_modules/core-js/internals/path.js": ( + /*!************************************************!*\ + !*** ./node_modules/core-js/internals/path.js ***! + \************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + module3.exports = __webpack_require__( + /*! ../internals/global */ + "./node_modules/core-js/internals/global.js" + ); + } + ), + /***/ + "./node_modules/core-js/internals/redefine.js": ( + /*!****************************************************!*\ + !*** ./node_modules/core-js/internals/redefine.js ***! + \****************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__( + /*! ../internals/global */ + "./node_modules/core-js/internals/global.js" + ); + var shared = __webpack_require__( + /*! ../internals/shared */ + "./node_modules/core-js/internals/shared.js" + ); + var hide = __webpack_require__( + /*! ../internals/hide */ + "./node_modules/core-js/internals/hide.js" + ); + var has = __webpack_require__( + /*! ../internals/has */ + "./node_modules/core-js/internals/has.js" + ); + var setGlobal = __webpack_require__( + /*! ../internals/set-global */ + "./node_modules/core-js/internals/set-global.js" + ); + var nativeFunctionToString = __webpack_require__( + /*! ../internals/function-to-string */ + "./node_modules/core-js/internals/function-to-string.js" + ); + var InternalStateModule = __webpack_require__( + /*! ../internals/internal-state */ + "./node_modules/core-js/internals/internal-state.js" + ); + var getInternalState = InternalStateModule.get; + var enforceInternalState = InternalStateModule.enforce; + var TEMPLATE = String(nativeFunctionToString).split("toString"); + shared("inspectSource", function(it) { + return nativeFunctionToString.call(it); + }); + (module3.exports = function(O, key2, value, options) { + var unsafe = options ? !!options.unsafe : false; + var simple2 = options ? !!options.enumerable : false; + var noTargetGet = options ? !!options.noTargetGet : false; + if (typeof value == "function") { + if (typeof key2 == "string" && !has(value, "name")) + hide(value, "name", key2); + enforceInternalState(value).source = TEMPLATE.join(typeof key2 == "string" ? key2 : ""); + } + if (O === global2) { + if (simple2) + O[key2] = value; + else + setGlobal(key2, value); + return; + } else if (!unsafe) { + delete O[key2]; + } else if (!noTargetGet && O[key2]) { + simple2 = true; + } + if (simple2) + O[key2] = value; + else + hide(O, key2, value); + })(Function.prototype, "toString", function toString() { + return typeof this == "function" && getInternalState(this).source || nativeFunctionToString.call(this); + }); + } + ), + /***/ + "./node_modules/core-js/internals/require-object-coercible.js": ( + /*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/require-object-coercible.js ***! + \********************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + module3.exports = function(it) { + if (it == void 0) + throw TypeError("Can't call method on " + it); + return it; + }; + } + ), + /***/ + "./node_modules/core-js/internals/set-global.js": ( + /*!******************************************************!*\ + !*** ./node_modules/core-js/internals/set-global.js ***! + \******************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__( + /*! ../internals/global */ + "./node_modules/core-js/internals/global.js" + ); + var hide = __webpack_require__( + /*! ../internals/hide */ + "./node_modules/core-js/internals/hide.js" + ); + module3.exports = function(key2, value) { + try { + hide(global2, key2, value); + } catch (error) { + global2[key2] = value; + } + return value; + }; + } + ), + /***/ + "./node_modules/core-js/internals/set-to-string-tag.js": ( + /*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/set-to-string-tag.js ***! + \*************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var defineProperty = __webpack_require__( + /*! ../internals/object-define-property */ + "./node_modules/core-js/internals/object-define-property.js" + ).f; + var has = __webpack_require__( + /*! ../internals/has */ + "./node_modules/core-js/internals/has.js" + ); + var wellKnownSymbol = __webpack_require__( + /*! ../internals/well-known-symbol */ + "./node_modules/core-js/internals/well-known-symbol.js" + ); + var TO_STRING_TAG = wellKnownSymbol("toStringTag"); + module3.exports = function(it, TAG, STATIC) { + if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) { + defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG }); + } + }; + } + ), + /***/ + "./node_modules/core-js/internals/shared-key.js": ( + /*!******************************************************!*\ + !*** ./node_modules/core-js/internals/shared-key.js ***! + \******************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var shared = __webpack_require__( + /*! ../internals/shared */ + "./node_modules/core-js/internals/shared.js" + ); + var uid = __webpack_require__( + /*! ../internals/uid */ + "./node_modules/core-js/internals/uid.js" + ); + var keys = shared("keys"); + module3.exports = function(key2) { + return keys[key2] || (keys[key2] = uid(key2)); + }; + } + ), + /***/ + "./node_modules/core-js/internals/shared.js": ( + /*!**************************************************!*\ + !*** ./node_modules/core-js/internals/shared.js ***! + \**************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__( + /*! ../internals/global */ + "./node_modules/core-js/internals/global.js" + ); + var setGlobal = __webpack_require__( + /*! ../internals/set-global */ + "./node_modules/core-js/internals/set-global.js" + ); + var IS_PURE = __webpack_require__( + /*! ../internals/is-pure */ + "./node_modules/core-js/internals/is-pure.js" + ); + var SHARED = "__core-js_shared__"; + var store = global2[SHARED] || setGlobal(SHARED, {}); + (module3.exports = function(key2, value) { + return store[key2] || (store[key2] = value !== void 0 ? value : {}); + })("versions", []).push({ + version: "3.1.3", + mode: IS_PURE ? "pure" : "global", + copyright: "\xA9 2019 Denis Pushkarev (zloirock.ru)" + }); + } + ), + /***/ + "./node_modules/core-js/internals/string-at.js": ( + /*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/string-at.js ***! + \*****************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var toInteger = __webpack_require__( + /*! ../internals/to-integer */ + "./node_modules/core-js/internals/to-integer.js" + ); + var requireObjectCoercible = __webpack_require__( + /*! ../internals/require-object-coercible */ + "./node_modules/core-js/internals/require-object-coercible.js" + ); + module3.exports = function(that, pos, CONVERT_TO_STRING) { + var S = String(requireObjectCoercible(that)); + var position = toInteger(pos); + var size = S.length; + var first2, second; + if (position < 0 || position >= size) + return CONVERT_TO_STRING ? "" : void 0; + first2 = S.charCodeAt(position); + return first2 < 55296 || first2 > 56319 || position + 1 === size || (second = S.charCodeAt(position + 1)) < 56320 || second > 57343 ? CONVERT_TO_STRING ? S.charAt(position) : first2 : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first2 - 55296 << 10) + (second - 56320) + 65536; + }; + } + ), + /***/ + "./node_modules/core-js/internals/to-absolute-index.js": ( + /*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/to-absolute-index.js ***! + \*************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var toInteger = __webpack_require__( + /*! ../internals/to-integer */ + "./node_modules/core-js/internals/to-integer.js" + ); + var max = Math.max; + var min = Math.min; + module3.exports = function(index2, length) { + var integer = toInteger(index2); + return integer < 0 ? max(integer + length, 0) : min(integer, length); + }; + } + ), + /***/ + "./node_modules/core-js/internals/to-indexed-object.js": ( + /*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/to-indexed-object.js ***! + \*************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var IndexedObject = __webpack_require__( + /*! ../internals/indexed-object */ + "./node_modules/core-js/internals/indexed-object.js" + ); + var requireObjectCoercible = __webpack_require__( + /*! ../internals/require-object-coercible */ + "./node_modules/core-js/internals/require-object-coercible.js" + ); + module3.exports = function(it) { + return IndexedObject(requireObjectCoercible(it)); + }; + } + ), + /***/ + "./node_modules/core-js/internals/to-integer.js": ( + /*!******************************************************!*\ + !*** ./node_modules/core-js/internals/to-integer.js ***! + \******************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + var ceil = Math.ceil; + var floor = Math.floor; + module3.exports = function(argument) { + return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); + }; + } + ), + /***/ + "./node_modules/core-js/internals/to-length.js": ( + /*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/to-length.js ***! + \*****************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var toInteger = __webpack_require__( + /*! ../internals/to-integer */ + "./node_modules/core-js/internals/to-integer.js" + ); + var min = Math.min; + module3.exports = function(argument) { + return argument > 0 ? min(toInteger(argument), 9007199254740991) : 0; + }; + } + ), + /***/ + "./node_modules/core-js/internals/to-object.js": ( + /*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/to-object.js ***! + \*****************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var requireObjectCoercible = __webpack_require__( + /*! ../internals/require-object-coercible */ + "./node_modules/core-js/internals/require-object-coercible.js" + ); + module3.exports = function(argument) { + return Object(requireObjectCoercible(argument)); + }; + } + ), + /***/ + "./node_modules/core-js/internals/to-primitive.js": ( + /*!********************************************************!*\ + !*** ./node_modules/core-js/internals/to-primitive.js ***! + \********************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var isObject2 = __webpack_require__( + /*! ../internals/is-object */ + "./node_modules/core-js/internals/is-object.js" + ); + module3.exports = function(it, S) { + if (!isObject2(it)) + return it; + var fn, val; + if (S && typeof (fn = it.toString) == "function" && !isObject2(val = fn.call(it))) + return val; + if (typeof (fn = it.valueOf) == "function" && !isObject2(val = fn.call(it))) + return val; + if (!S && typeof (fn = it.toString) == "function" && !isObject2(val = fn.call(it))) + return val; + throw TypeError("Can't convert object to primitive value"); + }; + } + ), + /***/ + "./node_modules/core-js/internals/uid.js": ( + /*!***********************************************!*\ + !*** ./node_modules/core-js/internals/uid.js ***! + \***********************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + var id = 0; + var postfix = Math.random(); + module3.exports = function(key2) { + return "Symbol(".concat(key2 === void 0 ? "" : key2, ")_", (++id + postfix).toString(36)); + }; + } + ), + /***/ + "./node_modules/core-js/internals/validate-set-prototype-of-arguments.js": ( + /*!*******************************************************************************!*\ + !*** ./node_modules/core-js/internals/validate-set-prototype-of-arguments.js ***! + \*******************************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var isObject2 = __webpack_require__( + /*! ../internals/is-object */ + "./node_modules/core-js/internals/is-object.js" + ); + var anObject = __webpack_require__( + /*! ../internals/an-object */ + "./node_modules/core-js/internals/an-object.js" + ); + module3.exports = function(O, proto) { + anObject(O); + if (!isObject2(proto) && proto !== null) { + throw TypeError("Can't set " + String(proto) + " as a prototype"); + } + }; + } + ), + /***/ + "./node_modules/core-js/internals/well-known-symbol.js": ( + /*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/well-known-symbol.js ***! + \*************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var global2 = __webpack_require__( + /*! ../internals/global */ + "./node_modules/core-js/internals/global.js" + ); + var shared = __webpack_require__( + /*! ../internals/shared */ + "./node_modules/core-js/internals/shared.js" + ); + var uid = __webpack_require__( + /*! ../internals/uid */ + "./node_modules/core-js/internals/uid.js" + ); + var NATIVE_SYMBOL = __webpack_require__( + /*! ../internals/native-symbol */ + "./node_modules/core-js/internals/native-symbol.js" + ); + var Symbol2 = global2.Symbol; + var store = shared("wks"); + module3.exports = function(name) { + return store[name] || (store[name] = NATIVE_SYMBOL && Symbol2[name] || (NATIVE_SYMBOL ? Symbol2 : uid)("Symbol." + name)); + }; + } + ), + /***/ + "./node_modules/core-js/modules/es.array.from.js": ( + /*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.from.js ***! + \*******************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + var $ = __webpack_require__( + /*! ../internals/export */ + "./node_modules/core-js/internals/export.js" + ); + var from = __webpack_require__( + /*! ../internals/array-from */ + "./node_modules/core-js/internals/array-from.js" + ); + var checkCorrectnessOfIteration = __webpack_require__( + /*! ../internals/check-correctness-of-iteration */ + "./node_modules/core-js/internals/check-correctness-of-iteration.js" + ); + var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function(iterable) { + Array.from(iterable); + }); + $({ target: "Array", stat: true, forced: INCORRECT_ITERATION }, { + from + }); + } + ), + /***/ + "./node_modules/core-js/modules/es.string.iterator.js": ( + /*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.iterator.js ***! + \************************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + "use strict"; + var codePointAt = __webpack_require__( + /*! ../internals/string-at */ + "./node_modules/core-js/internals/string-at.js" + ); + var InternalStateModule = __webpack_require__( + /*! ../internals/internal-state */ + "./node_modules/core-js/internals/internal-state.js" + ); + var defineIterator = __webpack_require__( + /*! ../internals/define-iterator */ + "./node_modules/core-js/internals/define-iterator.js" + ); + var STRING_ITERATOR = "String Iterator"; + var setInternalState = InternalStateModule.set; + var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); + defineIterator(String, "String", function(iterated) { + setInternalState(this, { + type: STRING_ITERATOR, + string: String(iterated), + index: 0 + }); + }, function next() { + var state = getInternalState(this); + var string = state.string; + var index2 = state.index; + var point; + if (index2 >= string.length) + return { value: void 0, done: true }; + point = codePointAt(string, index2, true); + state.index += point.length; + return { value: point, done: false }; + }); + } + ), + /***/ + "./node_modules/webpack/buildin/global.js": ( + /*!***********************************!*\ + !*** (webpack)/buildin/global.js ***! + \***********************************/ + /*! no static exports found */ + /***/ + function(module3, exports3) { + var g; + g = /* @__PURE__ */ function() { + return this; + }(); + try { + g = g || Function("return this")() || (1, eval)("this"); + } catch (e) { + if (typeof window === "object") + g = window; + } + module3.exports = g; + } + ), + /***/ + "./src/default-attrs.json": ( + /*!********************************!*\ + !*** ./src/default-attrs.json ***! + \********************************/ + /*! exports provided: xmlns, width, height, viewBox, fill, stroke, stroke-width, stroke-linecap, stroke-linejoin, default */ + /***/ + function(module3) { + module3.exports = { "xmlns": "http://www.w3.org/2000/svg", "width": 24, "height": 24, "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round" }; + } + ), + /***/ + "./src/icon.js": ( + /*!*********************!*\ + !*** ./src/icon.js ***! + \*********************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key2 in source) { + if (Object.prototype.hasOwnProperty.call(source, key2)) { + target[key2] = source[key2]; + } + } + } + return target; + }; + var _createClass = /* @__PURE__ */ function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { + if (protoProps) + defineProperties(Constructor.prototype, protoProps); + if (staticProps) + defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + var _dedupe = __webpack_require__( + /*! classnames/dedupe */ + "./node_modules/classnames/dedupe.js" + ); + var _dedupe2 = _interopRequireDefault(_dedupe); + var _defaultAttrs = __webpack_require__( + /*! ./default-attrs.json */ + "./src/default-attrs.json" + ); + var _defaultAttrs2 = _interopRequireDefault(_defaultAttrs); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + function _classCallCheck(instance10, Constructor) { + if (!(instance10 instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var Icon = function() { + function Icon2(name, contents) { + var tags = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : []; + _classCallCheck(this, Icon2); + this.name = name; + this.contents = contents; + this.tags = tags; + this.attrs = _extends({}, _defaultAttrs2.default, { class: "feather feather-" + name }); + } + _createClass(Icon2, [{ + key: "toSvg", + value: function toSvg() { + var attrs = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + var combinedAttrs = _extends({}, this.attrs, attrs, { class: (0, _dedupe2.default)(this.attrs.class, attrs.class) }); + return "" + this.contents + ""; + } + /** + * Return string representation of an `Icon`. + * + * Added for backward compatibility. If old code expects `feather.icons.` + * to be a string, `toString()` will get implicitly called. + * + * @returns {string} + */ + }, { + key: "toString", + value: function toString() { + return this.contents; + } + }]); + return Icon2; + }(); + function attrsToString(attrs) { + return Object.keys(attrs).map(function(key2) { + return key2 + '="' + attrs[key2] + '"'; + }).join(" "); + } + exports3.default = Icon; + } + ), + /***/ + "./src/icons.js": ( + /*!**********************!*\ + !*** ./src/icons.js ***! + \**********************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + var _icon = __webpack_require__( + /*! ./icon */ + "./src/icon.js" + ); + var _icon2 = _interopRequireDefault(_icon); + var _icons = __webpack_require__( + /*! ../dist/icons.json */ + "./dist/icons.json" + ); + var _icons2 = _interopRequireDefault(_icons); + var _tags = __webpack_require__( + /*! ./tags.json */ + "./src/tags.json" + ); + var _tags2 = _interopRequireDefault(_tags); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + exports3.default = Object.keys(_icons2.default).map(function(key2) { + return new _icon2.default(key2, _icons2.default[key2], _tags2.default[key2]); + }).reduce(function(object, icon) { + object[icon.name] = icon; + return object; + }, {}); + } + ), + /***/ + "./src/index.js": ( + /*!**********************!*\ + !*** ./src/index.js ***! + \**********************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + "use strict"; + var _icons = __webpack_require__( + /*! ./icons */ + "./src/icons.js" + ); + var _icons2 = _interopRequireDefault(_icons); + var _toSvg = __webpack_require__( + /*! ./to-svg */ + "./src/to-svg.js" + ); + var _toSvg2 = _interopRequireDefault(_toSvg); + var _replace = __webpack_require__( + /*! ./replace */ + "./src/replace.js" + ); + var _replace2 = _interopRequireDefault(_replace); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + module3.exports = { icons: _icons2.default, toSvg: _toSvg2.default, replace: _replace2.default }; + } + ), + /***/ + "./src/replace.js": ( + /*!************************!*\ + !*** ./src/replace.js ***! + \************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + var _extends = Object.assign || function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key2 in source) { + if (Object.prototype.hasOwnProperty.call(source, key2)) { + target[key2] = source[key2]; + } + } + } + return target; + }; + var _dedupe = __webpack_require__( + /*! classnames/dedupe */ + "./node_modules/classnames/dedupe.js" + ); + var _dedupe2 = _interopRequireDefault(_dedupe); + var _icons = __webpack_require__( + /*! ./icons */ + "./src/icons.js" + ); + var _icons2 = _interopRequireDefault(_icons); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + function replace() { + var attrs = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + if (typeof document === "undefined") { + throw new Error("`feather.replace()` only works in a browser environment."); + } + var elementsToReplace = document.querySelectorAll("[data-feather]"); + Array.from(elementsToReplace).forEach(function(element2) { + return replaceElement(element2, attrs); + }); + } + function replaceElement(element2) { + var attrs = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + var elementAttrs = getAttrs(element2); + var name = elementAttrs["data-feather"]; + delete elementAttrs["data-feather"]; + var svgString = _icons2.default[name].toSvg(_extends({}, attrs, elementAttrs, { class: (0, _dedupe2.default)(attrs.class, elementAttrs.class) })); + var svgDocument = new DOMParser().parseFromString(svgString, "image/svg+xml"); + var svgElement = svgDocument.querySelector("svg"); + element2.parentNode.replaceChild(svgElement, element2); + } + function getAttrs(element2) { + return Array.from(element2.attributes).reduce(function(attrs, attr2) { + attrs[attr2.name] = attr2.value; + return attrs; + }, {}); + } + exports3.default = replace; + } + ), + /***/ + "./src/tags.json": ( + /*!***********************!*\ + !*** ./src/tags.json ***! + \***********************/ + /*! exports provided: activity, airplay, alert-circle, alert-octagon, alert-triangle, align-center, align-justify, align-left, align-right, anchor, archive, at-sign, award, aperture, bar-chart, bar-chart-2, battery, battery-charging, bell, bell-off, bluetooth, book-open, book, bookmark, box, briefcase, calendar, camera, cast, chevron-down, chevron-up, circle, clipboard, clock, cloud-drizzle, cloud-lightning, cloud-rain, cloud-snow, cloud, codepen, codesandbox, code, coffee, columns, command, compass, copy, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, cpu, credit-card, crop, crosshair, database, delete, disc, dollar-sign, droplet, edit, edit-2, edit-3, eye, eye-off, external-link, facebook, fast-forward, figma, file-minus, file-plus, file-text, film, filter, flag, folder-minus, folder-plus, folder, framer, frown, gift, git-branch, git-commit, git-merge, git-pull-request, github, gitlab, globe, hard-drive, hash, headphones, heart, help-circle, hexagon, home, image, inbox, instagram, key, layers, layout, life-buoy, link, link-2, linkedin, list, lock, log-in, log-out, mail, map-pin, map, maximize, maximize-2, meh, menu, message-circle, message-square, mic-off, mic, minimize, minimize-2, minus, monitor, moon, more-horizontal, more-vertical, mouse-pointer, move, music, navigation, navigation-2, octagon, package, paperclip, pause, pause-circle, pen-tool, percent, phone-call, phone-forwarded, phone-incoming, phone-missed, phone-off, phone-outgoing, phone, play, pie-chart, play-circle, plus, plus-circle, plus-square, pocket, power, printer, radio, refresh-cw, refresh-ccw, repeat, rewind, rotate-ccw, rotate-cw, rss, save, scissors, search, send, settings, share-2, shield, shield-off, shopping-bag, shopping-cart, shuffle, skip-back, skip-forward, slack, slash, sliders, smartphone, smile, speaker, star, stop-circle, sun, sunrise, sunset, tablet, tag, target, terminal, thermometer, thumbs-down, thumbs-up, toggle-left, toggle-right, tool, trash, trash-2, triangle, truck, tv, twitch, twitter, type, umbrella, unlock, user-check, user-minus, user-plus, user-x, user, users, video-off, video, voicemail, volume, volume-1, volume-2, volume-x, watch, wifi-off, wifi, wind, x-circle, x-octagon, x-square, x, youtube, zap-off, zap, zoom-in, zoom-out, default */ + /***/ + function(module3) { + module3.exports = { "activity": ["pulse", "health", "action", "motion"], "airplay": ["stream", "cast", "mirroring"], "alert-circle": ["warning", "alert", "danger"], "alert-octagon": ["warning", "alert", "danger"], "alert-triangle": ["warning", "alert", "danger"], "align-center": ["text alignment", "center"], "align-justify": ["text alignment", "justified"], "align-left": ["text alignment", "left"], "align-right": ["text alignment", "right"], "anchor": [], "archive": ["index", "box"], "at-sign": ["mention", "at", "email", "message"], "award": ["achievement", "badge"], "aperture": ["camera", "photo"], "bar-chart": ["statistics", "diagram", "graph"], "bar-chart-2": ["statistics", "diagram", "graph"], "battery": ["power", "electricity"], "battery-charging": ["power", "electricity"], "bell": ["alarm", "notification", "sound"], "bell-off": ["alarm", "notification", "silent"], "bluetooth": ["wireless"], "book-open": ["read", "library"], "book": ["read", "dictionary", "booklet", "magazine", "library"], "bookmark": ["read", "clip", "marker", "tag"], "box": ["cube"], "briefcase": ["work", "bag", "baggage", "folder"], "calendar": ["date"], "camera": ["photo"], "cast": ["chromecast", "airplay"], "chevron-down": ["expand"], "chevron-up": ["collapse"], "circle": ["off", "zero", "record"], "clipboard": ["copy"], "clock": ["time", "watch", "alarm"], "cloud-drizzle": ["weather", "shower"], "cloud-lightning": ["weather", "bolt"], "cloud-rain": ["weather"], "cloud-snow": ["weather", "blizzard"], "cloud": ["weather"], "codepen": ["logo"], "codesandbox": ["logo"], "code": ["source", "programming"], "coffee": ["drink", "cup", "mug", "tea", "cafe", "hot", "beverage"], "columns": ["layout"], "command": ["keyboard", "cmd", "terminal", "prompt"], "compass": ["navigation", "safari", "travel", "direction"], "copy": ["clone", "duplicate"], "corner-down-left": ["arrow", "return"], "corner-down-right": ["arrow"], "corner-left-down": ["arrow"], "corner-left-up": ["arrow"], "corner-right-down": ["arrow"], "corner-right-up": ["arrow"], "corner-up-left": ["arrow"], "corner-up-right": ["arrow"], "cpu": ["processor", "technology"], "credit-card": ["purchase", "payment", "cc"], "crop": ["photo", "image"], "crosshair": ["aim", "target"], "database": ["storage", "memory"], "delete": ["remove"], "disc": ["album", "cd", "dvd", "music"], "dollar-sign": ["currency", "money", "payment"], "droplet": ["water"], "edit": ["pencil", "change"], "edit-2": ["pencil", "change"], "edit-3": ["pencil", "change"], "eye": ["view", "watch"], "eye-off": ["view", "watch", "hide", "hidden"], "external-link": ["outbound"], "facebook": ["logo", "social"], "fast-forward": ["music"], "figma": ["logo", "design", "tool"], "file-minus": ["delete", "remove", "erase"], "file-plus": ["add", "create", "new"], "file-text": ["data", "txt", "pdf"], "film": ["movie", "video"], "filter": ["funnel", "hopper"], "flag": ["report"], "folder-minus": ["directory"], "folder-plus": ["directory"], "folder": ["directory"], "framer": ["logo", "design", "tool"], "frown": ["emoji", "face", "bad", "sad", "emotion"], "gift": ["present", "box", "birthday", "party"], "git-branch": ["code", "version control"], "git-commit": ["code", "version control"], "git-merge": ["code", "version control"], "git-pull-request": ["code", "version control"], "github": ["logo", "version control"], "gitlab": ["logo", "version control"], "globe": ["world", "browser", "language", "translate"], "hard-drive": ["computer", "server", "memory", "data"], "hash": ["hashtag", "number", "pound"], "headphones": ["music", "audio", "sound"], "heart": ["like", "love", "emotion"], "help-circle": ["question mark"], "hexagon": ["shape", "node.js", "logo"], "home": ["house", "living"], "image": ["picture"], "inbox": ["email"], "instagram": ["logo", "camera"], "key": ["password", "login", "authentication", "secure"], "layers": ["stack"], "layout": ["window", "webpage"], "life-buoy": ["help", "life ring", "support"], "link": ["chain", "url"], "link-2": ["chain", "url"], "linkedin": ["logo", "social media"], "list": ["options"], "lock": ["security", "password", "secure"], "log-in": ["sign in", "arrow", "enter"], "log-out": ["sign out", "arrow", "exit"], "mail": ["email", "message"], "map-pin": ["location", "navigation", "travel", "marker"], "map": ["location", "navigation", "travel"], "maximize": ["fullscreen"], "maximize-2": ["fullscreen", "arrows", "expand"], "meh": ["emoji", "face", "neutral", "emotion"], "menu": ["bars", "navigation", "hamburger"], "message-circle": ["comment", "chat"], "message-square": ["comment", "chat"], "mic-off": ["record", "sound", "mute"], "mic": ["record", "sound", "listen"], "minimize": ["exit fullscreen", "close"], "minimize-2": ["exit fullscreen", "arrows", "close"], "minus": ["subtract"], "monitor": ["tv", "screen", "display"], "moon": ["dark", "night"], "more-horizontal": ["ellipsis"], "more-vertical": ["ellipsis"], "mouse-pointer": ["arrow", "cursor"], "move": ["arrows"], "music": ["note"], "navigation": ["location", "travel"], "navigation-2": ["location", "travel"], "octagon": ["stop"], "package": ["box", "container"], "paperclip": ["attachment"], "pause": ["music", "stop"], "pause-circle": ["music", "audio", "stop"], "pen-tool": ["vector", "drawing"], "percent": ["discount"], "phone-call": ["ring"], "phone-forwarded": ["call"], "phone-incoming": ["call"], "phone-missed": ["call"], "phone-off": ["call", "mute"], "phone-outgoing": ["call"], "phone": ["call"], "play": ["music", "start"], "pie-chart": ["statistics", "diagram"], "play-circle": ["music", "start"], "plus": ["add", "new"], "plus-circle": ["add", "new"], "plus-square": ["add", "new"], "pocket": ["logo", "save"], "power": ["on", "off"], "printer": ["fax", "office", "device"], "radio": ["signal"], "refresh-cw": ["synchronise", "arrows"], "refresh-ccw": ["arrows"], "repeat": ["loop", "arrows"], "rewind": ["music"], "rotate-ccw": ["arrow"], "rotate-cw": ["arrow"], "rss": ["feed", "subscribe"], "save": ["floppy disk"], "scissors": ["cut"], "search": ["find", "magnifier", "magnifying glass"], "send": ["message", "mail", "email", "paper airplane", "paper aeroplane"], "settings": ["cog", "edit", "gear", "preferences"], "share-2": ["network", "connections"], "shield": ["security", "secure"], "shield-off": ["security", "insecure"], "shopping-bag": ["ecommerce", "cart", "purchase", "store"], "shopping-cart": ["ecommerce", "cart", "purchase", "store"], "shuffle": ["music"], "skip-back": ["music"], "skip-forward": ["music"], "slack": ["logo"], "slash": ["ban", "no"], "sliders": ["settings", "controls"], "smartphone": ["cellphone", "device"], "smile": ["emoji", "face", "happy", "good", "emotion"], "speaker": ["audio", "music"], "star": ["bookmark", "favorite", "like"], "stop-circle": ["media", "music"], "sun": ["brightness", "weather", "light"], "sunrise": ["weather", "time", "morning", "day"], "sunset": ["weather", "time", "evening", "night"], "tablet": ["device"], "tag": ["label"], "target": ["logo", "bullseye"], "terminal": ["code", "command line", "prompt"], "thermometer": ["temperature", "celsius", "fahrenheit", "weather"], "thumbs-down": ["dislike", "bad", "emotion"], "thumbs-up": ["like", "good", "emotion"], "toggle-left": ["on", "off", "switch"], "toggle-right": ["on", "off", "switch"], "tool": ["settings", "spanner"], "trash": ["garbage", "delete", "remove", "bin"], "trash-2": ["garbage", "delete", "remove", "bin"], "triangle": ["delta"], "truck": ["delivery", "van", "shipping", "transport", "lorry"], "tv": ["television", "stream"], "twitch": ["logo"], "twitter": ["logo", "social"], "type": ["text"], "umbrella": ["rain", "weather"], "unlock": ["security"], "user-check": ["followed", "subscribed"], "user-minus": ["delete", "remove", "unfollow", "unsubscribe"], "user-plus": ["new", "add", "create", "follow", "subscribe"], "user-x": ["delete", "remove", "unfollow", "unsubscribe", "unavailable"], "user": ["person", "account"], "users": ["group"], "video-off": ["camera", "movie", "film"], "video": ["camera", "movie", "film"], "voicemail": ["phone"], "volume": ["music", "sound", "mute"], "volume-1": ["music", "sound"], "volume-2": ["music", "sound"], "volume-x": ["music", "sound", "mute"], "watch": ["clock", "time"], "wifi-off": ["disabled"], "wifi": ["connection", "signal", "wireless"], "wind": ["weather", "air"], "x-circle": ["cancel", "close", "delete", "remove", "times", "clear"], "x-octagon": ["delete", "stop", "alert", "warning", "times", "clear"], "x-square": ["cancel", "close", "delete", "remove", "times", "clear"], "x": ["cancel", "close", "delete", "remove", "times", "clear"], "youtube": ["logo", "video", "play"], "zap-off": ["flash", "camera", "lightning"], "zap": ["flash", "camera", "lightning"], "zoom-in": ["magnifying glass"], "zoom-out": ["magnifying glass"] }; + } + ), + /***/ + "./src/to-svg.js": ( + /*!***********************!*\ + !*** ./src/to-svg.js ***! + \***********************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + var _icons = __webpack_require__( + /*! ./icons */ + "./src/icons.js" + ); + var _icons2 = _interopRequireDefault(_icons); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + function toSvg(name) { + var attrs = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."); + if (!name) { + throw new Error("The required `key` (icon name) parameter is missing."); + } + if (!_icons2.default[name]) { + throw new Error("No icon matching '" + name + "'. See the complete list of icons at https://feathericons.com"); + } + return _icons2.default[name].toSvg(attrs); + } + exports3.default = toSvg; + } + ), + /***/ + 0: ( + /*!**************************************************!*\ + !*** multi core-js/es/array/from ./src/index.js ***! + \**************************************************/ + /*! no static exports found */ + /***/ + function(module3, exports3, __webpack_require__) { + __webpack_require__( + /*! core-js/es/array/from */ + "./node_modules/core-js/es/array/from.js" + ); + module3.exports = __webpack_require__( + /*! /home/runner/work/feather/feather/src/index.js */ + "./src/index.js" + ); + } + ) + /******/ + }) + ); + }); + } +}); + +// src/main.ts +var main_exports = {}; +__export(main_exports, { + default: () => ObsidianGit +}); +module.exports = __toCommonJS(main_exports); +init_polyfill_buffer(); + +// node_modules/.pnpm/isomorphic-git@1.25.3/node_modules/isomorphic-git/index.js +init_polyfill_buffer(); +var import_async_lock = __toESM(require_async_lock(), 1); +var import_sha1 = __toESM(require_sha1(), 1); +var import_crc_32 = __toESM(require_crc32(), 1); +var import_pako = __toESM(require_pako(), 1); +var import_pify = __toESM(require_pify(), 1); +var import_ignore = __toESM(require_ignore(), 1); +var import_clean_git_ref = __toESM(require_lib2(), 1); +var import_diff3 = __toESM(require_diff3(), 1); +var BaseError = class _BaseError extends Error { + constructor(message) { + super(message); + this.caller = ""; + } + toJSON() { + return { + code: this.code, + data: this.data, + caller: this.caller, + message: this.message, + stack: this.stack + }; + } + fromJSON(json) { + const e = new _BaseError(json.message); + e.code = json.code; + e.data = json.data; + e.caller = json.caller; + e.stack = json.stack; + return e; + } + get isIsomorphicGitError() { + return true; + } +}; +var UnmergedPathsError = class _UnmergedPathsError extends BaseError { + /** + * @param {Array} filepaths + */ + constructor(filepaths) { + super( + `Modifying the index is not possible because you have unmerged files: ${filepaths.toString}. Fix them up in the work tree, and then use 'git add/rm as appropriate to mark resolution and make a commit.` + ); + this.code = this.name = _UnmergedPathsError.code; + this.data = { filepaths }; + } +}; +UnmergedPathsError.code = "UnmergedPathsError"; +var InternalError = class _InternalError extends BaseError { + /** + * @param {string} message + */ + constructor(message) { + super( + `An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${message}` + ); + this.code = this.name = _InternalError.code; + this.data = { message }; + } +}; +InternalError.code = "InternalError"; +var UnsafeFilepathError = class _UnsafeFilepathError extends BaseError { + /** + * @param {string} filepath + */ + constructor(filepath) { + super(`The filepath "${filepath}" contains unsafe character sequences`); + this.code = this.name = _UnsafeFilepathError.code; + this.data = { filepath }; + } +}; +UnsafeFilepathError.code = "UnsafeFilepathError"; +var BufferCursor = class { + constructor(buffer2) { + this.buffer = buffer2; + this._start = 0; + } + eof() { + return this._start >= this.buffer.length; + } + tell() { + return this._start; + } + seek(n) { + this._start = n; + } + slice(n) { + const r = this.buffer.slice(this._start, this._start + n); + this._start += n; + return r; + } + toString(enc, length) { + const r = this.buffer.toString(enc, this._start, this._start + length); + this._start += length; + return r; + } + write(value, length, enc) { + const r = this.buffer.write(value, this._start, length, enc); + this._start += length; + return r; + } + copy(source, start, end) { + const r = source.copy(this.buffer, this._start, start, end); + this._start += r; + return r; + } + readUInt8() { + const r = this.buffer.readUInt8(this._start); + this._start += 1; + return r; + } + writeUInt8(value) { + const r = this.buffer.writeUInt8(value, this._start); + this._start += 1; + return r; + } + readUInt16BE() { + const r = this.buffer.readUInt16BE(this._start); + this._start += 2; + return r; + } + writeUInt16BE(value) { + const r = this.buffer.writeUInt16BE(value, this._start); + this._start += 2; + return r; + } + readUInt32BE() { + const r = this.buffer.readUInt32BE(this._start); + this._start += 4; + return r; + } + writeUInt32BE(value) { + const r = this.buffer.writeUInt32BE(value, this._start); + this._start += 4; + return r; + } +}; +function compareStrings(a, b) { + return -(a < b) || +(a > b); +} +function comparePath(a, b) { + return compareStrings(a.path, b.path); +} +function normalizeMode(mode) { + let type = mode > 0 ? mode >> 12 : 0; + if (type !== 4 && type !== 8 && type !== 10 && type !== 14) { + type = 8; + } + let permissions = mode & 511; + if (permissions & 73) { + permissions = 493; + } else { + permissions = 420; + } + if (type !== 8) + permissions = 0; + return (type << 12) + permissions; +} +var MAX_UINT32 = 2 ** 32; +function SecondsNanoseconds(givenSeconds, givenNanoseconds, milliseconds, date) { + if (givenSeconds !== void 0 && givenNanoseconds !== void 0) { + return [givenSeconds, givenNanoseconds]; + } + if (milliseconds === void 0) { + milliseconds = date.valueOf(); + } + const seconds = Math.floor(milliseconds / 1e3); + const nanoseconds = (milliseconds - seconds * 1e3) * 1e6; + return [seconds, nanoseconds]; +} +function normalizeStats(e) { + const [ctimeSeconds, ctimeNanoseconds] = SecondsNanoseconds( + e.ctimeSeconds, + e.ctimeNanoseconds, + e.ctimeMs, + e.ctime + ); + const [mtimeSeconds, mtimeNanoseconds] = SecondsNanoseconds( + e.mtimeSeconds, + e.mtimeNanoseconds, + e.mtimeMs, + e.mtime + ); + return { + ctimeSeconds: ctimeSeconds % MAX_UINT32, + ctimeNanoseconds: ctimeNanoseconds % MAX_UINT32, + mtimeSeconds: mtimeSeconds % MAX_UINT32, + mtimeNanoseconds: mtimeNanoseconds % MAX_UINT32, + dev: e.dev % MAX_UINT32, + ino: e.ino % MAX_UINT32, + mode: normalizeMode(e.mode % MAX_UINT32), + uid: e.uid % MAX_UINT32, + gid: e.gid % MAX_UINT32, + // size of -1 happens over a BrowserFS HTTP Backend that doesn't serve Content-Length headers + // (like the Karma webserver) because BrowserFS HTTP Backend uses HTTP HEAD requests to do fs.stat + size: e.size > -1 ? e.size % MAX_UINT32 : 0 + }; +} +function toHex(buffer2) { + let hex = ""; + for (const byte of new Uint8Array(buffer2)) { + if (byte < 16) + hex += "0"; + hex += byte.toString(16); + } + return hex; +} +var supportsSubtleSHA1 = null; +async function shasum(buffer2) { + if (supportsSubtleSHA1 === null) { + supportsSubtleSHA1 = await testSubtleSHA1(); + } + return supportsSubtleSHA1 ? subtleSHA1(buffer2) : shasumSync(buffer2); +} +function shasumSync(buffer2) { + return new import_sha1.default().update(buffer2).digest("hex"); +} +async function subtleSHA1(buffer2) { + const hash2 = await crypto.subtle.digest("SHA-1", buffer2); + return toHex(hash2); +} +async function testSubtleSHA1() { + try { + const hash2 = await subtleSHA1(new Uint8Array([])); + if (hash2 === "da39a3ee5e6b4b0d3255bfef95601890afd80709") + return true; + } catch (_) { + } + return false; +} +function parseCacheEntryFlags(bits) { + return { + assumeValid: Boolean(bits & 32768), + extended: Boolean(bits & 16384), + stage: (bits & 12288) >> 12, + nameLength: bits & 4095 + }; +} +function renderCacheEntryFlags(entry) { + const flags = entry.flags; + flags.extended = false; + flags.nameLength = Math.min(Buffer.from(entry.path).length, 4095); + return (flags.assumeValid ? 32768 : 0) + (flags.extended ? 16384 : 0) + ((flags.stage & 3) << 12) + (flags.nameLength & 4095); +} +var GitIndex = class _GitIndex { + /*:: + _entries: Map + _dirty: boolean // Used to determine if index needs to be saved to filesystem + */ + constructor(entries, unmergedPaths) { + this._dirty = false; + this._unmergedPaths = unmergedPaths || /* @__PURE__ */ new Set(); + this._entries = entries || /* @__PURE__ */ new Map(); + } + _addEntry(entry) { + if (entry.flags.stage === 0) { + entry.stages = [entry]; + this._entries.set(entry.path, entry); + this._unmergedPaths.delete(entry.path); + } else { + let existingEntry = this._entries.get(entry.path); + if (!existingEntry) { + this._entries.set(entry.path, entry); + existingEntry = entry; + } + existingEntry.stages[entry.flags.stage] = entry; + this._unmergedPaths.add(entry.path); + } + } + static async from(buffer2) { + if (Buffer.isBuffer(buffer2)) { + return _GitIndex.fromBuffer(buffer2); + } else if (buffer2 === null) { + return new _GitIndex(null); + } else { + throw new InternalError("invalid type passed to GitIndex.from"); + } + } + static async fromBuffer(buffer2) { + if (buffer2.length === 0) { + throw new InternalError("Index file is empty (.git/index)"); + } + const index2 = new _GitIndex(); + const reader = new BufferCursor(buffer2); + const magic = reader.toString("utf8", 4); + if (magic !== "DIRC") { + throw new InternalError(`Invalid dircache magic file number: ${magic}`); + } + const shaComputed = await shasum(buffer2.slice(0, -20)); + const shaClaimed = buffer2.slice(-20).toString("hex"); + if (shaClaimed !== shaComputed) { + throw new InternalError( + `Invalid checksum in GitIndex buffer: expected ${shaClaimed} but saw ${shaComputed}` + ); + } + const version2 = reader.readUInt32BE(); + if (version2 !== 2) { + throw new InternalError(`Unsupported dircache version: ${version2}`); + } + const numEntries = reader.readUInt32BE(); + let i = 0; + while (!reader.eof() && i < numEntries) { + const entry = {}; + entry.ctimeSeconds = reader.readUInt32BE(); + entry.ctimeNanoseconds = reader.readUInt32BE(); + entry.mtimeSeconds = reader.readUInt32BE(); + entry.mtimeNanoseconds = reader.readUInt32BE(); + entry.dev = reader.readUInt32BE(); + entry.ino = reader.readUInt32BE(); + entry.mode = reader.readUInt32BE(); + entry.uid = reader.readUInt32BE(); + entry.gid = reader.readUInt32BE(); + entry.size = reader.readUInt32BE(); + entry.oid = reader.slice(20).toString("hex"); + const flags = reader.readUInt16BE(); + entry.flags = parseCacheEntryFlags(flags); + const pathlength = buffer2.indexOf(0, reader.tell() + 1) - reader.tell(); + if (pathlength < 1) { + throw new InternalError(`Got a path length of: ${pathlength}`); + } + entry.path = reader.toString("utf8", pathlength); + if (entry.path.includes("..\\") || entry.path.includes("../")) { + throw new UnsafeFilepathError(entry.path); + } + let padding = 8 - (reader.tell() - 12) % 8; + if (padding === 0) + padding = 8; + while (padding--) { + const tmp = reader.readUInt8(); + if (tmp !== 0) { + throw new InternalError( + `Expected 1-8 null characters but got '${tmp}' after ${entry.path}` + ); + } else if (reader.eof()) { + throw new InternalError("Unexpected end of file"); + } + } + entry.stages = []; + index2._addEntry(entry); + i++; + } + return index2; + } + get unmergedPaths() { + return [...this._unmergedPaths]; + } + get entries() { + return [...this._entries.values()].sort(comparePath); + } + get entriesMap() { + return this._entries; + } + get entriesFlat() { + return [...this.entries].flatMap((entry) => { + return entry.stages.length > 1 ? entry.stages.filter((x) => x) : entry; + }); + } + *[Symbol.iterator]() { + for (const entry of this.entries) { + yield entry; + } + } + insert({ filepath, stats, oid, stage = 0 }) { + if (!stats) { + stats = { + ctimeSeconds: 0, + ctimeNanoseconds: 0, + mtimeSeconds: 0, + mtimeNanoseconds: 0, + dev: 0, + ino: 0, + mode: 0, + uid: 0, + gid: 0, + size: 0 + }; + } + stats = normalizeStats(stats); + const bfilepath = Buffer.from(filepath); + const entry = { + ctimeSeconds: stats.ctimeSeconds, + ctimeNanoseconds: stats.ctimeNanoseconds, + mtimeSeconds: stats.mtimeSeconds, + mtimeNanoseconds: stats.mtimeNanoseconds, + dev: stats.dev, + ino: stats.ino, + // We provide a fallback value for `mode` here because not all fs + // implementations assign it, but we use it in GitTree. + // '100644' is for a "regular non-executable file" + mode: stats.mode || 33188, + uid: stats.uid, + gid: stats.gid, + size: stats.size, + path: filepath, + oid, + flags: { + assumeValid: false, + extended: false, + stage, + nameLength: bfilepath.length < 4095 ? bfilepath.length : 4095 + }, + stages: [] + }; + this._addEntry(entry); + this._dirty = true; + } + delete({ filepath }) { + if (this._entries.has(filepath)) { + this._entries.delete(filepath); + } else { + for (const key2 of this._entries.keys()) { + if (key2.startsWith(filepath + "/")) { + this._entries.delete(key2); + } + } + } + if (this._unmergedPaths.has(filepath)) { + this._unmergedPaths.delete(filepath); + } + this._dirty = true; + } + clear() { + this._entries.clear(); + this._dirty = true; + } + has({ filepath }) { + return this._entries.has(filepath); + } + render() { + return this.entries.map((entry) => `${entry.mode.toString(8)} ${entry.oid} ${entry.path}`).join("\n"); + } + static async _entryToBuffer(entry) { + const bpath = Buffer.from(entry.path); + const length = Math.ceil((62 + bpath.length + 1) / 8) * 8; + const written = Buffer.alloc(length); + const writer = new BufferCursor(written); + const stat = normalizeStats(entry); + writer.writeUInt32BE(stat.ctimeSeconds); + writer.writeUInt32BE(stat.ctimeNanoseconds); + writer.writeUInt32BE(stat.mtimeSeconds); + writer.writeUInt32BE(stat.mtimeNanoseconds); + writer.writeUInt32BE(stat.dev); + writer.writeUInt32BE(stat.ino); + writer.writeUInt32BE(stat.mode); + writer.writeUInt32BE(stat.uid); + writer.writeUInt32BE(stat.gid); + writer.writeUInt32BE(stat.size); + writer.write(entry.oid, 20, "hex"); + writer.writeUInt16BE(renderCacheEntryFlags(entry)); + writer.write(entry.path, bpath.length, "utf8"); + return written; + } + async toObject() { + const header = Buffer.alloc(12); + const writer = new BufferCursor(header); + writer.write("DIRC", 4, "utf8"); + writer.writeUInt32BE(2); + writer.writeUInt32BE(this.entriesFlat.length); + let entryBuffers = []; + for (const entry of this.entries) { + entryBuffers.push(_GitIndex._entryToBuffer(entry)); + if (entry.stages.length > 1) { + for (const stage of entry.stages) { + if (stage && stage !== entry) { + entryBuffers.push(_GitIndex._entryToBuffer(stage)); + } + } + } + } + entryBuffers = await Promise.all(entryBuffers); + const body = Buffer.concat(entryBuffers); + const main = Buffer.concat([header, body]); + const sum = await shasum(main); + return Buffer.concat([main, Buffer.from(sum, "hex")]); + } +}; +function compareStats(entry, stats) { + const e = normalizeStats(entry); + const s = normalizeStats(stats); + const staleness = e.mode !== s.mode || e.mtimeSeconds !== s.mtimeSeconds || e.ctimeSeconds !== s.ctimeSeconds || e.uid !== s.uid || e.gid !== s.gid || e.ino !== s.ino || e.size !== s.size; + return staleness; +} +var lock = null; +var IndexCache = Symbol("IndexCache"); +function createCache() { + return { + map: /* @__PURE__ */ new Map(), + stats: /* @__PURE__ */ new Map() + }; +} +async function updateCachedIndexFile(fs, filepath, cache) { + const stat = await fs.lstat(filepath); + const rawIndexFile = await fs.read(filepath); + const index2 = await GitIndex.from(rawIndexFile); + cache.map.set(filepath, index2); + cache.stats.set(filepath, stat); +} +async function isIndexStale(fs, filepath, cache) { + const savedStats = cache.stats.get(filepath); + if (savedStats === void 0) + return true; + const currStats = await fs.lstat(filepath); + if (savedStats === null) + return false; + if (currStats === null) + return false; + return compareStats(savedStats, currStats); +} +var GitIndexManager = class { + /** + * + * @param {object} opts + * @param {import('../models/FileSystem.js').FileSystem} opts.fs + * @param {string} opts.gitdir + * @param {object} opts.cache + * @param {bool} opts.allowUnmerged + * @param {function(GitIndex): any} closure + */ + static async acquire({ fs, gitdir, cache, allowUnmerged = true }, closure) { + if (!cache[IndexCache]) + cache[IndexCache] = createCache(); + const filepath = `${gitdir}/index`; + if (lock === null) + lock = new import_async_lock.default({ maxPending: Infinity }); + let result; + let unmergedPaths = []; + await lock.acquire(filepath, async () => { + if (await isIndexStale(fs, filepath, cache[IndexCache])) { + await updateCachedIndexFile(fs, filepath, cache[IndexCache]); + } + const index2 = cache[IndexCache].map.get(filepath); + unmergedPaths = index2.unmergedPaths; + if (unmergedPaths.length && !allowUnmerged) + throw new UnmergedPathsError(unmergedPaths); + result = await closure(index2); + if (index2._dirty) { + const buffer2 = await index2.toObject(); + await fs.write(filepath, buffer2); + cache[IndexCache].stats.set(filepath, await fs.lstat(filepath)); + index2._dirty = false; + } + }); + return result; + } +}; +function basename(path2) { + const last2 = Math.max(path2.lastIndexOf("/"), path2.lastIndexOf("\\")); + if (last2 > -1) { + path2 = path2.slice(last2 + 1); + } + return path2; +} +function dirname(path2) { + const last2 = Math.max(path2.lastIndexOf("/"), path2.lastIndexOf("\\")); + if (last2 === -1) + return "."; + if (last2 === 0) + return "/"; + return path2.slice(0, last2); +} +function flatFileListToDirectoryStructure(files) { + const inodes = /* @__PURE__ */ new Map(); + const mkdir = function(name) { + if (!inodes.has(name)) { + const dir = { + type: "tree", + fullpath: name, + basename: basename(name), + metadata: {}, + children: [] + }; + inodes.set(name, dir); + dir.parent = mkdir(dirname(name)); + if (dir.parent && dir.parent !== dir) + dir.parent.children.push(dir); + } + return inodes.get(name); + }; + const mkfile = function(name, metadata) { + if (!inodes.has(name)) { + const file = { + type: "blob", + fullpath: name, + basename: basename(name), + metadata, + // This recursively generates any missing parent folders. + parent: mkdir(dirname(name)), + children: [] + }; + if (file.parent) + file.parent.children.push(file); + inodes.set(name, file); + } + return inodes.get(name); + }; + mkdir("."); + for (const file of files) { + mkfile(file.path, file); + } + return inodes; +} +function mode2type(mode) { + switch (mode) { + case 16384: + return "tree"; + case 33188: + return "blob"; + case 33261: + return "blob"; + case 40960: + return "blob"; + case 57344: + return "commit"; + } + throw new InternalError(`Unexpected GitTree entry mode: ${mode.toString(8)}`); +} +var GitWalkerIndex = class { + constructor({ fs, gitdir, cache }) { + this.treePromise = GitIndexManager.acquire( + { fs, gitdir, cache }, + async function(index2) { + return flatFileListToDirectoryStructure(index2.entries); + } + ); + const walker = this; + this.ConstructEntry = class StageEntry { + constructor(fullpath) { + this._fullpath = fullpath; + this._type = false; + this._mode = false; + this._stat = false; + this._oid = false; + } + async type() { + return walker.type(this); + } + async mode() { + return walker.mode(this); + } + async stat() { + return walker.stat(this); + } + async content() { + return walker.content(this); + } + async oid() { + return walker.oid(this); + } + }; + } + async readdir(entry) { + const filepath = entry._fullpath; + const tree = await this.treePromise; + const inode = tree.get(filepath); + if (!inode) + return null; + if (inode.type === "blob") + return null; + if (inode.type !== "tree") { + throw new Error(`ENOTDIR: not a directory, scandir '${filepath}'`); + } + const names = inode.children.map((inode2) => inode2.fullpath); + names.sort(compareStrings); + return names; + } + async type(entry) { + if (entry._type === false) { + await entry.stat(); + } + return entry._type; + } + async mode(entry) { + if (entry._mode === false) { + await entry.stat(); + } + return entry._mode; + } + async stat(entry) { + if (entry._stat === false) { + const tree = await this.treePromise; + const inode = tree.get(entry._fullpath); + if (!inode) { + throw new Error( + `ENOENT: no such file or directory, lstat '${entry._fullpath}'` + ); + } + const stats = inode.type === "tree" ? {} : normalizeStats(inode.metadata); + entry._type = inode.type === "tree" ? "tree" : mode2type(stats.mode); + entry._mode = stats.mode; + if (inode.type === "tree") { + entry._stat = void 0; + } else { + entry._stat = stats; + } + } + return entry._stat; + } + async content(_entry) { + } + async oid(entry) { + if (entry._oid === false) { + const tree = await this.treePromise; + const inode = tree.get(entry._fullpath); + entry._oid = inode.metadata.oid; + } + return entry._oid; + } +}; +var GitWalkSymbol = Symbol("GitWalkSymbol"); +function STAGE() { + const o = /* @__PURE__ */ Object.create(null); + Object.defineProperty(o, GitWalkSymbol, { + value: function({ fs, gitdir, cache }) { + return new GitWalkerIndex({ fs, gitdir, cache }); + } + }); + Object.freeze(o); + return o; +} +var NotFoundError = class _NotFoundError extends BaseError { + /** + * @param {string} what + */ + constructor(what) { + super(`Could not find ${what}.`); + this.code = this.name = _NotFoundError.code; + this.data = { what }; + } +}; +NotFoundError.code = "NotFoundError"; +var ObjectTypeError = class _ObjectTypeError extends BaseError { + /** + * @param {string} oid + * @param {'blob'|'commit'|'tag'|'tree'} actual + * @param {'blob'|'commit'|'tag'|'tree'} expected + * @param {string} [filepath] + */ + constructor(oid, actual, expected, filepath) { + super( + `Object ${oid} ${filepath ? `at ${filepath}` : ""}was anticipated to be a ${expected} but it is a ${actual}.` + ); + this.code = this.name = _ObjectTypeError.code; + this.data = { oid, actual, expected, filepath }; + } +}; +ObjectTypeError.code = "ObjectTypeError"; +var InvalidOidError = class _InvalidOidError extends BaseError { + /** + * @param {string} value + */ + constructor(value) { + super(`Expected a 40-char hex object id but saw "${value}".`); + this.code = this.name = _InvalidOidError.code; + this.data = { value }; + } +}; +InvalidOidError.code = "InvalidOidError"; +var NoRefspecError = class _NoRefspecError extends BaseError { + /** + * @param {string} remote + */ + constructor(remote) { + super(`Could not find a fetch refspec for remote "${remote}". Make sure the config file has an entry like the following: +[remote "${remote}"] + fetch = +refs/heads/*:refs/remotes/origin/* +`); + this.code = this.name = _NoRefspecError.code; + this.data = { remote }; + } +}; +NoRefspecError.code = "NoRefspecError"; +var GitPackedRefs = class _GitPackedRefs { + constructor(text2) { + this.refs = /* @__PURE__ */ new Map(); + this.parsedConfig = []; + if (text2) { + let key2 = null; + this.parsedConfig = text2.trim().split("\n").map((line) => { + if (/^\s*#/.test(line)) { + return { line, comment: true }; + } + const i = line.indexOf(" "); + if (line.startsWith("^")) { + const value = line.slice(1); + this.refs.set(key2 + "^{}", value); + return { line, ref: key2, peeled: value }; + } else { + const value = line.slice(0, i); + key2 = line.slice(i + 1); + this.refs.set(key2, value); + return { line, ref: key2, oid: value }; + } + }); + } + return this; + } + static from(text2) { + return new _GitPackedRefs(text2); + } + delete(ref) { + this.parsedConfig = this.parsedConfig.filter((entry) => entry.ref !== ref); + this.refs.delete(ref); + } + toString() { + return this.parsedConfig.map(({ line }) => line).join("\n") + "\n"; + } +}; +var GitRefSpec = class _GitRefSpec { + constructor({ remotePath, localPath, force, matchPrefix }) { + Object.assign(this, { + remotePath, + localPath, + force, + matchPrefix + }); + } + static from(refspec) { + const [ + forceMatch, + remotePath, + remoteGlobMatch, + localPath, + localGlobMatch + ] = refspec.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1); + const force = forceMatch === "+"; + const remoteIsGlob = remoteGlobMatch === "*"; + const localIsGlob = localGlobMatch === "*"; + if (remoteIsGlob !== localIsGlob) { + throw new InternalError("Invalid refspec"); + } + return new _GitRefSpec({ + remotePath, + localPath, + force, + matchPrefix: remoteIsGlob + }); + } + translate(remoteBranch) { + if (this.matchPrefix) { + if (remoteBranch.startsWith(this.remotePath)) { + return this.localPath + remoteBranch.replace(this.remotePath, ""); + } + } else { + if (remoteBranch === this.remotePath) + return this.localPath; + } + return null; + } + reverseTranslate(localBranch) { + if (this.matchPrefix) { + if (localBranch.startsWith(this.localPath)) { + return this.remotePath + localBranch.replace(this.localPath, ""); + } + } else { + if (localBranch === this.localPath) + return this.remotePath; + } + return null; + } +}; +var GitRefSpecSet = class _GitRefSpecSet { + constructor(rules = []) { + this.rules = rules; + } + static from(refspecs) { + const rules = []; + for (const refspec of refspecs) { + rules.push(GitRefSpec.from(refspec)); + } + return new _GitRefSpecSet(rules); + } + add(refspec) { + const rule = GitRefSpec.from(refspec); + this.rules.push(rule); + } + translate(remoteRefs) { + const result = []; + for (const rule of this.rules) { + for (const remoteRef of remoteRefs) { + const localRef = rule.translate(remoteRef); + if (localRef) { + result.push([remoteRef, localRef]); + } + } + } + return result; + } + translateOne(remoteRef) { + let result = null; + for (const rule of this.rules) { + const localRef = rule.translate(remoteRef); + if (localRef) { + result = localRef; + } + } + return result; + } + localNamespaces() { + return this.rules.filter((rule) => rule.matchPrefix).map((rule) => rule.localPath.replace(/\/$/, "")); + } +}; +function compareRefNames(a, b) { + const _a2 = a.replace(/\^\{\}$/, ""); + const _b = b.replace(/\^\{\}$/, ""); + const tmp = -(_a2 < _b) || +(_a2 > _b); + if (tmp === 0) { + return a.endsWith("^{}") ? 1 : -1; + } + return tmp; +} +var memo = /* @__PURE__ */ new Map(); +function normalizePath(path2) { + let normalizedPath = memo.get(path2); + if (!normalizedPath) { + normalizedPath = normalizePathInternal(path2); + memo.set(path2, normalizedPath); + } + return normalizedPath; +} +function normalizePathInternal(path2) { + path2 = path2.split("/./").join("/").replace(/\/{2,}/g, "/"); + if (path2 === "/.") + return "/"; + if (path2 === "./") + return "."; + if (path2.startsWith("./")) + path2 = path2.slice(2); + if (path2.endsWith("/.")) + path2 = path2.slice(0, -2); + if (path2.length > 1 && path2.endsWith("/")) + path2 = path2.slice(0, -1); + if (path2 === "") + return "."; + return path2; +} +function join(...parts) { + return normalizePath(parts.map(normalizePath).join("/")); +} +var num = (val) => { + val = val.toLowerCase(); + let n = parseInt(val); + if (val.endsWith("k")) + n *= 1024; + if (val.endsWith("m")) + n *= 1024 * 1024; + if (val.endsWith("g")) + n *= 1024 * 1024 * 1024; + return n; +}; +var bool = (val) => { + val = val.trim().toLowerCase(); + if (val === "true" || val === "yes" || val === "on") + return true; + if (val === "false" || val === "no" || val === "off") + return false; + throw Error( + `Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${val}` + ); +}; +var schema = { + core: { + filemode: bool, + bare: bool, + logallrefupdates: bool, + symlinks: bool, + ignorecase: bool, + bigFileThreshold: num + } +}; +var SECTION_LINE_REGEX = /^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/; +var SECTION_REGEX = /^[A-Za-z0-9-.]+$/; +var VARIABLE_LINE_REGEX = /^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/; +var VARIABLE_NAME_REGEX = /^[A-Za-z][A-Za-z-]*$/; +var VARIABLE_VALUE_COMMENT_REGEX = /^(.*?)( *[#;].*)$/; +var extractSectionLine = (line) => { + const matches = SECTION_LINE_REGEX.exec(line); + if (matches != null) { + const [section, subsection] = matches.slice(1); + return [section, subsection]; + } + return null; +}; +var extractVariableLine = (line) => { + const matches = VARIABLE_LINE_REGEX.exec(line); + if (matches != null) { + const [name, rawValue = "true"] = matches.slice(1); + const valueWithoutComments = removeComments(rawValue); + const valueWithoutQuotes = removeQuotes(valueWithoutComments); + return [name, valueWithoutQuotes]; + } + return null; +}; +var removeComments = (rawValue) => { + const commentMatches = VARIABLE_VALUE_COMMENT_REGEX.exec(rawValue); + if (commentMatches == null) { + return rawValue; + } + const [valueWithoutComment, comment] = commentMatches.slice(1); + if (hasOddNumberOfQuotes(valueWithoutComment) && hasOddNumberOfQuotes(comment)) { + return `${valueWithoutComment}${comment}`; + } + return valueWithoutComment; +}; +var hasOddNumberOfQuotes = (text2) => { + const numberOfQuotes = (text2.match(/(?:^|[^\\])"/g) || []).length; + return numberOfQuotes % 2 !== 0; +}; +var removeQuotes = (text2) => { + return text2.split("").reduce((newText, c, idx, text3) => { + const isQuote = c === '"' && text3[idx - 1] !== "\\"; + const isEscapeForQuote = c === "\\" && text3[idx + 1] === '"'; + if (isQuote || isEscapeForQuote) { + return newText; + } + return newText + c; + }, ""); +}; +var lower = (text2) => { + return text2 != null ? text2.toLowerCase() : null; +}; +var getPath = (section, subsection, name) => { + return [lower(section), subsection, lower(name)].filter((a) => a != null).join("."); +}; +var normalizePath$1 = (path2) => { + const pathSegments = path2.split("."); + const section = pathSegments.shift(); + const name = pathSegments.pop(); + const subsection = pathSegments.length ? pathSegments.join(".") : void 0; + return { + section, + subsection, + name, + path: getPath(section, subsection, name), + sectionPath: getPath(section, subsection, null) + }; +}; +var findLastIndex = (array, callback) => { + return array.reduce((lastIndex, item, index2) => { + return callback(item) ? index2 : lastIndex; + }, -1); +}; +var GitConfig = class _GitConfig { + constructor(text2) { + let section = null; + let subsection = null; + this.parsedConfig = text2.split("\n").map((line) => { + let name = null; + let value = null; + const trimmedLine = line.trim(); + const extractedSection = extractSectionLine(trimmedLine); + const isSection = extractedSection != null; + if (isSection) { + ; + [section, subsection] = extractedSection; + } else { + const extractedVariable = extractVariableLine(trimmedLine); + const isVariable = extractedVariable != null; + if (isVariable) { + ; + [name, value] = extractedVariable; + } + } + const path2 = getPath(section, subsection, name); + return { line, isSection, section, subsection, name, value, path: path2 }; + }); + } + static from(text2) { + return new _GitConfig(text2); + } + async get(path2, getall = false) { + const normalizedPath = normalizePath$1(path2).path; + const allValues = this.parsedConfig.filter((config) => config.path === normalizedPath).map(({ section, name, value }) => { + const fn = schema[section] && schema[section][name]; + return fn ? fn(value) : value; + }); + return getall ? allValues : allValues.pop(); + } + async getall(path2) { + return this.get(path2, true); + } + async getSubsections(section) { + return this.parsedConfig.filter((config) => config.section === section && config.isSection).map((config) => config.subsection); + } + async deleteSection(section, subsection) { + this.parsedConfig = this.parsedConfig.filter( + (config) => !(config.section === section && config.subsection === subsection) + ); + } + async append(path2, value) { + return this.set(path2, value, true); + } + async set(path2, value, append3 = false) { + const { + section, + subsection, + name, + path: normalizedPath, + sectionPath + } = normalizePath$1(path2); + const configIndex = findLastIndex( + this.parsedConfig, + (config) => config.path === normalizedPath + ); + if (value == null) { + if (configIndex !== -1) { + this.parsedConfig.splice(configIndex, 1); + } + } else { + if (configIndex !== -1) { + const config = this.parsedConfig[configIndex]; + const modifiedConfig = Object.assign({}, config, { + name, + value, + modified: true + }); + if (append3) { + this.parsedConfig.splice(configIndex + 1, 0, modifiedConfig); + } else { + this.parsedConfig[configIndex] = modifiedConfig; + } + } else { + const sectionIndex = this.parsedConfig.findIndex( + (config) => config.path === sectionPath + ); + const newConfig = { + section, + subsection, + name, + value, + modified: true, + path: normalizedPath + }; + if (SECTION_REGEX.test(section) && VARIABLE_NAME_REGEX.test(name)) { + if (sectionIndex >= 0) { + this.parsedConfig.splice(sectionIndex + 1, 0, newConfig); + } else { + const newSection = { + section, + subsection, + modified: true, + path: sectionPath + }; + this.parsedConfig.push(newSection, newConfig); + } + } + } + } + } + toString() { + return this.parsedConfig.map(({ line, section, subsection, name, value, modified: modified2 = false }) => { + if (!modified2) { + return line; + } + if (name != null && value != null) { + if (typeof value === "string" && /[#;]/.test(value)) { + return ` ${name} = "${value}"`; + } + return ` ${name} = ${value}`; + } + if (subsection != null) { + return `[${section} "${subsection}"]`; + } + return `[${section}]`; + }).join("\n"); + } +}; +var GitConfigManager = class { + static async get({ fs, gitdir }) { + const text2 = await fs.read(`${gitdir}/config`, { encoding: "utf8" }); + return GitConfig.from(text2); + } + static async save({ fs, gitdir, config }) { + await fs.write(`${gitdir}/config`, config.toString(), { + encoding: "utf8" + }); + } +}; +var refpaths = (ref) => [ + `${ref}`, + `refs/${ref}`, + `refs/tags/${ref}`, + `refs/heads/${ref}`, + `refs/remotes/${ref}`, + `refs/remotes/${ref}/HEAD` +]; +var GIT_FILES = ["config", "description", "index", "shallow", "commondir"]; +var GitRefManager = class _GitRefManager { + static async updateRemoteRefs({ + fs, + gitdir, + remote, + refs, + symrefs, + tags, + refspecs = void 0, + prune = false, + pruneTags = false + }) { + for (const value of refs.values()) { + if (!value.match(/[0-9a-f]{40}/)) { + throw new InvalidOidError(value); + } + } + const config = await GitConfigManager.get({ fs, gitdir }); + if (!refspecs) { + refspecs = await config.getall(`remote.${remote}.fetch`); + if (refspecs.length === 0) { + throw new NoRefspecError(remote); + } + refspecs.unshift(`+HEAD:refs/remotes/${remote}/HEAD`); + } + const refspec = GitRefSpecSet.from(refspecs); + const actualRefsToWrite = /* @__PURE__ */ new Map(); + if (pruneTags) { + const tags2 = await _GitRefManager.listRefs({ + fs, + gitdir, + filepath: "refs/tags" + }); + await _GitRefManager.deleteRefs({ + fs, + gitdir, + refs: tags2.map((tag2) => `refs/tags/${tag2}`) + }); + } + if (tags) { + for (const serverRef of refs.keys()) { + if (serverRef.startsWith("refs/tags") && !serverRef.endsWith("^{}")) { + if (!await _GitRefManager.exists({ fs, gitdir, ref: serverRef })) { + const oid = refs.get(serverRef); + actualRefsToWrite.set(serverRef, oid); + } + } + } + } + const refTranslations = refspec.translate([...refs.keys()]); + for (const [serverRef, translatedRef] of refTranslations) { + const value = refs.get(serverRef); + actualRefsToWrite.set(translatedRef, value); + } + const symrefTranslations = refspec.translate([...symrefs.keys()]); + for (const [serverRef, translatedRef] of symrefTranslations) { + const value = symrefs.get(serverRef); + const symtarget = refspec.translateOne(value); + if (symtarget) { + actualRefsToWrite.set(translatedRef, `ref: ${symtarget}`); + } + } + const pruned = []; + if (prune) { + for (const filepath of refspec.localNamespaces()) { + const refs2 = (await _GitRefManager.listRefs({ + fs, + gitdir, + filepath + })).map((file) => `${filepath}/${file}`); + for (const ref of refs2) { + if (!actualRefsToWrite.has(ref)) { + pruned.push(ref); + } + } + } + if (pruned.length > 0) { + await _GitRefManager.deleteRefs({ fs, gitdir, refs: pruned }); + } + } + for (const [key2, value] of actualRefsToWrite) { + await fs.write(join(gitdir, key2), `${value.trim()} +`, "utf8"); + } + return { pruned }; + } + // TODO: make this less crude? + static async writeRef({ fs, gitdir, ref, value }) { + if (!value.match(/[0-9a-f]{40}/)) { + throw new InvalidOidError(value); + } + await fs.write(join(gitdir, ref), `${value.trim()} +`, "utf8"); + } + static async writeSymbolicRef({ fs, gitdir, ref, value }) { + await fs.write(join(gitdir, ref), `ref: ${value.trim()} +`, "utf8"); + } + static async deleteRef({ fs, gitdir, ref }) { + return _GitRefManager.deleteRefs({ fs, gitdir, refs: [ref] }); + } + static async deleteRefs({ fs, gitdir, refs }) { + await Promise.all(refs.map((ref) => fs.rm(join(gitdir, ref)))); + let text2 = await fs.read(`${gitdir}/packed-refs`, { encoding: "utf8" }); + const packed = GitPackedRefs.from(text2); + const beforeSize = packed.refs.size; + for (const ref of refs) { + if (packed.refs.has(ref)) { + packed.delete(ref); + } + } + if (packed.refs.size < beforeSize) { + text2 = packed.toString(); + await fs.write(`${gitdir}/packed-refs`, text2, { encoding: "utf8" }); + } + } + /** + * @param {object} args + * @param {import('../models/FileSystem.js').FileSystem} args.fs + * @param {string} args.gitdir + * @param {string} args.ref + * @param {number} [args.depth] + * @returns {Promise} + */ + static async resolve({ fs, gitdir, ref, depth = void 0 }) { + if (depth !== void 0) { + depth--; + if (depth === -1) { + return ref; + } + } + let sha; + if (ref.startsWith("ref: ")) { + ref = ref.slice("ref: ".length); + return _GitRefManager.resolve({ fs, gitdir, ref, depth }); + } + if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) { + return ref; + } + const packedMap = await _GitRefManager.packedRefs({ fs, gitdir }); + const allpaths = refpaths(ref).filter((p) => !GIT_FILES.includes(p)); + for (const ref2 of allpaths) { + sha = await fs.read(`${gitdir}/${ref2}`, { encoding: "utf8" }) || packedMap.get(ref2); + if (sha) { + return _GitRefManager.resolve({ fs, gitdir, ref: sha.trim(), depth }); + } + } + throw new NotFoundError(ref); + } + static async exists({ fs, gitdir, ref }) { + try { + await _GitRefManager.expand({ fs, gitdir, ref }); + return true; + } catch (err) { + return false; + } + } + static async expand({ fs, gitdir, ref }) { + if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) { + return ref; + } + const packedMap = await _GitRefManager.packedRefs({ fs, gitdir }); + const allpaths = refpaths(ref); + for (const ref2 of allpaths) { + if (await fs.exists(`${gitdir}/${ref2}`)) + return ref2; + if (packedMap.has(ref2)) + return ref2; + } + throw new NotFoundError(ref); + } + static async expandAgainstMap({ ref, map }) { + const allpaths = refpaths(ref); + for (const ref2 of allpaths) { + if (await map.has(ref2)) + return ref2; + } + throw new NotFoundError(ref); + } + static resolveAgainstMap({ ref, fullref = ref, depth = void 0, map }) { + if (depth !== void 0) { + depth--; + if (depth === -1) { + return { fullref, oid: ref }; + } + } + if (ref.startsWith("ref: ")) { + ref = ref.slice("ref: ".length); + return _GitRefManager.resolveAgainstMap({ ref, fullref, depth, map }); + } + if (ref.length === 40 && /[0-9a-f]{40}/.test(ref)) { + return { fullref, oid: ref }; + } + const allpaths = refpaths(ref); + for (const ref2 of allpaths) { + const sha = map.get(ref2); + if (sha) { + return _GitRefManager.resolveAgainstMap({ + ref: sha.trim(), + fullref: ref2, + depth, + map + }); + } + } + throw new NotFoundError(ref); + } + static async packedRefs({ fs, gitdir }) { + const text2 = await fs.read(`${gitdir}/packed-refs`, { encoding: "utf8" }); + const packed = GitPackedRefs.from(text2); + return packed.refs; + } + // List all the refs that match the `filepath` prefix + static async listRefs({ fs, gitdir, filepath }) { + const packedMap = _GitRefManager.packedRefs({ fs, gitdir }); + let files = null; + try { + files = await fs.readdirDeep(`${gitdir}/${filepath}`); + files = files.map((x) => x.replace(`${gitdir}/${filepath}/`, "")); + } catch (err) { + files = []; + } + for (let key2 of (await packedMap).keys()) { + if (key2.startsWith(filepath)) { + key2 = key2.replace(filepath + "/", ""); + if (!files.includes(key2)) { + files.push(key2); + } + } + } + files.sort(compareRefNames); + return files; + } + static async listBranches({ fs, gitdir, remote }) { + if (remote) { + return _GitRefManager.listRefs({ + fs, + gitdir, + filepath: `refs/remotes/${remote}` + }); + } else { + return _GitRefManager.listRefs({ fs, gitdir, filepath: `refs/heads` }); + } + } + static async listTags({ fs, gitdir }) { + const tags = await _GitRefManager.listRefs({ + fs, + gitdir, + filepath: `refs/tags` + }); + return tags.filter((x) => !x.endsWith("^{}")); + } +}; +function compareTreeEntryPath(a, b) { + return compareStrings(appendSlashIfDir(a), appendSlashIfDir(b)); +} +function appendSlashIfDir(entry) { + return entry.mode === "040000" ? entry.path + "/" : entry.path; +} +function mode2type$1(mode) { + switch (mode) { + case "040000": + return "tree"; + case "100644": + return "blob"; + case "100755": + return "blob"; + case "120000": + return "blob"; + case "160000": + return "commit"; + } + throw new InternalError(`Unexpected GitTree entry mode: ${mode}`); +} +function parseBuffer(buffer2) { + const _entries = []; + let cursor = 0; + while (cursor < buffer2.length) { + const space2 = buffer2.indexOf(32, cursor); + if (space2 === -1) { + throw new InternalError( + `GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next space character.` + ); + } + const nullchar = buffer2.indexOf(0, cursor); + if (nullchar === -1) { + throw new InternalError( + `GitTree: Error parsing buffer at byte location ${cursor}: Could not find the next null character.` + ); + } + let mode = buffer2.slice(cursor, space2).toString("utf8"); + if (mode === "40000") + mode = "040000"; + const type = mode2type$1(mode); + const path2 = buffer2.slice(space2 + 1, nullchar).toString("utf8"); + if (path2.includes("\\") || path2.includes("/")) { + throw new UnsafeFilepathError(path2); + } + const oid = buffer2.slice(nullchar + 1, nullchar + 21).toString("hex"); + cursor = nullchar + 21; + _entries.push({ mode, path: path2, oid, type }); + } + return _entries; +} +function limitModeToAllowed(mode) { + if (typeof mode === "number") { + mode = mode.toString(8); + } + if (mode.match(/^0?4.*/)) + return "040000"; + if (mode.match(/^1006.*/)) + return "100644"; + if (mode.match(/^1007.*/)) + return "100755"; + if (mode.match(/^120.*/)) + return "120000"; + if (mode.match(/^160.*/)) + return "160000"; + throw new InternalError(`Could not understand file mode: ${mode}`); +} +function nudgeIntoShape(entry) { + if (!entry.oid && entry.sha) { + entry.oid = entry.sha; + } + entry.mode = limitModeToAllowed(entry.mode); + if (!entry.type) { + entry.type = mode2type$1(entry.mode); + } + return entry; +} +var GitTree = class _GitTree { + constructor(entries) { + if (Buffer.isBuffer(entries)) { + this._entries = parseBuffer(entries); + } else if (Array.isArray(entries)) { + this._entries = entries.map(nudgeIntoShape); + } else { + throw new InternalError("invalid type passed to GitTree constructor"); + } + this._entries.sort(comparePath); + } + static from(tree) { + return new _GitTree(tree); + } + render() { + return this._entries.map((entry) => `${entry.mode} ${entry.type} ${entry.oid} ${entry.path}`).join("\n"); + } + toObject() { + const entries = [...this._entries]; + entries.sort(compareTreeEntryPath); + return Buffer.concat( + entries.map((entry) => { + const mode = Buffer.from(entry.mode.replace(/^0/, "")); + const space2 = Buffer.from(" "); + const path2 = Buffer.from(entry.path, "utf8"); + const nullchar = Buffer.from([0]); + const oid = Buffer.from(entry.oid, "hex"); + return Buffer.concat([mode, space2, path2, nullchar, oid]); + }) + ); + } + /** + * @returns {TreeEntry[]} + */ + entries() { + return this._entries; + } + *[Symbol.iterator]() { + for (const entry of this._entries) { + yield entry; + } + } +}; +var GitObject = class { + static wrap({ type, object }) { + return Buffer.concat([ + Buffer.from(`${type} ${object.byteLength.toString()}\0`), + Buffer.from(object) + ]); + } + static unwrap(buffer2) { + const s = buffer2.indexOf(32); + const i = buffer2.indexOf(0); + const type = buffer2.slice(0, s).toString("utf8"); + const length = buffer2.slice(s + 1, i).toString("utf8"); + const actualLength = buffer2.length - (i + 1); + if (parseInt(length) !== actualLength) { + throw new InternalError( + `Length mismatch: expected ${length} bytes but got ${actualLength} instead.` + ); + } + return { + type, + object: Buffer.from(buffer2.slice(i + 1)) + }; + } +}; +async function readObjectLoose({ fs, gitdir, oid }) { + const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`; + const file = await fs.read(`${gitdir}/${source}`); + if (!file) { + return null; + } + return { object: file, format: "deflated", source }; +} +function applyDelta(delta, source) { + const reader = new BufferCursor(delta); + const sourceSize = readVarIntLE(reader); + if (sourceSize !== source.byteLength) { + throw new InternalError( + `applyDelta expected source buffer to be ${sourceSize} bytes but the provided buffer was ${source.length} bytes` + ); + } + const targetSize = readVarIntLE(reader); + let target; + const firstOp = readOp(reader, source); + if (firstOp.byteLength === targetSize) { + target = firstOp; + } else { + target = Buffer.alloc(targetSize); + const writer = new BufferCursor(target); + writer.copy(firstOp); + while (!reader.eof()) { + writer.copy(readOp(reader, source)); + } + const tell = writer.tell(); + if (targetSize !== tell) { + throw new InternalError( + `applyDelta expected target buffer to be ${targetSize} bytes but the resulting buffer was ${tell} bytes` + ); + } + } + return target; +} +function readVarIntLE(reader) { + let result = 0; + let shift = 0; + let byte = null; + do { + byte = reader.readUInt8(); + result |= (byte & 127) << shift; + shift += 7; + } while (byte & 128); + return result; +} +function readCompactLE(reader, flags, size) { + let result = 0; + let shift = 0; + while (size--) { + if (flags & 1) { + result |= reader.readUInt8() << shift; + } + flags >>= 1; + shift += 8; + } + return result; +} +function readOp(reader, source) { + const byte = reader.readUInt8(); + const COPY = 128; + const OFFS = 15; + const SIZE = 112; + if (byte & COPY) { + const offset = readCompactLE(reader, byte & OFFS, 4); + let size = readCompactLE(reader, (byte & SIZE) >> 4, 3); + if (size === 0) + size = 65536; + return source.slice(offset, offset + size); + } else { + return reader.slice(byte); + } +} +function fromValue(value) { + let queue = [value]; + return { + next() { + return Promise.resolve({ done: queue.length === 0, value: queue.pop() }); + }, + return() { + queue = []; + return {}; + }, + [Symbol.asyncIterator]() { + return this; + } + }; +} +function getIterator(iterable) { + if (iterable[Symbol.asyncIterator]) { + return iterable[Symbol.asyncIterator](); + } + if (iterable[Symbol.iterator]) { + return iterable[Symbol.iterator](); + } + if (iterable.next) { + return iterable; + } + return fromValue(iterable); +} +var StreamReader = class { + constructor(stream) { + this.stream = getIterator(stream); + this.buffer = null; + this.cursor = 0; + this.undoCursor = 0; + this.started = false; + this._ended = false; + this._discardedBytes = 0; + } + eof() { + return this._ended && this.cursor === this.buffer.length; + } + tell() { + return this._discardedBytes + this.cursor; + } + async byte() { + if (this.eof()) + return; + if (!this.started) + await this._init(); + if (this.cursor === this.buffer.length) { + await this._loadnext(); + if (this._ended) + return; + } + this._moveCursor(1); + return this.buffer[this.undoCursor]; + } + async chunk() { + if (this.eof()) + return; + if (!this.started) + await this._init(); + if (this.cursor === this.buffer.length) { + await this._loadnext(); + if (this._ended) + return; + } + this._moveCursor(this.buffer.length); + return this.buffer.slice(this.undoCursor, this.cursor); + } + async read(n) { + if (this.eof()) + return; + if (!this.started) + await this._init(); + if (this.cursor + n > this.buffer.length) { + this._trim(); + await this._accumulate(n); + } + this._moveCursor(n); + return this.buffer.slice(this.undoCursor, this.cursor); + } + async skip(n) { + if (this.eof()) + return; + if (!this.started) + await this._init(); + if (this.cursor + n > this.buffer.length) { + this._trim(); + await this._accumulate(n); + } + this._moveCursor(n); + } + async undo() { + this.cursor = this.undoCursor; + } + async _next() { + this.started = true; + let { done, value } = await this.stream.next(); + if (done) { + this._ended = true; + if (!value) + return Buffer.alloc(0); + } + if (value) { + value = Buffer.from(value); + } + return value; + } + _trim() { + this.buffer = this.buffer.slice(this.undoCursor); + this.cursor -= this.undoCursor; + this._discardedBytes += this.undoCursor; + this.undoCursor = 0; + } + _moveCursor(n) { + this.undoCursor = this.cursor; + this.cursor += n; + if (this.cursor > this.buffer.length) { + this.cursor = this.buffer.length; + } + } + async _accumulate(n) { + if (this._ended) + return; + const buffers = [this.buffer]; + while (this.cursor + n > lengthBuffers(buffers)) { + const nextbuffer = await this._next(); + if (this._ended) + break; + buffers.push(nextbuffer); + } + this.buffer = Buffer.concat(buffers); + } + async _loadnext() { + this._discardedBytes += this.buffer.length; + this.undoCursor = 0; + this.cursor = 0; + this.buffer = await this._next(); + } + async _init() { + this.buffer = await this._next(); + } +}; +function lengthBuffers(buffers) { + return buffers.reduce((acc, buffer2) => acc + buffer2.length, 0); +} +async function listpack(stream, onData) { + const reader = new StreamReader(stream); + let PACK = await reader.read(4); + PACK = PACK.toString("utf8"); + if (PACK !== "PACK") { + throw new InternalError(`Invalid PACK header '${PACK}'`); + } + let version2 = await reader.read(4); + version2 = version2.readUInt32BE(0); + if (version2 !== 2) { + throw new InternalError(`Invalid packfile version: ${version2}`); + } + let numObjects = await reader.read(4); + numObjects = numObjects.readUInt32BE(0); + if (numObjects < 1) + return; + while (!reader.eof() && numObjects--) { + const offset = reader.tell(); + const { type, length, ofs, reference } = await parseHeader(reader); + const inflator = new import_pako.default.Inflate(); + while (!inflator.result) { + const chunk = await reader.chunk(); + if (!chunk) + break; + inflator.push(chunk, false); + if (inflator.err) { + throw new InternalError(`Pako error: ${inflator.msg}`); + } + if (inflator.result) { + if (inflator.result.length !== length) { + throw new InternalError( + `Inflated object size is different from that stated in packfile.` + ); + } + await reader.undo(); + await reader.read(chunk.length - inflator.strm.avail_in); + const end = reader.tell(); + await onData({ + data: inflator.result, + type, + num: numObjects, + offset, + end, + reference, + ofs + }); + } + } + } +} +async function parseHeader(reader) { + let byte = await reader.byte(); + const type = byte >> 4 & 7; + let length = byte & 15; + if (byte & 128) { + let shift = 4; + do { + byte = await reader.byte(); + length |= (byte & 127) << shift; + shift += 7; + } while (byte & 128); + } + let ofs; + let reference; + if (type === 6) { + let shift = 0; + ofs = 0; + const bytes = []; + do { + byte = await reader.byte(); + ofs |= (byte & 127) << shift; + shift += 7; + bytes.push(byte); + } while (byte & 128); + reference = Buffer.from(bytes); + } + if (type === 7) { + const buf = await reader.read(20); + reference = buf; + } + return { type, length, ofs, reference }; +} +var supportsDecompressionStream = false; +async function inflate(buffer2) { + if (supportsDecompressionStream === null) { + supportsDecompressionStream = testDecompressionStream(); + } + return supportsDecompressionStream ? browserInflate(buffer2) : import_pako.default.inflate(buffer2); +} +async function browserInflate(buffer2) { + const ds = new DecompressionStream("deflate"); + const d = new Blob([buffer2]).stream().pipeThrough(ds); + return new Uint8Array(await new Response(d).arrayBuffer()); +} +function testDecompressionStream() { + try { + const ds = new DecompressionStream("deflate"); + if (ds) + return true; + } catch (_) { + } + return false; +} +function decodeVarInt(reader) { + const bytes = []; + let byte = 0; + let multibyte = 0; + do { + byte = reader.readUInt8(); + const lastSeven = byte & 127; + bytes.push(lastSeven); + multibyte = byte & 128; + } while (multibyte); + return bytes.reduce((a, b) => a + 1 << 7 | b, -1); +} +function otherVarIntDecode(reader, startWith) { + let result = startWith; + let shift = 4; + let byte = null; + do { + byte = reader.readUInt8(); + result |= (byte & 127) << shift; + shift += 7; + } while (byte & 128); + return result; +} +var GitPackIndex = class _GitPackIndex { + constructor(stuff) { + Object.assign(this, stuff); + this.offsetCache = {}; + } + static async fromIdx({ idx, getExternalRefDelta }) { + const reader = new BufferCursor(idx); + const magic = reader.slice(4).toString("hex"); + if (magic !== "ff744f63") { + return; + } + const version2 = reader.readUInt32BE(); + if (version2 !== 2) { + throw new InternalError( + `Unable to read version ${version2} packfile IDX. (Only version 2 supported)` + ); + } + if (idx.byteLength > 2048 * 1024 * 1024) { + throw new InternalError( + `To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.` + ); + } + reader.seek(reader.tell() + 4 * 255); + const size = reader.readUInt32BE(); + const hashes = []; + for (let i = 0; i < size; i++) { + const hash2 = reader.slice(20).toString("hex"); + hashes[i] = hash2; + } + reader.seek(reader.tell() + 4 * size); + const offsets = /* @__PURE__ */ new Map(); + for (let i = 0; i < size; i++) { + offsets.set(hashes[i], reader.readUInt32BE()); + } + const packfileSha = reader.slice(20).toString("hex"); + return new _GitPackIndex({ + hashes, + crcs: {}, + offsets, + packfileSha, + getExternalRefDelta + }); + } + static async fromPack({ pack, getExternalRefDelta, onProgress }) { + const listpackTypes = { + 1: "commit", + 2: "tree", + 3: "blob", + 4: "tag", + 6: "ofs-delta", + 7: "ref-delta" + }; + const offsetToObject = {}; + const packfileSha = pack.slice(-20).toString("hex"); + const hashes = []; + const crcs = {}; + const offsets = /* @__PURE__ */ new Map(); + let totalObjectCount = null; + let lastPercent = null; + await listpack([pack], async ({ data, type, reference, offset, num: num2 }) => { + if (totalObjectCount === null) + totalObjectCount = num2; + const percent = Math.floor( + (totalObjectCount - num2) * 100 / totalObjectCount + ); + if (percent !== lastPercent) { + if (onProgress) { + await onProgress({ + phase: "Receiving objects", + loaded: totalObjectCount - num2, + total: totalObjectCount + }); + } + } + lastPercent = percent; + type = listpackTypes[type]; + if (["commit", "tree", "blob", "tag"].includes(type)) { + offsetToObject[offset] = { + type, + offset + }; + } else if (type === "ofs-delta") { + offsetToObject[offset] = { + type, + offset + }; + } else if (type === "ref-delta") { + offsetToObject[offset] = { + type, + offset + }; + } + }); + const offsetArray = Object.keys(offsetToObject).map(Number); + for (const [i, start] of offsetArray.entries()) { + const end = i + 1 === offsetArray.length ? pack.byteLength - 20 : offsetArray[i + 1]; + const o = offsetToObject[start]; + const crc = import_crc_32.default.buf(pack.slice(start, end)) >>> 0; + o.end = end; + o.crc = crc; + } + const p = new _GitPackIndex({ + pack: Promise.resolve(pack), + packfileSha, + crcs, + hashes, + offsets, + getExternalRefDelta + }); + lastPercent = null; + let count = 0; + const objectsByDepth = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + for (let offset in offsetToObject) { + offset = Number(offset); + const percent = Math.floor(count * 100 / totalObjectCount); + if (percent !== lastPercent) { + if (onProgress) { + await onProgress({ + phase: "Resolving deltas", + loaded: count, + total: totalObjectCount + }); + } + } + count++; + lastPercent = percent; + const o = offsetToObject[offset]; + if (o.oid) + continue; + try { + p.readDepth = 0; + p.externalReadDepth = 0; + const { type, object } = await p.readSlice({ start: offset }); + objectsByDepth[p.readDepth] += 1; + const oid = await shasum(GitObject.wrap({ type, object })); + o.oid = oid; + hashes.push(oid); + offsets.set(oid, offset); + crcs[oid] = o.crc; + } catch (err) { + continue; + } + } + hashes.sort(); + return p; + } + async toBuffer() { + const buffers = []; + const write = (str, encoding) => { + buffers.push(Buffer.from(str, encoding)); + }; + write("ff744f63", "hex"); + write("00000002", "hex"); + const fanoutBuffer = new BufferCursor(Buffer.alloc(256 * 4)); + for (let i = 0; i < 256; i++) { + let count = 0; + for (const hash2 of this.hashes) { + if (parseInt(hash2.slice(0, 2), 16) <= i) + count++; + } + fanoutBuffer.writeUInt32BE(count); + } + buffers.push(fanoutBuffer.buffer); + for (const hash2 of this.hashes) { + write(hash2, "hex"); + } + const crcsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4)); + for (const hash2 of this.hashes) { + crcsBuffer.writeUInt32BE(this.crcs[hash2]); + } + buffers.push(crcsBuffer.buffer); + const offsetsBuffer = new BufferCursor(Buffer.alloc(this.hashes.length * 4)); + for (const hash2 of this.hashes) { + offsetsBuffer.writeUInt32BE(this.offsets.get(hash2)); + } + buffers.push(offsetsBuffer.buffer); + write(this.packfileSha, "hex"); + const totalBuffer = Buffer.concat(buffers); + const sha = await shasum(totalBuffer); + const shaBuffer = Buffer.alloc(20); + shaBuffer.write(sha, "hex"); + return Buffer.concat([totalBuffer, shaBuffer]); + } + async load({ pack }) { + this.pack = pack; + } + async unload() { + this.pack = null; + } + async read({ oid }) { + if (!this.offsets.get(oid)) { + if (this.getExternalRefDelta) { + this.externalReadDepth++; + return this.getExternalRefDelta(oid); + } else { + throw new InternalError(`Could not read object ${oid} from packfile`); + } + } + const start = this.offsets.get(oid); + return this.readSlice({ start }); + } + async readSlice({ start }) { + if (this.offsetCache[start]) { + return Object.assign({}, this.offsetCache[start]); + } + this.readDepth++; + const types2 = { + 16: "commit", + 32: "tree", + 48: "blob", + 64: "tag", + 96: "ofs_delta", + 112: "ref_delta" + }; + if (!this.pack) { + throw new InternalError( + "Tried to read from a GitPackIndex with no packfile loaded into memory" + ); + } + const raw = (await this.pack).slice(start); + const reader = new BufferCursor(raw); + const byte = reader.readUInt8(); + const btype = byte & 112; + let type = types2[btype]; + if (type === void 0) { + throw new InternalError("Unrecognized type: 0b" + btype.toString(2)); + } + const lastFour = byte & 15; + let length = lastFour; + const multibyte = byte & 128; + if (multibyte) { + length = otherVarIntDecode(reader, lastFour); + } + let base = null; + let object = null; + if (type === "ofs_delta") { + const offset = decodeVarInt(reader); + const baseOffset = start - offset; + ({ object: base, type } = await this.readSlice({ start: baseOffset })); + } + if (type === "ref_delta") { + const oid = reader.slice(20).toString("hex"); + ({ object: base, type } = await this.read({ oid })); + } + const buffer2 = raw.slice(reader.tell()); + object = Buffer.from(await inflate(buffer2)); + if (object.byteLength !== length) { + throw new InternalError( + `Packfile told us object would have length ${length} but it had length ${object.byteLength}` + ); + } + if (base) { + object = Buffer.from(applyDelta(object, base)); + } + if (this.readDepth > 3) { + this.offsetCache[start] = { type, object }; + } + return { type, format: "content", object }; + } +}; +var PackfileCache = Symbol("PackfileCache"); +async function loadPackIndex({ + fs, + filename, + getExternalRefDelta, + emitter, + emitterPrefix +}) { + const idx = await fs.read(filename); + return GitPackIndex.fromIdx({ idx, getExternalRefDelta }); +} +function readPackIndex({ + fs, + cache, + filename, + getExternalRefDelta, + emitter, + emitterPrefix +}) { + if (!cache[PackfileCache]) + cache[PackfileCache] = /* @__PURE__ */ new Map(); + let p = cache[PackfileCache].get(filename); + if (!p) { + p = loadPackIndex({ + fs, + filename, + getExternalRefDelta, + emitter, + emitterPrefix + }); + cache[PackfileCache].set(filename, p); + } + return p; +} +async function readObjectPacked({ + fs, + cache, + gitdir, + oid, + format = "content", + getExternalRefDelta +}) { + let list = await fs.readdir(join(gitdir, "objects/pack")); + list = list.filter((x) => x.endsWith(".idx")); + for (const filename of list) { + const indexFile = `${gitdir}/objects/pack/${filename}`; + const p = await readPackIndex({ + fs, + cache, + filename: indexFile, + getExternalRefDelta + }); + if (p.error) + throw new InternalError(p.error); + if (p.offsets.has(oid)) { + if (!p.pack) { + const packFile = indexFile.replace(/idx$/, "pack"); + p.pack = fs.read(packFile); + } + const result = await p.read({ oid, getExternalRefDelta }); + result.format = "content"; + result.source = `objects/pack/${filename.replace(/idx$/, "pack")}`; + return result; + } + } + return null; +} +async function _readObject({ + fs, + cache, + gitdir, + oid, + format = "content" +}) { + const getExternalRefDelta = (oid2) => _readObject({ fs, cache, gitdir, oid: oid2 }); + let result; + if (oid === "4b825dc642cb6eb9a060e54bf8d69288fbee4904") { + result = { format: "wrapped", object: Buffer.from(`tree 0\0`) }; + } + if (!result) { + result = await readObjectLoose({ fs, gitdir, oid }); + } + if (!result) { + result = await readObjectPacked({ + fs, + cache, + gitdir, + oid, + getExternalRefDelta + }); + } + if (!result) { + throw new NotFoundError(oid); + } + if (format === "deflated") { + return result; + } + if (result.format === "deflated") { + result.object = Buffer.from(await inflate(result.object)); + result.format = "wrapped"; + } + if (result.format === "wrapped") { + if (format === "wrapped" && result.format === "wrapped") { + return result; + } + const sha = await shasum(result.object); + if (sha !== oid) { + throw new InternalError( + `SHA check failed! Expected ${oid}, computed ${sha}` + ); + } + const { object, type } = GitObject.unwrap(result.object); + result.type = type; + result.object = object; + result.format = "content"; + } + if (result.format === "content") { + if (format === "content") + return result; + return; + } + throw new InternalError(`invalid format "${result.format}"`); +} +var AlreadyExistsError = class _AlreadyExistsError extends BaseError { + /** + * @param {'note'|'remote'|'tag'|'branch'} noun + * @param {string} where + * @param {boolean} canForce + */ + constructor(noun, where, canForce = true) { + super( + `Failed to create ${noun} at ${where} because it already exists.${canForce ? ` (Hint: use 'force: true' parameter to overwrite existing ${noun}.)` : ""}` + ); + this.code = this.name = _AlreadyExistsError.code; + this.data = { noun, where, canForce }; + } +}; +AlreadyExistsError.code = "AlreadyExistsError"; +var AmbiguousError = class _AmbiguousError extends BaseError { + /** + * @param {'oids'|'refs'} nouns + * @param {string} short + * @param {string[]} matches + */ + constructor(nouns, short, matches) { + super( + `Found multiple ${nouns} matching "${short}" (${matches.join( + ", " + )}). Use a longer abbreviation length to disambiguate them.` + ); + this.code = this.name = _AmbiguousError.code; + this.data = { nouns, short, matches }; + } +}; +AmbiguousError.code = "AmbiguousError"; +var CheckoutConflictError = class _CheckoutConflictError extends BaseError { + /** + * @param {string[]} filepaths + */ + constructor(filepaths) { + super( + `Your local changes to the following files would be overwritten by checkout: ${filepaths.join( + ", " + )}` + ); + this.code = this.name = _CheckoutConflictError.code; + this.data = { filepaths }; + } +}; +CheckoutConflictError.code = "CheckoutConflictError"; +var CommitNotFetchedError = class _CommitNotFetchedError extends BaseError { + /** + * @param {string} ref + * @param {string} oid + */ + constructor(ref, oid) { + super( + `Failed to checkout "${ref}" because commit ${oid} is not available locally. Do a git fetch to make the branch available locally.` + ); + this.code = this.name = _CommitNotFetchedError.code; + this.data = { ref, oid }; + } +}; +CommitNotFetchedError.code = "CommitNotFetchedError"; +var EmptyServerResponseError = class _EmptyServerResponseError extends BaseError { + constructor() { + super(`Empty response from git server.`); + this.code = this.name = _EmptyServerResponseError.code; + this.data = {}; + } +}; +EmptyServerResponseError.code = "EmptyServerResponseError"; +var FastForwardError = class _FastForwardError extends BaseError { + constructor() { + super(`A simple fast-forward merge was not possible.`); + this.code = this.name = _FastForwardError.code; + this.data = {}; + } +}; +FastForwardError.code = "FastForwardError"; +var GitPushError = class _GitPushError extends BaseError { + /** + * @param {string} prettyDetails + * @param {PushResult} result + */ + constructor(prettyDetails, result) { + super(`One or more branches were not updated: ${prettyDetails}`); + this.code = this.name = _GitPushError.code; + this.data = { prettyDetails, result }; + } +}; +GitPushError.code = "GitPushError"; +var HttpError = class _HttpError extends BaseError { + /** + * @param {number} statusCode + * @param {string} statusMessage + * @param {string} response + */ + constructor(statusCode, statusMessage, response) { + super(`HTTP Error: ${statusCode} ${statusMessage}`); + this.code = this.name = _HttpError.code; + this.data = { statusCode, statusMessage, response }; + } +}; +HttpError.code = "HttpError"; +var InvalidFilepathError = class _InvalidFilepathError extends BaseError { + /** + * @param {'leading-slash'|'trailing-slash'|'directory'} [reason] + */ + constructor(reason) { + let message = "invalid filepath"; + if (reason === "leading-slash" || reason === "trailing-slash") { + message = `"filepath" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.`; + } else if (reason === "directory") { + message = `"filepath" should not be a directory.`; + } + super(message); + this.code = this.name = _InvalidFilepathError.code; + this.data = { reason }; + } +}; +InvalidFilepathError.code = "InvalidFilepathError"; +var InvalidRefNameError = class _InvalidRefNameError extends BaseError { + /** + * @param {string} ref + * @param {string} suggestion + * @param {boolean} canForce + */ + constructor(ref, suggestion) { + super( + `"${ref}" would be an invalid git reference. (Hint: a valid alternative would be "${suggestion}".)` + ); + this.code = this.name = _InvalidRefNameError.code; + this.data = { ref, suggestion }; + } +}; +InvalidRefNameError.code = "InvalidRefNameError"; +var MaxDepthError = class _MaxDepthError extends BaseError { + /** + * @param {number} depth + */ + constructor(depth) { + super(`Maximum search depth of ${depth} exceeded.`); + this.code = this.name = _MaxDepthError.code; + this.data = { depth }; + } +}; +MaxDepthError.code = "MaxDepthError"; +var MergeNotSupportedError = class _MergeNotSupportedError extends BaseError { + constructor() { + super(`Merges with conflicts are not supported yet.`); + this.code = this.name = _MergeNotSupportedError.code; + this.data = {}; + } +}; +MergeNotSupportedError.code = "MergeNotSupportedError"; +var MergeConflictError = class _MergeConflictError extends BaseError { + /** + * @param {Array} filepaths + * @param {Array} bothModified + * @param {Array} deleteByUs + * @param {Array} deleteByTheirs + */ + constructor(filepaths, bothModified, deleteByUs, deleteByTheirs) { + super( + `Automatic merge failed with one or more merge conflicts in the following files: ${filepaths.toString()}. Fix conflicts then commit the result.` + ); + this.code = this.name = _MergeConflictError.code; + this.data = { filepaths, bothModified, deleteByUs, deleteByTheirs }; + } +}; +MergeConflictError.code = "MergeConflictError"; +var MissingNameError = class _MissingNameError extends BaseError { + /** + * @param {'author'|'committer'|'tagger'} role + */ + constructor(role) { + super( + `No name was provided for ${role} in the argument or in the .git/config file.` + ); + this.code = this.name = _MissingNameError.code; + this.data = { role }; + } +}; +MissingNameError.code = "MissingNameError"; +var MissingParameterError = class _MissingParameterError extends BaseError { + /** + * @param {string} parameter + */ + constructor(parameter) { + super( + `The function requires a "${parameter}" parameter but none was provided.` + ); + this.code = this.name = _MissingParameterError.code; + this.data = { parameter }; + } +}; +MissingParameterError.code = "MissingParameterError"; +var MultipleGitError = class _MultipleGitError extends BaseError { + /** + * @param {Error[]} errors + * @param {string} message + */ + constructor(errors) { + super( + `There are multiple errors that were thrown by the method. Please refer to the "errors" property to see more` + ); + this.code = this.name = _MultipleGitError.code; + this.data = { errors }; + this.errors = errors; + } +}; +MultipleGitError.code = "MultipleGitError"; +var ParseError = class _ParseError extends BaseError { + /** + * @param {string} expected + * @param {string} actual + */ + constructor(expected, actual) { + super(`Expected "${expected}" but received "${actual}".`); + this.code = this.name = _ParseError.code; + this.data = { expected, actual }; + } +}; +ParseError.code = "ParseError"; +var PushRejectedError = class _PushRejectedError extends BaseError { + /** + * @param {'not-fast-forward'|'tag-exists'} reason + */ + constructor(reason) { + let message = ""; + if (reason === "not-fast-forward") { + message = " because it was not a simple fast-forward"; + } else if (reason === "tag-exists") { + message = " because tag already exists"; + } + super(`Push rejected${message}. Use "force: true" to override.`); + this.code = this.name = _PushRejectedError.code; + this.data = { reason }; + } +}; +PushRejectedError.code = "PushRejectedError"; +var RemoteCapabilityError = class _RemoteCapabilityError extends BaseError { + /** + * @param {'shallow'|'deepen-since'|'deepen-not'|'deepen-relative'} capability + * @param {'depth'|'since'|'exclude'|'relative'} parameter + */ + constructor(capability, parameter) { + super( + `Remote does not support the "${capability}" so the "${parameter}" parameter cannot be used.` + ); + this.code = this.name = _RemoteCapabilityError.code; + this.data = { capability, parameter }; + } +}; +RemoteCapabilityError.code = "RemoteCapabilityError"; +var SmartHttpError = class _SmartHttpError extends BaseError { + /** + * @param {string} preview + * @param {string} response + */ + constructor(preview, response) { + super( + `Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${preview}` + ); + this.code = this.name = _SmartHttpError.code; + this.data = { preview, response }; + } +}; +SmartHttpError.code = "SmartHttpError"; +var UnknownTransportError = class _UnknownTransportError extends BaseError { + /** + * @param {string} url + * @param {string} transport + * @param {string} [suggestion] + */ + constructor(url, transport, suggestion) { + super( + `Git remote "${url}" uses an unrecognized transport protocol: "${transport}"` + ); + this.code = this.name = _UnknownTransportError.code; + this.data = { url, transport, suggestion }; + } +}; +UnknownTransportError.code = "UnknownTransportError"; +var UrlParseError = class _UrlParseError extends BaseError { + /** + * @param {string} url + */ + constructor(url) { + super(`Cannot parse remote URL: "${url}"`); + this.code = this.name = _UrlParseError.code; + this.data = { url }; + } +}; +UrlParseError.code = "UrlParseError"; +var UserCanceledError = class _UserCanceledError extends BaseError { + constructor() { + super(`The operation was canceled.`); + this.code = this.name = _UserCanceledError.code; + this.data = {}; + } +}; +UserCanceledError.code = "UserCanceledError"; +var IndexResetError = class _IndexResetError extends BaseError { + /** + * @param {Array} filepaths + */ + constructor(filepath) { + super( + `Could not merge index: Entry for '${filepath}' is not up to date. Either reset the index entry to HEAD, or stage your unstaged chages.` + ); + this.code = this.name = _IndexResetError.code; + this.data = { filepath }; + } +}; +IndexResetError.code = "IndexResetError"; +var Errors = /* @__PURE__ */ Object.freeze({ + __proto__: null, + AlreadyExistsError, + AmbiguousError, + CheckoutConflictError, + CommitNotFetchedError, + EmptyServerResponseError, + FastForwardError, + GitPushError, + HttpError, + InternalError, + InvalidFilepathError, + InvalidOidError, + InvalidRefNameError, + MaxDepthError, + MergeNotSupportedError, + MergeConflictError, + MissingNameError, + MissingParameterError, + MultipleGitError, + NoRefspecError, + NotFoundError, + ObjectTypeError, + ParseError, + PushRejectedError, + RemoteCapabilityError, + SmartHttpError, + UnknownTransportError, + UnsafeFilepathError, + UrlParseError, + UserCanceledError, + UnmergedPathsError, + IndexResetError +}); +function formatAuthor({ name, email, timestamp, timezoneOffset }) { + timezoneOffset = formatTimezoneOffset(timezoneOffset); + return `${name} <${email}> ${timestamp} ${timezoneOffset}`; +} +function formatTimezoneOffset(minutes) { + const sign = simpleSign(negateExceptForZero(minutes)); + minutes = Math.abs(minutes); + const hours = Math.floor(minutes / 60); + minutes -= hours * 60; + let strHours = String(hours); + let strMinutes = String(minutes); + if (strHours.length < 2) + strHours = "0" + strHours; + if (strMinutes.length < 2) + strMinutes = "0" + strMinutes; + return (sign === -1 ? "-" : "+") + strHours + strMinutes; +} +function simpleSign(n) { + return Math.sign(n) || (Object.is(n, -0) ? -1 : 1); +} +function negateExceptForZero(n) { + return n === 0 ? n : -n; +} +function normalizeNewlines(str) { + str = str.replace(/\r/g, ""); + str = str.replace(/^\n+/, ""); + str = str.replace(/\n+$/, "") + "\n"; + return str; +} +function parseAuthor(author) { + const [, name, email, timestamp, offset] = author.match( + /^(.*) <(.*)> (.*) (.*)$/ + ); + return { + name, + email, + timestamp: Number(timestamp), + timezoneOffset: parseTimezoneOffset(offset) + }; +} +function parseTimezoneOffset(offset) { + let [, sign, hours, minutes] = offset.match(/(\+|-)(\d\d)(\d\d)/); + minutes = (sign === "+" ? 1 : -1) * (Number(hours) * 60 + Number(minutes)); + return negateExceptForZero$1(minutes); +} +function negateExceptForZero$1(n) { + return n === 0 ? n : -n; +} +var GitAnnotatedTag = class _GitAnnotatedTag { + constructor(tag2) { + if (typeof tag2 === "string") { + this._tag = tag2; + } else if (Buffer.isBuffer(tag2)) { + this._tag = tag2.toString("utf8"); + } else if (typeof tag2 === "object") { + this._tag = _GitAnnotatedTag.render(tag2); + } else { + throw new InternalError( + "invalid type passed to GitAnnotatedTag constructor" + ); + } + } + static from(tag2) { + return new _GitAnnotatedTag(tag2); + } + static render(obj) { + return `object ${obj.object} +type ${obj.type} +tag ${obj.tag} +tagger ${formatAuthor(obj.tagger)} + +${obj.message} +${obj.gpgsig ? obj.gpgsig : ""}`; + } + justHeaders() { + return this._tag.slice(0, this._tag.indexOf("\n\n")); + } + message() { + const tag2 = this.withoutSignature(); + return tag2.slice(tag2.indexOf("\n\n") + 2); + } + parse() { + return Object.assign(this.headers(), { + message: this.message(), + gpgsig: this.gpgsig() + }); + } + render() { + return this._tag; + } + headers() { + const headers = this.justHeaders().split("\n"); + const hs = []; + for (const h of headers) { + if (h[0] === " ") { + hs[hs.length - 1] += "\n" + h.slice(1); + } else { + hs.push(h); + } + } + const obj = {}; + for (const h of hs) { + const key2 = h.slice(0, h.indexOf(" ")); + const value = h.slice(h.indexOf(" ") + 1); + if (Array.isArray(obj[key2])) { + obj[key2].push(value); + } else { + obj[key2] = value; + } + } + if (obj.tagger) { + obj.tagger = parseAuthor(obj.tagger); + } + if (obj.committer) { + obj.committer = parseAuthor(obj.committer); + } + return obj; + } + withoutSignature() { + const tag2 = normalizeNewlines(this._tag); + if (tag2.indexOf("\n-----BEGIN PGP SIGNATURE-----") === -1) + return tag2; + return tag2.slice(0, tag2.lastIndexOf("\n-----BEGIN PGP SIGNATURE-----")); + } + gpgsig() { + if (this._tag.indexOf("\n-----BEGIN PGP SIGNATURE-----") === -1) + return; + const signature = this._tag.slice( + this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"), + this._tag.indexOf("-----END PGP SIGNATURE-----") + "-----END PGP SIGNATURE-----".length + ); + return normalizeNewlines(signature); + } + payload() { + return this.withoutSignature() + "\n"; + } + toObject() { + return Buffer.from(this._tag, "utf8"); + } + static async sign(tag2, sign, secretKey) { + const payload = tag2.payload(); + let { signature } = await sign({ payload, secretKey }); + signature = normalizeNewlines(signature); + const signedTag = payload + signature; + return _GitAnnotatedTag.from(signedTag); + } +}; +function indent(str) { + return str.trim().split("\n").map((x) => " " + x).join("\n") + "\n"; +} +function outdent(str) { + return str.split("\n").map((x) => x.replace(/^ /, "")).join("\n"); +} +var GitCommit = class _GitCommit { + constructor(commit2) { + if (typeof commit2 === "string") { + this._commit = commit2; + } else if (Buffer.isBuffer(commit2)) { + this._commit = commit2.toString("utf8"); + } else if (typeof commit2 === "object") { + this._commit = _GitCommit.render(commit2); + } else { + throw new InternalError("invalid type passed to GitCommit constructor"); + } + } + static fromPayloadSignature({ payload, signature }) { + const headers = _GitCommit.justHeaders(payload); + const message = _GitCommit.justMessage(payload); + const commit2 = normalizeNewlines( + headers + "\ngpgsig" + indent(signature) + "\n" + message + ); + return new _GitCommit(commit2); + } + static from(commit2) { + return new _GitCommit(commit2); + } + toObject() { + return Buffer.from(this._commit, "utf8"); + } + // Todo: allow setting the headers and message + headers() { + return this.parseHeaders(); + } + // Todo: allow setting the headers and message + message() { + return _GitCommit.justMessage(this._commit); + } + parse() { + return Object.assign({ message: this.message() }, this.headers()); + } + static justMessage(commit2) { + return normalizeNewlines(commit2.slice(commit2.indexOf("\n\n") + 2)); + } + static justHeaders(commit2) { + return commit2.slice(0, commit2.indexOf("\n\n")); + } + parseHeaders() { + const headers = _GitCommit.justHeaders(this._commit).split("\n"); + const hs = []; + for (const h of headers) { + if (h[0] === " ") { + hs[hs.length - 1] += "\n" + h.slice(1); + } else { + hs.push(h); + } + } + const obj = { + parent: [] + }; + for (const h of hs) { + const key2 = h.slice(0, h.indexOf(" ")); + const value = h.slice(h.indexOf(" ") + 1); + if (Array.isArray(obj[key2])) { + obj[key2].push(value); + } else { + obj[key2] = value; + } + } + if (obj.author) { + obj.author = parseAuthor(obj.author); + } + if (obj.committer) { + obj.committer = parseAuthor(obj.committer); + } + return obj; + } + static renderHeaders(obj) { + let headers = ""; + if (obj.tree) { + headers += `tree ${obj.tree} +`; + } else { + headers += `tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 +`; + } + if (obj.parent) { + if (obj.parent.length === void 0) { + throw new InternalError(`commit 'parent' property should be an array`); + } + for (const p of obj.parent) { + headers += `parent ${p} +`; + } + } + const author = obj.author; + headers += `author ${formatAuthor(author)} +`; + const committer = obj.committer || obj.author; + headers += `committer ${formatAuthor(committer)} +`; + if (obj.gpgsig) { + headers += "gpgsig" + indent(obj.gpgsig); + } + return headers; + } + static render(obj) { + return _GitCommit.renderHeaders(obj) + "\n" + normalizeNewlines(obj.message); + } + render() { + return this._commit; + } + withoutSignature() { + const commit2 = normalizeNewlines(this._commit); + if (commit2.indexOf("\ngpgsig") === -1) + return commit2; + const headers = commit2.slice(0, commit2.indexOf("\ngpgsig")); + const message = commit2.slice( + commit2.indexOf("-----END PGP SIGNATURE-----\n") + "-----END PGP SIGNATURE-----\n".length + ); + return normalizeNewlines(headers + "\n" + message); + } + isolateSignature() { + const signature = this._commit.slice( + this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"), + this._commit.indexOf("-----END PGP SIGNATURE-----") + "-----END PGP SIGNATURE-----".length + ); + return outdent(signature); + } + static async sign(commit2, sign, secretKey) { + const payload = commit2.withoutSignature(); + const message = _GitCommit.justMessage(commit2._commit); + let { signature } = await sign({ payload, secretKey }); + signature = normalizeNewlines(signature); + const headers = _GitCommit.justHeaders(commit2._commit); + const signedCommit = headers + "\ngpgsig" + indent(signature) + "\n" + message; + return _GitCommit.from(signedCommit); + } +}; +async function resolveTree({ fs, cache, gitdir, oid }) { + if (oid === "4b825dc642cb6eb9a060e54bf8d69288fbee4904") { + return { tree: GitTree.from([]), oid }; + } + const { type, object } = await _readObject({ fs, cache, gitdir, oid }); + if (type === "tag") { + oid = GitAnnotatedTag.from(object).parse().object; + return resolveTree({ fs, cache, gitdir, oid }); + } + if (type === "commit") { + oid = GitCommit.from(object).parse().tree; + return resolveTree({ fs, cache, gitdir, oid }); + } + if (type !== "tree") { + throw new ObjectTypeError(oid, type, "tree"); + } + return { tree: GitTree.from(object), oid }; +} +var GitWalkerRepo = class { + constructor({ fs, gitdir, ref, cache }) { + this.fs = fs; + this.cache = cache; + this.gitdir = gitdir; + this.mapPromise = (async () => { + const map = /* @__PURE__ */ new Map(); + let oid; + try { + oid = await GitRefManager.resolve({ fs, gitdir, ref }); + } catch (e) { + if (e instanceof NotFoundError) { + oid = "4b825dc642cb6eb9a060e54bf8d69288fbee4904"; + } + } + const tree = await resolveTree({ fs, cache: this.cache, gitdir, oid }); + tree.type = "tree"; + tree.mode = "40000"; + map.set(".", tree); + return map; + })(); + const walker = this; + this.ConstructEntry = class TreeEntry { + constructor(fullpath) { + this._fullpath = fullpath; + this._type = false; + this._mode = false; + this._stat = false; + this._content = false; + this._oid = false; + } + async type() { + return walker.type(this); + } + async mode() { + return walker.mode(this); + } + async stat() { + return walker.stat(this); + } + async content() { + return walker.content(this); + } + async oid() { + return walker.oid(this); + } + }; + } + async readdir(entry) { + const filepath = entry._fullpath; + const { fs, cache, gitdir } = this; + const map = await this.mapPromise; + const obj = map.get(filepath); + if (!obj) + throw new Error(`No obj for ${filepath}`); + const oid = obj.oid; + if (!oid) + throw new Error(`No oid for obj ${JSON.stringify(obj)}`); + if (obj.type !== "tree") { + return null; + } + const { type, object } = await _readObject({ fs, cache, gitdir, oid }); + if (type !== obj.type) { + throw new ObjectTypeError(oid, type, obj.type); + } + const tree = GitTree.from(object); + for (const entry2 of tree) { + map.set(join(filepath, entry2.path), entry2); + } + return tree.entries().map((entry2) => join(filepath, entry2.path)); + } + async type(entry) { + if (entry._type === false) { + const map = await this.mapPromise; + const { type } = map.get(entry._fullpath); + entry._type = type; + } + return entry._type; + } + async mode(entry) { + if (entry._mode === false) { + const map = await this.mapPromise; + const { mode } = map.get(entry._fullpath); + entry._mode = normalizeMode(parseInt(mode, 8)); + } + return entry._mode; + } + async stat(_entry) { + } + async content(entry) { + if (entry._content === false) { + const map = await this.mapPromise; + const { fs, cache, gitdir } = this; + const obj = map.get(entry._fullpath); + const oid = obj.oid; + const { type, object } = await _readObject({ fs, cache, gitdir, oid }); + if (type !== "blob") { + entry._content = void 0; + } else { + entry._content = new Uint8Array(object); + } + } + return entry._content; + } + async oid(entry) { + if (entry._oid === false) { + const map = await this.mapPromise; + const obj = map.get(entry._fullpath); + entry._oid = obj.oid; + } + return entry._oid; + } +}; +function TREE({ ref = "HEAD" } = {}) { + const o = /* @__PURE__ */ Object.create(null); + Object.defineProperty(o, GitWalkSymbol, { + value: function({ fs, gitdir, cache }) { + return new GitWalkerRepo({ fs, gitdir, ref, cache }); + } + }); + Object.freeze(o); + return o; +} +var GitWalkerFs = class { + constructor({ fs, dir, gitdir, cache }) { + this.fs = fs; + this.cache = cache; + this.dir = dir; + this.gitdir = gitdir; + const walker = this; + this.ConstructEntry = class WorkdirEntry { + constructor(fullpath) { + this._fullpath = fullpath; + this._type = false; + this._mode = false; + this._stat = false; + this._content = false; + this._oid = false; + } + async type() { + return walker.type(this); + } + async mode() { + return walker.mode(this); + } + async stat() { + return walker.stat(this); + } + async content() { + return walker.content(this); + } + async oid() { + return walker.oid(this); + } + }; + } + async readdir(entry) { + const filepath = entry._fullpath; + const { fs, dir } = this; + const names = await fs.readdir(join(dir, filepath)); + if (names === null) + return null; + return names.map((name) => join(filepath, name)); + } + async type(entry) { + if (entry._type === false) { + await entry.stat(); + } + return entry._type; + } + async mode(entry) { + if (entry._mode === false) { + await entry.stat(); + } + return entry._mode; + } + async stat(entry) { + if (entry._stat === false) { + const { fs, dir } = this; + let stat = await fs.lstat(`${dir}/${entry._fullpath}`); + if (!stat) { + throw new Error( + `ENOENT: no such file or directory, lstat '${entry._fullpath}'` + ); + } + let type = stat.isDirectory() ? "tree" : "blob"; + if (type === "blob" && !stat.isFile() && !stat.isSymbolicLink()) { + type = "special"; + } + entry._type = type; + stat = normalizeStats(stat); + entry._mode = stat.mode; + if (stat.size === -1 && entry._actualSize) { + stat.size = entry._actualSize; + } + entry._stat = stat; + } + return entry._stat; + } + async content(entry) { + if (entry._content === false) { + const { fs, dir } = this; + if (await entry.type() === "tree") { + entry._content = void 0; + } else { + const content = await fs.read(`${dir}/${entry._fullpath}`); + entry._actualSize = content.length; + if (entry._stat && entry._stat.size === -1) { + entry._stat.size = entry._actualSize; + } + entry._content = new Uint8Array(content); + } + } + return entry._content; + } + async oid(entry) { + if (entry._oid === false) { + const { fs, gitdir, cache } = this; + let oid; + await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index2) { + const stage = index2.entriesMap.get(entry._fullpath); + const stats = await entry.stat(); + if (!stage || compareStats(stats, stage)) { + const content = await entry.content(); + if (content === void 0) { + oid = void 0; + } else { + oid = await shasum( + GitObject.wrap({ type: "blob", object: await entry.content() }) + ); + if (stage && oid === stage.oid && stats.mode === stage.mode && compareStats(stats, stage)) { + index2.insert({ + filepath: entry._fullpath, + stats, + oid + }); + } + } + } else { + oid = stage.oid; + } + }); + entry._oid = oid; + } + return entry._oid; + } +}; +function WORKDIR() { + const o = /* @__PURE__ */ Object.create(null); + Object.defineProperty(o, GitWalkSymbol, { + value: function({ fs, dir, gitdir, cache }) { + return new GitWalkerFs({ fs, dir, gitdir, cache }); + } + }); + Object.freeze(o); + return o; +} +function arrayRange(start, end) { + const length = end - start; + return Array.from({ length }, (_, i) => start + i); +} +var flat = typeof Array.prototype.flat === "undefined" ? (entries) => entries.reduce((acc, x) => acc.concat(x), []) : (entries) => entries.flat(); +var RunningMinimum = class { + constructor() { + this.value = null; + } + consider(value) { + if (value === null || value === void 0) + return; + if (this.value === null) { + this.value = value; + } else if (value < this.value) { + this.value = value; + } + } + reset() { + this.value = null; + } +}; +function* unionOfIterators(sets) { + const min = new RunningMinimum(); + let minimum; + const heads = []; + const numsets = sets.length; + for (let i = 0; i < numsets; i++) { + heads[i] = sets[i].next().value; + if (heads[i] !== void 0) { + min.consider(heads[i]); + } + } + if (min.value === null) + return; + while (true) { + const result = []; + minimum = min.value; + min.reset(); + for (let i = 0; i < numsets; i++) { + if (heads[i] !== void 0 && heads[i] === minimum) { + result[i] = heads[i]; + heads[i] = sets[i].next().value; + } else { + result[i] = null; + } + if (heads[i] !== void 0) { + min.consider(heads[i]); + } + } + yield result; + if (min.value === null) + return; + } +} +async function _walk({ + fs, + cache, + dir, + gitdir, + trees, + // @ts-ignore + map = async (_, entry) => entry, + // The default reducer is a flatmap that filters out undefineds. + reduce = async (parent, children2) => { + const flatten = flat(children2); + if (parent !== void 0) + flatten.unshift(parent); + return flatten; + }, + // The default iterate function walks all children concurrently + iterate = (walk2, children2) => Promise.all([...children2].map(walk2)) +}) { + const walkers = trees.map( + (proxy) => proxy[GitWalkSymbol]({ fs, dir, gitdir, cache }) + ); + const root2 = new Array(walkers.length).fill("."); + const range = arrayRange(0, walkers.length); + const unionWalkerFromReaddir = async (entries) => { + range.map((i) => { + entries[i] = entries[i] && new walkers[i].ConstructEntry(entries[i]); + }); + const subdirs = await Promise.all( + range.map((i) => entries[i] ? walkers[i].readdir(entries[i]) : []) + ); + const iterators = subdirs.map((array) => array === null ? [] : array).map((array) => array[Symbol.iterator]()); + return { + entries, + children: unionOfIterators(iterators) + }; + }; + const walk2 = async (root3) => { + const { entries, children: children2 } = await unionWalkerFromReaddir(root3); + const fullpath = entries.find((entry) => entry && entry._fullpath)._fullpath; + const parent = await map(fullpath, entries); + if (parent !== null) { + let walkedChildren = await iterate(walk2, children2); + walkedChildren = walkedChildren.filter((x) => x !== void 0); + return reduce(parent, walkedChildren); + } + }; + return walk2(root2); +} +async function rmRecursive(fs, filepath) { + const entries = await fs.readdir(filepath); + if (entries == null) { + await fs.rm(filepath); + } else if (entries.length) { + await Promise.all( + entries.map((entry) => { + const subpath = join(filepath, entry); + return fs.lstat(subpath).then((stat) => { + if (!stat) + return; + return stat.isDirectory() ? rmRecursive(fs, subpath) : fs.rm(subpath); + }); + }) + ).then(() => fs.rmdir(filepath)); + } else { + await fs.rmdir(filepath); + } +} +function isPromiseLike(obj) { + return isObject(obj) && isFunction(obj.then) && isFunction(obj.catch); +} +function isObject(obj) { + return obj && typeof obj === "object"; +} +function isFunction(obj) { + return typeof obj === "function"; +} +function isPromiseFs(fs) { + const test = (targetFs) => { + try { + return targetFs.readFile().catch((e) => e); + } catch (e) { + return e; + } + }; + return isPromiseLike(test(fs)); +} +var commands = [ + "readFile", + "writeFile", + "mkdir", + "rmdir", + "unlink", + "stat", + "lstat", + "readdir", + "readlink", + "symlink" +]; +function bindFs(target, fs) { + if (isPromiseFs(fs)) { + for (const command of commands) { + target[`_${command}`] = fs[command].bind(fs); + } + } else { + for (const command of commands) { + target[`_${command}`] = (0, import_pify.default)(fs[command].bind(fs)); + } + } + if (isPromiseFs(fs)) { + if (fs.rm) + target._rm = fs.rm.bind(fs); + else if (fs.rmdir.length > 1) + target._rm = fs.rmdir.bind(fs); + else + target._rm = rmRecursive.bind(null, target); + } else { + if (fs.rm) + target._rm = (0, import_pify.default)(fs.rm.bind(fs)); + else if (fs.rmdir.length > 2) + target._rm = (0, import_pify.default)(fs.rmdir.bind(fs)); + else + target._rm = rmRecursive.bind(null, target); + } +} +var FileSystem = class { + constructor(fs) { + if (typeof fs._original_unwrapped_fs !== "undefined") + return fs; + const promises = Object.getOwnPropertyDescriptor(fs, "promises"); + if (promises && promises.enumerable) { + bindFs(this, fs.promises); + } else { + bindFs(this, fs); + } + this._original_unwrapped_fs = fs; + } + /** + * Return true if a file exists, false if it doesn't exist. + * Rethrows errors that aren't related to file existance. + */ + async exists(filepath, options = {}) { + try { + await this._stat(filepath); + return true; + } catch (err) { + if (err.code === "ENOENT" || err.code === "ENOTDIR") { + return false; + } else { + console.log('Unhandled error in "FileSystem.exists()" function', err); + throw err; + } + } + } + /** + * Return the contents of a file if it exists, otherwise returns null. + * + * @param {string} filepath + * @param {object} [options] + * + * @returns {Promise} + */ + async read(filepath, options = {}) { + try { + let buffer2 = await this._readFile(filepath, options); + if (typeof buffer2 !== "string") { + buffer2 = Buffer.from(buffer2); + } + return buffer2; + } catch (err) { + return null; + } + } + /** + * Write a file (creating missing directories if need be) without throwing errors. + * + * @param {string} filepath + * @param {Buffer|Uint8Array|string} contents + * @param {object|string} [options] + */ + async write(filepath, contents, options = {}) { + try { + await this._writeFile(filepath, contents, options); + return; + } catch (err) { + await this.mkdir(dirname(filepath)); + await this._writeFile(filepath, contents, options); + } + } + /** + * Make a directory (or series of nested directories) without throwing an error if it already exists. + */ + async mkdir(filepath, _selfCall = false) { + try { + await this._mkdir(filepath); + return; + } catch (err) { + if (err === null) + return; + if (err.code === "EEXIST") + return; + if (_selfCall) + throw err; + if (err.code === "ENOENT") { + const parent = dirname(filepath); + if (parent === "." || parent === "/" || parent === filepath) + throw err; + await this.mkdir(parent); + await this.mkdir(filepath, true); + } + } + } + /** + * Delete a file without throwing an error if it is already deleted. + */ + async rm(filepath) { + try { + await this._unlink(filepath); + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + } + /** + * Delete a directory without throwing an error if it is already deleted. + */ + async rmdir(filepath, opts) { + try { + if (opts && opts.recursive) { + await this._rm(filepath, opts); + } else { + await this._rmdir(filepath); + } + } catch (err) { + if (err.code !== "ENOENT") + throw err; + } + } + /** + * Read a directory without throwing an error is the directory doesn't exist + */ + async readdir(filepath) { + try { + const names = await this._readdir(filepath); + names.sort(compareStrings); + return names; + } catch (err) { + if (err.code === "ENOTDIR") + return null; + return []; + } + } + /** + * Return a flast list of all the files nested inside a directory + * + * Based on an elegant concurrent recursive solution from SO + * https://stackoverflow.com/a/45130990/2168416 + */ + async readdirDeep(dir) { + const subdirs = await this._readdir(dir); + const files = await Promise.all( + subdirs.map(async (subdir) => { + const res = dir + "/" + subdir; + return (await this._stat(res)).isDirectory() ? this.readdirDeep(res) : res; + }) + ); + return files.reduce((a, f) => a.concat(f), []); + } + /** + * Return the Stats of a file/symlink if it exists, otherwise returns null. + * Rethrows errors that aren't related to file existance. + */ + async lstat(filename) { + try { + const stats = await this._lstat(filename); + return stats; + } catch (err) { + if (err.code === "ENOENT") { + return null; + } + throw err; + } + } + /** + * Reads the contents of a symlink if it exists, otherwise returns null. + * Rethrows errors that aren't related to file existance. + */ + async readlink(filename, opts = { encoding: "buffer" }) { + try { + const link = await this._readlink(filename, opts); + return Buffer.isBuffer(link) ? link : Buffer.from(link); + } catch (err) { + if (err.code === "ENOENT") { + return null; + } + throw err; + } + } + /** + * Write the contents of buffer to a symlink. + */ + async writelink(filename, buffer2) { + return this._symlink(buffer2.toString("utf8"), filename); + } +}; +function assertParameter(name, value) { + if (value === void 0) { + throw new MissingParameterError(name); + } +} +async function modified(entry, base) { + if (!entry && !base) + return false; + if (entry && !base) + return true; + if (!entry && base) + return true; + if (await entry.type() === "tree" && await base.type() === "tree") { + return false; + } + if (await entry.type() === await base.type() && await entry.mode() === await base.mode() && await entry.oid() === await base.oid()) { + return false; + } + return true; +} +async function abortMerge({ + fs: _fs, + dir, + gitdir = join(dir, ".git"), + commit: commit2 = "HEAD", + cache = {} +}) { + try { + assertParameter("fs", _fs); + assertParameter("dir", dir); + assertParameter("gitdir", gitdir); + const fs = new FileSystem(_fs); + const trees = [TREE({ ref: commit2 }), WORKDIR(), STAGE()]; + let unmergedPaths = []; + await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index2) { + unmergedPaths = index2.unmergedPaths; + }); + const results = await _walk({ + fs, + cache, + dir, + gitdir, + trees, + map: async function(path2, [head, workdir, index2]) { + const staged = !await modified(workdir, index2); + const unmerged = unmergedPaths.includes(path2); + const unmodified = !await modified(index2, head); + if (staged || unmerged) { + return head ? { + path: path2, + mode: await head.mode(), + oid: await head.oid(), + type: await head.type(), + content: await head.content() + } : void 0; + } + if (unmodified) + return false; + else + throw new IndexResetError(path2); + } + }); + await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index2) { + for (const entry of results) { + if (entry === false) + continue; + if (!entry) { + await fs.rmdir(`${dir}/${entry.path}`, { recursive: true }); + index2.delete({ filepath: entry.path }); + continue; + } + if (entry.type === "blob") { + const content = new TextDecoder().decode(entry.content); + await fs.write(`${dir}/${entry.path}`, content, { mode: entry.mode }); + index2.insert({ + filepath: entry.path, + oid: entry.oid, + stage: 0 + }); + } + } + }); + } catch (err) { + err.caller = "git.abortMerge"; + throw err; + } +} +var GitIgnoreManager = class { + static async isIgnored({ fs, dir, gitdir = join(dir, ".git"), filepath }) { + if (basename(filepath) === ".git") + return true; + if (filepath === ".") + return false; + let excludes = ""; + const excludesFile = join(gitdir, "info", "exclude"); + if (await fs.exists(excludesFile)) { + excludes = await fs.read(excludesFile, "utf8"); + } + const pairs = [ + { + gitignore: join(dir, ".gitignore"), + filepath + } + ]; + const pieces = filepath.split("/").filter(Boolean); + for (let i = 1; i < pieces.length; i++) { + const folder = pieces.slice(0, i).join("/"); + const file = pieces.slice(i).join("/"); + pairs.push({ + gitignore: join(dir, folder, ".gitignore"), + filepath: file + }); + } + let ignoredStatus = false; + for (const p of pairs) { + let file; + try { + file = await fs.read(p.gitignore, "utf8"); + } catch (err) { + if (err.code === "NOENT") + continue; + } + const ign = (0, import_ignore.default)().add(excludes); + ign.add(file); + const parentdir = dirname(p.filepath); + if (parentdir !== "." && ign.ignores(parentdir)) + return true; + if (ignoredStatus) { + ignoredStatus = !ign.test(p.filepath).unignored; + } else { + ignoredStatus = ign.test(p.filepath).ignored; + } + } + return ignoredStatus; + } +}; +async function writeObjectLoose({ fs, gitdir, object, format, oid }) { + if (format !== "deflated") { + throw new InternalError( + "GitObjectStoreLoose expects objects to write to be in deflated format" + ); + } + const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`; + const filepath = `${gitdir}/${source}`; + if (!await fs.exists(filepath)) + await fs.write(filepath, object); +} +var supportsCompressionStream = null; +async function deflate(buffer2) { + if (supportsCompressionStream === null) { + supportsCompressionStream = testCompressionStream(); + } + return supportsCompressionStream ? browserDeflate(buffer2) : import_pako.default.deflate(buffer2); +} +async function browserDeflate(buffer2) { + const cs = new CompressionStream("deflate"); + const c = new Blob([buffer2]).stream().pipeThrough(cs); + return new Uint8Array(await new Response(c).arrayBuffer()); +} +function testCompressionStream() { + try { + const cs = new CompressionStream("deflate"); + new Blob([]).stream(); + if (cs) + return true; + } catch (_) { + } + return false; +} +async function _writeObject({ + fs, + gitdir, + type, + object, + format = "content", + oid = void 0, + dryRun = false +}) { + if (format !== "deflated") { + if (format !== "wrapped") { + object = GitObject.wrap({ type, object }); + } + oid = await shasum(object); + object = Buffer.from(await deflate(object)); + } + if (!dryRun) { + await writeObjectLoose({ fs, gitdir, object, format: "deflated", oid }); + } + return oid; +} +function posixifyPathBuffer(buffer2) { + let idx; + while (~(idx = buffer2.indexOf(92))) + buffer2[idx] = 47; + return buffer2; +} +async function add({ + fs: _fs, + dir, + gitdir = join(dir, ".git"), + filepath, + cache = {}, + force = false, + parallel = true +}) { + try { + assertParameter("fs", _fs); + assertParameter("dir", dir); + assertParameter("gitdir", gitdir); + assertParameter("filepath", filepath); + const fs = new FileSystem(_fs); + await GitIndexManager.acquire({ fs, gitdir, cache }, async (index2) => { + return addToIndex({ + dir, + gitdir, + fs, + filepath, + index: index2, + force, + parallel + }); + }); + } catch (err) { + err.caller = "git.add"; + throw err; + } +} +async function addToIndex({ + dir, + gitdir, + fs, + filepath, + index: index2, + force, + parallel +}) { + filepath = Array.isArray(filepath) ? filepath : [filepath]; + const promises = filepath.map(async (currentFilepath) => { + if (!force) { + const ignored = await GitIgnoreManager.isIgnored({ + fs, + dir, + gitdir, + filepath: currentFilepath + }); + if (ignored) + return; + } + const stats = await fs.lstat(join(dir, currentFilepath)); + if (!stats) + throw new NotFoundError(currentFilepath); + if (stats.isDirectory()) { + const children2 = await fs.readdir(join(dir, currentFilepath)); + if (parallel) { + const promises2 = children2.map( + (child) => addToIndex({ + dir, + gitdir, + fs, + filepath: [join(currentFilepath, child)], + index: index2, + force, + parallel + }) + ); + await Promise.all(promises2); + } else { + for (const child of children2) { + await addToIndex({ + dir, + gitdir, + fs, + filepath: [join(currentFilepath, child)], + index: index2, + force, + parallel + }); + } + } + } else { + const object = stats.isSymbolicLink() ? await fs.readlink(join(dir, currentFilepath)).then(posixifyPathBuffer) : await fs.read(join(dir, currentFilepath)); + if (object === null) + throw new NotFoundError(currentFilepath); + const oid = await _writeObject({ fs, gitdir, type: "blob", object }); + index2.insert({ filepath: currentFilepath, stats, oid }); + } + }); + const settledPromises = await Promise.allSettled(promises); + const rejectedPromises = settledPromises.filter((settle) => settle.status === "rejected").map((settle) => settle.reason); + if (rejectedPromises.length > 1) { + throw new MultipleGitError(rejectedPromises); + } + if (rejectedPromises.length === 1) { + throw rejectedPromises[0]; + } + const fulfilledPromises = settledPromises.filter((settle) => settle.status === "fulfilled" && settle.value).map((settle) => settle.value); + return fulfilledPromises; +} +async function _commit({ + fs, + cache, + onSign, + gitdir, + message, + author, + committer, + signingKey, + dryRun = false, + noUpdateBranch = false, + ref, + parent, + tree +}) { + if (!ref) { + ref = await GitRefManager.resolve({ + fs, + gitdir, + ref: "HEAD", + depth: 2 + }); + } + return GitIndexManager.acquire( + { fs, gitdir, cache, allowUnmerged: false }, + async function(index2) { + const inodes = flatFileListToDirectoryStructure(index2.entries); + const inode = inodes.get("."); + if (!tree) { + tree = await constructTree({ fs, gitdir, inode, dryRun }); + } + if (!parent) { + try { + parent = [ + await GitRefManager.resolve({ + fs, + gitdir, + ref + }) + ]; + } catch (err) { + parent = []; + } + } else { + parent = await Promise.all( + parent.map((p) => { + return GitRefManager.resolve({ fs, gitdir, ref: p }); + }) + ); + } + let comm = GitCommit.from({ + tree, + parent, + author, + committer, + message + }); + if (signingKey) { + comm = await GitCommit.sign(comm, onSign, signingKey); + } + const oid = await _writeObject({ + fs, + gitdir, + type: "commit", + object: comm.toObject(), + dryRun + }); + if (!noUpdateBranch && !dryRun) { + await GitRefManager.writeRef({ + fs, + gitdir, + ref, + value: oid + }); + } + return oid; + } + ); +} +async function constructTree({ fs, gitdir, inode, dryRun }) { + const children2 = inode.children; + for (const inode2 of children2) { + if (inode2.type === "tree") { + inode2.metadata.mode = "040000"; + inode2.metadata.oid = await constructTree({ fs, gitdir, inode: inode2, dryRun }); + } + } + const entries = children2.map((inode2) => ({ + mode: inode2.metadata.mode, + path: inode2.basename, + oid: inode2.metadata.oid, + type: inode2.type + })); + const tree = GitTree.from(entries); + const oid = await _writeObject({ + fs, + gitdir, + type: "tree", + object: tree.toObject(), + dryRun + }); + return oid; +} +async function resolveFilepath({ fs, cache, gitdir, oid, filepath }) { + if (filepath.startsWith("/")) { + throw new InvalidFilepathError("leading-slash"); + } else if (filepath.endsWith("/")) { + throw new InvalidFilepathError("trailing-slash"); + } + const _oid = oid; + const result = await resolveTree({ fs, cache, gitdir, oid }); + const tree = result.tree; + if (filepath === "") { + oid = result.oid; + } else { + const pathArray = filepath.split("/"); + oid = await _resolveFilepath({ + fs, + cache, + gitdir, + tree, + pathArray, + oid: _oid, + filepath + }); + } + return oid; +} +async function _resolveFilepath({ + fs, + cache, + gitdir, + tree, + pathArray, + oid, + filepath +}) { + const name = pathArray.shift(); + for (const entry of tree) { + if (entry.path === name) { + if (pathArray.length === 0) { + return entry.oid; + } else { + const { type, object } = await _readObject({ + fs, + cache, + gitdir, + oid: entry.oid + }); + if (type !== "tree") { + throw new ObjectTypeError(oid, type, "tree", filepath); + } + tree = GitTree.from(object); + return _resolveFilepath({ + fs, + cache, + gitdir, + tree, + pathArray, + oid, + filepath + }); + } + } + } + throw new NotFoundError(`file or directory found at "${oid}:${filepath}"`); +} +async function _readTree({ + fs, + cache, + gitdir, + oid, + filepath = void 0 +}) { + if (filepath !== void 0) { + oid = await resolveFilepath({ fs, cache, gitdir, oid, filepath }); + } + const { tree, oid: treeOid } = await resolveTree({ fs, cache, gitdir, oid }); + const result = { + oid: treeOid, + tree: tree.entries() + }; + return result; +} +async function _writeTree({ fs, gitdir, tree }) { + const object = GitTree.from(tree).toObject(); + const oid = await _writeObject({ + fs, + gitdir, + type: "tree", + object, + format: "content" + }); + return oid; +} +async function _addNote({ + fs, + cache, + onSign, + gitdir, + ref, + oid, + note, + force, + author, + committer, + signingKey +}) { + let parent; + try { + parent = await GitRefManager.resolve({ gitdir, fs, ref }); + } catch (err) { + if (!(err instanceof NotFoundError)) { + throw err; + } + } + const result = await _readTree({ + fs, + cache, + gitdir, + oid: parent || "4b825dc642cb6eb9a060e54bf8d69288fbee4904" + }); + let tree = result.tree; + if (force) { + tree = tree.filter((entry) => entry.path !== oid); + } else { + for (const entry of tree) { + if (entry.path === oid) { + throw new AlreadyExistsError("note", oid); + } + } + } + if (typeof note === "string") { + note = Buffer.from(note, "utf8"); + } + const noteOid = await _writeObject({ + fs, + gitdir, + type: "blob", + object: note, + format: "content" + }); + tree.push({ mode: "100644", path: oid, oid: noteOid, type: "blob" }); + const treeOid = await _writeTree({ + fs, + gitdir, + tree + }); + const commitOid = await _commit({ + fs, + cache, + onSign, + gitdir, + ref, + tree: treeOid, + parent: parent && [parent], + message: `Note added by 'isomorphic-git addNote' +`, + author, + committer, + signingKey + }); + return commitOid; +} +async function _getConfig({ fs, gitdir, path: path2 }) { + const config = await GitConfigManager.get({ fs, gitdir }); + return config.get(path2); +} +async function normalizeAuthorObject({ fs, gitdir, author = {} }) { + let { name, email, timestamp, timezoneOffset } = author; + name = name || await _getConfig({ fs, gitdir, path: "user.name" }); + email = email || await _getConfig({ fs, gitdir, path: "user.email" }) || ""; + if (name === void 0) { + return void 0; + } + timestamp = timestamp != null ? timestamp : Math.floor(Date.now() / 1e3); + timezoneOffset = timezoneOffset != null ? timezoneOffset : new Date(timestamp * 1e3).getTimezoneOffset(); + return { name, email, timestamp, timezoneOffset }; +} +async function normalizeCommitterObject({ + fs, + gitdir, + author, + committer +}) { + committer = Object.assign({}, committer || author); + if (author) { + committer.timestamp = committer.timestamp || author.timestamp; + committer.timezoneOffset = committer.timezoneOffset || author.timezoneOffset; + } + committer = await normalizeAuthorObject({ fs, gitdir, author: committer }); + return committer; +} +async function addNote({ + fs: _fs, + onSign, + dir, + gitdir = join(dir, ".git"), + ref = "refs/notes/commits", + oid, + note, + force, + author: _author, + committer: _committer, + signingKey, + cache = {} +}) { + try { + assertParameter("fs", _fs); + assertParameter("gitdir", gitdir); + assertParameter("oid", oid); + assertParameter("note", note); + if (signingKey) { + assertParameter("onSign", onSign); + } + const fs = new FileSystem(_fs); + const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); + if (!author) + throw new MissingNameError("author"); + const committer = await normalizeCommitterObject({ + fs, + gitdir, + author, + committer: _committer + }); + if (!committer) + throw new MissingNameError("committer"); + return await _addNote({ + fs: new FileSystem(fs), + cache, + onSign, + gitdir, + ref, + oid, + note, + force, + author, + committer, + signingKey + }); + } catch (err) { + err.caller = "git.addNote"; + throw err; + } +} +async function _addRemote({ fs, gitdir, remote, url, force }) { + if (remote !== import_clean_git_ref.default.clean(remote)) { + throw new InvalidRefNameError(remote, import_clean_git_ref.default.clean(remote)); + } + const config = await GitConfigManager.get({ fs, gitdir }); + if (!force) { + const remoteNames = await config.getSubsections("remote"); + if (remoteNames.includes(remote)) { + if (url !== await config.get(`remote.${remote}.url`)) { + throw new AlreadyExistsError("remote", remote); + } + } + } + await config.set(`remote.${remote}.url`, url); + await config.set( + `remote.${remote}.fetch`, + `+refs/heads/*:refs/remotes/${remote}/*` + ); + await GitConfigManager.save({ fs, gitdir, config }); +} +async function addRemote({ + fs, + dir, + gitdir = join(dir, ".git"), + remote, + url, + force = false +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("remote", remote); + assertParameter("url", url); + return await _addRemote({ + fs: new FileSystem(fs), + gitdir, + remote, + url, + force + }); + } catch (err) { + err.caller = "git.addRemote"; + throw err; + } +} +async function _annotatedTag({ + fs, + cache, + onSign, + gitdir, + ref, + tagger, + message = ref, + gpgsig, + object, + signingKey, + force = false +}) { + ref = ref.startsWith("refs/tags/") ? ref : `refs/tags/${ref}`; + if (!force && await GitRefManager.exists({ fs, gitdir, ref })) { + throw new AlreadyExistsError("tag", ref); + } + const oid = await GitRefManager.resolve({ + fs, + gitdir, + ref: object || "HEAD" + }); + const { type } = await _readObject({ fs, cache, gitdir, oid }); + let tagObject = GitAnnotatedTag.from({ + object: oid, + type, + tag: ref.replace("refs/tags/", ""), + tagger, + message, + gpgsig + }); + if (signingKey) { + tagObject = await GitAnnotatedTag.sign(tagObject, onSign, signingKey); + } + const value = await _writeObject({ + fs, + gitdir, + type: "tag", + object: tagObject.toObject() + }); + await GitRefManager.writeRef({ fs, gitdir, ref, value }); +} +async function annotatedTag({ + fs: _fs, + onSign, + dir, + gitdir = join(dir, ".git"), + ref, + tagger: _tagger, + message = ref, + gpgsig, + object, + signingKey, + force = false, + cache = {} +}) { + try { + assertParameter("fs", _fs); + assertParameter("gitdir", gitdir); + assertParameter("ref", ref); + if (signingKey) { + assertParameter("onSign", onSign); + } + const fs = new FileSystem(_fs); + const tagger = await normalizeAuthorObject({ fs, gitdir, author: _tagger }); + if (!tagger) + throw new MissingNameError("tagger"); + return await _annotatedTag({ + fs, + cache, + onSign, + gitdir, + ref, + tagger, + message, + gpgsig, + object, + signingKey, + force + }); + } catch (err) { + err.caller = "git.annotatedTag"; + throw err; + } +} +async function _branch({ + fs, + gitdir, + ref, + object, + checkout: checkout2 = false, + force = false +}) { + if (ref !== import_clean_git_ref.default.clean(ref)) { + throw new InvalidRefNameError(ref, import_clean_git_ref.default.clean(ref)); + } + const fullref = `refs/heads/${ref}`; + if (!force) { + const exist = await GitRefManager.exists({ fs, gitdir, ref: fullref }); + if (exist) { + throw new AlreadyExistsError("branch", ref, false); + } + } + let oid; + try { + oid = await GitRefManager.resolve({ fs, gitdir, ref: object || "HEAD" }); + } catch (e) { + } + if (oid) { + await GitRefManager.writeRef({ fs, gitdir, ref: fullref, value: oid }); + } + if (checkout2) { + await GitRefManager.writeSymbolicRef({ + fs, + gitdir, + ref: "HEAD", + value: fullref + }); + } +} +async function branch({ + fs, + dir, + gitdir = join(dir, ".git"), + ref, + object, + checkout: checkout2 = false, + force = false +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("ref", ref); + return await _branch({ + fs: new FileSystem(fs), + gitdir, + ref, + object, + checkout: checkout2, + force + }); + } catch (err) { + err.caller = "git.branch"; + throw err; + } +} +var worthWalking = (filepath, root2) => { + if (filepath === "." || root2 == null || root2.length === 0 || root2 === ".") { + return true; + } + if (root2.length >= filepath.length) { + return root2.startsWith(filepath); + } else { + return filepath.startsWith(root2); + } +}; +async function _checkout({ + fs, + cache, + onProgress, + dir, + gitdir, + remote, + ref, + filepaths, + noCheckout, + noUpdateHead, + dryRun, + force, + track = true +}) { + let oid; + try { + oid = await GitRefManager.resolve({ fs, gitdir, ref }); + } catch (err) { + if (ref === "HEAD") + throw err; + const remoteRef = `${remote}/${ref}`; + oid = await GitRefManager.resolve({ + fs, + gitdir, + ref: remoteRef + }); + if (track) { + const config = await GitConfigManager.get({ fs, gitdir }); + await config.set(`branch.${ref}.remote`, remote); + await config.set(`branch.${ref}.merge`, `refs/heads/${ref}`); + await GitConfigManager.save({ fs, gitdir, config }); + } + await GitRefManager.writeRef({ + fs, + gitdir, + ref: `refs/heads/${ref}`, + value: oid + }); + } + if (!noCheckout) { + let ops; + try { + ops = await analyze({ + fs, + cache, + onProgress, + dir, + gitdir, + ref, + force, + filepaths + }); + } catch (err) { + if (err instanceof NotFoundError && err.data.what === oid) { + throw new CommitNotFetchedError(ref, oid); + } else { + throw err; + } + } + const conflicts2 = ops.filter(([method2]) => method2 === "conflict").map(([method2, fullpath]) => fullpath); + if (conflicts2.length > 0) { + throw new CheckoutConflictError(conflicts2); + } + const errors = ops.filter(([method2]) => method2 === "error").map(([method2, fullpath]) => fullpath); + if (errors.length > 0) { + throw new InternalError(errors.join(", ")); + } + if (dryRun) { + return; + } + let count = 0; + const total = ops.length; + await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index2) { + await Promise.all( + ops.filter( + ([method2]) => method2 === "delete" || method2 === "delete-index" + ).map(async function([method2, fullpath]) { + const filepath = `${dir}/${fullpath}`; + if (method2 === "delete") { + await fs.rm(filepath); + } + index2.delete({ filepath: fullpath }); + if (onProgress) { + await onProgress({ + phase: "Updating workdir", + loaded: ++count, + total + }); + } + }) + ); + }); + await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index2) { + for (const [method2, fullpath] of ops) { + if (method2 === "rmdir" || method2 === "rmdir-index") { + const filepath = `${dir}/${fullpath}`; + try { + if (method2 === "rmdir-index") { + index2.delete({ filepath: fullpath }); + } + await fs.rmdir(filepath); + if (onProgress) { + await onProgress({ + phase: "Updating workdir", + loaded: ++count, + total + }); + } + } catch (e) { + if (e.code === "ENOTEMPTY") { + console.log( + `Did not delete ${fullpath} because directory is not empty` + ); + } else { + throw e; + } + } + } + } + }); + await Promise.all( + ops.filter(([method2]) => method2 === "mkdir" || method2 === "mkdir-index").map(async function([_, fullpath]) { + const filepath = `${dir}/${fullpath}`; + await fs.mkdir(filepath); + if (onProgress) { + await onProgress({ + phase: "Updating workdir", + loaded: ++count, + total + }); + } + }) + ); + await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index2) { + await Promise.all( + ops.filter( + ([method2]) => method2 === "create" || method2 === "create-index" || method2 === "update" || method2 === "mkdir-index" + ).map(async function([method2, fullpath, oid2, mode, chmod]) { + const filepath = `${dir}/${fullpath}`; + try { + if (method2 !== "create-index" && method2 !== "mkdir-index") { + const { object } = await _readObject({ fs, cache, gitdir, oid: oid2 }); + if (chmod) { + await fs.rm(filepath); + } + if (mode === 33188) { + await fs.write(filepath, object); + } else if (mode === 33261) { + await fs.write(filepath, object, { mode: 511 }); + } else if (mode === 40960) { + await fs.writelink(filepath, object); + } else { + throw new InternalError( + `Invalid mode 0o${mode.toString(8)} detected in blob ${oid2}` + ); + } + } + const stats = await fs.lstat(filepath); + if (mode === 33261) { + stats.mode = 493; + } + if (method2 === "mkdir-index") { + stats.mode = 57344; + } + index2.insert({ + filepath: fullpath, + stats, + oid: oid2 + }); + if (onProgress) { + await onProgress({ + phase: "Updating workdir", + loaded: ++count, + total + }); + } + } catch (e) { + console.log(e); + } + }) + ); + }); + } + if (!noUpdateHead) { + const fullRef = await GitRefManager.expand({ fs, gitdir, ref }); + if (fullRef.startsWith("refs/heads")) { + await GitRefManager.writeSymbolicRef({ + fs, + gitdir, + ref: "HEAD", + value: fullRef + }); + } else { + await GitRefManager.writeRef({ fs, gitdir, ref: "HEAD", value: oid }); + } + } +} +async function analyze({ + fs, + cache, + onProgress, + dir, + gitdir, + ref, + force, + filepaths +}) { + let count = 0; + return _walk({ + fs, + cache, + dir, + gitdir, + trees: [TREE({ ref }), WORKDIR(), STAGE()], + map: async function(fullpath, [commit2, workdir, stage]) { + if (fullpath === ".") + return; + if (filepaths && !filepaths.some((base) => worthWalking(fullpath, base))) { + return null; + } + if (onProgress) { + await onProgress({ phase: "Analyzing workdir", loaded: ++count }); + } + const key2 = [!!stage, !!commit2, !!workdir].map(Number).join(""); + switch (key2) { + case "000": + return; + case "001": + if (force && filepaths && filepaths.includes(fullpath)) { + return ["delete", fullpath]; + } + return; + case "010": { + switch (await commit2.type()) { + case "tree": { + return ["mkdir", fullpath]; + } + case "blob": { + return [ + "create", + fullpath, + await commit2.oid(), + await commit2.mode() + ]; + } + case "commit": { + return [ + "mkdir-index", + fullpath, + await commit2.oid(), + await commit2.mode() + ]; + } + default: { + return [ + "error", + `new entry Unhandled type ${await commit2.type()}` + ]; + } + } + } + case "011": { + switch (`${await commit2.type()}-${await workdir.type()}`) { + case "tree-tree": { + return; + } + case "tree-blob": + case "blob-tree": { + return ["conflict", fullpath]; + } + case "blob-blob": { + if (await commit2.oid() !== await workdir.oid()) { + if (force) { + return [ + "update", + fullpath, + await commit2.oid(), + await commit2.mode(), + await commit2.mode() !== await workdir.mode() + ]; + } else { + return ["conflict", fullpath]; + } + } else { + if (await commit2.mode() !== await workdir.mode()) { + if (force) { + return [ + "update", + fullpath, + await commit2.oid(), + await commit2.mode(), + true + ]; + } else { + return ["conflict", fullpath]; + } + } else { + return [ + "create-index", + fullpath, + await commit2.oid(), + await commit2.mode() + ]; + } + } + } + case "commit-tree": { + return; + } + case "commit-blob": { + return ["conflict", fullpath]; + } + default: { + return ["error", `new entry Unhandled type ${commit2.type}`]; + } + } + } + case "100": { + return ["delete-index", fullpath]; + } + case "101": { + switch (await stage.type()) { + case "tree": { + return ["rmdir", fullpath]; + } + case "blob": { + if (await stage.oid() !== await workdir.oid()) { + if (force) { + return ["delete", fullpath]; + } else { + return ["conflict", fullpath]; + } + } else { + return ["delete", fullpath]; + } + } + case "commit": { + return ["rmdir-index", fullpath]; + } + default: { + return [ + "error", + `delete entry Unhandled type ${await stage.type()}` + ]; + } + } + } + case "110": + case "111": { + switch (`${await stage.type()}-${await commit2.type()}`) { + case "tree-tree": { + return; + } + case "blob-blob": { + if (await stage.oid() === await commit2.oid() && await stage.mode() === await commit2.mode() && !force) { + return; + } + if (workdir) { + if (await workdir.oid() !== await stage.oid() && await workdir.oid() !== await commit2.oid()) { + if (force) { + return [ + "update", + fullpath, + await commit2.oid(), + await commit2.mode(), + await commit2.mode() !== await workdir.mode() + ]; + } else { + return ["conflict", fullpath]; + } + } + } else if (force) { + return [ + "update", + fullpath, + await commit2.oid(), + await commit2.mode(), + await commit2.mode() !== await stage.mode() + ]; + } + if (await commit2.mode() !== await stage.mode()) { + return [ + "update", + fullpath, + await commit2.oid(), + await commit2.mode(), + true + ]; + } + if (await commit2.oid() !== await stage.oid()) { + return [ + "update", + fullpath, + await commit2.oid(), + await commit2.mode(), + false + ]; + } else { + return; + } + } + case "tree-blob": { + return ["update-dir-to-blob", fullpath, await commit2.oid()]; + } + case "blob-tree": { + return ["update-blob-to-tree", fullpath]; + } + case "commit-commit": { + return [ + "mkdir-index", + fullpath, + await commit2.oid(), + await commit2.mode() + ]; + } + default: { + return [ + "error", + `update entry Unhandled type ${await stage.type()}-${await commit2.type()}` + ]; + } + } + } + } + }, + // Modify the default flat mapping + reduce: async function(parent, children2) { + children2 = flat(children2); + if (!parent) { + return children2; + } else if (parent && parent[0] === "rmdir") { + children2.push(parent); + return children2; + } else { + children2.unshift(parent); + return children2; + } + } + }); +} +async function checkout({ + fs, + onProgress, + dir, + gitdir = join(dir, ".git"), + remote = "origin", + ref: _ref, + filepaths, + noCheckout = false, + noUpdateHead = _ref === void 0, + dryRun = false, + force = false, + track = true, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("dir", dir); + assertParameter("gitdir", gitdir); + const ref = _ref || "HEAD"; + return await _checkout({ + fs: new FileSystem(fs), + cache, + onProgress, + dir, + gitdir, + remote, + ref, + filepaths, + noCheckout, + noUpdateHead, + dryRun, + force, + track + }); + } catch (err) { + err.caller = "git.checkout"; + throw err; + } +} +var abbreviateRx = new RegExp("^refs/(heads/|tags/|remotes/)?(.*)"); +function abbreviateRef(ref) { + const match = abbreviateRx.exec(ref); + if (match) { + if (match[1] === "remotes/" && ref.endsWith("/HEAD")) { + return match[2].slice(0, -5); + } else { + return match[2]; + } + } + return ref; +} +async function _currentBranch({ + fs, + gitdir, + fullname = false, + test = false +}) { + const ref = await GitRefManager.resolve({ + fs, + gitdir, + ref: "HEAD", + depth: 2 + }); + if (test) { + try { + await GitRefManager.resolve({ fs, gitdir, ref }); + } catch (_) { + return; + } + } + if (!ref.startsWith("refs/")) + return; + return fullname ? ref : abbreviateRef(ref); +} +function translateSSHtoHTTP(url) { + url = url.replace(/^git@([^:]+):/, "https://$1/"); + url = url.replace(/^ssh:\/\//, "https://"); + return url; +} +function calculateBasicAuthHeader({ username = "", password = "" }) { + return `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`; +} +async function forAwait(iterable, cb) { + const iter = getIterator(iterable); + while (true) { + const { value, done } = await iter.next(); + if (value) + await cb(value); + if (done) + break; + } + if (iter.return) + iter.return(); +} +async function collect(iterable) { + let size = 0; + const buffers = []; + await forAwait(iterable, (value) => { + buffers.push(value); + size += value.byteLength; + }); + const result = new Uint8Array(size); + let nextIndex = 0; + for (const buffer2 of buffers) { + result.set(buffer2, nextIndex); + nextIndex += buffer2.byteLength; + } + return result; +} +function extractAuthFromUrl(url) { + let userpass = url.match(/^https?:\/\/([^/]+)@/); + if (userpass == null) + return { url, auth: {} }; + userpass = userpass[1]; + const [username, password] = userpass.split(":"); + url = url.replace(`${userpass}@`, ""); + return { url, auth: { username, password } }; +} +function padHex(b, n) { + const s = n.toString(16); + return "0".repeat(b - s.length) + s; +} +var GitPktLine = class { + static flush() { + return Buffer.from("0000", "utf8"); + } + static delim() { + return Buffer.from("0001", "utf8"); + } + static encode(line) { + if (typeof line === "string") { + line = Buffer.from(line); + } + const length = line.length + 4; + const hexlength = padHex(4, length); + return Buffer.concat([Buffer.from(hexlength, "utf8"), line]); + } + static streamReader(stream) { + const reader = new StreamReader(stream); + return async function read() { + try { + let length = await reader.read(4); + if (length == null) + return true; + length = parseInt(length.toString("utf8"), 16); + if (length === 0) + return null; + if (length === 1) + return null; + const buffer2 = await reader.read(length - 4); + if (buffer2 == null) + return true; + return buffer2; + } catch (err) { + stream.error = err; + return true; + } + }; + } +}; +async function parseCapabilitiesV2(read) { + const capabilities2 = {}; + let line; + while (true) { + line = await read(); + if (line === true) + break; + if (line === null) + continue; + line = line.toString("utf8").replace(/\n$/, ""); + const i = line.indexOf("="); + if (i > -1) { + const key2 = line.slice(0, i); + const value = line.slice(i + 1); + capabilities2[key2] = value; + } else { + capabilities2[line] = true; + } + } + return { protocolVersion: 2, capabilities2 }; +} +async function parseRefsAdResponse(stream, { service }) { + const capabilities = /* @__PURE__ */ new Set(); + const refs = /* @__PURE__ */ new Map(); + const symrefs = /* @__PURE__ */ new Map(); + const read = GitPktLine.streamReader(stream); + let lineOne = await read(); + while (lineOne === null) + lineOne = await read(); + if (lineOne === true) + throw new EmptyServerResponseError(); + if (lineOne.includes("version 2")) { + return parseCapabilitiesV2(read); + } + if (lineOne.toString("utf8").replace(/\n$/, "") !== `# service=${service}`) { + throw new ParseError(`# service=${service}\\n`, lineOne.toString("utf8")); + } + let lineTwo = await read(); + while (lineTwo === null) + lineTwo = await read(); + if (lineTwo === true) + return { capabilities, refs, symrefs }; + lineTwo = lineTwo.toString("utf8"); + if (lineTwo.includes("version 2")) { + return parseCapabilitiesV2(read); + } + const [firstRef, capabilitiesLine] = splitAndAssert(lineTwo, "\0", "\\x00"); + capabilitiesLine.split(" ").map((x) => capabilities.add(x)); + const [ref, name] = splitAndAssert(firstRef, " ", " "); + refs.set(name, ref); + while (true) { + const line = await read(); + if (line === true) + break; + if (line !== null) { + const [ref2, name2] = splitAndAssert(line.toString("utf8"), " ", " "); + refs.set(name2, ref2); + } + } + for (const cap of capabilities) { + if (cap.startsWith("symref=")) { + const m = cap.match(/symref=([^:]+):(.*)/); + if (m.length === 3) { + symrefs.set(m[1], m[2]); + } + } + } + return { protocolVersion: 1, capabilities, refs, symrefs }; +} +function splitAndAssert(line, sep2, expected) { + const split = line.trim().split(sep2); + if (split.length !== 2) { + throw new ParseError( + `Two strings separated by '${expected}'`, + line.toString("utf8") + ); + } + return split; +} +var corsProxify = (corsProxy, url) => corsProxy.endsWith("?") ? `${corsProxy}${url}` : `${corsProxy}/${url.replace(/^https?:\/\//, "")}`; +var updateHeaders = (headers, auth) => { + if (auth.username || auth.password) { + headers.Authorization = calculateBasicAuthHeader(auth); + } + if (auth.headers) { + Object.assign(headers, auth.headers); + } +}; +var stringifyBody = async (res) => { + try { + const data = Buffer.from(await collect(res.body)); + const response = data.toString("utf8"); + const preview = response.length < 256 ? response : response.slice(0, 256) + "..."; + return { preview, response, data }; + } catch (e) { + return {}; + } +}; +var GitRemoteHTTP = class { + static async capabilities() { + return ["discover", "connect"]; + } + /** + * @param {Object} args + * @param {HttpClient} args.http + * @param {ProgressCallback} [args.onProgress] + * @param {AuthCallback} [args.onAuth] + * @param {AuthFailureCallback} [args.onAuthFailure] + * @param {AuthSuccessCallback} [args.onAuthSuccess] + * @param {string} [args.corsProxy] + * @param {string} args.service + * @param {string} args.url + * @param {Object} args.headers + * @param {1 | 2} args.protocolVersion - Git Protocol Version + */ + static async discover({ + http, + onProgress, + onAuth, + onAuthSuccess, + onAuthFailure, + corsProxy, + service, + url: _origUrl, + headers, + protocolVersion + }) { + let { url, auth } = extractAuthFromUrl(_origUrl); + const proxifiedURL = corsProxy ? corsProxify(corsProxy, url) : url; + if (auth.username || auth.password) { + headers.Authorization = calculateBasicAuthHeader(auth); + } + if (protocolVersion === 2) { + headers["Git-Protocol"] = "version=2"; + } + let res; + let tryAgain; + let providedAuthBefore = false; + do { + res = await http.request({ + onProgress, + method: "GET", + url: `${proxifiedURL}/info/refs?service=${service}`, + headers + }); + tryAgain = false; + if (res.statusCode === 401 || res.statusCode === 203) { + const getAuth = providedAuthBefore ? onAuthFailure : onAuth; + if (getAuth) { + auth = await getAuth(url, { + ...auth, + headers: { ...headers } + }); + if (auth && auth.cancel) { + throw new UserCanceledError(); + } else if (auth) { + updateHeaders(headers, auth); + providedAuthBefore = true; + tryAgain = true; + } + } + } else if (res.statusCode === 200 && providedAuthBefore && onAuthSuccess) { + await onAuthSuccess(url, auth); + } + } while (tryAgain); + if (res.statusCode !== 200) { + const { response } = await stringifyBody(res); + throw new HttpError(res.statusCode, res.statusMessage, response); + } + if (res.headers["content-type"] === `application/x-${service}-advertisement`) { + const remoteHTTP = await parseRefsAdResponse(res.body, { service }); + remoteHTTP.auth = auth; + return remoteHTTP; + } else { + const { preview, response, data } = await stringifyBody(res); + try { + const remoteHTTP = await parseRefsAdResponse([data], { service }); + remoteHTTP.auth = auth; + return remoteHTTP; + } catch (e) { + throw new SmartHttpError(preview, response); + } + } + } + /** + * @param {Object} args + * @param {HttpClient} args.http + * @param {ProgressCallback} [args.onProgress] + * @param {string} [args.corsProxy] + * @param {string} args.service + * @param {string} args.url + * @param {Object} [args.headers] + * @param {any} args.body + * @param {any} args.auth + */ + static async connect({ + http, + onProgress, + corsProxy, + service, + url, + auth, + body, + headers + }) { + const urlAuth = extractAuthFromUrl(url); + if (urlAuth) + url = urlAuth.url; + if (corsProxy) + url = corsProxify(corsProxy, url); + headers["content-type"] = `application/x-${service}-request`; + headers.accept = `application/x-${service}-result`; + updateHeaders(headers, auth); + const res = await http.request({ + onProgress, + method: "POST", + url: `${url}/${service}`, + body, + headers + }); + if (res.statusCode !== 200) { + const { response } = stringifyBody(res); + throw new HttpError(res.statusCode, res.statusMessage, response); + } + return res; + } +}; +function parseRemoteUrl({ url }) { + if (url.startsWith("git@")) { + return { + transport: "ssh", + address: url + }; + } + const matches = url.match(/(\w+)(:\/\/|::)(.*)/); + if (matches === null) + return; + if (matches[2] === "://") { + return { + transport: matches[1], + address: matches[0] + }; + } + if (matches[2] === "::") { + return { + transport: matches[1], + address: matches[3] + }; + } +} +var GitRemoteManager = class { + static getRemoteHelperFor({ url }) { + const remoteHelpers = /* @__PURE__ */ new Map(); + remoteHelpers.set("http", GitRemoteHTTP); + remoteHelpers.set("https", GitRemoteHTTP); + const parts = parseRemoteUrl({ url }); + if (!parts) { + throw new UrlParseError(url); + } + if (remoteHelpers.has(parts.transport)) { + return remoteHelpers.get(parts.transport); + } + throw new UnknownTransportError( + url, + parts.transport, + parts.transport === "ssh" ? translateSSHtoHTTP(url) : void 0 + ); + } +}; +var lock$1 = null; +var GitShallowManager = class { + static async read({ fs, gitdir }) { + if (lock$1 === null) + lock$1 = new import_async_lock.default(); + const filepath = join(gitdir, "shallow"); + const oids = /* @__PURE__ */ new Set(); + await lock$1.acquire(filepath, async function() { + const text2 = await fs.read(filepath, { encoding: "utf8" }); + if (text2 === null) + return oids; + if (text2.trim() === "") + return oids; + text2.trim().split("\n").map((oid) => oids.add(oid)); + }); + return oids; + } + static async write({ fs, gitdir, oids }) { + if (lock$1 === null) + lock$1 = new import_async_lock.default(); + const filepath = join(gitdir, "shallow"); + if (oids.size > 0) { + const text2 = [...oids].join("\n") + "\n"; + await lock$1.acquire(filepath, async function() { + await fs.write(filepath, text2, { + encoding: "utf8" + }); + }); + } else { + await lock$1.acquire(filepath, async function() { + await fs.rm(filepath); + }); + } + } +}; +async function hasObjectLoose({ fs, gitdir, oid }) { + const source = `objects/${oid.slice(0, 2)}/${oid.slice(2)}`; + return fs.exists(`${gitdir}/${source}`); +} +async function hasObjectPacked({ + fs, + cache, + gitdir, + oid, + getExternalRefDelta +}) { + let list = await fs.readdir(join(gitdir, "objects/pack")); + list = list.filter((x) => x.endsWith(".idx")); + for (const filename of list) { + const indexFile = `${gitdir}/objects/pack/${filename}`; + const p = await readPackIndex({ + fs, + cache, + filename: indexFile, + getExternalRefDelta + }); + if (p.error) + throw new InternalError(p.error); + if (p.offsets.has(oid)) { + return true; + } + } + return false; +} +async function hasObject({ + fs, + cache, + gitdir, + oid, + format = "content" +}) { + const getExternalRefDelta = (oid2) => _readObject({ fs, cache, gitdir, oid: oid2 }); + let result = await hasObjectLoose({ fs, gitdir, oid }); + if (!result) { + result = await hasObjectPacked({ + fs, + cache, + gitdir, + oid, + getExternalRefDelta + }); + } + return result; +} +function emptyPackfile(pack) { + const pheader = "5041434b"; + const version2 = "00000002"; + const obCount = "00000000"; + const header = pheader + version2 + obCount; + return pack.slice(0, 12).toString("hex") === header; +} +function filterCapabilities(server, client) { + const serverNames = server.map((cap) => cap.split("=", 1)[0]); + return client.filter((cap) => { + const name = cap.split("=", 1)[0]; + return serverNames.includes(name); + }); +} +var pkg = { + name: "isomorphic-git", + version: "1.25.3", + agent: "git/isomorphic-git@1.25.3" +}; +var FIFO = class { + constructor() { + this._queue = []; + } + write(chunk) { + if (this._ended) { + throw Error("You cannot write to a FIFO that has already been ended!"); + } + if (this._waiting) { + const resolve = this._waiting; + this._waiting = null; + resolve({ value: chunk }); + } else { + this._queue.push(chunk); + } + } + end() { + this._ended = true; + if (this._waiting) { + const resolve = this._waiting; + this._waiting = null; + resolve({ done: true }); + } + } + destroy(err) { + this.error = err; + this.end(); + } + async next() { + if (this._queue.length > 0) { + return { value: this._queue.shift() }; + } + if (this._ended) { + return { done: true }; + } + if (this._waiting) { + throw Error( + "You cannot call read until the previous call to read has returned!" + ); + } + return new Promise((resolve) => { + this._waiting = resolve; + }); + } +}; +function findSplit(str) { + const r = str.indexOf("\r"); + const n = str.indexOf("\n"); + if (r === -1 && n === -1) + return -1; + if (r === -1) + return n + 1; + if (n === -1) + return r + 1; + if (n === r + 1) + return n + 1; + return Math.min(r, n) + 1; +} +function splitLines(input) { + const output = new FIFO(); + let tmp = ""; + (async () => { + await forAwait(input, (chunk) => { + chunk = chunk.toString("utf8"); + tmp += chunk; + while (true) { + const i = findSplit(tmp); + if (i === -1) + break; + output.write(tmp.slice(0, i)); + tmp = tmp.slice(i); + } + }); + if (tmp.length > 0) { + output.write(tmp); + } + output.end(); + })(); + return output; +} +var GitSideBand = class { + static demux(input) { + const read = GitPktLine.streamReader(input); + const packetlines = new FIFO(); + const packfile = new FIFO(); + const progress = new FIFO(); + const nextBit = async function() { + const line = await read(); + if (line === null) + return nextBit(); + if (line === true) { + packetlines.end(); + progress.end(); + input.error ? packfile.destroy(input.error) : packfile.end(); + return; + } + switch (line[0]) { + case 1: { + packfile.write(line.slice(1)); + break; + } + case 2: { + progress.write(line.slice(1)); + break; + } + case 3: { + const error = line.slice(1); + progress.write(error); + packetlines.end(); + progress.end(); + packfile.destroy(new Error(error.toString("utf8"))); + return; + } + default: { + packetlines.write(line); + } + } + nextBit(); + }; + nextBit(); + return { + packetlines, + packfile, + progress + }; + } + // static mux ({ + // protocol, // 'side-band' or 'side-band-64k' + // packetlines, + // packfile, + // progress, + // error + // }) { + // const MAX_PACKET_LENGTH = protocol === 'side-band-64k' ? 999 : 65519 + // let output = new PassThrough() + // packetlines.on('data', data => { + // if (data === null) { + // output.write(GitPktLine.flush()) + // } else { + // output.write(GitPktLine.encode(data)) + // } + // }) + // let packfileWasEmpty = true + // let packfileEnded = false + // let progressEnded = false + // let errorEnded = false + // let goodbye = Buffer.concat([ + // GitPktLine.encode(Buffer.from('010A', 'hex')), + // GitPktLine.flush() + // ]) + // packfile + // .on('data', data => { + // packfileWasEmpty = false + // const buffers = splitBuffer(data, MAX_PACKET_LENGTH) + // for (const buffer of buffers) { + // output.write( + // GitPktLine.encode(Buffer.concat([Buffer.from('01', 'hex'), buffer])) + // ) + // } + // }) + // .on('end', () => { + // packfileEnded = true + // if (!packfileWasEmpty) output.write(goodbye) + // if (progressEnded && errorEnded) output.end() + // }) + // progress + // .on('data', data => { + // const buffers = splitBuffer(data, MAX_PACKET_LENGTH) + // for (const buffer of buffers) { + // output.write( + // GitPktLine.encode(Buffer.concat([Buffer.from('02', 'hex'), buffer])) + // ) + // } + // }) + // .on('end', () => { + // progressEnded = true + // if (packfileEnded && errorEnded) output.end() + // }) + // error + // .on('data', data => { + // const buffers = splitBuffer(data, MAX_PACKET_LENGTH) + // for (const buffer of buffers) { + // output.write( + // GitPktLine.encode(Buffer.concat([Buffer.from('03', 'hex'), buffer])) + // ) + // } + // }) + // .on('end', () => { + // errorEnded = true + // if (progressEnded && packfileEnded) output.end() + // }) + // return output + // } +}; +async function parseUploadPackResponse(stream) { + const { packetlines, packfile, progress } = GitSideBand.demux(stream); + const shallows = []; + const unshallows = []; + const acks = []; + let nak = false; + let done = false; + return new Promise((resolve, reject) => { + forAwait(packetlines, (data) => { + const line = data.toString("utf8").trim(); + if (line.startsWith("shallow")) { + const oid = line.slice(-41).trim(); + if (oid.length !== 40) { + reject(new InvalidOidError(oid)); + } + shallows.push(oid); + } else if (line.startsWith("unshallow")) { + const oid = line.slice(-41).trim(); + if (oid.length !== 40) { + reject(new InvalidOidError(oid)); + } + unshallows.push(oid); + } else if (line.startsWith("ACK")) { + const [, oid, status2] = line.split(" "); + acks.push({ oid, status: status2 }); + if (!status2) + done = true; + } else if (line.startsWith("NAK")) { + nak = true; + done = true; + } else { + done = true; + nak = true; + } + if (done) { + stream.error ? reject(stream.error) : resolve({ shallows, unshallows, acks, nak, packfile, progress }); + } + }).finally(() => { + if (!done) { + stream.error ? reject(stream.error) : resolve({ shallows, unshallows, acks, nak, packfile, progress }); + } + }); + }); +} +function writeUploadPackRequest({ + capabilities = [], + wants = [], + haves = [], + shallows = [], + depth = null, + since = null, + exclude = [] +}) { + const packstream = []; + wants = [...new Set(wants)]; + let firstLineCapabilities = ` ${capabilities.join(" ")}`; + for (const oid of wants) { + packstream.push(GitPktLine.encode(`want ${oid}${firstLineCapabilities} +`)); + firstLineCapabilities = ""; + } + for (const oid of shallows) { + packstream.push(GitPktLine.encode(`shallow ${oid} +`)); + } + if (depth !== null) { + packstream.push(GitPktLine.encode(`deepen ${depth} +`)); + } + if (since !== null) { + packstream.push( + GitPktLine.encode(`deepen-since ${Math.floor(since.valueOf() / 1e3)} +`) + ); + } + for (const oid of exclude) { + packstream.push(GitPktLine.encode(`deepen-not ${oid} +`)); + } + packstream.push(GitPktLine.flush()); + for (const oid of haves) { + packstream.push(GitPktLine.encode(`have ${oid} +`)); + } + packstream.push(GitPktLine.encode(`done +`)); + return packstream; +} +async function _fetch({ + fs, + cache, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + gitdir, + ref: _ref, + remoteRef: _remoteRef, + remote: _remote, + url: _url, + corsProxy, + depth = null, + since = null, + exclude = [], + relative: relative2 = false, + tags = false, + singleBranch = false, + headers = {}, + prune = false, + pruneTags = false +}) { + const ref = _ref || await _currentBranch({ fs, gitdir, test: true }); + const config = await GitConfigManager.get({ fs, gitdir }); + const remote = _remote || ref && await config.get(`branch.${ref}.remote`) || "origin"; + const url = _url || await config.get(`remote.${remote}.url`); + if (typeof url === "undefined") { + throw new MissingParameterError("remote OR url"); + } + const remoteRef = _remoteRef || ref && await config.get(`branch.${ref}.merge`) || _ref || "HEAD"; + if (corsProxy === void 0) { + corsProxy = await config.get("http.corsProxy"); + } + const GitRemoteHTTP2 = GitRemoteManager.getRemoteHelperFor({ url }); + const remoteHTTP = await GitRemoteHTTP2.discover({ + http, + onAuth, + onAuthSuccess, + onAuthFailure, + corsProxy, + service: "git-upload-pack", + url, + headers, + protocolVersion: 1 + }); + const auth = remoteHTTP.auth; + const remoteRefs = remoteHTTP.refs; + if (remoteRefs.size === 0) { + return { + defaultBranch: null, + fetchHead: null, + fetchHeadDescription: null + }; + } + if (depth !== null && !remoteHTTP.capabilities.has("shallow")) { + throw new RemoteCapabilityError("shallow", "depth"); + } + if (since !== null && !remoteHTTP.capabilities.has("deepen-since")) { + throw new RemoteCapabilityError("deepen-since", "since"); + } + if (exclude.length > 0 && !remoteHTTP.capabilities.has("deepen-not")) { + throw new RemoteCapabilityError("deepen-not", "exclude"); + } + if (relative2 === true && !remoteHTTP.capabilities.has("deepen-relative")) { + throw new RemoteCapabilityError("deepen-relative", "relative"); + } + const { oid, fullref } = GitRefManager.resolveAgainstMap({ + ref: remoteRef, + map: remoteRefs + }); + for (const remoteRef2 of remoteRefs.keys()) { + if (remoteRef2 === fullref || remoteRef2 === "HEAD" || remoteRef2.startsWith("refs/heads/") || tags && remoteRef2.startsWith("refs/tags/")) { + continue; + } + remoteRefs.delete(remoteRef2); + } + const capabilities = filterCapabilities( + [...remoteHTTP.capabilities], + [ + "multi_ack_detailed", + "no-done", + "side-band-64k", + // Note: I removed 'thin-pack' option since our code doesn't "fatten" packfiles, + // which is necessary for compatibility with git. It was the cause of mysterious + // 'fatal: pack has [x] unresolved deltas' errors that plagued us for some time. + // isomorphic-git is perfectly happy with thin packfiles in .git/objects/pack but + // canonical git it turns out is NOT. + "ofs-delta", + `agent=${pkg.agent}` + ] + ); + if (relative2) + capabilities.push("deepen-relative"); + const wants = singleBranch ? [oid] : remoteRefs.values(); + const haveRefs = singleBranch ? [ref] : await GitRefManager.listRefs({ + fs, + gitdir, + filepath: `refs` + }); + let haves = []; + for (let ref2 of haveRefs) { + try { + ref2 = await GitRefManager.expand({ fs, gitdir, ref: ref2 }); + const oid2 = await GitRefManager.resolve({ fs, gitdir, ref: ref2 }); + if (await hasObject({ fs, cache, gitdir, oid: oid2 })) { + haves.push(oid2); + } + } catch (err) { + } + } + haves = [...new Set(haves)]; + const oids = await GitShallowManager.read({ fs, gitdir }); + const shallows = remoteHTTP.capabilities.has("shallow") ? [...oids] : []; + const packstream = writeUploadPackRequest({ + capabilities, + wants, + haves, + shallows, + depth, + since, + exclude + }); + const packbuffer = Buffer.from(await collect(packstream)); + const raw = await GitRemoteHTTP2.connect({ + http, + onProgress, + corsProxy, + service: "git-upload-pack", + url, + auth, + body: [packbuffer], + headers + }); + const response = await parseUploadPackResponse(raw.body); + if (raw.headers) { + response.headers = raw.headers; + } + for (const oid2 of response.shallows) { + if (!oids.has(oid2)) { + try { + const { object } = await _readObject({ fs, cache, gitdir, oid: oid2 }); + const commit2 = new GitCommit(object); + const hasParents = await Promise.all( + commit2.headers().parent.map((oid3) => hasObject({ fs, cache, gitdir, oid: oid3 })) + ); + const haveAllParents = hasParents.length === 0 || hasParents.every((has) => has); + if (!haveAllParents) { + oids.add(oid2); + } + } catch (err) { + oids.add(oid2); + } + } + } + for (const oid2 of response.unshallows) { + oids.delete(oid2); + } + await GitShallowManager.write({ fs, gitdir, oids }); + if (singleBranch) { + const refs = /* @__PURE__ */ new Map([[fullref, oid]]); + const symrefs = /* @__PURE__ */ new Map(); + let bail = 10; + let key2 = fullref; + while (bail--) { + const value = remoteHTTP.symrefs.get(key2); + if (value === void 0) + break; + symrefs.set(key2, value); + key2 = value; + } + const realRef = remoteRefs.get(key2); + if (realRef) { + refs.set(key2, realRef); + } + const { pruned } = await GitRefManager.updateRemoteRefs({ + fs, + gitdir, + remote, + refs, + symrefs, + tags, + prune + }); + if (prune) { + response.pruned = pruned; + } + } else { + const { pruned } = await GitRefManager.updateRemoteRefs({ + fs, + gitdir, + remote, + refs: remoteRefs, + symrefs: remoteHTTP.symrefs, + tags, + prune, + pruneTags + }); + if (prune) { + response.pruned = pruned; + } + } + response.HEAD = remoteHTTP.symrefs.get("HEAD"); + if (response.HEAD === void 0) { + const { oid: oid2 } = GitRefManager.resolveAgainstMap({ + ref: "HEAD", + map: remoteRefs + }); + for (const [key2, value] of remoteRefs.entries()) { + if (key2 !== "HEAD" && value === oid2) { + response.HEAD = key2; + break; + } + } + } + const noun = fullref.startsWith("refs/tags") ? "tag" : "branch"; + response.FETCH_HEAD = { + oid, + description: `${noun} '${abbreviateRef(fullref)}' of ${url}` + }; + if (onProgress || onMessage) { + const lines = splitLines(response.progress); + forAwait(lines, async (line) => { + if (onMessage) + await onMessage(line); + if (onProgress) { + const matches = line.match(/([^:]*).*\((\d+?)\/(\d+?)\)/); + if (matches) { + await onProgress({ + phase: matches[1].trim(), + loaded: parseInt(matches[2], 10), + total: parseInt(matches[3], 10) + }); + } + } + }); + } + const packfile = Buffer.from(await collect(response.packfile)); + if (raw.body.error) + throw raw.body.error; + const packfileSha = packfile.slice(-20).toString("hex"); + const res = { + defaultBranch: response.HEAD, + fetchHead: response.FETCH_HEAD.oid, + fetchHeadDescription: response.FETCH_HEAD.description + }; + if (response.headers) { + res.headers = response.headers; + } + if (prune) { + res.pruned = response.pruned; + } + if (packfileSha !== "" && !emptyPackfile(packfile)) { + res.packfile = `objects/pack/pack-${packfileSha}.pack`; + const fullpath = join(gitdir, res.packfile); + await fs.write(fullpath, packfile); + const getExternalRefDelta = (oid2) => _readObject({ fs, cache, gitdir, oid: oid2 }); + const idx = await GitPackIndex.fromPack({ + pack: packfile, + getExternalRefDelta, + onProgress + }); + await fs.write(fullpath.replace(/\.pack$/, ".idx"), await idx.toBuffer()); + } + return res; +} +async function _init({ + fs, + bare = false, + dir, + gitdir = bare ? dir : join(dir, ".git"), + defaultBranch = "master" +}) { + if (await fs.exists(gitdir + "/config")) + return; + let folders = [ + "hooks", + "info", + "objects/info", + "objects/pack", + "refs/heads", + "refs/tags" + ]; + folders = folders.map((dir2) => gitdir + "/" + dir2); + for (const folder of folders) { + await fs.mkdir(folder); + } + await fs.write( + gitdir + "/config", + `[core] + repositoryformatversion = 0 + filemode = false + bare = ${bare} +` + (bare ? "" : " logallrefupdates = true\n") + " symlinks = false\n ignorecase = true\n" + ); + await fs.write(gitdir + "/HEAD", `ref: refs/heads/${defaultBranch} +`); +} +async function _clone({ + fs, + cache, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + dir, + gitdir, + url, + corsProxy, + ref, + remote, + depth, + since, + exclude, + relative: relative2, + singleBranch, + noCheckout, + noTags, + headers +}) { + try { + await _init({ fs, gitdir }); + await _addRemote({ fs, gitdir, remote, url, force: false }); + if (corsProxy) { + const config = await GitConfigManager.get({ fs, gitdir }); + await config.set(`http.corsProxy`, corsProxy); + await GitConfigManager.save({ fs, gitdir, config }); + } + const { defaultBranch, fetchHead } = await _fetch({ + fs, + cache, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + gitdir, + ref, + remote, + corsProxy, + depth, + since, + exclude, + relative: relative2, + singleBranch, + headers, + tags: !noTags + }); + if (fetchHead === null) + return; + ref = ref || defaultBranch; + ref = ref.replace("refs/heads/", ""); + await _checkout({ + fs, + cache, + onProgress, + dir, + gitdir, + ref, + remote, + noCheckout + }); + } catch (err) { + await fs.rmdir(gitdir, { recursive: true, maxRetries: 10 }).catch(() => void 0); + throw err; + } +} +async function clone({ + fs, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + dir, + gitdir = join(dir, ".git"), + url, + corsProxy = void 0, + ref = void 0, + remote = "origin", + depth = void 0, + since = void 0, + exclude = [], + relative: relative2 = false, + singleBranch = false, + noCheckout = false, + noTags = false, + headers = {}, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("http", http); + assertParameter("gitdir", gitdir); + if (!noCheckout) { + assertParameter("dir", dir); + } + assertParameter("url", url); + return await _clone({ + fs: new FileSystem(fs), + cache, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + dir, + gitdir, + url, + corsProxy, + ref, + remote, + depth, + since, + exclude, + relative: relative2, + singleBranch, + noCheckout, + noTags, + headers + }); + } catch (err) { + err.caller = "git.clone"; + throw err; + } +} +async function commit({ + fs: _fs, + onSign, + dir, + gitdir = join(dir, ".git"), + message, + author: _author, + committer: _committer, + signingKey, + dryRun = false, + noUpdateBranch = false, + ref, + parent, + tree, + cache = {} +}) { + try { + assertParameter("fs", _fs); + assertParameter("message", message); + if (signingKey) { + assertParameter("onSign", onSign); + } + const fs = new FileSystem(_fs); + const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); + if (!author) + throw new MissingNameError("author"); + const committer = await normalizeCommitterObject({ + fs, + gitdir, + author, + committer: _committer + }); + if (!committer) + throw new MissingNameError("committer"); + return await _commit({ + fs, + cache, + onSign, + gitdir, + message, + author, + committer, + signingKey, + dryRun, + noUpdateBranch, + ref, + parent, + tree + }); + } catch (err) { + err.caller = "git.commit"; + throw err; + } +} +async function currentBranch({ + fs, + dir, + gitdir = join(dir, ".git"), + fullname = false, + test = false +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + return await _currentBranch({ + fs: new FileSystem(fs), + gitdir, + fullname, + test + }); + } catch (err) { + err.caller = "git.currentBranch"; + throw err; + } +} +async function _deleteBranch({ fs, gitdir, ref }) { + ref = ref.startsWith("refs/heads/") ? ref : `refs/heads/${ref}`; + const exist = await GitRefManager.exists({ fs, gitdir, ref }); + if (!exist) { + throw new NotFoundError(ref); + } + const fullRef = await GitRefManager.expand({ fs, gitdir, ref }); + const currentRef = await _currentBranch({ fs, gitdir, fullname: true }); + if (fullRef === currentRef) { + const value = await GitRefManager.resolve({ fs, gitdir, ref: fullRef }); + await GitRefManager.writeRef({ fs, gitdir, ref: "HEAD", value }); + } + await GitRefManager.deleteRef({ fs, gitdir, ref: fullRef }); +} +async function deleteBranch({ + fs, + dir, + gitdir = join(dir, ".git"), + ref +}) { + try { + assertParameter("fs", fs); + assertParameter("ref", ref); + return await _deleteBranch({ + fs: new FileSystem(fs), + gitdir, + ref + }); + } catch (err) { + err.caller = "git.deleteBranch"; + throw err; + } +} +async function deleteRef({ fs, dir, gitdir = join(dir, ".git"), ref }) { + try { + assertParameter("fs", fs); + assertParameter("ref", ref); + await GitRefManager.deleteRef({ fs: new FileSystem(fs), gitdir, ref }); + } catch (err) { + err.caller = "git.deleteRef"; + throw err; + } +} +async function _deleteRemote({ fs, gitdir, remote }) { + const config = await GitConfigManager.get({ fs, gitdir }); + await config.deleteSection("remote", remote); + await GitConfigManager.save({ fs, gitdir, config }); +} +async function deleteRemote({ + fs, + dir, + gitdir = join(dir, ".git"), + remote +}) { + try { + assertParameter("fs", fs); + assertParameter("remote", remote); + return await _deleteRemote({ + fs: new FileSystem(fs), + gitdir, + remote + }); + } catch (err) { + err.caller = "git.deleteRemote"; + throw err; + } +} +async function _deleteTag({ fs, gitdir, ref }) { + ref = ref.startsWith("refs/tags/") ? ref : `refs/tags/${ref}`; + await GitRefManager.deleteRef({ fs, gitdir, ref }); +} +async function deleteTag({ fs, dir, gitdir = join(dir, ".git"), ref }) { + try { + assertParameter("fs", fs); + assertParameter("ref", ref); + return await _deleteTag({ + fs: new FileSystem(fs), + gitdir, + ref + }); + } catch (err) { + err.caller = "git.deleteTag"; + throw err; + } +} +async function expandOidLoose({ fs, gitdir, oid: short }) { + const prefix = short.slice(0, 2); + const objectsSuffixes = await fs.readdir(`${gitdir}/objects/${prefix}`); + return objectsSuffixes.map((suffix) => `${prefix}${suffix}`).filter((_oid) => _oid.startsWith(short)); +} +async function expandOidPacked({ + fs, + cache, + gitdir, + oid: short, + getExternalRefDelta +}) { + const results = []; + let list = await fs.readdir(join(gitdir, "objects/pack")); + list = list.filter((x) => x.endsWith(".idx")); + for (const filename of list) { + const indexFile = `${gitdir}/objects/pack/${filename}`; + const p = await readPackIndex({ + fs, + cache, + filename: indexFile, + getExternalRefDelta + }); + if (p.error) + throw new InternalError(p.error); + for (const oid of p.offsets.keys()) { + if (oid.startsWith(short)) + results.push(oid); + } + } + return results; +} +async function _expandOid({ fs, cache, gitdir, oid: short }) { + const getExternalRefDelta = (oid) => _readObject({ fs, cache, gitdir, oid }); + const results = await expandOidLoose({ fs, gitdir, oid: short }); + const packedOids = await expandOidPacked({ + fs, + cache, + gitdir, + oid: short, + getExternalRefDelta + }); + for (const packedOid of packedOids) { + if (results.indexOf(packedOid) === -1) { + results.push(packedOid); + } + } + if (results.length === 1) { + return results[0]; + } + if (results.length > 1) { + throw new AmbiguousError("oids", short, results); + } + throw new NotFoundError(`an object matching "${short}"`); +} +async function expandOid({ + fs, + dir, + gitdir = join(dir, ".git"), + oid, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("oid", oid); + return await _expandOid({ + fs: new FileSystem(fs), + cache, + gitdir, + oid + }); + } catch (err) { + err.caller = "git.expandOid"; + throw err; + } +} +async function expandRef({ fs, dir, gitdir = join(dir, ".git"), ref }) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("ref", ref); + return await GitRefManager.expand({ + fs: new FileSystem(fs), + gitdir, + ref + }); + } catch (err) { + err.caller = "git.expandRef"; + throw err; + } +} +async function _findMergeBase({ fs, cache, gitdir, oids }) { + const visits = {}; + const passes = oids.length; + let heads = oids.map((oid, index2) => ({ index: index2, oid })); + while (heads.length) { + const result = /* @__PURE__ */ new Set(); + for (const { oid, index: index2 } of heads) { + if (!visits[oid]) + visits[oid] = /* @__PURE__ */ new Set(); + visits[oid].add(index2); + if (visits[oid].size === passes) { + result.add(oid); + } + } + if (result.size > 0) { + return [...result]; + } + const newheads = /* @__PURE__ */ new Map(); + for (const { oid, index: index2 } of heads) { + try { + const { object } = await _readObject({ fs, cache, gitdir, oid }); + const commit2 = GitCommit.from(object); + const { parent } = commit2.parseHeaders(); + for (const oid2 of parent) { + if (!visits[oid2] || !visits[oid2].has(index2)) { + newheads.set(oid2 + ":" + index2, { oid: oid2, index: index2 }); + } + } + } catch (err) { + } + } + heads = Array.from(newheads.values()); + } + return []; +} +var LINEBREAKS = /^.*(\r?\n|$)/gm; +function mergeFile({ branches, contents }) { + const ourName = branches[1]; + const theirName = branches[2]; + const baseContent = contents[0]; + const ourContent = contents[1]; + const theirContent = contents[2]; + const ours = ourContent.match(LINEBREAKS); + const base = baseContent.match(LINEBREAKS); + const theirs = theirContent.match(LINEBREAKS); + const result = (0, import_diff3.default)(ours, base, theirs); + const markerSize = 7; + let mergedText = ""; + let cleanMerge = true; + for (const item of result) { + if (item.ok) { + mergedText += item.ok.join(""); + } + if (item.conflict) { + cleanMerge = false; + mergedText += `${"<".repeat(markerSize)} ${ourName} +`; + mergedText += item.conflict.a.join(""); + mergedText += `${"=".repeat(markerSize)} +`; + mergedText += item.conflict.b.join(""); + mergedText += `${">".repeat(markerSize)} ${theirName} +`; + } + } + return { cleanMerge, mergedText }; +} +async function mergeTree({ + fs, + cache, + dir, + gitdir = join(dir, ".git"), + index: index2, + ourOid, + baseOid, + theirOid, + ourName = "ours", + baseName = "base", + theirName = "theirs", + dryRun = false, + abortOnConflict = true, + mergeDriver +}) { + const ourTree = TREE({ ref: ourOid }); + const baseTree = TREE({ ref: baseOid }); + const theirTree = TREE({ ref: theirOid }); + const unmergedFiles = []; + const bothModified = []; + const deleteByUs = []; + const deleteByTheirs = []; + const results = await _walk({ + fs, + cache, + dir, + gitdir, + trees: [ourTree, baseTree, theirTree], + map: async function(filepath, [ours, base, theirs]) { + const path2 = basename(filepath); + const ourChange = await modified(ours, base); + const theirChange = await modified(theirs, base); + switch (`${ourChange}-${theirChange}`) { + case "false-false": { + return { + mode: await base.mode(), + path: path2, + oid: await base.oid(), + type: await base.type() + }; + } + case "false-true": { + return theirs ? { + mode: await theirs.mode(), + path: path2, + oid: await theirs.oid(), + type: await theirs.type() + } : void 0; + } + case "true-false": { + return ours ? { + mode: await ours.mode(), + path: path2, + oid: await ours.oid(), + type: await ours.type() + } : void 0; + } + case "true-true": { + if (ours && base && theirs && await ours.type() === "blob" && await base.type() === "blob" && await theirs.type() === "blob") { + return mergeBlobs({ + fs, + gitdir, + path: path2, + ours, + base, + theirs, + ourName, + baseName, + theirName, + mergeDriver + }).then(async (r) => { + if (!r.cleanMerge) { + unmergedFiles.push(filepath); + bothModified.push(filepath); + if (!abortOnConflict) { + const baseOid2 = await base.oid(); + const ourOid2 = await ours.oid(); + const theirOid2 = await theirs.oid(); + index2.delete({ filepath }); + index2.insert({ filepath, oid: baseOid2, stage: 1 }); + index2.insert({ filepath, oid: ourOid2, stage: 2 }); + index2.insert({ filepath, oid: theirOid2, stage: 3 }); + } + } else if (!abortOnConflict) { + index2.insert({ filepath, oid: r.mergeResult.oid, stage: 0 }); + } + return r.mergeResult; + }); + } + if (base && !ours && theirs && await base.type() === "blob" && await theirs.type() === "blob") { + unmergedFiles.push(filepath); + deleteByUs.push(filepath); + if (!abortOnConflict) { + const baseOid2 = await base.oid(); + const theirOid2 = await theirs.oid(); + index2.delete({ filepath }); + index2.insert({ filepath, oid: baseOid2, stage: 1 }); + index2.insert({ filepath, oid: theirOid2, stage: 3 }); + } + return { + mode: await theirs.mode(), + oid: await theirs.oid(), + type: "blob", + path: path2 + }; + } + if (base && ours && !theirs && await base.type() === "blob" && await ours.type() === "blob") { + unmergedFiles.push(filepath); + deleteByTheirs.push(filepath); + if (!abortOnConflict) { + const baseOid2 = await base.oid(); + const ourOid2 = await ours.oid(); + index2.delete({ filepath }); + index2.insert({ filepath, oid: baseOid2, stage: 1 }); + index2.insert({ filepath, oid: ourOid2, stage: 2 }); + } + return { + mode: await ours.mode(), + oid: await ours.oid(), + type: "blob", + path: path2 + }; + } + if (base && !ours && !theirs && await base.type() === "blob") { + return void 0; + } + throw new MergeNotSupportedError(); + } + } + }, + /** + * @param {TreeEntry} [parent] + * @param {Array} children + */ + reduce: unmergedFiles.length !== 0 && (!dir || abortOnConflict) ? void 0 : async (parent, children2) => { + const entries = children2.filter(Boolean); + if (!parent) + return; + if (parent && parent.type === "tree" && entries.length === 0) + return; + if (entries.length > 0) { + const tree = new GitTree(entries); + const object = tree.toObject(); + const oid = await _writeObject({ + fs, + gitdir, + type: "tree", + object, + dryRun + }); + parent.oid = oid; + } + return parent; + } + }); + if (unmergedFiles.length !== 0) { + if (dir && !abortOnConflict) { + await _walk({ + fs, + cache, + dir, + gitdir, + trees: [TREE({ ref: results.oid })], + map: async function(filepath, [entry]) { + const path2 = `${dir}/${filepath}`; + if (await entry.type() === "blob") { + const mode = await entry.mode(); + const content = new TextDecoder().decode(await entry.content()); + await fs.write(path2, content, { mode }); + } + return true; + } + }); + } + return new MergeConflictError( + unmergedFiles, + bothModified, + deleteByUs, + deleteByTheirs + ); + } + return results.oid; +} +async function mergeBlobs({ + fs, + gitdir, + path: path2, + ours, + base, + theirs, + ourName, + theirName, + baseName, + dryRun, + mergeDriver = mergeFile +}) { + const type = "blob"; + const mode = await base.mode() === await ours.mode() ? await theirs.mode() : await ours.mode(); + if (await ours.oid() === await theirs.oid()) { + return { + cleanMerge: true, + mergeResult: { mode, path: path2, oid: await ours.oid(), type } + }; + } + if (await ours.oid() === await base.oid()) { + return { + cleanMerge: true, + mergeResult: { mode, path: path2, oid: await theirs.oid(), type } + }; + } + if (await theirs.oid() === await base.oid()) { + return { + cleanMerge: true, + mergeResult: { mode, path: path2, oid: await ours.oid(), type } + }; + } + const ourContent = Buffer.from(await ours.content()).toString("utf8"); + const baseContent = Buffer.from(await base.content()).toString("utf8"); + const theirContent = Buffer.from(await theirs.content()).toString("utf8"); + const { mergedText, cleanMerge } = await mergeDriver({ + branches: [baseName, ourName, theirName], + contents: [baseContent, ourContent, theirContent], + path: path2 + }); + const oid = await _writeObject({ + fs, + gitdir, + type: "blob", + object: Buffer.from(mergedText, "utf8"), + dryRun + }); + return { cleanMerge, mergeResult: { mode, path: path2, oid, type } }; +} +async function _merge({ + fs, + cache, + dir, + gitdir, + ours, + theirs, + fastForward: fastForward2 = true, + fastForwardOnly = false, + dryRun = false, + noUpdateBranch = false, + abortOnConflict = true, + message, + author, + committer, + signingKey, + onSign, + mergeDriver +}) { + if (ours === void 0) { + ours = await _currentBranch({ fs, gitdir, fullname: true }); + } + ours = await GitRefManager.expand({ + fs, + gitdir, + ref: ours + }); + theirs = await GitRefManager.expand({ + fs, + gitdir, + ref: theirs + }); + const ourOid = await GitRefManager.resolve({ + fs, + gitdir, + ref: ours + }); + const theirOid = await GitRefManager.resolve({ + fs, + gitdir, + ref: theirs + }); + const baseOids = await _findMergeBase({ + fs, + cache, + gitdir, + oids: [ourOid, theirOid] + }); + if (baseOids.length !== 1) { + throw new MergeNotSupportedError(); + } + const baseOid = baseOids[0]; + if (baseOid === theirOid) { + return { + oid: ourOid, + alreadyMerged: true + }; + } + if (fastForward2 && baseOid === ourOid) { + if (!dryRun && !noUpdateBranch) { + await GitRefManager.writeRef({ fs, gitdir, ref: ours, value: theirOid }); + } + return { + oid: theirOid, + fastForward: true + }; + } else { + if (fastForwardOnly) { + throw new FastForwardError(); + } + const tree = await GitIndexManager.acquire( + { fs, gitdir, cache, allowUnmerged: false }, + async (index2) => { + return mergeTree({ + fs, + cache, + dir, + gitdir, + index: index2, + ourOid, + theirOid, + baseOid, + ourName: abbreviateRef(ours), + baseName: "base", + theirName: abbreviateRef(theirs), + dryRun, + abortOnConflict, + mergeDriver + }); + } + ); + if (tree instanceof MergeConflictError) + throw tree; + if (!message) { + message = `Merge branch '${abbreviateRef(theirs)}' into ${abbreviateRef( + ours + )}`; + } + const oid = await _commit({ + fs, + cache, + gitdir, + message, + ref: ours, + tree, + parent: [ourOid, theirOid], + author, + committer, + signingKey, + onSign, + dryRun, + noUpdateBranch + }); + return { + oid, + tree, + mergeCommit: true + }; + } +} +async function _pull({ + fs, + cache, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + dir, + gitdir, + ref, + url, + remote, + remoteRef, + prune, + pruneTags, + fastForward: fastForward2, + fastForwardOnly, + corsProxy, + singleBranch, + headers, + author, + committer, + signingKey +}) { + try { + if (!ref) { + const head = await _currentBranch({ fs, gitdir }); + if (!head) { + throw new MissingParameterError("ref"); + } + ref = head; + } + const { fetchHead, fetchHeadDescription } = await _fetch({ + fs, + cache, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + gitdir, + corsProxy, + ref, + url, + remote, + remoteRef, + singleBranch, + headers, + prune, + pruneTags + }); + await _merge({ + fs, + cache, + gitdir, + ours: ref, + theirs: fetchHead, + fastForward: fastForward2, + fastForwardOnly, + message: `Merge ${fetchHeadDescription}`, + author, + committer, + signingKey, + dryRun: false, + noUpdateBranch: false + }); + await _checkout({ + fs, + cache, + onProgress, + dir, + gitdir, + ref, + remote, + noCheckout: false + }); + } catch (err) { + err.caller = "git.pull"; + throw err; + } +} +async function fastForward({ + fs, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + dir, + gitdir = join(dir, ".git"), + ref, + url, + remote, + remoteRef, + corsProxy, + singleBranch, + headers = {}, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("http", http); + assertParameter("gitdir", gitdir); + const thisWillNotBeUsed = { + name: "", + email: "", + timestamp: Date.now(), + timezoneOffset: 0 + }; + return await _pull({ + fs: new FileSystem(fs), + cache, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + dir, + gitdir, + ref, + url, + remote, + remoteRef, + fastForwardOnly: true, + corsProxy, + singleBranch, + headers, + author: thisWillNotBeUsed, + committer: thisWillNotBeUsed + }); + } catch (err) { + err.caller = "git.fastForward"; + throw err; + } +} +async function fetch({ + fs, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + dir, + gitdir = join(dir, ".git"), + ref, + remote, + remoteRef, + url, + corsProxy, + depth = null, + since = null, + exclude = [], + relative: relative2 = false, + tags = false, + singleBranch = false, + headers = {}, + prune = false, + pruneTags = false, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("http", http); + assertParameter("gitdir", gitdir); + return await _fetch({ + fs: new FileSystem(fs), + cache, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + gitdir, + ref, + remote, + remoteRef, + url, + corsProxy, + depth, + since, + exclude, + relative: relative2, + tags, + singleBranch, + headers, + prune, + pruneTags + }); + } catch (err) { + err.caller = "git.fetch"; + throw err; + } +} +async function findMergeBase({ + fs, + dir, + gitdir = join(dir, ".git"), + oids, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("oids", oids); + return await _findMergeBase({ + fs: new FileSystem(fs), + cache, + gitdir, + oids + }); + } catch (err) { + err.caller = "git.findMergeBase"; + throw err; + } +} +async function _findRoot({ fs, filepath }) { + if (await fs.exists(join(filepath, ".git"))) { + return filepath; + } else { + const parent = dirname(filepath); + if (parent === filepath) { + throw new NotFoundError(`git root for ${filepath}`); + } + return _findRoot({ fs, filepath: parent }); + } +} +async function findRoot({ fs, filepath }) { + try { + assertParameter("fs", fs); + assertParameter("filepath", filepath); + return await _findRoot({ fs: new FileSystem(fs), filepath }); + } catch (err) { + err.caller = "git.findRoot"; + throw err; + } +} +async function getConfig({ fs, dir, gitdir = join(dir, ".git"), path: path2 }) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("path", path2); + return await _getConfig({ + fs: new FileSystem(fs), + gitdir, + path: path2 + }); + } catch (err) { + err.caller = "git.getConfig"; + throw err; + } +} +async function _getConfigAll({ fs, gitdir, path: path2 }) { + const config = await GitConfigManager.get({ fs, gitdir }); + return config.getall(path2); +} +async function getConfigAll({ + fs, + dir, + gitdir = join(dir, ".git"), + path: path2 +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("path", path2); + return await _getConfigAll({ + fs: new FileSystem(fs), + gitdir, + path: path2 + }); + } catch (err) { + err.caller = "git.getConfigAll"; + throw err; + } +} +async function getRemoteInfo({ + http, + onAuth, + onAuthSuccess, + onAuthFailure, + corsProxy, + url, + headers = {}, + forPush = false +}) { + try { + assertParameter("http", http); + assertParameter("url", url); + const GitRemoteHTTP2 = GitRemoteManager.getRemoteHelperFor({ url }); + const remote = await GitRemoteHTTP2.discover({ + http, + onAuth, + onAuthSuccess, + onAuthFailure, + corsProxy, + service: forPush ? "git-receive-pack" : "git-upload-pack", + url, + headers, + protocolVersion: 1 + }); + const result = { + capabilities: [...remote.capabilities] + }; + for (const [ref, oid] of remote.refs) { + const parts = ref.split("/"); + const last2 = parts.pop(); + let o = result; + for (const part of parts) { + o[part] = o[part] || {}; + o = o[part]; + } + o[last2] = oid; + } + for (const [symref, ref] of remote.symrefs) { + const parts = symref.split("/"); + const last2 = parts.pop(); + let o = result; + for (const part of parts) { + o[part] = o[part] || {}; + o = o[part]; + } + o[last2] = ref; + } + return result; + } catch (err) { + err.caller = "git.getRemoteInfo"; + throw err; + } +} +function formatInfoRefs(remote, prefix, symrefs, peelTags) { + const refs = []; + for (const [key2, value] of remote.refs) { + if (prefix && !key2.startsWith(prefix)) + continue; + if (key2.endsWith("^{}")) { + if (peelTags) { + const _key = key2.replace("^{}", ""); + const last2 = refs[refs.length - 1]; + const r = last2.ref === _key ? last2 : refs.find((x) => x.ref === _key); + if (r === void 0) { + throw new Error("I did not expect this to happen"); + } + r.peeled = value; + } + continue; + } + const ref = { ref: key2, oid: value }; + if (symrefs) { + if (remote.symrefs.has(key2)) { + ref.target = remote.symrefs.get(key2); + } + } + refs.push(ref); + } + return refs; +} +async function getRemoteInfo2({ + http, + onAuth, + onAuthSuccess, + onAuthFailure, + corsProxy, + url, + headers = {}, + forPush = false, + protocolVersion = 2 +}) { + try { + assertParameter("http", http); + assertParameter("url", url); + const GitRemoteHTTP2 = GitRemoteManager.getRemoteHelperFor({ url }); + const remote = await GitRemoteHTTP2.discover({ + http, + onAuth, + onAuthSuccess, + onAuthFailure, + corsProxy, + service: forPush ? "git-receive-pack" : "git-upload-pack", + url, + headers, + protocolVersion + }); + if (remote.protocolVersion === 2) { + return { + protocolVersion: remote.protocolVersion, + capabilities: remote.capabilities2 + }; + } + const capabilities = {}; + for (const cap of remote.capabilities) { + const [key2, value] = cap.split("="); + if (value) { + capabilities[key2] = value; + } else { + capabilities[key2] = true; + } + } + return { + protocolVersion: 1, + capabilities, + refs: formatInfoRefs(remote, void 0, true, true) + }; + } catch (err) { + err.caller = "git.getRemoteInfo2"; + throw err; + } +} +async function hashObject({ + type, + object, + format = "content", + oid = void 0 +}) { + if (format !== "deflated") { + if (format !== "wrapped") { + object = GitObject.wrap({ type, object }); + } + oid = await shasum(object); + } + return { oid, object }; +} +async function hashBlob({ object }) { + try { + assertParameter("object", object); + if (typeof object === "string") { + object = Buffer.from(object, "utf8"); + } else { + object = Buffer.from(object); + } + const type = "blob"; + const { oid, object: _object } = await hashObject({ + type: "blob", + format: "content", + object + }); + return { oid, type, object: new Uint8Array(_object), format: "wrapped" }; + } catch (err) { + err.caller = "git.hashBlob"; + throw err; + } +} +async function _indexPack({ + fs, + cache, + onProgress, + dir, + gitdir, + filepath +}) { + try { + filepath = join(dir, filepath); + const pack = await fs.read(filepath); + const getExternalRefDelta = (oid) => _readObject({ fs, cache, gitdir, oid }); + const idx = await GitPackIndex.fromPack({ + pack, + getExternalRefDelta, + onProgress + }); + await fs.write(filepath.replace(/\.pack$/, ".idx"), await idx.toBuffer()); + return { + oids: [...idx.hashes] + }; + } catch (err) { + err.caller = "git.indexPack"; + throw err; + } +} +async function indexPack({ + fs, + onProgress, + dir, + gitdir = join(dir, ".git"), + filepath, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("dir", dir); + assertParameter("gitdir", dir); + assertParameter("filepath", filepath); + return await _indexPack({ + fs: new FileSystem(fs), + cache, + onProgress, + dir, + gitdir, + filepath + }); + } catch (err) { + err.caller = "git.indexPack"; + throw err; + } +} +async function init({ + fs, + bare = false, + dir, + gitdir = bare ? dir : join(dir, ".git"), + defaultBranch = "master" +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + if (!bare) { + assertParameter("dir", dir); + } + return await _init({ + fs: new FileSystem(fs), + bare, + dir, + gitdir, + defaultBranch + }); + } catch (err) { + err.caller = "git.init"; + throw err; + } +} +async function _isDescendent({ + fs, + cache, + gitdir, + oid, + ancestor, + depth +}) { + const shallows = await GitShallowManager.read({ fs, gitdir }); + if (!oid) { + throw new MissingParameterError("oid"); + } + if (!ancestor) { + throw new MissingParameterError("ancestor"); + } + if (oid === ancestor) + return false; + const queue = [oid]; + const visited = /* @__PURE__ */ new Set(); + let searchdepth = 0; + while (queue.length) { + if (searchdepth++ === depth) { + throw new MaxDepthError(depth); + } + const oid2 = queue.shift(); + const { type, object } = await _readObject({ + fs, + cache, + gitdir, + oid: oid2 + }); + if (type !== "commit") { + throw new ObjectTypeError(oid2, type, "commit"); + } + const commit2 = GitCommit.from(object).parse(); + for (const parent of commit2.parent) { + if (parent === ancestor) + return true; + } + if (!shallows.has(oid2)) { + for (const parent of commit2.parent) { + if (!visited.has(parent)) { + queue.push(parent); + visited.add(parent); + } + } + } + } + return false; +} +async function isDescendent({ + fs, + dir, + gitdir = join(dir, ".git"), + oid, + ancestor, + depth = -1, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("oid", oid); + assertParameter("ancestor", ancestor); + return await _isDescendent({ + fs: new FileSystem(fs), + cache, + gitdir, + oid, + ancestor, + depth + }); + } catch (err) { + err.caller = "git.isDescendent"; + throw err; + } +} +async function isIgnored({ + fs, + dir, + gitdir = join(dir, ".git"), + filepath +}) { + try { + assertParameter("fs", fs); + assertParameter("dir", dir); + assertParameter("gitdir", gitdir); + assertParameter("filepath", filepath); + return GitIgnoreManager.isIgnored({ + fs: new FileSystem(fs), + dir, + gitdir, + filepath + }); + } catch (err) { + err.caller = "git.isIgnored"; + throw err; + } +} +async function listBranches({ + fs, + dir, + gitdir = join(dir, ".git"), + remote +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + return GitRefManager.listBranches({ + fs: new FileSystem(fs), + gitdir, + remote + }); + } catch (err) { + err.caller = "git.listBranches"; + throw err; + } +} +async function _listFiles({ fs, gitdir, ref, cache }) { + if (ref) { + const oid = await GitRefManager.resolve({ gitdir, fs, ref }); + const filenames = []; + await accumulateFilesFromOid({ + fs, + cache, + gitdir, + oid, + filenames, + prefix: "" + }); + return filenames; + } else { + return GitIndexManager.acquire({ fs, gitdir, cache }, async function(index2) { + return index2.entries.map((x) => x.path); + }); + } +} +async function accumulateFilesFromOid({ + fs, + cache, + gitdir, + oid, + filenames, + prefix +}) { + const { tree } = await _readTree({ fs, cache, gitdir, oid }); + for (const entry of tree) { + if (entry.type === "tree") { + await accumulateFilesFromOid({ + fs, + cache, + gitdir, + oid: entry.oid, + filenames, + prefix: join(prefix, entry.path) + }); + } else { + filenames.push(join(prefix, entry.path)); + } + } +} +async function listFiles({ + fs, + dir, + gitdir = join(dir, ".git"), + ref, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + return await _listFiles({ + fs: new FileSystem(fs), + cache, + gitdir, + ref + }); + } catch (err) { + err.caller = "git.listFiles"; + throw err; + } +} +async function _listNotes({ fs, cache, gitdir, ref }) { + let parent; + try { + parent = await GitRefManager.resolve({ gitdir, fs, ref }); + } catch (err) { + if (err instanceof NotFoundError) { + return []; + } + } + const result = await _readTree({ + fs, + cache, + gitdir, + oid: parent + }); + const notes = result.tree.map((entry) => ({ + target: entry.path, + note: entry.oid + })); + return notes; +} +async function listNotes({ + fs, + dir, + gitdir = join(dir, ".git"), + ref = "refs/notes/commits", + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("ref", ref); + return await _listNotes({ + fs: new FileSystem(fs), + cache, + gitdir, + ref + }); + } catch (err) { + err.caller = "git.listNotes"; + throw err; + } +} +async function _listRemotes({ fs, gitdir }) { + const config = await GitConfigManager.get({ fs, gitdir }); + const remoteNames = await config.getSubsections("remote"); + const remotes = Promise.all( + remoteNames.map(async (remote) => { + const url = await config.get(`remote.${remote}.url`); + return { remote, url }; + }) + ); + return remotes; +} +async function listRemotes({ fs, dir, gitdir = join(dir, ".git") }) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + return await _listRemotes({ + fs: new FileSystem(fs), + gitdir + }); + } catch (err) { + err.caller = "git.listRemotes"; + throw err; + } +} +async function parseListRefsResponse(stream) { + const read = GitPktLine.streamReader(stream); + const refs = []; + let line; + while (true) { + line = await read(); + if (line === true) + break; + if (line === null) + continue; + line = line.toString("utf8").replace(/\n$/, ""); + const [oid, ref, ...attrs] = line.split(" "); + const r = { ref, oid }; + for (const attr2 of attrs) { + const [name, value] = attr2.split(":"); + if (name === "symref-target") { + r.target = value; + } else if (name === "peeled") { + r.peeled = value; + } + } + refs.push(r); + } + return refs; +} +async function writeListRefsRequest({ prefix, symrefs, peelTags }) { + const packstream = []; + packstream.push(GitPktLine.encode("command=ls-refs\n")); + packstream.push(GitPktLine.encode(`agent=${pkg.agent} +`)); + if (peelTags || symrefs || prefix) { + packstream.push(GitPktLine.delim()); + } + if (peelTags) + packstream.push(GitPktLine.encode("peel")); + if (symrefs) + packstream.push(GitPktLine.encode("symrefs")); + if (prefix) + packstream.push(GitPktLine.encode(`ref-prefix ${prefix}`)); + packstream.push(GitPktLine.flush()); + return packstream; +} +async function listServerRefs({ + http, + onAuth, + onAuthSuccess, + onAuthFailure, + corsProxy, + url, + headers = {}, + forPush = false, + protocolVersion = 2, + prefix, + symrefs, + peelTags +}) { + try { + assertParameter("http", http); + assertParameter("url", url); + const remote = await GitRemoteHTTP.discover({ + http, + onAuth, + onAuthSuccess, + onAuthFailure, + corsProxy, + service: forPush ? "git-receive-pack" : "git-upload-pack", + url, + headers, + protocolVersion + }); + if (remote.protocolVersion === 1) { + return formatInfoRefs(remote, prefix, symrefs, peelTags); + } + const body = await writeListRefsRequest({ prefix, symrefs, peelTags }); + const res = await GitRemoteHTTP.connect({ + http, + auth: remote.auth, + headers, + corsProxy, + service: forPush ? "git-receive-pack" : "git-upload-pack", + url, + body + }); + return parseListRefsResponse(res.body); + } catch (err) { + err.caller = "git.listServerRefs"; + throw err; + } +} +async function listTags({ fs, dir, gitdir = join(dir, ".git") }) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + return GitRefManager.listTags({ fs: new FileSystem(fs), gitdir }); + } catch (err) { + err.caller = "git.listTags"; + throw err; + } +} +async function resolveCommit({ fs, cache, gitdir, oid }) { + const { type, object } = await _readObject({ fs, cache, gitdir, oid }); + if (type === "tag") { + oid = GitAnnotatedTag.from(object).parse().object; + return resolveCommit({ fs, cache, gitdir, oid }); + } + if (type !== "commit") { + throw new ObjectTypeError(oid, type, "commit"); + } + return { commit: GitCommit.from(object), oid }; +} +async function _readCommit({ fs, cache, gitdir, oid }) { + const { commit: commit2, oid: commitOid } = await resolveCommit({ + fs, + cache, + gitdir, + oid + }); + const result = { + oid: commitOid, + commit: commit2.parse(), + payload: commit2.withoutSignature() + }; + return result; +} +function compareAge(a, b) { + return a.committer.timestamp - b.committer.timestamp; +} +var EMPTY_OID = "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"; +async function resolveFileIdInTree({ fs, cache, gitdir, oid, fileId }) { + if (fileId === EMPTY_OID) + return; + const _oid = oid; + let filepath; + const result = await resolveTree({ fs, cache, gitdir, oid }); + const tree = result.tree; + if (fileId === result.oid) { + filepath = result.path; + } else { + filepath = await _resolveFileId({ + fs, + cache, + gitdir, + tree, + fileId, + oid: _oid + }); + if (Array.isArray(filepath)) { + if (filepath.length === 0) + filepath = void 0; + else if (filepath.length === 1) + filepath = filepath[0]; + } + } + return filepath; +} +async function _resolveFileId({ + fs, + cache, + gitdir, + tree, + fileId, + oid, + filepaths = [], + parentPath = "" +}) { + const walks = tree.entries().map(function(entry) { + let result; + if (entry.oid === fileId) { + result = join(parentPath, entry.path); + filepaths.push(result); + } else if (entry.type === "tree") { + result = _readObject({ + fs, + cache, + gitdir, + oid: entry.oid + }).then(function({ object }) { + return _resolveFileId({ + fs, + cache, + gitdir, + tree: GitTree.from(object), + fileId, + oid, + filepaths, + parentPath: join(parentPath, entry.path) + }); + }); + } + return result; + }); + await Promise.all(walks); + return filepaths; +} +async function _log({ + fs, + cache, + gitdir, + filepath, + ref, + depth, + since, + force, + follow +}) { + const sinceTimestamp = typeof since === "undefined" ? void 0 : Math.floor(since.valueOf() / 1e3); + const commits = []; + const shallowCommits = await GitShallowManager.read({ fs, gitdir }); + const oid = await GitRefManager.resolve({ fs, gitdir, ref }); + const tips = [await _readCommit({ fs, cache, gitdir, oid })]; + let lastFileOid; + let lastCommit; + let isOk; + function endCommit(commit2) { + if (isOk && filepath) + commits.push(commit2); + } + while (tips.length > 0) { + const commit2 = tips.pop(); + if (sinceTimestamp !== void 0 && commit2.commit.committer.timestamp <= sinceTimestamp) { + break; + } + if (filepath) { + let vFileOid; + try { + vFileOid = await resolveFilepath({ + fs, + cache, + gitdir, + oid: commit2.commit.tree, + filepath + }); + if (lastCommit && lastFileOid !== vFileOid) { + commits.push(lastCommit); + } + lastFileOid = vFileOid; + lastCommit = commit2; + isOk = true; + } catch (e) { + if (e instanceof NotFoundError) { + let found = follow && lastFileOid; + if (found) { + found = await resolveFileIdInTree({ + fs, + cache, + gitdir, + oid: commit2.commit.tree, + fileId: lastFileOid + }); + if (found) { + if (Array.isArray(found)) { + if (lastCommit) { + const lastFound = await resolveFileIdInTree({ + fs, + cache, + gitdir, + oid: lastCommit.commit.tree, + fileId: lastFileOid + }); + if (Array.isArray(lastFound)) { + found = found.filter((p) => lastFound.indexOf(p) === -1); + if (found.length === 1) { + found = found[0]; + filepath = found; + if (lastCommit) + commits.push(lastCommit); + } else { + found = false; + if (lastCommit) + commits.push(lastCommit); + break; + } + } + } + } else { + filepath = found; + if (lastCommit) + commits.push(lastCommit); + } + } + } + if (!found) { + if (isOk && lastFileOid) { + commits.push(lastCommit); + if (!force) + break; + } + if (!force && !follow) + throw e; + } + lastCommit = commit2; + isOk = false; + } else + throw e; + } + } else { + commits.push(commit2); + } + if (depth !== void 0 && commits.length === depth) { + endCommit(commit2); + break; + } + if (!shallowCommits.has(commit2.oid)) { + for (const oid2 of commit2.commit.parent) { + const commit3 = await _readCommit({ fs, cache, gitdir, oid: oid2 }); + if (!tips.map((commit4) => commit4.oid).includes(commit3.oid)) { + tips.push(commit3); + } + } + } + if (tips.length === 0) { + endCommit(commit2); + } + tips.sort((a, b) => compareAge(a.commit, b.commit)); + } + return commits; +} +async function log({ + fs, + dir, + gitdir = join(dir, ".git"), + filepath, + ref = "HEAD", + depth, + since, + // Date + force, + follow, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("ref", ref); + return await _log({ + fs: new FileSystem(fs), + cache, + gitdir, + filepath, + ref, + depth, + since, + force, + follow + }); + } catch (err) { + err.caller = "git.log"; + throw err; + } +} +async function merge({ + fs: _fs, + onSign, + dir, + gitdir = join(dir, ".git"), + ours, + theirs, + fastForward: fastForward2 = true, + fastForwardOnly = false, + dryRun = false, + noUpdateBranch = false, + abortOnConflict = true, + message, + author: _author, + committer: _committer, + signingKey, + cache = {}, + mergeDriver +}) { + try { + assertParameter("fs", _fs); + if (signingKey) { + assertParameter("onSign", onSign); + } + const fs = new FileSystem(_fs); + const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); + if (!author && (!fastForwardOnly || !fastForward2)) { + throw new MissingNameError("author"); + } + const committer = await normalizeCommitterObject({ + fs, + gitdir, + author, + committer: _committer + }); + if (!committer && (!fastForwardOnly || !fastForward2)) { + throw new MissingNameError("committer"); + } + return await _merge({ + fs, + cache, + dir, + gitdir, + ours, + theirs, + fastForward: fastForward2, + fastForwardOnly, + dryRun, + noUpdateBranch, + abortOnConflict, + message, + author, + committer, + signingKey, + onSign, + mergeDriver + }); + } catch (err) { + err.caller = "git.merge"; + throw err; + } +} +var types = { + commit: 16, + tree: 32, + blob: 48, + tag: 64, + ofs_delta: 96, + ref_delta: 112 +}; +async function _pack({ + fs, + cache, + dir, + gitdir = join(dir, ".git"), + oids +}) { + const hash2 = new import_sha1.default(); + const outputStream = []; + function write(chunk, enc) { + const buff = Buffer.from(chunk, enc); + outputStream.push(buff); + hash2.update(buff); + } + async function writeObject2({ stype, object }) { + const type = types[stype]; + let length = object.length; + let multibyte = length > 15 ? 128 : 0; + const lastFour = length & 15; + length = length >>> 4; + let byte = (multibyte | type | lastFour).toString(16); + write(byte, "hex"); + while (multibyte) { + multibyte = length > 127 ? 128 : 0; + byte = multibyte | length & 127; + write(padHex(2, byte), "hex"); + length = length >>> 7; + } + write(Buffer.from(await deflate(object))); + } + write("PACK"); + write("00000002", "hex"); + write(padHex(8, oids.length), "hex"); + for (const oid of oids) { + const { type, object } = await _readObject({ fs, cache, gitdir, oid }); + await writeObject2({ write, object, stype: type }); + } + const digest = hash2.digest(); + outputStream.push(digest); + return outputStream; +} +async function _packObjects({ fs, cache, gitdir, oids, write }) { + const buffers = await _pack({ fs, cache, gitdir, oids }); + const packfile = Buffer.from(await collect(buffers)); + const packfileSha = packfile.slice(-20).toString("hex"); + const filename = `pack-${packfileSha}.pack`; + if (write) { + await fs.write(join(gitdir, `objects/pack/${filename}`), packfile); + return { filename }; + } + return { + filename, + packfile: new Uint8Array(packfile) + }; +} +async function packObjects({ + fs, + dir, + gitdir = join(dir, ".git"), + oids, + write = false, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("oids", oids); + return await _packObjects({ + fs: new FileSystem(fs), + cache, + gitdir, + oids, + write + }); + } catch (err) { + err.caller = "git.packObjects"; + throw err; + } +} +async function pull({ + fs: _fs, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + dir, + gitdir = join(dir, ".git"), + ref, + url, + remote, + remoteRef, + prune = false, + pruneTags = false, + fastForward: fastForward2 = true, + fastForwardOnly = false, + corsProxy, + singleBranch, + headers = {}, + author: _author, + committer: _committer, + signingKey, + cache = {} +}) { + try { + assertParameter("fs", _fs); + assertParameter("gitdir", gitdir); + const fs = new FileSystem(_fs); + const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); + if (!author) + throw new MissingNameError("author"); + const committer = await normalizeCommitterObject({ + fs, + gitdir, + author, + committer: _committer + }); + if (!committer) + throw new MissingNameError("committer"); + return await _pull({ + fs, + cache, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + dir, + gitdir, + ref, + url, + remote, + remoteRef, + fastForward: fastForward2, + fastForwardOnly, + corsProxy, + singleBranch, + headers, + author, + committer, + signingKey, + prune, + pruneTags + }); + } catch (err) { + err.caller = "git.pull"; + throw err; + } +} +async function listCommitsAndTags({ + fs, + cache, + dir, + gitdir = join(dir, ".git"), + start, + finish +}) { + const shallows = await GitShallowManager.read({ fs, gitdir }); + const startingSet = /* @__PURE__ */ new Set(); + const finishingSet = /* @__PURE__ */ new Set(); + for (const ref of start) { + startingSet.add(await GitRefManager.resolve({ fs, gitdir, ref })); + } + for (const ref of finish) { + try { + const oid = await GitRefManager.resolve({ fs, gitdir, ref }); + finishingSet.add(oid); + } catch (err) { + } + } + const visited = /* @__PURE__ */ new Set(); + async function walk2(oid) { + visited.add(oid); + const { type, object } = await _readObject({ fs, cache, gitdir, oid }); + if (type === "tag") { + const tag2 = GitAnnotatedTag.from(object); + const commit2 = tag2.headers().object; + return walk2(commit2); + } + if (type !== "commit") { + throw new ObjectTypeError(oid, type, "commit"); + } + if (!shallows.has(oid)) { + const commit2 = GitCommit.from(object); + const parents = commit2.headers().parent; + for (oid of parents) { + if (!finishingSet.has(oid) && !visited.has(oid)) { + await walk2(oid); + } + } + } + } + for (const oid of startingSet) { + await walk2(oid); + } + return visited; +} +async function listObjects({ + fs, + cache, + dir, + gitdir = join(dir, ".git"), + oids +}) { + const visited = /* @__PURE__ */ new Set(); + async function walk2(oid) { + if (visited.has(oid)) + return; + visited.add(oid); + const { type, object } = await _readObject({ fs, cache, gitdir, oid }); + if (type === "tag") { + const tag2 = GitAnnotatedTag.from(object); + const obj = tag2.headers().object; + await walk2(obj); + } else if (type === "commit") { + const commit2 = GitCommit.from(object); + const tree = commit2.headers().tree; + await walk2(tree); + } else if (type === "tree") { + const tree = GitTree.from(object); + for (const entry of tree) { + if (entry.type === "blob") { + visited.add(entry.oid); + } + if (entry.type === "tree") { + await walk2(entry.oid); + } + } + } + } + for (const oid of oids) { + await walk2(oid); + } + return visited; +} +async function parseReceivePackResponse(packfile) { + const result = {}; + let response = ""; + const read = GitPktLine.streamReader(packfile); + let line = await read(); + while (line !== true) { + if (line !== null) + response += line.toString("utf8") + "\n"; + line = await read(); + } + const lines = response.toString("utf8").split("\n"); + line = lines.shift(); + if (!line.startsWith("unpack ")) { + throw new ParseError('unpack ok" or "unpack [error message]', line); + } + result.ok = line === "unpack ok"; + if (!result.ok) { + result.error = line.slice("unpack ".length); + } + result.refs = {}; + for (const line2 of lines) { + if (line2.trim() === "") + continue; + const status2 = line2.slice(0, 2); + const refAndMessage = line2.slice(3); + let space2 = refAndMessage.indexOf(" "); + if (space2 === -1) + space2 = refAndMessage.length; + const ref = refAndMessage.slice(0, space2); + const error = refAndMessage.slice(space2 + 1); + result.refs[ref] = { + ok: status2 === "ok", + error + }; + } + return result; +} +async function writeReceivePackRequest({ + capabilities = [], + triplets = [] +}) { + const packstream = []; + let capsFirstLine = `\0 ${capabilities.join(" ")}`; + for (const trip of triplets) { + packstream.push( + GitPktLine.encode( + `${trip.oldoid} ${trip.oid} ${trip.fullRef}${capsFirstLine} +` + ) + ); + capsFirstLine = ""; + } + packstream.push(GitPktLine.flush()); + return packstream; +} +async function _push({ + fs, + cache, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + gitdir, + ref: _ref, + remoteRef: _remoteRef, + remote, + url: _url, + force = false, + delete: _delete = false, + corsProxy, + headers = {} +}) { + const ref = _ref || await _currentBranch({ fs, gitdir }); + if (typeof ref === "undefined") { + throw new MissingParameterError("ref"); + } + const config = await GitConfigManager.get({ fs, gitdir }); + remote = remote || await config.get(`branch.${ref}.pushRemote`) || await config.get("remote.pushDefault") || await config.get(`branch.${ref}.remote`) || "origin"; + const url = _url || await config.get(`remote.${remote}.pushurl`) || await config.get(`remote.${remote}.url`); + if (typeof url === "undefined") { + throw new MissingParameterError("remote OR url"); + } + const remoteRef = _remoteRef || await config.get(`branch.${ref}.merge`); + if (typeof url === "undefined") { + throw new MissingParameterError("remoteRef"); + } + if (corsProxy === void 0) { + corsProxy = await config.get("http.corsProxy"); + } + const fullRef = await GitRefManager.expand({ fs, gitdir, ref }); + const oid = _delete ? "0000000000000000000000000000000000000000" : await GitRefManager.resolve({ fs, gitdir, ref: fullRef }); + const GitRemoteHTTP2 = GitRemoteManager.getRemoteHelperFor({ url }); + const httpRemote = await GitRemoteHTTP2.discover({ + http, + onAuth, + onAuthSuccess, + onAuthFailure, + corsProxy, + service: "git-receive-pack", + url, + headers, + protocolVersion: 1 + }); + const auth = httpRemote.auth; + let fullRemoteRef; + if (!remoteRef) { + fullRemoteRef = fullRef; + } else { + try { + fullRemoteRef = await GitRefManager.expandAgainstMap({ + ref: remoteRef, + map: httpRemote.refs + }); + } catch (err) { + if (err instanceof NotFoundError) { + fullRemoteRef = remoteRef.startsWith("refs/") ? remoteRef : `refs/heads/${remoteRef}`; + } else { + throw err; + } + } + } + const oldoid = httpRemote.refs.get(fullRemoteRef) || "0000000000000000000000000000000000000000"; + const thinPack = !httpRemote.capabilities.has("no-thin"); + let objects = /* @__PURE__ */ new Set(); + if (!_delete) { + const finish = [...httpRemote.refs.values()]; + let skipObjects = /* @__PURE__ */ new Set(); + if (oldoid !== "0000000000000000000000000000000000000000") { + const mergebase = await _findMergeBase({ + fs, + cache, + gitdir, + oids: [oid, oldoid] + }); + for (const oid2 of mergebase) + finish.push(oid2); + if (thinPack) { + skipObjects = await listObjects({ fs, cache, gitdir, oids: mergebase }); + } + } + if (!finish.includes(oid)) { + const commits = await listCommitsAndTags({ + fs, + cache, + gitdir, + start: [oid], + finish + }); + objects = await listObjects({ fs, cache, gitdir, oids: commits }); + } + if (thinPack) { + try { + const ref2 = await GitRefManager.resolve({ + fs, + gitdir, + ref: `refs/remotes/${remote}/HEAD`, + depth: 2 + }); + const { oid: oid2 } = await GitRefManager.resolveAgainstMap({ + ref: ref2.replace(`refs/remotes/${remote}/`, ""), + fullref: ref2, + map: httpRemote.refs + }); + const oids = [oid2]; + for (const oid3 of await listObjects({ fs, cache, gitdir, oids })) { + skipObjects.add(oid3); + } + } catch (e) { + } + for (const oid2 of skipObjects) { + objects.delete(oid2); + } + } + if (oid === oldoid) + force = true; + if (!force) { + if (fullRef.startsWith("refs/tags") && oldoid !== "0000000000000000000000000000000000000000") { + throw new PushRejectedError("tag-exists"); + } + if (oid !== "0000000000000000000000000000000000000000" && oldoid !== "0000000000000000000000000000000000000000" && !await _isDescendent({ + fs, + cache, + gitdir, + oid, + ancestor: oldoid, + depth: -1 + })) { + throw new PushRejectedError("not-fast-forward"); + } + } + } + const capabilities = filterCapabilities( + [...httpRemote.capabilities], + ["report-status", "side-band-64k", `agent=${pkg.agent}`] + ); + const packstream1 = await writeReceivePackRequest({ + capabilities, + triplets: [{ oldoid, oid, fullRef: fullRemoteRef }] + }); + const packstream2 = _delete ? [] : await _pack({ + fs, + cache, + gitdir, + oids: [...objects] + }); + const res = await GitRemoteHTTP2.connect({ + http, + onProgress, + corsProxy, + service: "git-receive-pack", + url, + auth, + headers, + body: [...packstream1, ...packstream2] + }); + const { packfile, progress } = await GitSideBand.demux(res.body); + if (onMessage) { + const lines = splitLines(progress); + forAwait(lines, async (line) => { + await onMessage(line); + }); + } + const result = await parseReceivePackResponse(packfile); + if (res.headers) { + result.headers = res.headers; + } + if (remote && result.ok && result.refs[fullRemoteRef].ok) { + const ref2 = `refs/remotes/${remote}/${fullRemoteRef.replace( + "refs/heads", + "" + )}`; + if (_delete) { + await GitRefManager.deleteRef({ fs, gitdir, ref: ref2 }); + } else { + await GitRefManager.writeRef({ fs, gitdir, ref: ref2, value: oid }); + } + } + if (result.ok && Object.values(result.refs).every((result2) => result2.ok)) { + return result; + } else { + const prettyDetails = Object.entries(result.refs).filter(([k, v]) => !v.ok).map(([k, v]) => ` + - ${k}: ${v.error}`).join(""); + throw new GitPushError(prettyDetails, result); + } +} +async function push({ + fs, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + dir, + gitdir = join(dir, ".git"), + ref, + remoteRef, + remote = "origin", + url, + force = false, + delete: _delete = false, + corsProxy, + headers = {}, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("http", http); + assertParameter("gitdir", gitdir); + return await _push({ + fs: new FileSystem(fs), + cache, + http, + onProgress, + onMessage, + onAuth, + onAuthSuccess, + onAuthFailure, + gitdir, + ref, + remoteRef, + remote, + url, + force, + delete: _delete, + corsProxy, + headers + }); + } catch (err) { + err.caller = "git.push"; + throw err; + } +} +async function resolveBlob({ fs, cache, gitdir, oid }) { + const { type, object } = await _readObject({ fs, cache, gitdir, oid }); + if (type === "tag") { + oid = GitAnnotatedTag.from(object).parse().object; + return resolveBlob({ fs, cache, gitdir, oid }); + } + if (type !== "blob") { + throw new ObjectTypeError(oid, type, "blob"); + } + return { oid, blob: new Uint8Array(object) }; +} +async function _readBlob({ + fs, + cache, + gitdir, + oid, + filepath = void 0 +}) { + if (filepath !== void 0) { + oid = await resolveFilepath({ fs, cache, gitdir, oid, filepath }); + } + const blob = await resolveBlob({ + fs, + cache, + gitdir, + oid + }); + return blob; +} +async function readBlob({ + fs, + dir, + gitdir = join(dir, ".git"), + oid, + filepath, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("oid", oid); + return await _readBlob({ + fs: new FileSystem(fs), + cache, + gitdir, + oid, + filepath + }); + } catch (err) { + err.caller = "git.readBlob"; + throw err; + } +} +async function readCommit({ + fs, + dir, + gitdir = join(dir, ".git"), + oid, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("oid", oid); + return await _readCommit({ + fs: new FileSystem(fs), + cache, + gitdir, + oid + }); + } catch (err) { + err.caller = "git.readCommit"; + throw err; + } +} +async function _readNote({ + fs, + cache, + gitdir, + ref = "refs/notes/commits", + oid +}) { + const parent = await GitRefManager.resolve({ gitdir, fs, ref }); + const { blob } = await _readBlob({ + fs, + cache, + gitdir, + oid: parent, + filepath: oid + }); + return blob; +} +async function readNote({ + fs, + dir, + gitdir = join(dir, ".git"), + ref = "refs/notes/commits", + oid, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("ref", ref); + assertParameter("oid", oid); + return await _readNote({ + fs: new FileSystem(fs), + cache, + gitdir, + ref, + oid + }); + } catch (err) { + err.caller = "git.readNote"; + throw err; + } +} +async function readObject({ + fs: _fs, + dir, + gitdir = join(dir, ".git"), + oid, + format = "parsed", + filepath = void 0, + encoding = void 0, + cache = {} +}) { + try { + assertParameter("fs", _fs); + assertParameter("gitdir", gitdir); + assertParameter("oid", oid); + const fs = new FileSystem(_fs); + if (filepath !== void 0) { + oid = await resolveFilepath({ + fs, + cache, + gitdir, + oid, + filepath + }); + } + const _format = format === "parsed" ? "content" : format; + const result = await _readObject({ + fs, + cache, + gitdir, + oid, + format: _format + }); + result.oid = oid; + if (format === "parsed") { + result.format = "parsed"; + switch (result.type) { + case "commit": + result.object = GitCommit.from(result.object).parse(); + break; + case "tree": + result.object = GitTree.from(result.object).entries(); + break; + case "blob": + if (encoding) { + result.object = result.object.toString(encoding); + } else { + result.object = new Uint8Array(result.object); + result.format = "content"; + } + break; + case "tag": + result.object = GitAnnotatedTag.from(result.object).parse(); + break; + default: + throw new ObjectTypeError( + result.oid, + result.type, + "blob|commit|tag|tree" + ); + } + } else if (result.format === "deflated" || result.format === "wrapped") { + result.type = result.format; + } + return result; + } catch (err) { + err.caller = "git.readObject"; + throw err; + } +} +async function _readTag({ fs, cache, gitdir, oid }) { + const { type, object } = await _readObject({ + fs, + cache, + gitdir, + oid, + format: "content" + }); + if (type !== "tag") { + throw new ObjectTypeError(oid, type, "tag"); + } + const tag2 = GitAnnotatedTag.from(object); + const result = { + oid, + tag: tag2.parse(), + payload: tag2.payload() + }; + return result; +} +async function readTag({ + fs, + dir, + gitdir = join(dir, ".git"), + oid, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("oid", oid); + return await _readTag({ + fs: new FileSystem(fs), + cache, + gitdir, + oid + }); + } catch (err) { + err.caller = "git.readTag"; + throw err; + } +} +async function readTree({ + fs, + dir, + gitdir = join(dir, ".git"), + oid, + filepath = void 0, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("oid", oid); + return await _readTree({ + fs: new FileSystem(fs), + cache, + gitdir, + oid, + filepath + }); + } catch (err) { + err.caller = "git.readTree"; + throw err; + } +} +async function remove({ + fs: _fs, + dir, + gitdir = join(dir, ".git"), + filepath, + cache = {} +}) { + try { + assertParameter("fs", _fs); + assertParameter("gitdir", gitdir); + assertParameter("filepath", filepath); + await GitIndexManager.acquire( + { fs: new FileSystem(_fs), gitdir, cache }, + async function(index2) { + index2.delete({ filepath }); + } + ); + } catch (err) { + err.caller = "git.remove"; + throw err; + } +} +async function _removeNote({ + fs, + cache, + onSign, + gitdir, + ref = "refs/notes/commits", + oid, + author, + committer, + signingKey +}) { + let parent; + try { + parent = await GitRefManager.resolve({ gitdir, fs, ref }); + } catch (err) { + if (!(err instanceof NotFoundError)) { + throw err; + } + } + const result = await _readTree({ + fs, + gitdir, + oid: parent || "4b825dc642cb6eb9a060e54bf8d69288fbee4904" + }); + let tree = result.tree; + tree = tree.filter((entry) => entry.path !== oid); + const treeOid = await _writeTree({ + fs, + gitdir, + tree + }); + const commitOid = await _commit({ + fs, + cache, + onSign, + gitdir, + ref, + tree: treeOid, + parent: parent && [parent], + message: `Note removed by 'isomorphic-git removeNote' +`, + author, + committer, + signingKey + }); + return commitOid; +} +async function removeNote({ + fs: _fs, + onSign, + dir, + gitdir = join(dir, ".git"), + ref = "refs/notes/commits", + oid, + author: _author, + committer: _committer, + signingKey, + cache = {} +}) { + try { + assertParameter("fs", _fs); + assertParameter("gitdir", gitdir); + assertParameter("oid", oid); + const fs = new FileSystem(_fs); + const author = await normalizeAuthorObject({ fs, gitdir, author: _author }); + if (!author) + throw new MissingNameError("author"); + const committer = await normalizeCommitterObject({ + fs, + gitdir, + author, + committer: _committer + }); + if (!committer) + throw new MissingNameError("committer"); + return await _removeNote({ + fs, + cache, + onSign, + gitdir, + ref, + oid, + author, + committer, + signingKey + }); + } catch (err) { + err.caller = "git.removeNote"; + throw err; + } +} +async function _renameBranch({ + fs, + gitdir, + oldref, + ref, + checkout: checkout2 = false +}) { + if (ref !== import_clean_git_ref.default.clean(ref)) { + throw new InvalidRefNameError(ref, import_clean_git_ref.default.clean(ref)); + } + if (oldref !== import_clean_git_ref.default.clean(oldref)) { + throw new InvalidRefNameError(oldref, import_clean_git_ref.default.clean(oldref)); + } + const fulloldref = `refs/heads/${oldref}`; + const fullnewref = `refs/heads/${ref}`; + const newexist = await GitRefManager.exists({ fs, gitdir, ref: fullnewref }); + if (newexist) { + throw new AlreadyExistsError("branch", ref, false); + } + const value = await GitRefManager.resolve({ + fs, + gitdir, + ref: fulloldref, + depth: 1 + }); + await GitRefManager.writeRef({ fs, gitdir, ref: fullnewref, value }); + await GitRefManager.deleteRef({ fs, gitdir, ref: fulloldref }); + const fullCurrentBranchRef = await _currentBranch({ + fs, + gitdir, + fullname: true + }); + const isCurrentBranch = fullCurrentBranchRef === fulloldref; + if (checkout2 || isCurrentBranch) { + await GitRefManager.writeSymbolicRef({ + fs, + gitdir, + ref: "HEAD", + value: fullnewref + }); + } +} +async function renameBranch({ + fs, + dir, + gitdir = join(dir, ".git"), + ref, + oldref, + checkout: checkout2 = false +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("ref", ref); + assertParameter("oldref", oldref); + return await _renameBranch({ + fs: new FileSystem(fs), + gitdir, + ref, + oldref, + checkout: checkout2 + }); + } catch (err) { + err.caller = "git.renameBranch"; + throw err; + } +} +async function hashObject$1({ gitdir, type, object }) { + return shasum(GitObject.wrap({ type, object })); +} +async function resetIndex({ + fs: _fs, + dir, + gitdir = join(dir, ".git"), + filepath, + ref, + cache = {} +}) { + try { + assertParameter("fs", _fs); + assertParameter("gitdir", gitdir); + assertParameter("filepath", filepath); + const fs = new FileSystem(_fs); + let oid; + let workdirOid; + try { + oid = await GitRefManager.resolve({ fs, gitdir, ref: ref || "HEAD" }); + } catch (e) { + if (ref) { + throw e; + } + } + if (oid) { + try { + oid = await resolveFilepath({ + fs, + cache, + gitdir, + oid, + filepath + }); + } catch (e) { + oid = null; + } + } + let stats = { + ctime: /* @__PURE__ */ new Date(0), + mtime: /* @__PURE__ */ new Date(0), + dev: 0, + ino: 0, + mode: 0, + uid: 0, + gid: 0, + size: 0 + }; + const object = dir && await fs.read(join(dir, filepath)); + if (object) { + workdirOid = await hashObject$1({ + gitdir, + type: "blob", + object + }); + if (oid === workdirOid) { + stats = await fs.lstat(join(dir, filepath)); + } + } + await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index2) { + index2.delete({ filepath }); + if (oid) { + index2.insert({ filepath, stats, oid }); + } + }); + } catch (err) { + err.caller = "git.reset"; + throw err; + } +} +async function resolveRef({ + fs, + dir, + gitdir = join(dir, ".git"), + ref, + depth +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("ref", ref); + const oid = await GitRefManager.resolve({ + fs: new FileSystem(fs), + gitdir, + ref, + depth + }); + return oid; + } catch (err) { + err.caller = "git.resolveRef"; + throw err; + } +} +async function setConfig({ + fs: _fs, + dir, + gitdir = join(dir, ".git"), + path: path2, + value, + append: append3 = false +}) { + try { + assertParameter("fs", _fs); + assertParameter("gitdir", gitdir); + assertParameter("path", path2); + const fs = new FileSystem(_fs); + const config = await GitConfigManager.get({ fs, gitdir }); + if (append3) { + await config.append(path2, value); + } else { + await config.set(path2, value); + } + await GitConfigManager.save({ fs, gitdir, config }); + } catch (err) { + err.caller = "git.setConfig"; + throw err; + } +} +async function status({ + fs: _fs, + dir, + gitdir = join(dir, ".git"), + filepath, + cache = {} +}) { + try { + assertParameter("fs", _fs); + assertParameter("gitdir", gitdir); + assertParameter("filepath", filepath); + const fs = new FileSystem(_fs); + const ignored = await GitIgnoreManager.isIgnored({ + fs, + gitdir, + dir, + filepath + }); + if (ignored) { + return "ignored"; + } + const headTree = await getHeadTree({ fs, cache, gitdir }); + const treeOid = await getOidAtPath({ + fs, + cache, + gitdir, + tree: headTree, + path: filepath + }); + const indexEntry = await GitIndexManager.acquire( + { fs, gitdir, cache }, + async function(index2) { + for (const entry of index2) { + if (entry.path === filepath) + return entry; + } + return null; + } + ); + const stats = await fs.lstat(join(dir, filepath)); + const H = treeOid !== null; + const I = indexEntry !== null; + const W = stats !== null; + const getWorkdirOid = async () => { + if (I && !compareStats(indexEntry, stats)) { + return indexEntry.oid; + } else { + const object = await fs.read(join(dir, filepath)); + const workdirOid = await hashObject$1({ + gitdir, + type: "blob", + object + }); + if (I && indexEntry.oid === workdirOid) { + if (stats.size !== -1) { + GitIndexManager.acquire({ fs, gitdir, cache }, async function(index2) { + index2.insert({ filepath, stats, oid: workdirOid }); + }); + } + } + return workdirOid; + } + }; + if (!H && !W && !I) + return "absent"; + if (!H && !W && I) + return "*absent"; + if (!H && W && !I) + return "*added"; + if (!H && W && I) { + const workdirOid = await getWorkdirOid(); + return workdirOid === indexEntry.oid ? "added" : "*added"; + } + if (H && !W && !I) + return "deleted"; + if (H && !W && I) { + return treeOid === indexEntry.oid ? "*deleted" : "*deleted"; + } + if (H && W && !I) { + const workdirOid = await getWorkdirOid(); + return workdirOid === treeOid ? "*undeleted" : "*undeletemodified"; + } + if (H && W && I) { + const workdirOid = await getWorkdirOid(); + if (workdirOid === treeOid) { + return workdirOid === indexEntry.oid ? "unmodified" : "*unmodified"; + } else { + return workdirOid === indexEntry.oid ? "modified" : "*modified"; + } + } + } catch (err) { + err.caller = "git.status"; + throw err; + } +} +async function getOidAtPath({ fs, cache, gitdir, tree, path: path2 }) { + if (typeof path2 === "string") + path2 = path2.split("/"); + const dirname3 = path2.shift(); + for (const entry of tree) { + if (entry.path === dirname3) { + if (path2.length === 0) { + return entry.oid; + } + const { type, object } = await _readObject({ + fs, + cache, + gitdir, + oid: entry.oid + }); + if (type === "tree") { + const tree2 = GitTree.from(object); + return getOidAtPath({ fs, cache, gitdir, tree: tree2, path: path2 }); + } + if (type === "blob") { + throw new ObjectTypeError(entry.oid, type, "blob", path2.join("/")); + } + } + } + return null; +} +async function getHeadTree({ fs, cache, gitdir }) { + let oid; + try { + oid = await GitRefManager.resolve({ fs, gitdir, ref: "HEAD" }); + } catch (e) { + if (e instanceof NotFoundError) { + return []; + } + } + const { tree } = await _readTree({ fs, cache, gitdir, oid }); + return tree; +} +async function statusMatrix({ + fs: _fs, + dir, + gitdir = join(dir, ".git"), + ref = "HEAD", + filepaths = ["."], + filter, + cache = {}, + ignored: shouldIgnore = false +}) { + try { + assertParameter("fs", _fs); + assertParameter("gitdir", gitdir); + assertParameter("ref", ref); + const fs = new FileSystem(_fs); + return await _walk({ + fs, + cache, + dir, + gitdir, + trees: [TREE({ ref }), WORKDIR(), STAGE()], + map: async function(filepath, [head, workdir, stage]) { + if (!head && !stage && workdir) { + if (!shouldIgnore) { + const isIgnored2 = await GitIgnoreManager.isIgnored({ + fs, + dir, + filepath + }); + if (isIgnored2) { + return null; + } + } + } + if (!filepaths.some((base) => worthWalking(filepath, base))) { + return null; + } + if (filter) { + if (!filter(filepath)) + return; + } + const [headType, workdirType, stageType] = await Promise.all([ + head && head.type(), + workdir && workdir.type(), + stage && stage.type() + ]); + const isBlob = [headType, workdirType, stageType].includes("blob"); + if ((headType === "tree" || headType === "special") && !isBlob) + return; + if (headType === "commit") + return null; + if ((workdirType === "tree" || workdirType === "special") && !isBlob) + return; + if (stageType === "commit") + return null; + if ((stageType === "tree" || stageType === "special") && !isBlob) + return; + const headOid = headType === "blob" ? await head.oid() : void 0; + const stageOid = stageType === "blob" ? await stage.oid() : void 0; + let workdirOid; + if (headType !== "blob" && workdirType === "blob" && stageType !== "blob") { + workdirOid = "42"; + } else if (workdirType === "blob") { + workdirOid = await workdir.oid(); + } + const entry = [void 0, headOid, workdirOid, stageOid]; + const result = entry.map((value) => entry.indexOf(value)); + result.shift(); + return [filepath, ...result]; + } + }); + } catch (err) { + err.caller = "git.statusMatrix"; + throw err; + } +} +async function tag({ + fs: _fs, + dir, + gitdir = join(dir, ".git"), + ref, + object, + force = false +}) { + try { + assertParameter("fs", _fs); + assertParameter("gitdir", gitdir); + assertParameter("ref", ref); + const fs = new FileSystem(_fs); + if (ref === void 0) { + throw new MissingParameterError("ref"); + } + ref = ref.startsWith("refs/tags/") ? ref : `refs/tags/${ref}`; + const value = await GitRefManager.resolve({ + fs, + gitdir, + ref: object || "HEAD" + }); + if (!force && await GitRefManager.exists({ fs, gitdir, ref })) { + throw new AlreadyExistsError("tag", ref); + } + await GitRefManager.writeRef({ fs, gitdir, ref, value }); + } catch (err) { + err.caller = "git.tag"; + throw err; + } +} +async function updateIndex({ + fs: _fs, + dir, + gitdir = join(dir, ".git"), + cache = {}, + filepath, + oid, + mode, + add: add2, + remove: remove3, + force +}) { + try { + assertParameter("fs", _fs); + assertParameter("gitdir", gitdir); + assertParameter("filepath", filepath); + const fs = new FileSystem(_fs); + if (remove3) { + return await GitIndexManager.acquire( + { fs, gitdir, cache }, + async function(index2) { + let fileStats2; + if (!force) { + fileStats2 = await fs.lstat(join(dir, filepath)); + if (fileStats2) { + if (fileStats2.isDirectory()) { + throw new InvalidFilepathError("directory"); + } + return; + } + } + if (index2.has({ filepath })) { + index2.delete({ + filepath + }); + } + } + ); + } + let fileStats; + if (!oid) { + fileStats = await fs.lstat(join(dir, filepath)); + if (!fileStats) { + throw new NotFoundError( + `file at "${filepath}" on disk and "remove" not set` + ); + } + if (fileStats.isDirectory()) { + throw new InvalidFilepathError("directory"); + } + } + return await GitIndexManager.acquire({ fs, gitdir, cache }, async function(index2) { + if (!add2 && !index2.has({ filepath })) { + throw new NotFoundError( + `file at "${filepath}" in index and "add" not set` + ); + } + let stats = { + ctime: /* @__PURE__ */ new Date(0), + mtime: /* @__PURE__ */ new Date(0), + dev: 0, + ino: 0, + mode, + uid: 0, + gid: 0, + size: 0 + }; + if (!oid) { + stats = fileStats; + const object = stats.isSymbolicLink() ? await fs.readlink(join(dir, filepath)) : await fs.read(join(dir, filepath)); + oid = await _writeObject({ + fs, + gitdir, + type: "blob", + format: "content", + object + }); + } + index2.insert({ + filepath, + oid, + stats + }); + return oid; + }); + } catch (err) { + err.caller = "git.updateIndex"; + throw err; + } +} +function version() { + try { + return pkg.version; + } catch (err) { + err.caller = "git.version"; + throw err; + } +} +async function walk({ + fs, + dir, + gitdir = join(dir, ".git"), + trees, + map, + reduce, + iterate, + cache = {} +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("trees", trees); + return await _walk({ + fs: new FileSystem(fs), + cache, + dir, + gitdir, + trees, + map, + reduce, + iterate + }); + } catch (err) { + err.caller = "git.walk"; + throw err; + } +} +async function writeBlob({ fs, dir, gitdir = join(dir, ".git"), blob }) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("blob", blob); + return await _writeObject({ + fs: new FileSystem(fs), + gitdir, + type: "blob", + object: blob, + format: "content" + }); + } catch (err) { + err.caller = "git.writeBlob"; + throw err; + } +} +async function _writeCommit({ fs, gitdir, commit: commit2 }) { + const object = GitCommit.from(commit2).toObject(); + const oid = await _writeObject({ + fs, + gitdir, + type: "commit", + object, + format: "content" + }); + return oid; +} +async function writeCommit({ + fs, + dir, + gitdir = join(dir, ".git"), + commit: commit2 +}) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("commit", commit2); + return await _writeCommit({ + fs: new FileSystem(fs), + gitdir, + commit: commit2 + }); + } catch (err) { + err.caller = "git.writeCommit"; + throw err; + } +} +async function writeObject({ + fs: _fs, + dir, + gitdir = join(dir, ".git"), + type, + object, + format = "parsed", + oid, + encoding = void 0 +}) { + try { + const fs = new FileSystem(_fs); + if (format === "parsed") { + switch (type) { + case "commit": + object = GitCommit.from(object).toObject(); + break; + case "tree": + object = GitTree.from(object).toObject(); + break; + case "blob": + object = Buffer.from(object, encoding); + break; + case "tag": + object = GitAnnotatedTag.from(object).toObject(); + break; + default: + throw new ObjectTypeError(oid || "", type, "blob|commit|tag|tree"); + } + format = "content"; + } + oid = await _writeObject({ + fs, + gitdir, + type, + object, + oid, + format + }); + return oid; + } catch (err) { + err.caller = "git.writeObject"; + throw err; + } +} +async function writeRef({ + fs: _fs, + dir, + gitdir = join(dir, ".git"), + ref, + value, + force = false, + symbolic = false +}) { + try { + assertParameter("fs", _fs); + assertParameter("gitdir", gitdir); + assertParameter("ref", ref); + assertParameter("value", value); + const fs = new FileSystem(_fs); + if (ref !== import_clean_git_ref.default.clean(ref)) { + throw new InvalidRefNameError(ref, import_clean_git_ref.default.clean(ref)); + } + if (!force && await GitRefManager.exists({ fs, gitdir, ref })) { + throw new AlreadyExistsError("ref", ref); + } + if (symbolic) { + await GitRefManager.writeSymbolicRef({ + fs, + gitdir, + ref, + value + }); + } else { + value = await GitRefManager.resolve({ + fs, + gitdir, + ref: value + }); + await GitRefManager.writeRef({ + fs, + gitdir, + ref, + value + }); + } + } catch (err) { + err.caller = "git.writeRef"; + throw err; + } +} +async function _writeTag({ fs, gitdir, tag: tag2 }) { + const object = GitAnnotatedTag.from(tag2).toObject(); + const oid = await _writeObject({ + fs, + gitdir, + type: "tag", + object, + format: "content" + }); + return oid; +} +async function writeTag({ fs, dir, gitdir = join(dir, ".git"), tag: tag2 }) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("tag", tag2); + return await _writeTag({ + fs: new FileSystem(fs), + gitdir, + tag: tag2 + }); + } catch (err) { + err.caller = "git.writeTag"; + throw err; + } +} +async function writeTree({ fs, dir, gitdir = join(dir, ".git"), tree }) { + try { + assertParameter("fs", fs); + assertParameter("gitdir", gitdir); + assertParameter("tree", tree); + return await _writeTree({ + fs: new FileSystem(fs), + gitdir, + tree + }); + } catch (err) { + err.caller = "git.writeTree"; + throw err; + } +} +var index = { + Errors, + STAGE, + TREE, + WORKDIR, + add, + abortMerge, + addNote, + addRemote, + annotatedTag, + branch, + checkout, + clone, + commit, + getConfig, + getConfigAll, + setConfig, + currentBranch, + deleteBranch, + deleteRef, + deleteRemote, + deleteTag, + expandOid, + expandRef, + fastForward, + fetch, + findMergeBase, + findRoot, + getRemoteInfo, + getRemoteInfo2, + hashBlob, + indexPack, + init, + isDescendent, + isIgnored, + listBranches, + listFiles, + listNotes, + listRemotes, + listServerRefs, + listTags, + log, + merge, + packObjects, + pull, + push, + readBlob, + readCommit, + readNote, + readObject, + readTag, + readTree, + remove, + removeNote, + renameBranch, + resetIndex, + updateIndex, + resolveRef, + status, + statusMatrix, + tag, + version, + walk, + writeBlob, + writeCommit, + writeObject, + writeRef, + writeTag, + writeTree +}; +var isomorphic_git_default = index; + +// src/main.ts +var import_obsidian31 = require("obsidian"); + +// src/lineAuthor/lineAuthorIntegration.ts +init_polyfill_buffer(); +var import_obsidian12 = require("obsidian"); + +// src/gitManager/simpleGit.ts +init_polyfill_buffer(); +var import_child_process2 = require("child_process"); +var import_debug2 = __toESM(require_browser()); +var import_obsidian4 = require("obsidian"); +var path = __toESM(require("path")); +var import_path = require("path"); + +// node_modules/.pnpm/github.com+Vinzent03+git-js@6b9a2d899bc8256e38a1d6f0b8a88116ba2bf56a_supports-color@9.4.0_rdkutdaeyye3o67thmklazfzta/node_modules/simple-git/dist/esm/index.js +init_polyfill_buffer(); +var import_file_exists = __toESM(require_dist(), 1); +var import_debug = __toESM(require_browser(), 1); +var import_child_process = require("child_process"); +var import_promise_deferred = __toESM(require_dist2(), 1); +var import_promise_deferred2 = __toESM(require_dist2(), 1); +var __defProp2 = Object.defineProperty; +var __defProps = Object.defineProperties; +var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; +var __getOwnPropNames2 = Object.getOwnPropertyNames; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __hasOwnProp2 = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp2 = (obj, key2, value) => key2 in obj ? __defProp2(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value; +var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp2.call(b, prop)) + __defNormalProp2(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp2(a, prop, b[prop]); + } + return a; +}; +var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); +var __markAsModule = (target) => __defProp2(target, "__esModule", { value: true }); +var __esm2 = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res; +}; +var __commonJS2 = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); +}; +var __reExport = (target, module2, copyDefault, desc) => { + if (module2 && typeof module2 === "object" || typeof module2 === "function") { + for (let key2 of __getOwnPropNames2(module2)) + if (!__hasOwnProp2.call(target, key2) && (copyDefault || key2 !== "default")) + __defProp2(target, key2, { get: () => module2[key2], enumerable: !(desc = __getOwnPropDesc2(module2, key2)) || desc.enumerable }); + } + return target; +}; +var __toCommonJS2 = /* @__PURE__ */ ((cache) => { + return (module2, temp) => { + return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp); + }; +})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0); +var __async = (__this, __arguments, generator) => { + return new Promise((resolve, reject) => { + var fulfilled = (value) => { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + }; + var rejected = (value) => { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + }; + var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); + step((generator = generator.apply(__this, __arguments)).next()); + }); +}; +var GitError; +var init_git_error = __esm2({ + "src/lib/errors/git-error.ts"() { + GitError = class extends Error { + constructor(task, message) { + super(message); + this.task = task; + Object.setPrototypeOf(this, new.target.prototype); + } + }; + } +}); +var GitResponseError; +var init_git_response_error = __esm2({ + "src/lib/errors/git-response-error.ts"() { + init_git_error(); + GitResponseError = class extends GitError { + constructor(git, message) { + super(void 0, message || String(git)); + this.git = git; + } + }; + } +}); +var TaskConfigurationError; +var init_task_configuration_error = __esm2({ + "src/lib/errors/task-configuration-error.ts"() { + init_git_error(); + TaskConfigurationError = class extends GitError { + constructor(message) { + super(void 0, message); + } + }; + } +}); +function asFunction(source) { + return typeof source === "function" ? source : NOOP; +} +function isUserFunction(source) { + return typeof source === "function" && source !== NOOP; +} +function splitOn(input, char) { + const index2 = input.indexOf(char); + if (index2 <= 0) { + return [input, ""]; + } + return [input.substr(0, index2), input.substr(index2 + 1)]; +} +function first(input, offset = 0) { + return isArrayLike(input) && input.length > offset ? input[offset] : void 0; +} +function last(input, offset = 0) { + if (isArrayLike(input) && input.length > offset) { + return input[input.length - 1 - offset]; + } +} +function isArrayLike(input) { + return !!(input && typeof input.length === "number"); +} +function toLinesWithContent(input = "", trimmed2 = true, separator2 = "\n") { + return input.split(separator2).reduce((output, line) => { + const lineContent = trimmed2 ? line.trim() : line; + if (lineContent) { + output.push(lineContent); + } + return output; + }, []); +} +function forEachLineWithContent(input, callback) { + return toLinesWithContent(input, true).map((line) => callback(line)); +} +function folderExists(path2) { + return (0, import_file_exists.exists)(path2, import_file_exists.FOLDER); +} +function append(target, item) { + if (Array.isArray(target)) { + if (!target.includes(item)) { + target.push(item); + } + } else { + target.add(item); + } + return item; +} +function including(target, item) { + if (Array.isArray(target) && !target.includes(item)) { + target.push(item); + } + return target; +} +function remove2(target, item) { + if (Array.isArray(target)) { + const index2 = target.indexOf(item); + if (index2 >= 0) { + target.splice(index2, 1); + } + } else { + target.delete(item); + } + return item; +} +function asArray(source) { + return Array.isArray(source) ? source : [source]; +} +function asStringArray(source) { + return asArray(source).map(String); +} +function asNumber(source, onNaN = 0) { + if (source == null) { + return onNaN; + } + const num2 = parseInt(source, 10); + return isNaN(num2) ? onNaN : num2; +} +function prefixedArray(input, prefix) { + const output = []; + for (let i = 0, max = input.length; i < max; i++) { + output.push(prefix, input[i]); + } + return output; +} +function bufferToString(input) { + return (Array.isArray(input) ? Buffer.concat(input) : input).toString("utf-8"); +} +function pick(source, properties) { + return Object.assign({}, ...properties.map((property) => property in source ? { [property]: source[property] } : {})); +} +function delay(duration = 0) { + return new Promise((done) => setTimeout(done, duration)); +} +var NULL; +var NOOP; +var objectToString; +var init_util = __esm2({ + "src/lib/utils/util.ts"() { + NULL = "\0"; + NOOP = () => { + }; + objectToString = Object.prototype.toString.call.bind(Object.prototype.toString); + } +}); +function filterType(input, filter, def) { + if (filter(input)) { + return input; + } + return arguments.length > 2 ? def : void 0; +} +function filterPrimitives(input, omit) { + return /number|string|boolean/.test(typeof input) && (!omit || !omit.includes(typeof input)); +} +function filterPlainObject(input) { + return !!input && objectToString(input) === "[object Object]"; +} +function filterFunction(input) { + return typeof input === "function"; +} +var filterArray; +var filterString; +var filterStringArray; +var filterStringOrStringArray; +var filterHasLength; +var init_argument_filters = __esm2({ + "src/lib/utils/argument-filters.ts"() { + init_util(); + filterArray = (input) => { + return Array.isArray(input); + }; + filterString = (input) => { + return typeof input === "string"; + }; + filterStringArray = (input) => { + return Array.isArray(input) && input.every(filterString); + }; + filterStringOrStringArray = (input) => { + return filterString(input) || Array.isArray(input) && input.every(filterString); + }; + filterHasLength = (input) => { + if (input == null || "number|boolean|function".includes(typeof input)) { + return false; + } + return Array.isArray(input) || typeof input === "string" || typeof input.length === "number"; + }; + } +}); +var ExitCodes; +var init_exit_codes = __esm2({ + "src/lib/utils/exit-codes.ts"() { + ExitCodes = /* @__PURE__ */ ((ExitCodes2) => { + ExitCodes2[ExitCodes2["SUCCESS"] = 0] = "SUCCESS"; + ExitCodes2[ExitCodes2["ERROR"] = 1] = "ERROR"; + ExitCodes2[ExitCodes2["NOT_FOUND"] = -2] = "NOT_FOUND"; + ExitCodes2[ExitCodes2["UNCLEAN"] = 128] = "UNCLEAN"; + return ExitCodes2; + })(ExitCodes || {}); + } +}); +var GitOutputStreams; +var init_git_output_streams = __esm2({ + "src/lib/utils/git-output-streams.ts"() { + GitOutputStreams = class { + constructor(stdOut, stdErr) { + this.stdOut = stdOut; + this.stdErr = stdErr; + } + asStrings() { + return new GitOutputStreams(this.stdOut.toString("utf8"), this.stdErr.toString("utf8")); + } + }; + } +}); +var LineParser; +var RemoteLineParser; +var init_line_parser = __esm2({ + "src/lib/utils/line-parser.ts"() { + LineParser = class { + constructor(regExp, useMatches) { + this.matches = []; + this.parse = (line, target) => { + this.resetMatches(); + if (!this._regExp.every((reg, index2) => this.addMatch(reg, index2, line(index2)))) { + return false; + } + return this.useMatches(target, this.prepareMatches()) !== false; + }; + this._regExp = Array.isArray(regExp) ? regExp : [regExp]; + if (useMatches) { + this.useMatches = useMatches; + } + } + useMatches(target, match) { + throw new Error(`LineParser:useMatches not implemented`); + } + resetMatches() { + this.matches.length = 0; + } + prepareMatches() { + return this.matches; + } + addMatch(reg, index2, line) { + const matched = line && reg.exec(line); + if (matched) { + this.pushMatch(index2, matched); + } + return !!matched; + } + pushMatch(_index, matched) { + this.matches.push(...matched.slice(1)); + } + }; + RemoteLineParser = class extends LineParser { + addMatch(reg, index2, line) { + return /^remote:\s/.test(String(line)) && super.addMatch(reg, index2, line); + } + pushMatch(index2, matched) { + if (index2 > 0 || matched.length > 1) { + super.pushMatch(index2, matched); + } + } + }; + } +}); +function createInstanceConfig(...options) { + const baseDir = process.cwd(); + const config = Object.assign(__spreadValues({ baseDir }, defaultOptions), ...options.filter((o) => typeof o === "object" && o)); + config.baseDir = config.baseDir || baseDir; + config.trimmed = config.trimmed === true; + return config; +} +var defaultOptions; +var init_simple_git_options = __esm2({ + "src/lib/utils/simple-git-options.ts"() { + defaultOptions = { + binary: "git", + maxConcurrentProcesses: 5, + config: [], + trimmed: false + }; + } +}); +function appendTaskOptions(options, commands2 = []) { + if (!filterPlainObject(options)) { + return commands2; + } + return Object.keys(options).reduce((commands22, key2) => { + const value = options[key2]; + if (filterPrimitives(value, ["boolean"])) { + commands22.push(key2 + "=" + value); + } else { + commands22.push(key2); + } + return commands22; + }, commands2); +} +function getTrailingOptions(args, initialPrimitive = 0, objectOnly = false) { + const command = []; + for (let i = 0, max = initialPrimitive < 0 ? args.length : initialPrimitive; i < max; i++) { + if ("string|number".includes(typeof args[i])) { + command.push(String(args[i])); + } + } + appendTaskOptions(trailingOptionsArgument(args), command); + if (!objectOnly) { + command.push(...trailingArrayArgument(args)); + } + return command; +} +function trailingArrayArgument(args) { + const hasTrailingCallback = typeof last(args) === "function"; + return filterType(last(args, hasTrailingCallback ? 1 : 0), filterArray, []); +} +function trailingOptionsArgument(args) { + const hasTrailingCallback = filterFunction(last(args)); + return filterType(last(args, hasTrailingCallback ? 1 : 0), filterPlainObject); +} +function trailingFunctionArgument(args, includeNoop = true) { + const callback = asFunction(last(args)); + return includeNoop || isUserFunction(callback) ? callback : void 0; +} +var init_task_options = __esm2({ + "src/lib/utils/task-options.ts"() { + init_argument_filters(); + init_util(); + } +}); +function callTaskParser(parser3, streams) { + return parser3(streams.stdOut, streams.stdErr); +} +function parseStringResponse(result, parsers12, texts, trim = true) { + asArray(texts).forEach((text2) => { + for (let lines = toLinesWithContent(text2, trim), i = 0, max = lines.length; i < max; i++) { + const line = (offset = 0) => { + if (i + offset >= max) { + return; + } + return lines[i + offset]; + }; + parsers12.some(({ parse: parse2 }) => parse2(line, result)); + } + }); + return result; +} +var init_task_parser = __esm2({ + "src/lib/utils/task-parser.ts"() { + init_util(); + } +}); +var utils_exports = {}; +__export2(utils_exports, { + ExitCodes: () => ExitCodes, + GitOutputStreams: () => GitOutputStreams, + LineParser: () => LineParser, + NOOP: () => NOOP, + NULL: () => NULL, + RemoteLineParser: () => RemoteLineParser, + append: () => append, + appendTaskOptions: () => appendTaskOptions, + asArray: () => asArray, + asFunction: () => asFunction, + asNumber: () => asNumber, + asStringArray: () => asStringArray, + bufferToString: () => bufferToString, + callTaskParser: () => callTaskParser, + createInstanceConfig: () => createInstanceConfig, + delay: () => delay, + filterArray: () => filterArray, + filterFunction: () => filterFunction, + filterHasLength: () => filterHasLength, + filterPlainObject: () => filterPlainObject, + filterPrimitives: () => filterPrimitives, + filterString: () => filterString, + filterStringArray: () => filterStringArray, + filterStringOrStringArray: () => filterStringOrStringArray, + filterType: () => filterType, + first: () => first, + folderExists: () => folderExists, + forEachLineWithContent: () => forEachLineWithContent, + getTrailingOptions: () => getTrailingOptions, + including: () => including, + isUserFunction: () => isUserFunction, + last: () => last, + objectToString: () => objectToString, + parseStringResponse: () => parseStringResponse, + pick: () => pick, + prefixedArray: () => prefixedArray, + remove: () => remove2, + splitOn: () => splitOn, + toLinesWithContent: () => toLinesWithContent, + trailingFunctionArgument: () => trailingFunctionArgument, + trailingOptionsArgument: () => trailingOptionsArgument +}); +var init_utils = __esm2({ + "src/lib/utils/index.ts"() { + init_argument_filters(); + init_exit_codes(); + init_git_output_streams(); + init_line_parser(); + init_simple_git_options(); + init_task_options(); + init_task_parser(); + init_util(); + } +}); +var check_is_repo_exports = {}; +__export2(check_is_repo_exports, { + CheckRepoActions: () => CheckRepoActions, + checkIsBareRepoTask: () => checkIsBareRepoTask, + checkIsRepoRootTask: () => checkIsRepoRootTask, + checkIsRepoTask: () => checkIsRepoTask +}); +function checkIsRepoTask(action) { + switch (action) { + case "bare": + return checkIsBareRepoTask(); + case "root": + return checkIsRepoRootTask(); + } + const commands2 = ["rev-parse", "--is-inside-work-tree"]; + return { + commands: commands2, + format: "utf-8", + onError, + parser + }; +} +function checkIsRepoRootTask() { + const commands2 = ["rev-parse", "--git-dir"]; + return { + commands: commands2, + format: "utf-8", + onError, + parser(path2) { + return /^\.(git)?$/.test(path2.trim()); + } + }; +} +function checkIsBareRepoTask() { + const commands2 = ["rev-parse", "--is-bare-repository"]; + return { + commands: commands2, + format: "utf-8", + onError, + parser + }; +} +function isNotRepoMessage(error) { + return /(Not a git repository|Kein Git-Repository)/i.test(String(error)); +} +var CheckRepoActions; +var onError; +var parser; +var init_check_is_repo = __esm2({ + "src/lib/tasks/check-is-repo.ts"() { + init_utils(); + CheckRepoActions = /* @__PURE__ */ ((CheckRepoActions2) => { + CheckRepoActions2["BARE"] = "bare"; + CheckRepoActions2["IN_TREE"] = "tree"; + CheckRepoActions2["IS_REPO_ROOT"] = "root"; + return CheckRepoActions2; + })(CheckRepoActions || {}); + onError = ({ exitCode }, error, done, fail) => { + if (exitCode === 128 && isNotRepoMessage(error)) { + return done(Buffer.from("false")); + } + fail(error); + }; + parser = (text2) => { + return text2.trim() === "true"; + }; + } +}); +function cleanSummaryParser(dryRun, text2) { + const summary = new CleanResponse(dryRun); + const regexp = dryRun ? dryRunRemovalRegexp : removalRegexp; + toLinesWithContent(text2).forEach((line) => { + const removed = line.replace(regexp, ""); + summary.paths.push(removed); + (isFolderRegexp.test(removed) ? summary.folders : summary.files).push(removed); + }); + return summary; +} +var CleanResponse; +var removalRegexp; +var dryRunRemovalRegexp; +var isFolderRegexp; +var init_CleanSummary = __esm2({ + "src/lib/responses/CleanSummary.ts"() { + init_utils(); + CleanResponse = class { + constructor(dryRun) { + this.dryRun = dryRun; + this.paths = []; + this.files = []; + this.folders = []; + } + }; + removalRegexp = /^[a-z]+\s*/i; + dryRunRemovalRegexp = /^[a-z]+\s+[a-z]+\s*/i; + isFolderRegexp = /\/$/; + } +}); +var task_exports = {}; +__export2(task_exports, { + EMPTY_COMMANDS: () => EMPTY_COMMANDS, + adhocExecTask: () => adhocExecTask, + configurationErrorTask: () => configurationErrorTask, + isBufferTask: () => isBufferTask, + isEmptyTask: () => isEmptyTask, + straightThroughBufferTask: () => straightThroughBufferTask, + straightThroughStringTask: () => straightThroughStringTask +}); +function adhocExecTask(parser3) { + return { + commands: EMPTY_COMMANDS, + format: "empty", + parser: parser3 + }; +} +function configurationErrorTask(error) { + return { + commands: EMPTY_COMMANDS, + format: "empty", + parser() { + throw typeof error === "string" ? new TaskConfigurationError(error) : error; + } + }; +} +function straightThroughStringTask(commands2, trimmed2 = false) { + return { + commands: commands2, + format: "utf-8", + parser(text2) { + return trimmed2 ? String(text2).trim() : text2; + } + }; +} +function straightThroughBufferTask(commands2) { + return { + commands: commands2, + format: "buffer", + parser(buffer2) { + return buffer2; + } + }; +} +function isBufferTask(task) { + return task.format === "buffer"; +} +function isEmptyTask(task) { + return task.format === "empty" || !task.commands.length; +} +var EMPTY_COMMANDS; +var init_task = __esm2({ + "src/lib/tasks/task.ts"() { + init_task_configuration_error(); + EMPTY_COMMANDS = []; + } +}); +var clean_exports = {}; +__export2(clean_exports, { + CONFIG_ERROR_INTERACTIVE_MODE: () => CONFIG_ERROR_INTERACTIVE_MODE, + CONFIG_ERROR_MODE_REQUIRED: () => CONFIG_ERROR_MODE_REQUIRED, + CONFIG_ERROR_UNKNOWN_OPTION: () => CONFIG_ERROR_UNKNOWN_OPTION, + CleanOptions: () => CleanOptions, + cleanTask: () => cleanTask, + cleanWithOptionsTask: () => cleanWithOptionsTask, + isCleanOptionsArray: () => isCleanOptionsArray +}); +function cleanWithOptionsTask(mode, customArgs) { + const { cleanMode, options, valid } = getCleanOptions(mode); + if (!cleanMode) { + return configurationErrorTask(CONFIG_ERROR_MODE_REQUIRED); + } + if (!valid.options) { + return configurationErrorTask(CONFIG_ERROR_UNKNOWN_OPTION + JSON.stringify(mode)); + } + options.push(...customArgs); + if (options.some(isInteractiveMode)) { + return configurationErrorTask(CONFIG_ERROR_INTERACTIVE_MODE); + } + return cleanTask(cleanMode, options); +} +function cleanTask(mode, customArgs) { + const commands2 = ["clean", `-${mode}`, ...customArgs]; + return { + commands: commands2, + format: "utf-8", + parser(text2) { + return cleanSummaryParser(mode === "n", text2); + } + }; +} +function isCleanOptionsArray(input) { + return Array.isArray(input) && input.every((test) => CleanOptionValues.has(test)); +} +function getCleanOptions(input) { + let cleanMode; + let options = []; + let valid = { cleanMode: false, options: true }; + input.replace(/[^a-z]i/g, "").split("").forEach((char) => { + if (isCleanMode(char)) { + cleanMode = char; + valid.cleanMode = true; + } else { + valid.options = valid.options && isKnownOption(options[options.length] = `-${char}`); + } + }); + return { + cleanMode, + options, + valid + }; +} +function isCleanMode(cleanMode) { + return cleanMode === "f" || cleanMode === "n"; +} +function isKnownOption(option) { + return /^-[a-z]$/i.test(option) && CleanOptionValues.has(option.charAt(1)); +} +function isInteractiveMode(option) { + if (/^-[^\-]/.test(option)) { + return option.indexOf("i") > 0; + } + return option === "--interactive"; +} +var CONFIG_ERROR_INTERACTIVE_MODE; +var CONFIG_ERROR_MODE_REQUIRED; +var CONFIG_ERROR_UNKNOWN_OPTION; +var CleanOptions; +var CleanOptionValues; +var init_clean = __esm2({ + "src/lib/tasks/clean.ts"() { + init_CleanSummary(); + init_utils(); + init_task(); + CONFIG_ERROR_INTERACTIVE_MODE = "Git clean interactive mode is not supported"; + CONFIG_ERROR_MODE_REQUIRED = 'Git clean mode parameter ("n" or "f") is required'; + CONFIG_ERROR_UNKNOWN_OPTION = "Git clean unknown option found in: "; + CleanOptions = /* @__PURE__ */ ((CleanOptions2) => { + CleanOptions2["DRY_RUN"] = "n"; + CleanOptions2["FORCE"] = "f"; + CleanOptions2["IGNORED_INCLUDED"] = "x"; + CleanOptions2["IGNORED_ONLY"] = "X"; + CleanOptions2["EXCLUDING"] = "e"; + CleanOptions2["QUIET"] = "q"; + CleanOptions2["RECURSIVE"] = "d"; + return CleanOptions2; + })(CleanOptions || {}); + CleanOptionValues = /* @__PURE__ */ new Set([ + "i", + ...asStringArray(Object.values(CleanOptions)) + ]); + } +}); +function configListParser(text2) { + const config = new ConfigList(); + for (const item of configParser(text2)) { + config.addValue(item.file, String(item.key), item.value); + } + return config; +} +function configGetParser(text2, key2) { + let value = null; + const values = []; + const scopes = /* @__PURE__ */ new Map(); + for (const item of configParser(text2, key2)) { + if (item.key !== key2) { + continue; + } + values.push(value = item.value); + if (!scopes.has(item.file)) { + scopes.set(item.file, []); + } + scopes.get(item.file).push(value); + } + return { + key: key2, + paths: Array.from(scopes.keys()), + scopes, + value, + values + }; +} +function configFilePath(filePath) { + return filePath.replace(/^(file):/, ""); +} +function* configParser(text2, requestedKey = null) { + const lines = text2.split("\0"); + for (let i = 0, max = lines.length - 1; i < max; ) { + const file = configFilePath(lines[i++]); + let value = lines[i++]; + let key2 = requestedKey; + if (value.includes("\n")) { + const line = splitOn(value, "\n"); + key2 = line[0]; + value = line[1]; + } + yield { file, key: key2, value }; + } +} +var ConfigList; +var init_ConfigList = __esm2({ + "src/lib/responses/ConfigList.ts"() { + init_utils(); + ConfigList = class { + constructor() { + this.files = []; + this.values = /* @__PURE__ */ Object.create(null); + } + get all() { + if (!this._all) { + this._all = this.files.reduce((all, file) => { + return Object.assign(all, this.values[file]); + }, {}); + } + return this._all; + } + addFile(file) { + if (!(file in this.values)) { + const latest = last(this.files); + this.values[file] = latest ? Object.create(this.values[latest]) : {}; + this.files.push(file); + } + return this.values[file]; + } + addValue(file, key2, value) { + const values = this.addFile(file); + if (!values.hasOwnProperty(key2)) { + values[key2] = value; + } else if (Array.isArray(values[key2])) { + values[key2].push(value); + } else { + values[key2] = [values[key2], value]; + } + this._all = void 0; + } + }; + } +}); +function asConfigScope(scope, fallback) { + if (typeof scope === "string" && GitConfigScope.hasOwnProperty(scope)) { + return scope; + } + return fallback; +} +function addConfigTask(key2, value, append22, scope) { + const commands2 = ["config", `--${scope}`]; + if (append22) { + commands2.push("--add"); + } + commands2.push(key2, value); + return { + commands: commands2, + format: "utf-8", + parser(text2) { + return text2; + } + }; +} +function getConfigTask(key2, scope) { + const commands2 = ["config", "--null", "--show-origin", "--get-all", key2]; + if (scope) { + commands2.splice(1, 0, `--${scope}`); + } + return { + commands: commands2, + format: "utf-8", + parser(text2) { + return configGetParser(text2, key2); + } + }; +} +function listConfigTask(scope) { + const commands2 = ["config", "--list", "--show-origin", "--null"]; + if (scope) { + commands2.push(`--${scope}`); + } + return { + commands: commands2, + format: "utf-8", + parser(text2) { + return configListParser(text2); + } + }; +} +function config_default() { + return { + addConfig(key2, value, ...rest) { + return this._runTask(addConfigTask(key2, value, rest[0] === true, asConfigScope( + rest[1], + "local" + /* local */ + )), trailingFunctionArgument(arguments)); + }, + getConfig(key2, scope) { + return this._runTask(getConfigTask(key2, asConfigScope(scope, void 0)), trailingFunctionArgument(arguments)); + }, + listConfig(...rest) { + return this._runTask(listConfigTask(asConfigScope(rest[0], void 0)), trailingFunctionArgument(arguments)); + } + }; +} +var GitConfigScope; +var init_config = __esm2({ + "src/lib/tasks/config.ts"() { + init_ConfigList(); + init_utils(); + GitConfigScope = /* @__PURE__ */ ((GitConfigScope2) => { + GitConfigScope2["system"] = "system"; + GitConfigScope2["global"] = "global"; + GitConfigScope2["local"] = "local"; + GitConfigScope2["worktree"] = "worktree"; + return GitConfigScope2; + })(GitConfigScope || {}); + } +}); +function grepQueryBuilder(...params) { + return new GrepQuery().param(...params); +} +function parseGrep(grep) { + const paths = /* @__PURE__ */ new Set(); + const results = {}; + forEachLineWithContent(grep, (input) => { + const [path2, line, preview] = input.split(NULL); + paths.add(path2); + (results[path2] = results[path2] || []).push({ + line: asNumber(line), + path: path2, + preview + }); + }); + return { + paths, + results + }; +} +function grep_default() { + return { + grep(searchTerm) { + const then = trailingFunctionArgument(arguments); + const options = getTrailingOptions(arguments); + for (const option of disallowedOptions) { + if (options.includes(option)) { + return this._runTask(configurationErrorTask(`git.grep: use of "${option}" is not supported.`), then); + } + } + if (typeof searchTerm === "string") { + searchTerm = grepQueryBuilder().param(searchTerm); + } + const commands2 = ["grep", "--null", "-n", "--full-name", ...options, ...searchTerm]; + return this._runTask({ + commands: commands2, + format: "utf-8", + parser(stdOut) { + return parseGrep(stdOut); + } + }, then); + } + }; +} +var disallowedOptions; +var Query; +var _a; +var GrepQuery; +var init_grep = __esm2({ + "src/lib/tasks/grep.ts"() { + init_utils(); + init_task(); + disallowedOptions = ["-h"]; + Query = Symbol("grepQuery"); + GrepQuery = class { + constructor() { + this[_a] = []; + } + *[(_a = Query, Symbol.iterator)]() { + for (const query of this[Query]) { + yield query; + } + } + and(...and) { + and.length && this[Query].push("--and", "(", ...prefixedArray(and, "-e"), ")"); + return this; + } + param(...param) { + this[Query].push(...prefixedArray(param, "-e")); + return this; + } + }; + } +}); +var reset_exports = {}; +__export2(reset_exports, { + ResetMode: () => ResetMode, + getResetMode: () => getResetMode, + resetTask: () => resetTask +}); +function resetTask(mode, customArgs) { + const commands2 = ["reset"]; + if (isValidResetMode(mode)) { + commands2.push(`--${mode}`); + } + commands2.push(...customArgs); + return straightThroughStringTask(commands2); +} +function getResetMode(mode) { + if (isValidResetMode(mode)) { + return mode; + } + switch (typeof mode) { + case "string": + case "undefined": + return "soft"; + } + return; +} +function isValidResetMode(mode) { + return ResetModes.includes(mode); +} +var ResetMode; +var ResetModes; +var init_reset = __esm2({ + "src/lib/tasks/reset.ts"() { + init_task(); + ResetMode = /* @__PURE__ */ ((ResetMode2) => { + ResetMode2["MIXED"] = "mixed"; + ResetMode2["SOFT"] = "soft"; + ResetMode2["HARD"] = "hard"; + ResetMode2["MERGE"] = "merge"; + ResetMode2["KEEP"] = "keep"; + return ResetMode2; + })(ResetMode || {}); + ResetModes = Array.from(Object.values(ResetMode)); + } +}); +function createLog() { + return (0, import_debug.default)("simple-git"); +} +function prefixedLogger(to, prefix, forward) { + if (!prefix || !String(prefix).replace(/\s*/, "")) { + return !forward ? to : (message, ...args) => { + to(message, ...args); + forward(message, ...args); + }; + } + return (message, ...args) => { + to(`%s ${message}`, prefix, ...args); + if (forward) { + forward(message, ...args); + } + }; +} +function childLoggerName(name, childDebugger, { namespace: parentNamespace }) { + if (typeof name === "string") { + return name; + } + const childNamespace = childDebugger && childDebugger.namespace || ""; + if (childNamespace.startsWith(parentNamespace)) { + return childNamespace.substr(parentNamespace.length + 1); + } + return childNamespace || parentNamespace; +} +function createLogger(label, verbose, initialStep, infoDebugger = createLog()) { + const labelPrefix = label && `[${label}]` || ""; + const spawned = []; + const debugDebugger = typeof verbose === "string" ? infoDebugger.extend(verbose) : verbose; + const key2 = childLoggerName(filterType(verbose, filterString), debugDebugger, infoDebugger); + return step(initialStep); + function sibling(name, initial) { + return append(spawned, createLogger(label, key2.replace(/^[^:]+/, name), initial, infoDebugger)); + } + function step(phase) { + const stepPrefix = phase && `[${phase}]` || ""; + const debug22 = debugDebugger && prefixedLogger(debugDebugger, stepPrefix) || NOOP; + const info = prefixedLogger(infoDebugger, `${labelPrefix} ${stepPrefix}`, debug22); + return Object.assign(debugDebugger ? debug22 : info, { + label, + sibling, + info, + step + }); + } +} +var init_git_logger = __esm2({ + "src/lib/git-logger.ts"() { + init_utils(); + import_debug.default.formatters.L = (value) => String(filterHasLength(value) ? value.length : "-"); + import_debug.default.formatters.B = (value) => { + if (Buffer.isBuffer(value)) { + return value.toString("utf8"); + } + return objectToString(value); + }; + } +}); +var _TasksPendingQueue; +var TasksPendingQueue; +var init_tasks_pending_queue = __esm2({ + "src/lib/runners/tasks-pending-queue.ts"() { + init_git_error(); + init_git_logger(); + _TasksPendingQueue = class { + constructor(logLabel = "GitExecutor") { + this.logLabel = logLabel; + this._queue = /* @__PURE__ */ new Map(); + } + withProgress(task) { + return this._queue.get(task); + } + createProgress(task) { + const name = _TasksPendingQueue.getName(task.commands[0]); + const logger = createLogger(this.logLabel, name); + return { + task, + logger, + name + }; + } + push(task) { + const progress = this.createProgress(task); + progress.logger("Adding task to the queue, commands = %o", task.commands); + this._queue.set(task, progress); + return progress; + } + fatal(err) { + for (const [task, { logger }] of Array.from(this._queue.entries())) { + if (task === err.task) { + logger.info(`Failed %o`, err); + logger(`Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`); + } else { + logger.info(`A fatal exception occurred in a previous task, the queue has been purged: %o`, err.message); + } + this.complete(task); + } + if (this._queue.size !== 0) { + throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`); + } + } + complete(task) { + const progress = this.withProgress(task); + if (progress) { + this._queue.delete(task); + } + } + attempt(task) { + const progress = this.withProgress(task); + if (!progress) { + throw new GitError(void 0, "TasksPendingQueue: attempt called for an unknown task"); + } + progress.logger("Starting task"); + return progress; + } + static getName(name = "empty") { + return `task:${name}:${++_TasksPendingQueue.counter}`; + } + }; + TasksPendingQueue = _TasksPendingQueue; + TasksPendingQueue.counter = 0; + } +}); +function pluginContext(task, commands2) { + return { + method: first(task.commands) || "", + commands: commands2 + }; +} +function onErrorReceived(target, logger) { + return (err) => { + logger(`[ERROR] child process exception %o`, err); + target.push(Buffer.from(String(err.stack), "ascii")); + }; +} +function onDataReceived(target, name, logger, output) { + return (buffer2) => { + logger(`%s received %L bytes`, name, buffer2); + output(`%B`, buffer2); + target.push(buffer2); + }; +} +var GitExecutorChain; +var init_git_executor_chain = __esm2({ + "src/lib/runners/git-executor-chain.ts"() { + init_git_error(); + init_task(); + init_utils(); + init_tasks_pending_queue(); + GitExecutorChain = class { + constructor(_executor, _scheduler, _plugins) { + this._executor = _executor; + this._scheduler = _scheduler; + this._plugins = _plugins; + this._chain = Promise.resolve(); + this._queue = new TasksPendingQueue(); + } + get binary() { + return this._executor.binary; + } + get cwd() { + return this._cwd || this._executor.cwd; + } + set cwd(cwd) { + this._cwd = cwd; + } + get env() { + return this._executor.env; + } + get outputHandler() { + return this._executor.outputHandler; + } + chain() { + return this; + } + push(task) { + this._queue.push(task); + return this._chain = this._chain.then(() => this.attemptTask(task)); + } + attemptTask(task) { + return __async(this, null, function* () { + const onScheduleComplete = yield this._scheduler.next(); + const onQueueComplete = () => this._queue.complete(task); + try { + const { logger } = this._queue.attempt(task); + return yield isEmptyTask(task) ? this.attemptEmptyTask(task, logger) : this.attemptRemoteTask(task, logger); + } catch (e) { + throw this.onFatalException(task, e); + } finally { + onQueueComplete(); + onScheduleComplete(); + } + }); + } + onFatalException(task, e) { + const gitError = e instanceof GitError ? Object.assign(e, { task }) : new GitError(task, e && String(e)); + this._chain = Promise.resolve(); + this._queue.fatal(gitError); + return gitError; + } + attemptRemoteTask(task, logger) { + return __async(this, null, function* () { + const args = this._plugins.exec("spawn.args", [...task.commands], pluginContext(task, task.commands)); + const raw = yield this.gitResponse(task, this.binary, args, this.outputHandler, logger.step("SPAWN")); + const outputStreams = yield this.handleTaskData(task, args, raw, logger.step("HANDLE")); + logger(`passing response to task's parser as a %s`, task.format); + if (isBufferTask(task)) { + return callTaskParser(task.parser, outputStreams); + } + return callTaskParser(task.parser, outputStreams.asStrings()); + }); + } + attemptEmptyTask(task, logger) { + return __async(this, null, function* () { + logger(`empty task bypassing child process to call to task's parser`); + return task.parser(this); + }); + } + handleTaskData(task, args, result, logger) { + const { exitCode, rejection, stdOut, stdErr } = result; + return new Promise((done, fail) => { + logger(`Preparing to handle process response exitCode=%d stdOut=`, exitCode); + const { error } = this._plugins.exec("task.error", { error: rejection }, __spreadValues(__spreadValues({}, pluginContext(task, args)), result)); + if (error && task.onError) { + logger.info(`exitCode=%s handling with custom error handler`); + return task.onError(result, error, (newStdOut) => { + logger.info(`custom error handler treated as success`); + logger(`custom error returned a %s`, objectToString(newStdOut)); + done(new GitOutputStreams(Array.isArray(newStdOut) ? Buffer.concat(newStdOut) : newStdOut, Buffer.concat(stdErr))); + }, fail); + } + if (error) { + logger.info(`handling as error: exitCode=%s stdErr=%s rejection=%o`, exitCode, stdErr.length, rejection); + return fail(error); + } + logger.info(`retrieving task output complete`); + done(new GitOutputStreams(Buffer.concat(stdOut), Buffer.concat(stdErr))); + }); + } + gitResponse(task, command, args, outputHandler, logger) { + return __async(this, null, function* () { + const outputLogger = logger.sibling("output"); + const spawnOptions = this._plugins.exec("spawn.options", { + cwd: this.cwd, + env: this.env, + windowsHide: true + }, pluginContext(task, task.commands)); + return new Promise((done) => { + const stdOut = []; + const stdErr = []; + logger.info(`%s %o`, command, args); + logger("%O", spawnOptions); + let rejection = this._beforeSpawn(task, args); + if (rejection) { + return done({ + stdOut, + stdErr, + exitCode: 9901, + rejection + }); + } + this._plugins.exec("spawn.before", void 0, __spreadProps(__spreadValues({}, pluginContext(task, args)), { + kill(reason) { + rejection = reason || rejection; + } + })); + const spawned = (0, import_child_process.spawn)(command, args, spawnOptions); + spawned.stdout.on("data", onDataReceived(stdOut, "stdOut", logger, outputLogger.step("stdOut"))); + spawned.stderr.on("data", onDataReceived(stdErr, "stdErr", logger, outputLogger.step("stdErr"))); + spawned.on("error", onErrorReceived(stdErr, logger)); + if (outputHandler) { + logger(`Passing child process stdOut/stdErr to custom outputHandler`); + outputHandler(command, spawned.stdout, spawned.stderr, [...args]); + } + this._plugins.exec("spawn.after", void 0, __spreadProps(__spreadValues({}, pluginContext(task, args)), { + spawned, + close(exitCode, reason) { + done({ + stdOut, + stdErr, + exitCode, + rejection: rejection || reason + }); + }, + kill(reason) { + if (spawned.killed) { + return; + } + rejection = reason; + spawned.kill("SIGINT"); + } + })); + }); + }); + } + _beforeSpawn(task, args) { + let rejection; + this._plugins.exec("spawn.before", void 0, __spreadProps(__spreadValues({}, pluginContext(task, args)), { + kill(reason) { + rejection = reason || rejection; + } + })); + return rejection; + } + }; + } +}); +var git_executor_exports = {}; +__export2(git_executor_exports, { + GitExecutor: () => GitExecutor +}); +var GitExecutor; +var init_git_executor = __esm2({ + "src/lib/runners/git-executor.ts"() { + init_git_executor_chain(); + GitExecutor = class { + constructor(binary = "git", cwd, _scheduler, _plugins) { + this.binary = binary; + this.cwd = cwd; + this._scheduler = _scheduler; + this._plugins = _plugins; + this._chain = new GitExecutorChain(this, this._scheduler, this._plugins); + } + chain() { + return new GitExecutorChain(this, this._scheduler, this._plugins); + } + push(task) { + return this._chain.push(task); + } + }; + } +}); +function taskCallback(task, response, callback = NOOP) { + const onSuccess = (data) => { + callback(null, data); + }; + const onError2 = (err) => { + if ((err == null ? void 0 : err.task) === task) { + callback(err instanceof GitResponseError ? addDeprecationNoticeToError(err) : err, void 0); + } + }; + response.then(onSuccess, onError2); +} +function addDeprecationNoticeToError(err) { + let log2 = (name) => { + console.warn(`simple-git deprecation notice: accessing GitResponseError.${name} should be GitResponseError.git.${name}, this will no longer be available in version 3`); + log2 = NOOP; + }; + return Object.create(err, Object.getOwnPropertyNames(err.git).reduce(descriptorReducer, {})); + function descriptorReducer(all, name) { + if (name in err) { + return all; + } + all[name] = { + enumerable: false, + configurable: false, + get() { + log2(name); + return err.git[name]; + } + }; + return all; + } +} +var init_task_callback = __esm2({ + "src/lib/task-callback.ts"() { + init_git_response_error(); + init_utils(); + } +}); +function changeWorkingDirectoryTask(directory, root2) { + return adhocExecTask((instance10) => { + if (!folderExists(directory)) { + throw new Error(`Git.cwd: cannot change to non-directory "${directory}"`); + } + return (root2 || instance10).cwd = directory; + }); +} +var init_change_working_directory = __esm2({ + "src/lib/tasks/change-working-directory.ts"() { + init_utils(); + init_task(); + } +}); +function checkoutTask(args) { + const commands2 = ["checkout", ...args]; + if (commands2[1] === "-b" && commands2.includes("-B")) { + commands2[1] = remove2(commands2, "-B"); + } + return straightThroughStringTask(commands2); +} +function checkout_default() { + return { + checkout() { + return this._runTask(checkoutTask(getTrailingOptions(arguments, 1)), trailingFunctionArgument(arguments)); + }, + checkoutBranch(branchName, startPoint) { + return this._runTask(checkoutTask(["-b", branchName, startPoint, ...getTrailingOptions(arguments)]), trailingFunctionArgument(arguments)); + }, + checkoutLocalBranch(branchName) { + return this._runTask(checkoutTask(["-b", branchName, ...getTrailingOptions(arguments)]), trailingFunctionArgument(arguments)); + } + }; +} +var init_checkout = __esm2({ + "src/lib/tasks/checkout.ts"() { + init_utils(); + init_task(); + } +}); +function parseCommitResult(stdOut) { + const result = { + author: null, + branch: "", + commit: "", + root: false, + summary: { + changes: 0, + insertions: 0, + deletions: 0 + } + }; + return parseStringResponse(result, parsers, stdOut); +} +var parsers; +var init_parse_commit = __esm2({ + "src/lib/parsers/parse-commit.ts"() { + init_utils(); + parsers = [ + new LineParser(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/, (result, [branch2, root2, commit2]) => { + result.branch = branch2; + result.commit = commit2; + result.root = !!root2; + }), + new LineParser(/\s*Author:\s(.+)/i, (result, [author]) => { + const parts = author.split("<"); + const email = parts.pop(); + if (!email || !email.includes("@")) { + return; + } + result.author = { + email: email.substr(0, email.length - 1), + name: parts.join("<").trim() + }; + }), + new LineParser(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g, (result, [changes, insertions, deletions]) => { + result.summary.changes = parseInt(changes, 10) || 0; + result.summary.insertions = parseInt(insertions, 10) || 0; + result.summary.deletions = parseInt(deletions, 10) || 0; + }), + new LineParser(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/, (result, [changes, lines, direction]) => { + result.summary.changes = parseInt(changes, 10) || 0; + const count = parseInt(lines, 10) || 0; + if (direction === "-") { + result.summary.deletions = count; + } else if (direction === "+") { + result.summary.insertions = count; + } + }) + ]; + } +}); +function commitTask(message, files, customArgs) { + const commands2 = [ + "-c", + "core.abbrev=40", + "commit", + ...prefixedArray(message, "-m"), + ...files, + ...customArgs + ]; + return { + commands: commands2, + format: "utf-8", + parser: parseCommitResult + }; +} +function commit_default() { + return { + commit(message, ...rest) { + const next = trailingFunctionArgument(arguments); + const task = rejectDeprecatedSignatures(message) || commitTask(asArray(message), asArray(filterType(rest[0], filterStringOrStringArray, [])), [...filterType(rest[1], filterArray, []), ...getTrailingOptions(arguments, 0, true)]); + return this._runTask(task, next); + } + }; + function rejectDeprecatedSignatures(message) { + return !filterStringOrStringArray(message) && configurationErrorTask(`git.commit: requires the commit message to be supplied as a string/string[]`); + } +} +var init_commit = __esm2({ + "src/lib/tasks/commit.ts"() { + init_parse_commit(); + init_utils(); + init_task(); + } +}); +function hashObjectTask(filePath, write) { + const commands2 = ["hash-object", filePath]; + if (write) { + commands2.push("-w"); + } + return straightThroughStringTask(commands2, true); +} +var init_hash_object = __esm2({ + "src/lib/tasks/hash-object.ts"() { + init_task(); + } +}); +function parseInit(bare, path2, text2) { + const response = String(text2).trim(); + let result; + if (result = initResponseRegex.exec(response)) { + return new InitSummary(bare, path2, false, result[1]); + } + if (result = reInitResponseRegex.exec(response)) { + return new InitSummary(bare, path2, true, result[1]); + } + let gitDir = ""; + const tokens = response.split(" "); + while (tokens.length) { + const token = tokens.shift(); + if (token === "in") { + gitDir = tokens.join(" "); + break; + } + } + return new InitSummary(bare, path2, /^re/i.test(response), gitDir); +} +var InitSummary; +var initResponseRegex; +var reInitResponseRegex; +var init_InitSummary = __esm2({ + "src/lib/responses/InitSummary.ts"() { + InitSummary = class { + constructor(bare, path2, existing, gitDir) { + this.bare = bare; + this.path = path2; + this.existing = existing; + this.gitDir = gitDir; + } + }; + initResponseRegex = /^Init.+ repository in (.+)$/; + reInitResponseRegex = /^Rein.+ in (.+)$/; + } +}); +function hasBareCommand(command) { + return command.includes(bareCommand); +} +function initTask(bare = false, path2, customArgs) { + const commands2 = ["init", ...customArgs]; + if (bare && !hasBareCommand(commands2)) { + commands2.splice(1, 0, bareCommand); + } + return { + commands: commands2, + format: "utf-8", + parser(text2) { + return parseInit(commands2.includes("--bare"), path2, text2); + } + }; +} +var bareCommand; +var init_init = __esm2({ + "src/lib/tasks/init.ts"() { + init_InitSummary(); + bareCommand = "--bare"; + } +}); +function logFormatFromCommand(customArgs) { + for (let i = 0; i < customArgs.length; i++) { + const format = logFormatRegex.exec(customArgs[i]); + if (format) { + return `--${format[1]}`; + } + } + return ""; +} +function isLogFormat(customArg) { + return logFormatRegex.test(customArg); +} +var logFormatRegex; +var init_log_format = __esm2({ + "src/lib/args/log-format.ts"() { + logFormatRegex = /^--(stat|numstat|name-only|name-status)(=|$)/; + } +}); +var DiffSummary; +var init_DiffSummary = __esm2({ + "src/lib/responses/DiffSummary.ts"() { + DiffSummary = class { + constructor() { + this.changed = 0; + this.deletions = 0; + this.insertions = 0; + this.files = []; + } + }; + } +}); +function getDiffParser(format = "") { + const parser3 = diffSummaryParsers[format]; + return (stdOut) => parseStringResponse(new DiffSummary(), parser3, stdOut, false); +} +var statParser; +var numStatParser; +var nameOnlyParser; +var nameStatusParser; +var diffSummaryParsers; +var init_parse_diff_summary = __esm2({ + "src/lib/parsers/parse-diff-summary.ts"() { + init_log_format(); + init_DiffSummary(); + init_utils(); + statParser = [ + new LineParser(/(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/, (result, [file, changes, alterations = ""]) => { + result.files.push({ + file: file.trim(), + changes: asNumber(changes), + insertions: alterations.replace(/[^+]/g, "").length, + deletions: alterations.replace(/[^-]/g, "").length, + binary: false + }); + }), + new LineParser(/(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/, (result, [file, before, after]) => { + result.files.push({ + file: file.trim(), + before: asNumber(before), + after: asNumber(after), + binary: true + }); + }), + new LineParser(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/, (result, [changed, summary]) => { + const inserted = /(\d+) i/.exec(summary); + const deleted = /(\d+) d/.exec(summary); + result.changed = asNumber(changed); + result.insertions = asNumber(inserted == null ? void 0 : inserted[1]); + result.deletions = asNumber(deleted == null ? void 0 : deleted[1]); + }) + ]; + numStatParser = [ + new LineParser(/(\d+)\t(\d+)\t(.+)$/, (result, [changesInsert, changesDelete, file]) => { + const insertions = asNumber(changesInsert); + const deletions = asNumber(changesDelete); + result.changed++; + result.insertions += insertions; + result.deletions += deletions; + result.files.push({ + file, + changes: insertions + deletions, + insertions, + deletions, + binary: false + }); + }), + new LineParser(/-\t-\t(.+)$/, (result, [file]) => { + result.changed++; + result.files.push({ + file, + after: 0, + before: 0, + binary: true + }); + }) + ]; + nameOnlyParser = [ + new LineParser(/(.+)$/, (result, [file]) => { + result.changed++; + result.files.push({ + file, + changes: 0, + insertions: 0, + deletions: 0, + binary: false + }); + }) + ]; + nameStatusParser = [ + new LineParser(/([ACDMRTUXB])([0-9][0-9][0-9])?\t(.[^\t]+)\t?(.*)?$/, (result, [status2, _similarity, from, to]) => { + result.changed++; + result.files.push({ + file: to != null ? to : from, + changes: 0, + status: status2, + insertions: 0, + deletions: 0, + binary: false + }); + }) + ]; + diffSummaryParsers = { + [ + "" + /* NONE */ + ]: statParser, + [ + "--stat" + /* STAT */ + ]: statParser, + [ + "--numstat" + /* NUM_STAT */ + ]: numStatParser, + [ + "--name-status" + /* NAME_STATUS */ + ]: nameStatusParser, + [ + "--name-only" + /* NAME_ONLY */ + ]: nameOnlyParser + }; + } +}); +function lineBuilder(tokens, fields) { + return fields.reduce((line, field, index2) => { + line[field] = tokens[index2] || ""; + return line; + }, /* @__PURE__ */ Object.create({ diff: null })); +} +function createListLogSummaryParser(splitter = SPLITTER, fields = defaultFieldNames, logFormat = "") { + const parseDiffResult = getDiffParser(logFormat); + return function(stdOut) { + const all = toLinesWithContent(stdOut, true, START_BOUNDARY).map(function(item) { + const lineDetail = item.trim().split(COMMIT_BOUNDARY); + const listLogLine = lineBuilder(lineDetail[0].trim().split(splitter), fields); + if (lineDetail.length > 1 && !!lineDetail[1].trim()) { + listLogLine.diff = parseDiffResult(lineDetail[1]); + } + return listLogLine; + }); + return { + all, + latest: all.length && all[0] || null, + total: all.length + }; + }; +} +var START_BOUNDARY; +var COMMIT_BOUNDARY; +var SPLITTER; +var defaultFieldNames; +var init_parse_list_log_summary = __esm2({ + "src/lib/parsers/parse-list-log-summary.ts"() { + init_utils(); + init_parse_diff_summary(); + init_log_format(); + START_BOUNDARY = "\xF2\xF2\xF2\xF2\xF2\xF2 "; + COMMIT_BOUNDARY = " \xF2\xF2"; + SPLITTER = " \xF2 "; + defaultFieldNames = ["hash", "date", "message", "refs", "author_name", "author_email"]; + } +}); +var diff_exports = {}; +__export2(diff_exports, { + diffSummaryTask: () => diffSummaryTask, + validateLogFormatConfig: () => validateLogFormatConfig +}); +function diffSummaryTask(customArgs) { + let logFormat = logFormatFromCommand(customArgs); + const commands2 = ["diff"]; + if (logFormat === "") { + logFormat = "--stat"; + commands2.push("--stat=4096"); + } + commands2.push(...customArgs); + return validateLogFormatConfig(commands2) || { + commands: commands2, + format: "utf-8", + parser: getDiffParser(logFormat) + }; +} +function validateLogFormatConfig(customArgs) { + const flags = customArgs.filter(isLogFormat); + if (flags.length > 1) { + return configurationErrorTask(`Summary flags are mutually exclusive - pick one of ${flags.join(",")}`); + } + if (flags.length && customArgs.includes("-z")) { + return configurationErrorTask(`Summary flag ${flags} parsing is not compatible with null termination option '-z'`); + } +} +var init_diff = __esm2({ + "src/lib/tasks/diff.ts"() { + init_log_format(); + init_parse_diff_summary(); + init_task(); + } +}); +function prettyFormat(format, splitter) { + const fields = []; + const formatStr = []; + Object.keys(format).forEach((field) => { + fields.push(field); + formatStr.push(String(format[field])); + }); + return [fields, formatStr.join(splitter)]; +} +function userOptions(input) { + return Object.keys(input).reduce((out, key2) => { + if (!(key2 in excludeOptions)) { + out[key2] = input[key2]; + } + return out; + }, {}); +} +function parseLogOptions(opt = {}, customArgs = []) { + const splitter = filterType(opt.splitter, filterString, SPLITTER); + const format = !filterPrimitives(opt.format) && opt.format ? opt.format : { + hash: "%H", + date: opt.strictDate === false ? "%ai" : "%aI", + message: "%s", + refs: "%D", + body: opt.multiLine ? "%B" : "%b", + author_name: opt.mailMap !== false ? "%aN" : "%an", + author_email: opt.mailMap !== false ? "%aE" : "%ae" + }; + const [fields, formatStr] = prettyFormat(format, splitter); + const suffix = []; + const command = [ + `--pretty=format:${START_BOUNDARY}${formatStr}${COMMIT_BOUNDARY}`, + ...customArgs + ]; + const maxCount = opt.n || opt["max-count"] || opt.maxCount; + if (maxCount) { + command.push(`--max-count=${maxCount}`); + } + if (opt.from || opt.to) { + const rangeOperator = opt.symmetric !== false ? "..." : ".."; + suffix.push(`${opt.from || ""}${rangeOperator}${opt.to || ""}`); + } + if (filterString(opt.file)) { + suffix.push("--follow", opt.file); + } + appendTaskOptions(userOptions(opt), command); + return { + fields, + splitter, + commands: [...command, ...suffix] + }; +} +function logTask(splitter, fields, customArgs) { + const parser3 = createListLogSummaryParser(splitter, fields, logFormatFromCommand(customArgs)); + return { + commands: ["log", ...customArgs], + format: "utf-8", + parser: parser3 + }; +} +function log_default() { + return { + log(...rest) { + const next = trailingFunctionArgument(arguments); + const options = parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray)); + const task = rejectDeprecatedSignatures(...rest) || validateLogFormatConfig(options.commands) || createLogTask(options); + return this._runTask(task, next); + } + }; + function createLogTask(options) { + return logTask(options.splitter, options.fields, options.commands); + } + function rejectDeprecatedSignatures(from, to) { + return filterString(from) && filterString(to) && configurationErrorTask(`git.log(string, string) should be replaced with git.log({ from: string, to: string })`); + } +} +var excludeOptions; +var init_log = __esm2({ + "src/lib/tasks/log.ts"() { + init_log_format(); + init_parse_list_log_summary(); + init_utils(); + init_task(); + init_diff(); + excludeOptions = /* @__PURE__ */ ((excludeOptions2) => { + excludeOptions2[excludeOptions2["--pretty"] = 0] = "--pretty"; + excludeOptions2[excludeOptions2["max-count"] = 1] = "max-count"; + excludeOptions2[excludeOptions2["maxCount"] = 2] = "maxCount"; + excludeOptions2[excludeOptions2["n"] = 3] = "n"; + excludeOptions2[excludeOptions2["file"] = 4] = "file"; + excludeOptions2[excludeOptions2["format"] = 5] = "format"; + excludeOptions2[excludeOptions2["from"] = 6] = "from"; + excludeOptions2[excludeOptions2["to"] = 7] = "to"; + excludeOptions2[excludeOptions2["splitter"] = 8] = "splitter"; + excludeOptions2[excludeOptions2["symmetric"] = 9] = "symmetric"; + excludeOptions2[excludeOptions2["mailMap"] = 10] = "mailMap"; + excludeOptions2[excludeOptions2["multiLine"] = 11] = "multiLine"; + excludeOptions2[excludeOptions2["strictDate"] = 12] = "strictDate"; + return excludeOptions2; + })(excludeOptions || {}); + } +}); +var MergeSummaryConflict; +var MergeSummaryDetail; +var init_MergeSummary = __esm2({ + "src/lib/responses/MergeSummary.ts"() { + MergeSummaryConflict = class { + constructor(reason, file = null, meta) { + this.reason = reason; + this.file = file; + this.meta = meta; + } + toString() { + return `${this.file}:${this.reason}`; + } + }; + MergeSummaryDetail = class { + constructor() { + this.conflicts = []; + this.merges = []; + this.result = "success"; + } + get failed() { + return this.conflicts.length > 0; + } + get reason() { + return this.result; + } + toString() { + if (this.conflicts.length) { + return `CONFLICTS: ${this.conflicts.join(", ")}`; + } + return "OK"; + } + }; + } +}); +var PullSummary; +var PullFailedSummary; +var init_PullSummary = __esm2({ + "src/lib/responses/PullSummary.ts"() { + PullSummary = class { + constructor() { + this.remoteMessages = { + all: [] + }; + this.created = []; + this.deleted = []; + this.files = []; + this.deletions = {}; + this.insertions = {}; + this.summary = { + changes: 0, + deletions: 0, + insertions: 0 + }; + } + }; + PullFailedSummary = class { + constructor() { + this.remote = ""; + this.hash = { + local: "", + remote: "" + }; + this.branch = { + local: "", + remote: "" + }; + this.message = ""; + } + toString() { + return this.message; + } + }; + } +}); +function objectEnumerationResult(remoteMessages) { + return remoteMessages.objects = remoteMessages.objects || { + compressing: 0, + counting: 0, + enumerating: 0, + packReused: 0, + reused: { count: 0, delta: 0 }, + total: { count: 0, delta: 0 } + }; +} +function asObjectCount(source) { + const count = /^\s*(\d+)/.exec(source); + const delta = /delta (\d+)/i.exec(source); + return { + count: asNumber(count && count[1] || "0"), + delta: asNumber(delta && delta[1] || "0") + }; +} +var remoteMessagesObjectParsers; +var init_parse_remote_objects = __esm2({ + "src/lib/parsers/parse-remote-objects.ts"() { + init_utils(); + remoteMessagesObjectParsers = [ + new RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i, (result, [action, count]) => { + const key2 = action.toLowerCase(); + const enumeration = objectEnumerationResult(result.remoteMessages); + Object.assign(enumeration, { [key2]: asNumber(count) }); + }), + new RemoteLineParser(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i, (result, [action, count]) => { + const key2 = action.toLowerCase(); + const enumeration = objectEnumerationResult(result.remoteMessages); + Object.assign(enumeration, { [key2]: asNumber(count) }); + }), + new RemoteLineParser(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i, (result, [total, reused, packReused]) => { + const objects = objectEnumerationResult(result.remoteMessages); + objects.total = asObjectCount(total); + objects.reused = asObjectCount(reused); + objects.packReused = asNumber(packReused); + }) + ]; + } +}); +function parseRemoteMessages(_stdOut, stdErr) { + return parseStringResponse({ remoteMessages: new RemoteMessageSummary() }, parsers2, stdErr); +} +var parsers2; +var RemoteMessageSummary; +var init_parse_remote_messages = __esm2({ + "src/lib/parsers/parse-remote-messages.ts"() { + init_utils(); + init_parse_remote_objects(); + parsers2 = [ + new RemoteLineParser(/^remote:\s*(.+)$/, (result, [text2]) => { + result.remoteMessages.all.push(text2.trim()); + return false; + }), + ...remoteMessagesObjectParsers, + new RemoteLineParser([/create a (?:pull|merge) request/i, /\s(https?:\/\/\S+)$/], (result, [pullRequestUrl]) => { + result.remoteMessages.pullRequestUrl = pullRequestUrl; + }), + new RemoteLineParser([/found (\d+) vulnerabilities.+\(([^)]+)\)/i, /\s(https?:\/\/\S+)$/], (result, [count, summary, url]) => { + result.remoteMessages.vulnerabilities = { + count: asNumber(count), + summary, + url + }; + }) + ]; + RemoteMessageSummary = class { + constructor() { + this.all = []; + } + }; + } +}); +function parsePullErrorResult(stdOut, stdErr) { + const pullError = parseStringResponse(new PullFailedSummary(), errorParsers, [stdOut, stdErr]); + return pullError.message && pullError; +} +var FILE_UPDATE_REGEX; +var SUMMARY_REGEX; +var ACTION_REGEX; +var parsers3; +var errorParsers; +var parsePullDetail; +var parsePullResult; +var init_parse_pull = __esm2({ + "src/lib/parsers/parse-pull.ts"() { + init_PullSummary(); + init_utils(); + init_parse_remote_messages(); + FILE_UPDATE_REGEX = /^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/; + SUMMARY_REGEX = /(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/; + ACTION_REGEX = /^(create|delete) mode \d+ (.+)/; + parsers3 = [ + new LineParser(FILE_UPDATE_REGEX, (result, [file, insertions, deletions]) => { + result.files.push(file); + if (insertions) { + result.insertions[file] = insertions.length; + } + if (deletions) { + result.deletions[file] = deletions.length; + } + }), + new LineParser(SUMMARY_REGEX, (result, [changes, , insertions, , deletions]) => { + if (insertions !== void 0 || deletions !== void 0) { + result.summary.changes = +changes || 0; + result.summary.insertions = +insertions || 0; + result.summary.deletions = +deletions || 0; + return true; + } + return false; + }), + new LineParser(ACTION_REGEX, (result, [action, file]) => { + append(result.files, file); + append(action === "create" ? result.created : result.deleted, file); + }) + ]; + errorParsers = [ + new LineParser(/^from\s(.+)$/i, (result, [remote]) => void (result.remote = remote)), + new LineParser(/^fatal:\s(.+)$/, (result, [message]) => void (result.message = message)), + new LineParser(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/, (result, [hashLocal, hashRemote, branchLocal, branchRemote]) => { + result.branch.local = branchLocal; + result.hash.local = hashLocal; + result.branch.remote = branchRemote; + result.hash.remote = hashRemote; + }) + ]; + parsePullDetail = (stdOut, stdErr) => { + return parseStringResponse(new PullSummary(), parsers3, [stdOut, stdErr]); + }; + parsePullResult = (stdOut, stdErr) => { + return Object.assign(new PullSummary(), parsePullDetail(stdOut, stdErr), parseRemoteMessages(stdOut, stdErr)); + }; + } +}); +var parsers4; +var parseMergeResult; +var parseMergeDetail; +var init_parse_merge = __esm2({ + "src/lib/parsers/parse-merge.ts"() { + init_MergeSummary(); + init_utils(); + init_parse_pull(); + parsers4 = [ + new LineParser(/^Auto-merging\s+(.+)$/, (summary, [autoMerge]) => { + summary.merges.push(autoMerge); + }), + new LineParser(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/, (summary, [reason, file]) => { + summary.conflicts.push(new MergeSummaryConflict(reason, file)); + }), + new LineParser(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/, (summary, [reason, file, deleteRef2]) => { + summary.conflicts.push(new MergeSummaryConflict(reason, file, { deleteRef: deleteRef2 })); + }), + new LineParser(/^CONFLICT\s+\((.+)\):/, (summary, [reason]) => { + summary.conflicts.push(new MergeSummaryConflict(reason, null)); + }), + new LineParser(/^Automatic merge failed;\s+(.+)$/, (summary, [result]) => { + summary.result = result; + }) + ]; + parseMergeResult = (stdOut, stdErr) => { + return Object.assign(parseMergeDetail(stdOut, stdErr), parsePullResult(stdOut, stdErr)); + }; + parseMergeDetail = (stdOut) => { + return parseStringResponse(new MergeSummaryDetail(), parsers4, stdOut); + }; + } +}); +function mergeTask(customArgs) { + if (!customArgs.length) { + return configurationErrorTask("Git.merge requires at least one option"); + } + return { + commands: ["merge", ...customArgs], + format: "utf-8", + parser(stdOut, stdErr) { + const merge2 = parseMergeResult(stdOut, stdErr); + if (merge2.failed) { + throw new GitResponseError(merge2); + } + return merge2; + } + }; +} +var init_merge = __esm2({ + "src/lib/tasks/merge.ts"() { + init_git_response_error(); + init_parse_merge(); + init_task(); + } +}); +function pushResultPushedItem(local, remote, status2) { + const deleted = status2.includes("deleted"); + const tag2 = status2.includes("tag") || /^refs\/tags/.test(local); + const alreadyUpdated = !status2.includes("new"); + return { + deleted, + tag: tag2, + branch: !tag2, + new: !alreadyUpdated, + alreadyUpdated, + local, + remote + }; +} +var parsers5; +var parsePushResult; +var parsePushDetail; +var init_parse_push = __esm2({ + "src/lib/parsers/parse-push.ts"() { + init_utils(); + init_parse_remote_messages(); + parsers5 = [ + new LineParser(/^Pushing to (.+)$/, (result, [repo]) => { + result.repo = repo; + }), + new LineParser(/^updating local tracking ref '(.+)'/, (result, [local]) => { + result.ref = __spreadProps(__spreadValues({}, result.ref || {}), { + local + }); + }), + new LineParser(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/, (result, [local, remote, type]) => { + result.pushed.push(pushResultPushedItem(local, remote, type)); + }), + new LineParser(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/, (result, [local, remote, remoteName]) => { + result.branch = __spreadProps(__spreadValues({}, result.branch || {}), { + local, + remote, + remoteName + }); + }), + new LineParser(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/, (result, [local, remote, from, to]) => { + result.update = { + head: { + local, + remote + }, + hash: { + from, + to + } + }; + }) + ]; + parsePushResult = (stdOut, stdErr) => { + const pushDetail = parsePushDetail(stdOut, stdErr); + const responseDetail = parseRemoteMessages(stdOut, stdErr); + return __spreadValues(__spreadValues({}, pushDetail), responseDetail); + }; + parsePushDetail = (stdOut, stdErr) => { + return parseStringResponse({ pushed: [] }, parsers5, [stdOut, stdErr]); + }; + } +}); +var push_exports = {}; +__export2(push_exports, { + pushTagsTask: () => pushTagsTask, + pushTask: () => pushTask +}); +function pushTagsTask(ref = {}, customArgs) { + append(customArgs, "--tags"); + return pushTask(ref, customArgs); +} +function pushTask(ref = {}, customArgs) { + const commands2 = ["push", ...customArgs]; + if (ref.branch) { + commands2.splice(1, 0, ref.branch); + } + if (ref.remote) { + commands2.splice(1, 0, ref.remote); + } + remove2(commands2, "-v"); + append(commands2, "--verbose"); + append(commands2, "--porcelain"); + return { + commands: commands2, + format: "utf-8", + parser: parsePushResult + }; +} +var init_push = __esm2({ + "src/lib/tasks/push.ts"() { + init_parse_push(); + init_utils(); + } +}); +var fromPathRegex; +var FileStatusSummary; +var init_FileStatusSummary = __esm2({ + "src/lib/responses/FileStatusSummary.ts"() { + fromPathRegex = /^(.+) -> (.+)$/; + FileStatusSummary = class { + constructor(path2, index2, working_dir) { + this.path = path2; + this.index = index2; + this.working_dir = working_dir; + if (index2 + working_dir === "R") { + const detail = fromPathRegex.exec(path2) || [null, path2, path2]; + this.from = detail[1] || ""; + this.path = detail[2] || ""; + } + } + }; + } +}); +function renamedFile(line) { + const [to, from] = line.split(NULL); + return { + from: from || to, + to + }; +} +function parser2(indexX, indexY, handler) { + return [`${indexX}${indexY}`, handler]; +} +function conflicts(indexX, ...indexY) { + return indexY.map((y) => parser2(indexX, y, (result, file) => append(result.conflicted, file))); +} +function splitLine(result, lineStr) { + const trimmed2 = lineStr.trim(); + switch (" ") { + case trimmed2.charAt(2): + return data(trimmed2.charAt(0), trimmed2.charAt(1), trimmed2.substr(3)); + case trimmed2.charAt(1): + return data(" ", trimmed2.charAt(0), trimmed2.substr(2)); + default: + return; + } + function data(index2, workingDir, path2) { + const raw = `${index2}${workingDir}`; + const handler = parsers6.get(raw); + if (handler) { + handler(result, path2); + } + if (raw !== "##" && raw !== "!!") { + result.files.push(new FileStatusSummary(path2.replace(/\0.+$/, ""), index2, workingDir)); + } + } +} +var StatusSummary; +var parsers6; +var parseStatusSummary; +var init_StatusSummary = __esm2({ + "src/lib/responses/StatusSummary.ts"() { + init_utils(); + init_FileStatusSummary(); + StatusSummary = class { + constructor() { + this.not_added = []; + this.conflicted = []; + this.created = []; + this.deleted = []; + this.ignored = void 0; + this.modified = []; + this.renamed = []; + this.files = []; + this.staged = []; + this.ahead = 0; + this.behind = 0; + this.current = null; + this.tracking = null; + this.detached = false; + this.isClean = () => { + return !this.files.length; + }; + } + }; + parsers6 = new Map([ + parser2(" ", "A", (result, file) => append(result.created, file)), + parser2(" ", "D", (result, file) => append(result.deleted, file)), + parser2(" ", "M", (result, file) => append(result.modified, file)), + parser2("A", " ", (result, file) => append(result.created, file) && append(result.staged, file)), + parser2("A", "M", (result, file) => append(result.created, file) && append(result.staged, file) && append(result.modified, file)), + parser2("D", " ", (result, file) => append(result.deleted, file) && append(result.staged, file)), + parser2("M", " ", (result, file) => append(result.modified, file) && append(result.staged, file)), + parser2("M", "M", (result, file) => append(result.modified, file) && append(result.staged, file)), + parser2("R", " ", (result, file) => { + append(result.renamed, renamedFile(file)); + }), + parser2("R", "M", (result, file) => { + const renamed = renamedFile(file); + append(result.renamed, renamed); + append(result.modified, renamed.to); + }), + parser2("!", "!", (_result, _file) => { + append(_result.ignored = _result.ignored || [], _file); + }), + parser2("?", "?", (result, file) => append(result.not_added, file)), + ...conflicts( + "A", + "A", + "U" + /* UNMERGED */ + ), + ...conflicts( + "D", + "D", + "U" + /* UNMERGED */ + ), + ...conflicts( + "U", + "A", + "D", + "U" + /* UNMERGED */ + ), + [ + "##", + (result, line) => { + const aheadReg = /ahead (\d+)/; + const behindReg = /behind (\d+)/; + const currentReg = /^(.+?(?=(?:\.{3}|\s|$)))/; + const trackingReg = /\.{3}(\S*)/; + const onEmptyBranchReg = /\son\s([\S]+)$/; + let regexResult; + regexResult = aheadReg.exec(line); + result.ahead = regexResult && +regexResult[1] || 0; + regexResult = behindReg.exec(line); + result.behind = regexResult && +regexResult[1] || 0; + regexResult = currentReg.exec(line); + result.current = regexResult && regexResult[1]; + regexResult = trackingReg.exec(line); + result.tracking = regexResult && regexResult[1]; + regexResult = onEmptyBranchReg.exec(line); + result.current = regexResult && regexResult[1] || result.current; + result.detached = /\(no branch\)/.test(line); + } + ] + ]); + parseStatusSummary = function(text2) { + const lines = text2.split(NULL); + const status2 = new StatusSummary(); + for (let i = 0, l = lines.length; i < l; ) { + let line = lines[i++].trim(); + if (!line) { + continue; + } + if (line.charAt(0) === "R") { + line += NULL + (lines[i++] || ""); + } + splitLine(status2, line); + } + return status2; + }; + } +}); +function statusTask(customArgs) { + const commands2 = [ + "status", + "--porcelain", + "-b", + "-u", + "--null", + ...customArgs.filter((arg) => !ignoredOptions.includes(arg)) + ]; + return { + format: "utf-8", + commands: commands2, + parser(text2) { + return parseStatusSummary(text2); + } + }; +} +var ignoredOptions; +var init_status = __esm2({ + "src/lib/tasks/status.ts"() { + init_StatusSummary(); + ignoredOptions = ["--null", "-z"]; + } +}); +function versionResponse(major = 0, minor = 0, patch = 0, agent = "", installed = true) { + return Object.defineProperty({ + major, + minor, + patch, + agent, + installed + }, "toString", { + value() { + return `${this.major}.${this.minor}.${this.patch}`; + }, + configurable: false, + enumerable: false + }); +} +function notInstalledResponse() { + return versionResponse(0, 0, 0, "", false); +} +function version_default() { + return { + version() { + return this._runTask({ + commands: ["--version"], + format: "utf-8", + parser: versionParser, + onError(result, error, done, fail) { + if (result.exitCode === -2) { + return done(Buffer.from(NOT_INSTALLED)); + } + fail(error); + } + }); + } + }; +} +function versionParser(stdOut) { + if (stdOut === NOT_INSTALLED) { + return notInstalledResponse(); + } + return parseStringResponse(versionResponse(0, 0, 0, stdOut), parsers7, stdOut); +} +var NOT_INSTALLED; +var parsers7; +var init_version = __esm2({ + "src/lib/tasks/version.ts"() { + init_utils(); + NOT_INSTALLED = "installed=false"; + parsers7 = [ + new LineParser(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/, (result, [major, minor, patch, agent = ""]) => { + Object.assign(result, versionResponse(asNumber(major), asNumber(minor), asNumber(patch), agent)); + }), + new LineParser(/version (\d+)\.(\d+)\.(\D+)(.+)?$/, (result, [major, minor, patch, agent = ""]) => { + Object.assign(result, versionResponse(asNumber(major), asNumber(minor), patch, agent)); + }) + ]; + } +}); +var simple_git_api_exports = {}; +__export2(simple_git_api_exports, { + SimpleGitApi: () => SimpleGitApi +}); +var SimpleGitApi; +var init_simple_git_api = __esm2({ + "src/lib/simple-git-api.ts"() { + init_task_callback(); + init_change_working_directory(); + init_checkout(); + init_commit(); + init_config(); + init_grep(); + init_hash_object(); + init_init(); + init_log(); + init_merge(); + init_push(); + init_status(); + init_task(); + init_version(); + init_utils(); + SimpleGitApi = class { + constructor(_executor) { + this._executor = _executor; + } + _runTask(task, then) { + const chain = this._executor.chain(); + const promise2 = chain.push(task); + if (then) { + taskCallback(task, promise2, then); + } + return Object.create(this, { + then: { value: promise2.then.bind(promise2) }, + catch: { value: promise2.catch.bind(promise2) }, + _executor: { value: chain } + }); + } + add(files) { + return this._runTask(straightThroughStringTask(["add", ...asArray(files)]), trailingFunctionArgument(arguments)); + } + cwd(directory) { + const next = trailingFunctionArgument(arguments); + if (typeof directory === "string") { + return this._runTask(changeWorkingDirectoryTask(directory, this._executor), next); + } + if (typeof (directory == null ? void 0 : directory.path) === "string") { + return this._runTask(changeWorkingDirectoryTask(directory.path, directory.root && this._executor || void 0), next); + } + return this._runTask(configurationErrorTask("Git.cwd: workingDirectory must be supplied as a string"), next); + } + hashObject(path2, write) { + return this._runTask(hashObjectTask(path2, write === true), trailingFunctionArgument(arguments)); + } + init(bare) { + return this._runTask(initTask(bare === true, this._executor.cwd, getTrailingOptions(arguments)), trailingFunctionArgument(arguments)); + } + merge() { + return this._runTask(mergeTask(getTrailingOptions(arguments)), trailingFunctionArgument(arguments)); + } + mergeFromTo(remote, branch2) { + if (!(filterString(remote) && filterString(branch2))) { + return this._runTask(configurationErrorTask(`Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings`)); + } + return this._runTask(mergeTask([remote, branch2, ...getTrailingOptions(arguments)]), trailingFunctionArgument(arguments, false)); + } + outputHandler(handler) { + this._executor.outputHandler = handler; + return this; + } + push() { + const task = pushTask({ + remote: filterType(arguments[0], filterString), + branch: filterType(arguments[1], filterString) + }, getTrailingOptions(arguments)); + return this._runTask(task, trailingFunctionArgument(arguments)); + } + stash() { + return this._runTask(straightThroughStringTask(["stash", ...getTrailingOptions(arguments)]), trailingFunctionArgument(arguments)); + } + status() { + return this._runTask(statusTask(getTrailingOptions(arguments)), trailingFunctionArgument(arguments)); + } + }; + Object.assign(SimpleGitApi.prototype, checkout_default(), commit_default(), config_default(), grep_default(), log_default(), version_default()); + } +}); +var scheduler_exports = {}; +__export2(scheduler_exports, { + Scheduler: () => Scheduler +}); +var createScheduledTask; +var Scheduler; +var init_scheduler = __esm2({ + "src/lib/runners/scheduler.ts"() { + init_utils(); + init_git_logger(); + createScheduledTask = /* @__PURE__ */ (() => { + let id = 0; + return () => { + id++; + const { promise: promise2, done } = (0, import_promise_deferred.createDeferred)(); + return { + promise: promise2, + done, + id + }; + }; + })(); + Scheduler = class { + constructor(concurrency = 2) { + this.concurrency = concurrency; + this.logger = createLogger("", "scheduler"); + this.pending = []; + this.running = []; + this.logger(`Constructed, concurrency=%s`, concurrency); + } + schedule() { + if (!this.pending.length || this.running.length >= this.concurrency) { + this.logger(`Schedule attempt ignored, pending=%s running=%s concurrency=%s`, this.pending.length, this.running.length, this.concurrency); + return; + } + const task = append(this.running, this.pending.shift()); + this.logger(`Attempting id=%s`, task.id); + task.done(() => { + this.logger(`Completing id=`, task.id); + remove2(this.running, task); + this.schedule(); + }); + } + next() { + const { promise: promise2, id } = append(this.pending, createScheduledTask()); + this.logger(`Scheduling id=%s`, id); + this.schedule(); + return promise2; + } + }; + } +}); +var apply_patch_exports = {}; +__export2(apply_patch_exports, { + applyPatchTask: () => applyPatchTask +}); +function applyPatchTask(patches, customArgs) { + return straightThroughStringTask(["apply", ...customArgs, ...patches]); +} +var init_apply_patch = __esm2({ + "src/lib/tasks/apply-patch.ts"() { + init_task(); + } +}); +function branchDeletionSuccess(branch2, hash2) { + return { + branch: branch2, + hash: hash2, + success: true + }; +} +function branchDeletionFailure(branch2) { + return { + branch: branch2, + hash: null, + success: false + }; +} +var BranchDeletionBatch; +var init_BranchDeleteSummary = __esm2({ + "src/lib/responses/BranchDeleteSummary.ts"() { + BranchDeletionBatch = class { + constructor() { + this.all = []; + this.branches = {}; + this.errors = []; + } + get success() { + return !this.errors.length; + } + }; + } +}); +function hasBranchDeletionError(data, processExitCode) { + return processExitCode === 1 && deleteErrorRegex.test(data); +} +var deleteSuccessRegex; +var deleteErrorRegex; +var parsers8; +var parseBranchDeletions; +var init_parse_branch_delete = __esm2({ + "src/lib/parsers/parse-branch-delete.ts"() { + init_BranchDeleteSummary(); + init_utils(); + deleteSuccessRegex = /(\S+)\s+\(\S+\s([^)]+)\)/; + deleteErrorRegex = /^error[^']+'([^']+)'/m; + parsers8 = [ + new LineParser(deleteSuccessRegex, (result, [branch2, hash2]) => { + const deletion = branchDeletionSuccess(branch2, hash2); + result.all.push(deletion); + result.branches[branch2] = deletion; + }), + new LineParser(deleteErrorRegex, (result, [branch2]) => { + const deletion = branchDeletionFailure(branch2); + result.errors.push(deletion); + result.all.push(deletion); + result.branches[branch2] = deletion; + }) + ]; + parseBranchDeletions = (stdOut, stdErr) => { + return parseStringResponse(new BranchDeletionBatch(), parsers8, [stdOut, stdErr]); + }; + } +}); +var BranchSummaryResult; +var init_BranchSummary = __esm2({ + "src/lib/responses/BranchSummary.ts"() { + BranchSummaryResult = class { + constructor() { + this.all = []; + this.branches = {}; + this.current = ""; + this.detached = false; + } + push(status2, detached, name, commit2, label) { + if (status2 === "*") { + this.detached = detached; + this.current = name; + } + this.all.push(name); + this.branches[name] = { + current: status2 === "*", + linkedWorkTree: status2 === "+", + name, + commit: commit2, + label + }; + } + }; + } +}); +function branchStatus(input) { + return input ? input.charAt(0) : ""; +} +function parseBranchSummary(stdOut) { + return parseStringResponse(new BranchSummaryResult(), parsers9, stdOut); +} +var parsers9; +var init_parse_branch = __esm2({ + "src/lib/parsers/parse-branch.ts"() { + init_BranchSummary(); + init_utils(); + parsers9 = [ + new LineParser(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/, (result, [current, name, commit2, label]) => { + result.push(branchStatus(current), true, name, commit2, label); + }), + new LineParser(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s, (result, [current, name, commit2, label]) => { + result.push(branchStatus(current), false, name, commit2, label); + }) + ]; + } +}); +var branch_exports = {}; +__export2(branch_exports, { + branchLocalTask: () => branchLocalTask, + branchTask: () => branchTask, + containsDeleteBranchCommand: () => containsDeleteBranchCommand, + deleteBranchTask: () => deleteBranchTask, + deleteBranchesTask: () => deleteBranchesTask +}); +function containsDeleteBranchCommand(commands2) { + const deleteCommands = ["-d", "-D", "--delete"]; + return commands2.some((command) => deleteCommands.includes(command)); +} +function branchTask(customArgs) { + const isDelete = containsDeleteBranchCommand(customArgs); + const commands2 = ["branch", ...customArgs]; + if (commands2.length === 1) { + commands2.push("-a"); + } + if (!commands2.includes("-v")) { + commands2.splice(1, 0, "-v"); + } + return { + format: "utf-8", + commands: commands2, + parser(stdOut, stdErr) { + if (isDelete) { + return parseBranchDeletions(stdOut, stdErr).all[0]; + } + return parseBranchSummary(stdOut); + } + }; +} +function branchLocalTask() { + const parser3 = parseBranchSummary; + return { + format: "utf-8", + commands: ["branch", "-v"], + parser: parser3 + }; +} +function deleteBranchesTask(branches, forceDelete = false) { + return { + format: "utf-8", + commands: ["branch", "-v", forceDelete ? "-D" : "-d", ...branches], + parser(stdOut, stdErr) { + return parseBranchDeletions(stdOut, stdErr); + }, + onError({ exitCode, stdOut }, error, done, fail) { + if (!hasBranchDeletionError(String(error), exitCode)) { + return fail(error); + } + done(stdOut); + } + }; +} +function deleteBranchTask(branch2, forceDelete = false) { + const task = { + format: "utf-8", + commands: ["branch", "-v", forceDelete ? "-D" : "-d", branch2], + parser(stdOut, stdErr) { + return parseBranchDeletions(stdOut, stdErr).branches[branch2]; + }, + onError({ exitCode, stdErr, stdOut }, error, _, fail) { + if (!hasBranchDeletionError(String(error), exitCode)) { + return fail(error); + } + throw new GitResponseError(task.parser(bufferToString(stdOut), bufferToString(stdErr)), String(error)); + } + }; + return task; +} +var init_branch = __esm2({ + "src/lib/tasks/branch.ts"() { + init_git_response_error(); + init_parse_branch_delete(); + init_parse_branch(); + init_utils(); + } +}); +var parseCheckIgnore; +var init_CheckIgnore = __esm2({ + "src/lib/responses/CheckIgnore.ts"() { + parseCheckIgnore = (text2) => { + return text2.split(/\n/g).map((line) => line.trim()).filter((file) => !!file); + }; + } +}); +var check_ignore_exports = {}; +__export2(check_ignore_exports, { + checkIgnoreTask: () => checkIgnoreTask +}); +function checkIgnoreTask(paths) { + return { + commands: ["check-ignore", ...paths], + format: "utf-8", + parser: parseCheckIgnore + }; +} +var init_check_ignore = __esm2({ + "src/lib/tasks/check-ignore.ts"() { + init_CheckIgnore(); + } +}); +var clone_exports = {}; +__export2(clone_exports, { + cloneMirrorTask: () => cloneMirrorTask, + cloneTask: () => cloneTask +}); +function disallowedCommand(command) { + return /^--upload-pack(=|$)/.test(command); +} +function cloneTask(repo, directory, customArgs) { + const commands2 = ["clone", ...customArgs]; + filterString(repo) && commands2.push(repo); + filterString(directory) && commands2.push(directory); + const banned = commands2.find(disallowedCommand); + if (banned) { + return configurationErrorTask(`git.fetch: potential exploit argument blocked.`); + } + return straightThroughStringTask(commands2); +} +function cloneMirrorTask(repo, directory, customArgs) { + append(customArgs, "--mirror"); + return cloneTask(repo, directory, customArgs); +} +var init_clone = __esm2({ + "src/lib/tasks/clone.ts"() { + init_task(); + init_utils(); + } +}); +function parseFetchResult(stdOut, stdErr) { + const result = { + raw: stdOut, + remote: null, + branches: [], + tags: [], + updated: [], + deleted: [] + }; + return parseStringResponse(result, parsers10, [stdOut, stdErr]); +} +var parsers10; +var init_parse_fetch = __esm2({ + "src/lib/parsers/parse-fetch.ts"() { + init_utils(); + parsers10 = [ + new LineParser(/From (.+)$/, (result, [remote]) => { + result.remote = remote; + }), + new LineParser(/\* \[new branch]\s+(\S+)\s*-> (.+)$/, (result, [name, tracking]) => { + result.branches.push({ + name, + tracking + }); + }), + new LineParser(/\* \[new tag]\s+(\S+)\s*-> (.+)$/, (result, [name, tracking]) => { + result.tags.push({ + name, + tracking + }); + }), + new LineParser(/- \[deleted]\s+\S+\s*-> (.+)$/, (result, [tracking]) => { + result.deleted.push({ + tracking + }); + }), + new LineParser(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/, (result, [from, to, name, tracking]) => { + result.updated.push({ + name, + tracking, + to, + from + }); + }) + ]; + } +}); +var fetch_exports = {}; +__export2(fetch_exports, { + fetchTask: () => fetchTask +}); +function disallowedCommand2(command) { + return /^--upload-pack(=|$)/.test(command); +} +function fetchTask(remote, branch2, customArgs) { + const commands2 = ["fetch", ...customArgs]; + if (remote && branch2) { + commands2.push(remote, branch2); + } + const banned = commands2.find(disallowedCommand2); + if (banned) { + return configurationErrorTask(`git.fetch: potential exploit argument blocked.`); + } + return { + commands: commands2, + format: "utf-8", + parser: parseFetchResult + }; +} +var init_fetch = __esm2({ + "src/lib/tasks/fetch.ts"() { + init_parse_fetch(); + init_task(); + } +}); +function parseMoveResult(stdOut) { + return parseStringResponse({ moves: [] }, parsers11, stdOut); +} +var parsers11; +var init_parse_move = __esm2({ + "src/lib/parsers/parse-move.ts"() { + init_utils(); + parsers11 = [ + new LineParser(/^Renaming (.+) to (.+)$/, (result, [from, to]) => { + result.moves.push({ from, to }); + }) + ]; + } +}); +var move_exports = {}; +__export2(move_exports, { + moveTask: () => moveTask +}); +function moveTask(from, to) { + return { + commands: ["mv", "-v", ...asArray(from), to], + format: "utf-8", + parser: parseMoveResult + }; +} +var init_move = __esm2({ + "src/lib/tasks/move.ts"() { + init_parse_move(); + init_utils(); + } +}); +var pull_exports = {}; +__export2(pull_exports, { + pullTask: () => pullTask +}); +function pullTask(remote, branch2, customArgs) { + const commands2 = ["pull", ...customArgs]; + if (remote && branch2) { + commands2.splice(1, 0, remote, branch2); + } + return { + commands: commands2, + format: "utf-8", + parser(stdOut, stdErr) { + return parsePullResult(stdOut, stdErr); + }, + onError(result, _error, _done, fail) { + const pullError = parsePullErrorResult(bufferToString(result.stdOut), bufferToString(result.stdErr)); + if (pullError) { + return fail(new GitResponseError(pullError)); + } + fail(_error); + } + }; +} +var init_pull = __esm2({ + "src/lib/tasks/pull.ts"() { + init_git_response_error(); + init_parse_pull(); + init_utils(); + } +}); +function parseGetRemotes(text2) { + const remotes = {}; + forEach(text2, ([name]) => remotes[name] = { name }); + return Object.values(remotes); +} +function parseGetRemotesVerbose(text2) { + const remotes = {}; + forEach(text2, ([name, url, purpose]) => { + if (!remotes.hasOwnProperty(name)) { + remotes[name] = { + name, + refs: { fetch: "", push: "" } + }; + } + if (purpose && url) { + remotes[name].refs[purpose.replace(/[^a-z]/g, "")] = url; + } + }); + return Object.values(remotes); +} +function forEach(text2, handler) { + forEachLineWithContent(text2, (line) => handler(line.split(/\s+/))); +} +var init_GetRemoteSummary = __esm2({ + "src/lib/responses/GetRemoteSummary.ts"() { + init_utils(); + } +}); +var remote_exports = {}; +__export2(remote_exports, { + addRemoteTask: () => addRemoteTask, + getRemotesTask: () => getRemotesTask, + listRemotesTask: () => listRemotesTask, + remoteTask: () => remoteTask, + removeRemoteTask: () => removeRemoteTask +}); +function addRemoteTask(remoteName, remoteRepo, customArgs = []) { + return straightThroughStringTask(["remote", "add", ...customArgs, remoteName, remoteRepo]); +} +function getRemotesTask(verbose) { + const commands2 = ["remote"]; + if (verbose) { + commands2.push("-v"); + } + return { + commands: commands2, + format: "utf-8", + parser: verbose ? parseGetRemotesVerbose : parseGetRemotes + }; +} +function listRemotesTask(customArgs = []) { + const commands2 = [...customArgs]; + if (commands2[0] !== "ls-remote") { + commands2.unshift("ls-remote"); + } + return straightThroughStringTask(commands2); +} +function remoteTask(customArgs = []) { + const commands2 = [...customArgs]; + if (commands2[0] !== "remote") { + commands2.unshift("remote"); + } + return straightThroughStringTask(commands2); +} +function removeRemoteTask(remoteName) { + return straightThroughStringTask(["remote", "remove", remoteName]); +} +var init_remote = __esm2({ + "src/lib/tasks/remote.ts"() { + init_GetRemoteSummary(); + init_task(); + } +}); +var stash_list_exports = {}; +__export2(stash_list_exports, { + stashListTask: () => stashListTask +}); +function stashListTask(opt = {}, customArgs) { + const options = parseLogOptions(opt); + const commands2 = ["stash", "list", ...options.commands, ...customArgs]; + const parser3 = createListLogSummaryParser(options.splitter, options.fields, logFormatFromCommand(commands2)); + return validateLogFormatConfig(commands2) || { + commands: commands2, + format: "utf-8", + parser: parser3 + }; +} +var init_stash_list = __esm2({ + "src/lib/tasks/stash-list.ts"() { + init_log_format(); + init_parse_list_log_summary(); + init_diff(); + init_log(); + } +}); +var sub_module_exports = {}; +__export2(sub_module_exports, { + addSubModuleTask: () => addSubModuleTask, + initSubModuleTask: () => initSubModuleTask, + subModuleTask: () => subModuleTask, + updateSubModuleTask: () => updateSubModuleTask +}); +function addSubModuleTask(repo, path2) { + return subModuleTask(["add", repo, path2]); +} +function initSubModuleTask(customArgs) { + return subModuleTask(["init", ...customArgs]); +} +function subModuleTask(customArgs) { + const commands2 = [...customArgs]; + if (commands2[0] !== "submodule") { + commands2.unshift("submodule"); + } + return straightThroughStringTask(commands2); +} +function updateSubModuleTask(customArgs) { + return subModuleTask(["update", ...customArgs]); +} +var init_sub_module = __esm2({ + "src/lib/tasks/sub-module.ts"() { + init_task(); + } +}); +function singleSorted(a, b) { + const aIsNum = isNaN(a); + const bIsNum = isNaN(b); + if (aIsNum !== bIsNum) { + return aIsNum ? 1 : -1; + } + return aIsNum ? sorted(a, b) : 0; +} +function sorted(a, b) { + return a === b ? 0 : a > b ? 1 : -1; +} +function trimmed(input) { + return input.trim(); +} +function toNumber(input) { + if (typeof input === "string") { + return parseInt(input.replace(/^\D+/g, ""), 10) || 0; + } + return 0; +} +var TagList; +var parseTagList; +var init_TagList = __esm2({ + "src/lib/responses/TagList.ts"() { + TagList = class { + constructor(all, latest) { + this.all = all; + this.latest = latest; + } + }; + parseTagList = function(data, customSort = false) { + const tags = data.split("\n").map(trimmed).filter(Boolean); + if (!customSort) { + tags.sort(function(tagA, tagB) { + const partsA = tagA.split("."); + const partsB = tagB.split("."); + if (partsA.length === 1 || partsB.length === 1) { + return singleSorted(toNumber(partsA[0]), toNumber(partsB[0])); + } + for (let i = 0, l = Math.max(partsA.length, partsB.length); i < l; i++) { + const diff3 = sorted(toNumber(partsA[i]), toNumber(partsB[i])); + if (diff3) { + return diff3; + } + } + return 0; + }); + } + const latest = customSort ? tags[0] : [...tags].reverse().find((tag2) => tag2.indexOf(".") >= 0); + return new TagList(tags, latest); + }; + } +}); +var tag_exports = {}; +__export2(tag_exports, { + addAnnotatedTagTask: () => addAnnotatedTagTask, + addTagTask: () => addTagTask, + tagListTask: () => tagListTask +}); +function tagListTask(customArgs = []) { + const hasCustomSort = customArgs.some((option) => /^--sort=/.test(option)); + return { + format: "utf-8", + commands: ["tag", "-l", ...customArgs], + parser(text2) { + return parseTagList(text2, hasCustomSort); + } + }; +} +function addTagTask(name) { + return { + format: "utf-8", + commands: ["tag", name], + parser() { + return { name }; + } + }; +} +function addAnnotatedTagTask(name, tagMessage) { + return { + format: "utf-8", + commands: ["tag", "-a", "-m", tagMessage, name], + parser() { + return { name }; + } + }; +} +var init_tag = __esm2({ + "src/lib/tasks/tag.ts"() { + init_TagList(); + } +}); +var require_git = __commonJS2({ + "src/git.js"(exports2, module2) { + var { GitExecutor: GitExecutor2 } = (init_git_executor(), __toCommonJS2(git_executor_exports)); + var { SimpleGitApi: SimpleGitApi2 } = (init_simple_git_api(), __toCommonJS2(simple_git_api_exports)); + var { Scheduler: Scheduler2 } = (init_scheduler(), __toCommonJS2(scheduler_exports)); + var { configurationErrorTask: configurationErrorTask2 } = (init_task(), __toCommonJS2(task_exports)); + var { + asArray: asArray2, + filterArray: filterArray2, + filterPrimitives: filterPrimitives2, + filterString: filterString2, + filterStringOrStringArray: filterStringOrStringArray2, + filterType: filterType2, + getTrailingOptions: getTrailingOptions2, + trailingFunctionArgument: trailingFunctionArgument2, + trailingOptionsArgument: trailingOptionsArgument2 + } = (init_utils(), __toCommonJS2(utils_exports)); + var { applyPatchTask: applyPatchTask2 } = (init_apply_patch(), __toCommonJS2(apply_patch_exports)); + var { + branchTask: branchTask2, + branchLocalTask: branchLocalTask2, + deleteBranchesTask: deleteBranchesTask2, + deleteBranchTask: deleteBranchTask2 + } = (init_branch(), __toCommonJS2(branch_exports)); + var { checkIgnoreTask: checkIgnoreTask2 } = (init_check_ignore(), __toCommonJS2(check_ignore_exports)); + var { checkIsRepoTask: checkIsRepoTask2 } = (init_check_is_repo(), __toCommonJS2(check_is_repo_exports)); + var { cloneTask: cloneTask2, cloneMirrorTask: cloneMirrorTask2 } = (init_clone(), __toCommonJS2(clone_exports)); + var { cleanWithOptionsTask: cleanWithOptionsTask2, isCleanOptionsArray: isCleanOptionsArray2 } = (init_clean(), __toCommonJS2(clean_exports)); + var { diffSummaryTask: diffSummaryTask2 } = (init_diff(), __toCommonJS2(diff_exports)); + var { fetchTask: fetchTask2 } = (init_fetch(), __toCommonJS2(fetch_exports)); + var { moveTask: moveTask2 } = (init_move(), __toCommonJS2(move_exports)); + var { pullTask: pullTask2 } = (init_pull(), __toCommonJS2(pull_exports)); + var { pushTagsTask: pushTagsTask2 } = (init_push(), __toCommonJS2(push_exports)); + var { + addRemoteTask: addRemoteTask2, + getRemotesTask: getRemotesTask2, + listRemotesTask: listRemotesTask2, + remoteTask: remoteTask2, + removeRemoteTask: removeRemoteTask2 + } = (init_remote(), __toCommonJS2(remote_exports)); + var { getResetMode: getResetMode2, resetTask: resetTask2 } = (init_reset(), __toCommonJS2(reset_exports)); + var { stashListTask: stashListTask2 } = (init_stash_list(), __toCommonJS2(stash_list_exports)); + var { + addSubModuleTask: addSubModuleTask2, + initSubModuleTask: initSubModuleTask2, + subModuleTask: subModuleTask2, + updateSubModuleTask: updateSubModuleTask2 + } = (init_sub_module(), __toCommonJS2(sub_module_exports)); + var { addAnnotatedTagTask: addAnnotatedTagTask2, addTagTask: addTagTask2, tagListTask: tagListTask2 } = (init_tag(), __toCommonJS2(tag_exports)); + var { straightThroughBufferTask: straightThroughBufferTask2, straightThroughStringTask: straightThroughStringTask2 } = (init_task(), __toCommonJS2(task_exports)); + function Git2(options, plugins) { + this._executor = new GitExecutor2(options.binary, options.baseDir, new Scheduler2(options.maxConcurrentProcesses), plugins); + this._trimmed = options.trimmed; + } + (Git2.prototype = Object.create(SimpleGitApi2.prototype)).constructor = Git2; + Git2.prototype.customBinary = function(command) { + this._executor.binary = command; + return this; + }; + Git2.prototype.env = function(name, value) { + if (arguments.length === 1 && typeof name === "object") { + this._executor.env = name; + } else { + (this._executor.env = this._executor.env || {})[name] = value; + } + return this; + }; + Git2.prototype.stashList = function(options) { + return this._runTask(stashListTask2(trailingOptionsArgument2(arguments) || {}, filterArray2(options) && options || []), trailingFunctionArgument2(arguments)); + }; + function createCloneTask(api, task, repoPath, localPath) { + if (typeof repoPath !== "string") { + return configurationErrorTask2(`git.${api}() requires a string 'repoPath'`); + } + return task(repoPath, filterType2(localPath, filterString2), getTrailingOptions2(arguments)); + } + Git2.prototype.clone = function() { + return this._runTask(createCloneTask("clone", cloneTask2, ...arguments), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.mirror = function() { + return this._runTask(createCloneTask("mirror", cloneMirrorTask2, ...arguments), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.mv = function(from, to) { + return this._runTask(moveTask2(from, to), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.checkoutLatestTag = function(then) { + var git = this; + return this.pull(function() { + git.tags(function(err, tags) { + git.checkout(tags.latest, then); + }); + }); + }; + Git2.prototype.pull = function(remote, branch2, options, then) { + return this._runTask(pullTask2(filterType2(remote, filterString2), filterType2(branch2, filterString2), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.fetch = function(remote, branch2) { + return this._runTask(fetchTask2(filterType2(remote, filterString2), filterType2(branch2, filterString2), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.silent = function(silence) { + console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"); + return this; + }; + Git2.prototype.tags = function(options, then) { + return this._runTask(tagListTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.rebase = function() { + return this._runTask(straightThroughStringTask2(["rebase", ...getTrailingOptions2(arguments)]), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.reset = function(mode) { + return this._runTask(resetTask2(getResetMode2(mode), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.revert = function(commit2) { + const next = trailingFunctionArgument2(arguments); + if (typeof commit2 !== "string") { + return this._runTask(configurationErrorTask2("Commit must be a string"), next); + } + return this._runTask(straightThroughStringTask2(["revert", ...getTrailingOptions2(arguments, 0, true), commit2]), next); + }; + Git2.prototype.addTag = function(name) { + const task = typeof name === "string" ? addTagTask2(name) : configurationErrorTask2("Git.addTag requires a tag name"); + return this._runTask(task, trailingFunctionArgument2(arguments)); + }; + Git2.prototype.addAnnotatedTag = function(tagName, tagMessage) { + return this._runTask(addAnnotatedTagTask2(tagName, tagMessage), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.deleteLocalBranch = function(branchName, forceDelete, then) { + return this._runTask(deleteBranchTask2(branchName, typeof forceDelete === "boolean" ? forceDelete : false), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.deleteLocalBranches = function(branchNames, forceDelete, then) { + return this._runTask(deleteBranchesTask2(branchNames, typeof forceDelete === "boolean" ? forceDelete : false), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.branch = function(options, then) { + return this._runTask(branchTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.branchLocal = function(then) { + return this._runTask(branchLocalTask2(), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.raw = function(commands2) { + const createRestCommands = !Array.isArray(commands2); + const command = [].slice.call(createRestCommands ? arguments : commands2, 0); + for (let i = 0; i < command.length && createRestCommands; i++) { + if (!filterPrimitives2(command[i])) { + command.splice(i, command.length - i); + break; + } + } + command.push(...getTrailingOptions2(arguments, 0, true)); + var next = trailingFunctionArgument2(arguments); + if (!command.length) { + return this._runTask(configurationErrorTask2("Raw: must supply one or more command to execute"), next); + } + return this._runTask(straightThroughStringTask2(command, this._trimmed), next); + }; + Git2.prototype.submoduleAdd = function(repo, path2, then) { + return this._runTask(addSubModuleTask2(repo, path2), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.submoduleUpdate = function(args, then) { + return this._runTask(updateSubModuleTask2(getTrailingOptions2(arguments, true)), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.submoduleInit = function(args, then) { + return this._runTask(initSubModuleTask2(getTrailingOptions2(arguments, true)), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.subModule = function(options, then) { + return this._runTask(subModuleTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.listRemote = function() { + return this._runTask(listRemotesTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.addRemote = function(remoteName, remoteRepo, then) { + return this._runTask(addRemoteTask2(remoteName, remoteRepo, getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.removeRemote = function(remoteName, then) { + return this._runTask(removeRemoteTask2(remoteName), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.getRemotes = function(verbose, then) { + return this._runTask(getRemotesTask2(verbose === true), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.remote = function(options, then) { + return this._runTask(remoteTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.tag = function(options, then) { + const command = getTrailingOptions2(arguments); + if (command[0] !== "tag") { + command.unshift("tag"); + } + return this._runTask(straightThroughStringTask2(command), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.updateServerInfo = function(then) { + return this._runTask(straightThroughStringTask2(["update-server-info"]), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.pushTags = function(remote, then) { + const task = pushTagsTask2({ remote: filterType2(remote, filterString2) }, getTrailingOptions2(arguments)); + return this._runTask(task, trailingFunctionArgument2(arguments)); + }; + Git2.prototype.rm = function(files) { + return this._runTask(straightThroughStringTask2(["rm", "-f", ...asArray2(files)]), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.rmKeepLocal = function(files) { + return this._runTask(straightThroughStringTask2(["rm", "--cached", ...asArray2(files)]), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.catFile = function(options, then) { + return this._catFile("utf-8", arguments); + }; + Git2.prototype.binaryCatFile = function() { + return this._catFile("buffer", arguments); + }; + Git2.prototype._catFile = function(format, args) { + var handler = trailingFunctionArgument2(args); + var command = ["cat-file"]; + var options = args[0]; + if (typeof options === "string") { + return this._runTask(configurationErrorTask2("Git.catFile: options must be supplied as an array of strings"), handler); + } + if (Array.isArray(options)) { + command.push.apply(command, options); + } + const task = format === "buffer" ? straightThroughBufferTask2(command) : straightThroughStringTask2(command); + return this._runTask(task, handler); + }; + Git2.prototype.diff = function(options, then) { + const task = filterString2(options) ? configurationErrorTask2("git.diff: supplying options as a single string is no longer supported, switch to an array of strings") : straightThroughStringTask2(["diff", ...getTrailingOptions2(arguments)]); + return this._runTask(task, trailingFunctionArgument2(arguments)); + }; + Git2.prototype.diffSummary = function() { + return this._runTask(diffSummaryTask2(getTrailingOptions2(arguments, 1)), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.applyPatch = function(patches) { + const task = !filterStringOrStringArray2(patches) ? configurationErrorTask2(`git.applyPatch requires one or more string patches as the first argument`) : applyPatchTask2(asArray2(patches), getTrailingOptions2([].slice.call(arguments, 1))); + return this._runTask(task, trailingFunctionArgument2(arguments)); + }; + Git2.prototype.revparse = function() { + const commands2 = ["rev-parse", ...getTrailingOptions2(arguments, true)]; + return this._runTask(straightThroughStringTask2(commands2, true), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.show = function(options, then) { + return this._runTask(straightThroughStringTask2(["show", ...getTrailingOptions2(arguments, 1)]), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.clean = function(mode, options, then) { + const usingCleanOptionsArray = isCleanOptionsArray2(mode); + const cleanMode = usingCleanOptionsArray && mode.join("") || filterType2(mode, filterString2) || ""; + const customArgs = getTrailingOptions2([].slice.call(arguments, usingCleanOptionsArray ? 1 : 0)); + return this._runTask(cleanWithOptionsTask2(cleanMode, customArgs), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.exec = function(then) { + const task = { + commands: [], + format: "utf-8", + parser() { + if (typeof then === "function") { + then(); + } + } + }; + return this._runTask(task); + }; + Git2.prototype.clearQueue = function() { + return this; + }; + Git2.prototype.checkIgnore = function(pathnames, then) { + return this._runTask(checkIgnoreTask2(asArray2(filterType2(pathnames, filterStringOrStringArray2, []))), trailingFunctionArgument2(arguments)); + }; + Git2.prototype.checkIsRepo = function(checkType, then) { + return this._runTask(checkIsRepoTask2(filterType2(checkType, filterString2)), trailingFunctionArgument2(arguments)); + }; + module2.exports = Git2; + } +}); +init_git_error(); +var GitConstructError = class extends GitError { + constructor(config, message) { + super(void 0, message); + this.config = config; + } +}; +init_git_error(); +init_git_error(); +var GitPluginError = class extends GitError { + constructor(task, plugin, message) { + super(task, message); + this.task = task; + this.plugin = plugin; + Object.setPrototypeOf(this, new.target.prototype); + } +}; +init_git_response_error(); +init_task_configuration_error(); +init_check_is_repo(); +init_clean(); +init_config(); +init_grep(); +init_reset(); +function abortPlugin(signal) { + if (!signal) { + return; + } + const onSpawnAfter = { + type: "spawn.after", + action(_data, context) { + function kill() { + context.kill(new GitPluginError(void 0, "abort", "Abort signal received")); + } + signal.addEventListener("abort", kill); + context.spawned.on("close", () => signal.removeEventListener("abort", kill)); + } + }; + const onSpawnBefore = { + type: "spawn.before", + action(_data, context) { + if (signal.aborted) { + context.kill(new GitPluginError(void 0, "abort", "Abort already signaled")); + } + } + }; + return [onSpawnBefore, onSpawnAfter]; +} +function isConfigSwitch(arg) { + return typeof arg === "string" && arg.trim().toLowerCase() === "-c"; +} +function preventProtocolOverride(arg, next) { + if (!isConfigSwitch(arg)) { + return; + } + if (!/^\s*protocol(.[a-z]+)?.allow/.test(next)) { + return; + } + throw new GitPluginError(void 0, "unsafe", "Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol"); +} +function preventUploadPack(arg, method2) { + if (/^\s*--(upload|receive)-pack/.test(arg)) { + throw new GitPluginError(void 0, "unsafe", `Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack`); + } + if (method2 === "clone" && /^\s*-u\b/.test(arg)) { + throw new GitPluginError(void 0, "unsafe", `Use of clone with option -u is not permitted without enabling allowUnsafePack`); + } + if (method2 === "push" && /^\s*--exec\b/.test(arg)) { + throw new GitPluginError(void 0, "unsafe", `Use of push with option --exec is not permitted without enabling allowUnsafePack`); + } +} +function blockUnsafeOperationsPlugin({ + allowUnsafeProtocolOverride = false, + allowUnsafePack = false +} = {}) { + return { + type: "spawn.args", + action(args, context) { + args.forEach((current, index2) => { + const next = index2 < args.length ? args[index2 + 1] : ""; + allowUnsafeProtocolOverride || preventProtocolOverride(current, next); + allowUnsafePack || preventUploadPack(current, context.method); + }); + return args; + } + }; +} +init_utils(); +function commandConfigPrefixingPlugin(configuration) { + const prefix = prefixedArray(configuration, "-c"); + return { + type: "spawn.args", + action(data) { + return [...prefix, ...data]; + } + }; +} +init_utils(); +var never = (0, import_promise_deferred2.deferred)().promise; +function completionDetectionPlugin({ + onClose = true, + onExit = 50 +} = {}) { + function createEvents() { + let exitCode = -1; + const events = { + close: (0, import_promise_deferred2.deferred)(), + closeTimeout: (0, import_promise_deferred2.deferred)(), + exit: (0, import_promise_deferred2.deferred)(), + exitTimeout: (0, import_promise_deferred2.deferred)() + }; + const result = Promise.race([ + onClose === false ? never : events.closeTimeout.promise, + onExit === false ? never : events.exitTimeout.promise + ]); + configureTimeout(onClose, events.close, events.closeTimeout); + configureTimeout(onExit, events.exit, events.exitTimeout); + return { + close(code) { + exitCode = code; + events.close.done(); + }, + exit(code) { + exitCode = code; + events.exit.done(); + }, + get exitCode() { + return exitCode; + }, + result + }; + } + function configureTimeout(flag, event, timeout) { + if (flag === false) { + return; + } + (flag === true ? event.promise : event.promise.then(() => delay(flag))).then(timeout.done); + } + return { + type: "spawn.after", + action(_0, _1) { + return __async(this, arguments, function* (_data, { spawned, close }) { + var _a2, _b; + const events = createEvents(); + let deferClose = true; + let quickClose = () => void (deferClose = false); + (_a2 = spawned.stdout) == null ? void 0 : _a2.on("data", quickClose); + (_b = spawned.stderr) == null ? void 0 : _b.on("data", quickClose); + spawned.on("error", quickClose); + spawned.on("close", (code) => events.close(code)); + spawned.on("exit", (code) => events.exit(code)); + try { + yield events.result; + if (deferClose) { + yield delay(50); + } + close(events.exitCode); + } catch (err) { + close(events.exitCode, err); + } + }); + } + }; +} +init_git_error(); +function isTaskError(result) { + return !!(result.exitCode && result.stdErr.length); +} +function getErrorMessage(result) { + return Buffer.concat([...result.stdOut, ...result.stdErr]); +} +function errorDetectionHandler(overwrite = false, isError = isTaskError, errorMessage = getErrorMessage) { + return (error, result) => { + if (!overwrite && error || !isError(result)) { + return error; + } + return errorMessage(result); + }; +} +function errorDetectionPlugin(config) { + return { + type: "task.error", + action(data, context) { + const error = config(data.error, { + stdErr: context.stdErr, + stdOut: context.stdOut, + exitCode: context.exitCode + }); + if (Buffer.isBuffer(error)) { + return { error: new GitError(void 0, error.toString("utf-8")) }; + } + return { + error + }; + } + }; +} +init_utils(); +var PluginStore = class { + constructor() { + this.plugins = /* @__PURE__ */ new Set(); + } + add(plugin) { + const plugins = []; + asArray(plugin).forEach((plugin2) => plugin2 && this.plugins.add(append(plugins, plugin2))); + return () => { + plugins.forEach((plugin2) => this.plugins.delete(plugin2)); + }; + } + exec(type, data, context) { + let output = data; + const contextual = Object.freeze(Object.create(context)); + for (const plugin of this.plugins) { + if (plugin.type === type) { + output = plugin.action(output, contextual); + } + } + return output; + } +}; +init_utils(); +function progressMonitorPlugin(progress) { + const progressCommand = "--progress"; + const progressMethods = ["checkout", "clone", "fetch", "pull", "push"]; + const onProgress = { + type: "spawn.after", + action(_data, context) { + var _a2; + if (!context.commands.includes(progressCommand)) { + return; + } + (_a2 = context.spawned.stderr) == null ? void 0 : _a2.on("data", (chunk) => { + const message = /^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(chunk.toString("utf8")); + if (!message) { + return; + } + progress({ + method: context.method, + stage: progressEventStage(message[1]), + progress: asNumber(message[2]), + processed: asNumber(message[3]), + total: asNumber(message[4]) + }); + }); + } + }; + const onArgs = { + type: "spawn.args", + action(args, context) { + if (!progressMethods.includes(context.method)) { + return args; + } + return including(args, progressCommand); + } + }; + return [onArgs, onProgress]; +} +function progressEventStage(input) { + return String(input.toLowerCase().split(" ", 1)) || "unknown"; +} +init_utils(); +function spawnOptionsPlugin(spawnOptions) { + const options = pick(spawnOptions, ["uid", "gid"]); + return { + type: "spawn.options", + action(data) { + return __spreadValues(__spreadValues({}, options), data); + } + }; +} +function timeoutPlugin({ + block, + stdErr = true, + stdOut = true +}) { + if (block > 0) { + return { + type: "spawn.after", + action(_data, context) { + var _a2, _b; + let timeout; + function wait3() { + timeout && clearTimeout(timeout); + timeout = setTimeout(kill, block); + } + function stop() { + var _a3, _b2; + (_a3 = context.spawned.stdout) == null ? void 0 : _a3.off("data", wait3); + (_b2 = context.spawned.stderr) == null ? void 0 : _b2.off("data", wait3); + context.spawned.off("exit", stop); + context.spawned.off("close", stop); + timeout && clearTimeout(timeout); + } + function kill() { + stop(); + context.kill(new GitPluginError(void 0, "timeout", `block timeout reached`)); + } + stdOut && ((_a2 = context.spawned.stdout) == null ? void 0 : _a2.on("data", wait3)); + stdErr && ((_b = context.spawned.stderr) == null ? void 0 : _b.on("data", wait3)); + context.spawned.on("exit", stop); + context.spawned.on("close", stop); + wait3(); + } + }; + } +} +init_utils(); +var Git = require_git(); +function gitInstanceFactory(baseDir, options) { + const plugins = new PluginStore(); + const config = createInstanceConfig(baseDir && (typeof baseDir === "string" ? { baseDir } : baseDir) || {}, options); + if (!folderExists(config.baseDir)) { + throw new GitConstructError(config, `Cannot use simple-git on a directory that does not exist`); + } + if (Array.isArray(config.config)) { + plugins.add(commandConfigPrefixingPlugin(config.config)); + } + plugins.add(blockUnsafeOperationsPlugin(config.unsafe)); + plugins.add(completionDetectionPlugin(config.completion)); + config.abort && plugins.add(abortPlugin(config.abort)); + config.progress && plugins.add(progressMonitorPlugin(config.progress)); + config.timeout && plugins.add(timeoutPlugin(config.timeout)); + config.spawnOptions && plugins.add(spawnOptionsPlugin(config.spawnOptions)); + plugins.add(errorDetectionPlugin(errorDetectionHandler(true))); + config.errors && plugins.add(errorDetectionPlugin(config.errors)); + return new Git(config, plugins); +} +init_git_response_error(); +var esm_default = gitInstanceFactory; + +// src/constants.ts +init_polyfill_buffer(); +var import_obsidian2 = require("obsidian"); +var DATE_FORMAT = "YYYY-MM-DD"; +var DATE_TIME_FORMAT_MINUTES = `${DATE_FORMAT} HH:mm`; +var DATE_TIME_FORMAT_SECONDS = `${DATE_FORMAT} HH:mm:ss`; +var GIT_LINE_AUTHORING_MOVEMENT_DETECTION_MINIMAL_LENGTH = 40; +var DEFAULT_SETTINGS = { + commitMessage: "vault backup: {{date}}", + commitDateFormat: DATE_TIME_FORMAT_SECONDS, + autoSaveInterval: 0, + autoPushInterval: 0, + autoPullInterval: 0, + autoPullOnBoot: false, + disablePush: false, + pullBeforePush: true, + disablePopups: false, + disablePopupsForNoChanges: false, + listChangedFilesInMessageBody: false, + showStatusBar: true, + updateSubmodules: false, + syncMethod: "merge", + customMessageOnAutoBackup: false, + autoBackupAfterFileChange: false, + treeStructure: false, + refreshSourceControl: import_obsidian2.Platform.isDesktopApp, + basePath: "", + differentIntervalCommitAndPush: false, + changedFilesInStatusBar: false, + showedMobileNotice: false, + refreshSourceControlTimer: 7e3, + showBranchStatusBar: true, + setLastSaveToLastCommit: false, + submoduleRecurseCheckout: false, + gitDir: "", + showFileMenu: true, + authorInHistoryView: "hide", + dateInHistoryView: false, + lineAuthor: { + show: false, + followMovement: "inactive", + authorDisplay: "initials", + showCommitHash: false, + dateTimeFormatOptions: "date", + dateTimeFormatCustomString: DATE_TIME_FORMAT_MINUTES, + dateTimeTimezone: "viewer-local", + coloringMaxAge: "1y", + // colors were picked via: + // https://color.adobe.com/de/create/color-accessibility + colorNew: { r: 255, g: 150, b: 150 }, + colorOld: { r: 120, g: 160, b: 255 }, + textColorCss: "var(--text-muted)", + // more pronounced than line numbers, but less than the content text + ignoreWhitespace: false, + gutterSpacingFallbackLength: 5 + } +}; +var SOURCE_CONTROL_VIEW_CONFIG = { + type: "git-view", + name: "Source Control", + icon: "git-pull-request" +}; +var HISTORY_VIEW_CONFIG = { + type: "git-history-view", + name: "History", + icon: "history" +}; +var DIFF_VIEW_CONFIG = { + type: "diff-view", + name: "Diff View", + icon: "git-pull-request" +}; + +// src/types.ts +init_polyfill_buffer(); +function mergeSettingsByPriority(low, high) { + const lineAuthor = Object.assign({}, low.lineAuthor, high.lineAuthor); + return Object.assign({}, low, high, { lineAuthor }); +} + +// src/utils.ts +init_polyfill_buffer(); +var cssColorConverter = __toESM(require_lib3()); +var import_deep_equal = __toESM(require_deep_equal()); +var import_obsidian3 = require("obsidian"); +var worthWalking2 = (filepath, root2) => { + if (filepath === "." || root2 == null || root2.length === 0 || root2 === ".") { + return true; + } + if (root2.length >= filepath.length) { + return root2.startsWith(filepath); + } else { + return filepath.startsWith(root2); + } +}; +function getNewLeaf(event) { + let leaf; + if (event) { + if (event.button === 0 || event.button === 1) { + const type = import_obsidian3.Keymap.isModEvent(event); + leaf = app.workspace.getLeaf(type); + } + } else { + leaf = app.workspace.getLeaf(false); + } + return leaf; +} +function impossibleBranch(x) { + throw new Error("Impossible branch: " + x); +} +function rgbToString(rgb) { + return `rgb(${rgb.r},${rgb.g},${rgb.b})`; +} +function convertToRgb(str) { + var _a2; + const color = (_a2 = cssColorConverter.fromString(str)) == null ? void 0 : _a2.toRgbaArray(); + if (color === void 0) { + return void 0; + } + const [r, g, b] = color; + return { r, g, b }; +} +function momentToEpochSeconds(instant) { + return instant.diff(import_obsidian3.moment.unix(0), "seconds"); +} +function median(array) { + if (array.length === 0) + return void 0; + return array.slice().sort()[Math.floor(array.length / 2)]; +} +function strictDeepEqual(a, b) { + return (0, import_deep_equal.default)(a, b, { strict: true }); +} +function resizeToLength(original, desiredLength, fillChar) { + if (original.length <= desiredLength) { + const prefix = new Array(desiredLength - original.length).fill(fillChar).join(""); + return prefix + original; + } else { + return original.substring(original.length - desiredLength); + } +} +function prefixOfLengthAsWhitespace(toBeRenderedText, whitespacePrefixLength) { + if (whitespacePrefixLength <= 0) + return toBeRenderedText; + const whitespacePrefix = new Array(whitespacePrefixLength).fill(" ").join(""); + const originalSuffix = toBeRenderedText.substring( + whitespacePrefixLength, + toBeRenderedText.length + ); + return whitespacePrefix + originalSuffix; +} +function between(l, x, r) { + return l <= x && x <= r; +} +function splitRemoteBranch(remoteBranch) { + const [remote, ...branch2] = remoteBranch.split("/"); + return [remote, branch2.length === 0 ? void 0 : branch2.join("/")]; +} +function getDisplayPath(path2) { + if (path2.endsWith("/")) + return path2; + return path2.split("/").last().replace(".md", ""); +} +function formatMinutes(minutes) { + if (minutes === 1) + return "1 minute"; + return `${minutes} minutes`; +} + +// src/gitManager/gitManager.ts +init_polyfill_buffer(); +var GitManager = class { + constructor(plugin) { + this.plugin = plugin; + this.app = plugin.app; + } + // Constructs a path relative to the vault from a path relative to the git repository + getRelativeVaultPath(path2) { + if (this.plugin.settings.basePath) { + return this.plugin.settings.basePath + "/" + path2; + } else { + return path2; + } + } + // Constructs a path relative to the git repository from a path relative to the vault + // + // @param doConversion - If false, the path is returned as is. This is added because that parameter is often passed on to functions where this method is called. + getRelativeRepoPath(path2, doConversion = true) { + if (doConversion) { + if (this.plugin.settings.basePath.length > 0) { + return path2.substring(this.plugin.settings.basePath.length + 1); + } + } + return path2; + } + _getTreeStructure(children2, beginLength = 0) { + const list = []; + children2 = [...children2]; + while (children2.length > 0) { + const first2 = children2.first(); + const restPath = first2.path.substring(beginLength); + if (restPath.contains("/")) { + const title = restPath.substring(0, restPath.indexOf("/")); + const childrenWithSameTitle = children2.filter((item) => { + return item.path.substring(beginLength).startsWith(title + "/"); + }); + childrenWithSameTitle.forEach((item) => children2.remove(item)); + const path2 = first2.path.substring( + 0, + restPath.indexOf("/") + beginLength + ); + list.push({ + title, + path: path2, + vaultPath: this.getRelativeVaultPath(path2), + children: this._getTreeStructure( + childrenWithSameTitle, + (beginLength > 0 ? beginLength + title.length : title.length) + 1 + ) + }); + } else { + list.push({ + title: restPath, + data: first2, + path: first2.path, + vaultPath: this.getRelativeVaultPath(first2.path) + }); + children2.remove(first2); + } + } + return list; + } + /* + * Sorts the children and simplifies the title + * If a node only contains another subdirectory, that subdirectory is moved up one level and integrated into the parent node + */ + simplify(tree) { + var _a2, _b, _c, _d; + for (const node of tree) { + while (true) { + const singleChild = ((_a2 = node.children) == null ? void 0 : _a2.length) == 1; + const singleChildIsDir = ((_c = (_b = node.children) == null ? void 0 : _b.first()) == null ? void 0 : _c.data) == void 0; + if (!(node.children != void 0 && singleChild && singleChildIsDir)) + break; + const child = node.children.first(); + node.title += "/" + child.title; + node.data = child.data; + node.path = child.path; + node.vaultPath = child.vaultPath; + node.children = child.children; + } + if (node.children != void 0) { + this.simplify(node.children); + } + (_d = node.children) == null ? void 0 : _d.sort((a, b) => { + const dirCompare = (b.data == void 0 ? 1 : 0) - (a.data == void 0 ? 1 : 0); + if (dirCompare != 0) { + return dirCompare; + } else { + return a.title.localeCompare(b.title); + } + }); + } + return tree.sort((a, b) => { + const dirCompare = (b.data == void 0 ? 1 : 0) - (a.data == void 0 ? 1 : 0); + if (dirCompare != 0) { + return dirCompare; + } else { + return a.title.localeCompare(b.title); + } + }); + } + getTreeStructure(children2) { + const tree = this._getTreeStructure(children2); + const res = this.simplify(tree); + return res; + } + async formatCommitMessage(template) { + let status2; + if (template.includes("{{numFiles}}")) { + status2 = await this.status(); + const numFiles = status2.staged.length; + template = template.replace("{{numFiles}}", String(numFiles)); + } + if (template.includes("{{hostname}}")) { + const hostname = this.plugin.localStorage.getHostname() || ""; + template = template.replace("{{hostname}}", hostname); + } + if (template.includes("{{files}}")) { + status2 = status2 != null ? status2 : await this.status(); + const changeset = {}; + status2.staged.forEach((value) => { + if (value.index in changeset) { + changeset[value.index].push(value.path); + } else { + changeset[value.index] = [value.path]; + } + }); + const chunks = []; + for (const [action, files2] of Object.entries(changeset)) { + chunks.push(action + " " + files2.join(" ")); + } + const files = chunks.join(", "); + template = template.replace("{{files}}", files); + } + const moment6 = window.moment; + template = template.replace( + "{{date}}", + moment6().format(this.plugin.settings.commitDateFormat) + ); + if (this.plugin.settings.listChangedFilesInMessageBody) { + template = template + "\n\nAffected files:\n" + (status2 != null ? status2 : await this.status()).staged.map((e) => e.path).join("\n"); + } + return template; + } +}; + +// src/gitManager/simpleGit.ts +var SimpleGit = class extends GitManager { + constructor(plugin) { + super(plugin); + } + async setGitInstance(ignoreError = false) { + if (this.isGitInstalled()) { + const adapter = this.app.vault.adapter; + const path2 = adapter.getBasePath(); + let basePath = path2; + if (this.plugin.settings.basePath) { + const exists2 = await adapter.exists( + (0, import_obsidian4.normalizePath)(this.plugin.settings.basePath) + ); + if (exists2) { + basePath = path2 + import_path.sep + this.plugin.settings.basePath; + } else if (!ignoreError) { + new import_obsidian4.Notice("ObsidianGit: Base path does not exist"); + } + } + this.git = esm_default({ + baseDir: basePath, + binary: this.plugin.localStorage.getGitPath() || void 0, + config: ["core.quotepath=off"] + }); + const pathPaths = this.plugin.localStorage.getPATHPaths(); + const envVars = this.plugin.localStorage.getEnvVars(); + const gitDir = this.plugin.settings.gitDir; + if (pathPaths.length > 0) { + const path3 = process.env["PATH"] + ":" + pathPaths.join(":"); + process.env["PATH"] = path3; + } + if (gitDir) { + process.env["GIT_DIR"] = gitDir; + } + for (const envVar of envVars) { + const [key2, value] = envVar.split("="); + process.env[key2] = value; + } + import_debug2.default.enable("simple-git"); + if (await this.git.checkIsRepo()) { + await this.git.cwd(await this.git.revparse("--show-toplevel")); + } + } + } + async status() { + this.plugin.setState(1 /* status */); + const status2 = await this.git.status((err) => this.onError(err)); + this.plugin.setState(0 /* idle */); + const allFilesFormatted = status2.files.map((e) => { + const res = this.formatPath(e); + return { + path: res.path, + from: res.from, + index: e.index === "?" ? "U" : e.index, + working_dir: e.working_dir === "?" ? "U" : e.working_dir, + vault_path: this.getRelativeVaultPath(res.path) + }; + }); + return { + all: allFilesFormatted, + changed: allFilesFormatted.filter((e) => e.working_dir !== " "), + staged: allFilesFormatted.filter( + (e) => e.index !== " " && e.index != "U" + ), + conflicted: status2.conflicted.map( + (path2) => this.formatPath({ path: path2 }).path + ) + }; + } + async submoduleAwareHeadRevisonInContainingDirectory(filepath) { + const repoPath = this.getRelativeRepoPath(filepath); + const containingDirectory = path.dirname(repoPath); + const args = ["-C", containingDirectory, "rev-parse", "HEAD"]; + const result = this.git.raw(args); + result.catch( + (err) => console.warn("obsidian-git: rev-parse error:", err) + ); + return result; + } + async getSubmodulePaths() { + return new Promise(async (resolve) => { + this.git.outputHandler(async (cmd, stdout, stderr, args) => { + if (!(args.contains("submodule") && args.contains("foreach"))) { + return; + } + let body = ""; + const root2 = this.app.vault.adapter.getBasePath() + (this.plugin.settings.basePath ? "/" + this.plugin.settings.basePath : ""); + stdout.on("data", (chunk) => { + body += chunk.toString("utf8"); + }); + stdout.on("end", async () => { + const submods = body.split("\n"); + const strippedSubmods = submods.map((i) => { + const submod = i.match(/'([^']*)'/); + if (submod != void 0) { + return root2 + "/" + submod[1] + import_path.sep; + } + }).filter((i) => !!i); + strippedSubmods.reverse(); + resolve(strippedSubmods); + }); + }); + await this.git.subModule(["foreach", "--recursive", ""]); + this.git.outputHandler(() => { + }); + }); + } + //Remove wrong `"` like "My file.md" + formatPath(path2, renamed = false) { + function format(path3) { + if (path3 == void 0) + return void 0; + if (path3.startsWith('"') && path3.endsWith('"')) { + return path3.substring(1, path3.length - 1); + } else { + return path3; + } + } + if (renamed) { + return { + from: format(path2.from), + path: format(path2.path) + }; + } else { + return { + path: format(path2.path) + }; + } + } + async blame(path2, trackMovement, ignoreWhitespace) { + path2 = this.getRelativeRepoPath(path2); + if (!await this.isTracked(path2)) + return "untracked"; + const inSubmodule = await this.getSubmoduleOfFile(path2); + const args = inSubmodule ? ["-C", inSubmodule.submodule] : []; + const relativePath = inSubmodule ? inSubmodule.relativeFilepath : path2; + args.push("blame", "--porcelain"); + if (ignoreWhitespace) + args.push("-w"); + const trackCArg = `-C${GIT_LINE_AUTHORING_MOVEMENT_DETECTION_MINIMAL_LENGTH}`; + switch (trackMovement) { + case "inactive": + break; + case "same-commit": + args.push("-C", trackCArg); + break; + case "all-commits": + args.push("-C", "-C", trackCArg); + break; + default: + impossibleBranch(trackMovement); + } + args.push("--", relativePath); + const rawBlame = await this.git.raw( + args, + (err) => err && console.warn("git-blame", err) + ); + return parseBlame(rawBlame); + } + async isTracked(path2) { + const inSubmodule = await this.getSubmoduleOfFile(path2); + const args = inSubmodule ? ["-C", inSubmodule.submodule] : []; + const relativePath = inSubmodule ? inSubmodule.relativeFilepath : path2; + args.push("ls-files", "--", relativePath); + return this.git.raw(args, (err) => err && console.warn("ls-files", err)).then((x) => x.trim() !== ""); + } + async commitAll({ message }) { + if (this.plugin.settings.updateSubmodules) { + this.plugin.setState(4 /* commit */); + const submodulePaths = await this.getSubmodulePaths(); + for (const item of submodulePaths) { + await this.git.cwd({ path: item, root: false }).add("-A", (err) => this.onError(err)); + await this.git.cwd({ path: item, root: false }).commit( + await this.formatCommitMessage(message), + (err) => this.onError(err) + ); + } + } + this.plugin.setState(3 /* add */); + await this.git.add("-A", (err) => this.onError(err)); + this.plugin.setState(4 /* commit */); + const res = await this.git.commit( + await this.formatCommitMessage(message), + (err) => this.onError(err) + ); + dispatchEvent(new CustomEvent("git-head-update")); + return res.summary.changes; + } + async commit({ + message, + amend + }) { + this.plugin.setState(4 /* commit */); + const res = (await this.git.commit( + await this.formatCommitMessage(message), + amend ? ["--amend"] : [], + (err) => this.onError(err) + )).summary.changes; + dispatchEvent(new CustomEvent("git-head-update")); + this.plugin.setState(0 /* idle */); + return res; + } + async stage(path2, relativeToVault) { + this.plugin.setState(3 /* add */); + path2 = this.getRelativeRepoPath(path2, relativeToVault); + await this.git.add(["--", path2], (err) => this.onError(err)); + this.plugin.setState(0 /* idle */); + } + async stageAll({ dir }) { + this.plugin.setState(3 /* add */); + await this.git.add(dir != null ? dir : "-A", (err) => this.onError(err)); + this.plugin.setState(0 /* idle */); + } + async unstageAll({ dir }) { + this.plugin.setState(3 /* add */); + await this.git.reset( + dir != void 0 ? ["--", dir] : [], + (err) => this.onError(err) + ); + this.plugin.setState(0 /* idle */); + } + async unstage(path2, relativeToVault) { + this.plugin.setState(3 /* add */); + path2 = this.getRelativeRepoPath(path2, relativeToVault); + await this.git.reset(["--", path2], (err) => this.onError(err)); + this.plugin.setState(0 /* idle */); + } + async discard(filepath) { + this.plugin.setState(3 /* add */); + await this.git.checkout(["--", filepath], (err) => this.onError(err)); + this.plugin.setState(0 /* idle */); + } + async hashObject(filepath) { + filepath = this.getRelativeRepoPath(filepath); + const inSubmodule = await this.getSubmoduleOfFile(filepath); + const args = inSubmodule ? ["-C", inSubmodule.submodule] : []; + const relativeFilepath = inSubmodule ? inSubmodule.relativeFilepath : filepath; + args.push("hash-object", "--", relativeFilepath); + const revision = this.git.raw(args); + revision.catch( + (err) => err && console.warn("obsidian-git. hash-object failed:", err == null ? void 0 : err.message) + ); + return revision; + } + async discardAll({ dir }) { + return this.discard(dir != null ? dir : "."); + } + async pull() { + this.plugin.setState(2 /* pull */); + if (this.plugin.settings.updateSubmodules) + await this.git.subModule( + ["update", "--remote", "--merge", "--recursive"], + (err) => this.onError(err) + ); + const branchInfo = await this.branchInfo(); + const localCommit = await this.git.revparse( + [branchInfo.current], + (err) => this.onError(err) + ); + if (!branchInfo.tracking && this.plugin.settings.updateSubmodules) { + this.plugin.log( + "No tracking branch found. Ignoring pull of main repo and updating submodules only." + ); + return; + } + await this.git.fetch((err) => this.onError(err)); + const upstreamCommit = await this.git.revparse( + [branchInfo.tracking], + (err) => this.onError(err) + ); + if (localCommit !== upstreamCommit) { + if (this.plugin.settings.syncMethod === "merge" || this.plugin.settings.syncMethod === "rebase") { + try { + switch (this.plugin.settings.syncMethod) { + case "merge": + await this.git.merge([branchInfo.tracking]); + break; + case "rebase": + await this.git.rebase([branchInfo.tracking]); + } + } catch (err) { + this.plugin.displayError( + `Pull failed (${this.plugin.settings.syncMethod}): ${err.message}` + ); + return; + } + } else if (this.plugin.settings.syncMethod === "reset") { + try { + await this.git.raw( + [ + "update-ref", + `refs/heads/${branchInfo.current}`, + upstreamCommit + ], + (err) => this.onError(err) + ); + await this.unstageAll({}); + } catch (err) { + this.plugin.displayError( + `Sync failed (${this.plugin.settings.syncMethod}): ${err.message}` + ); + } + } + dispatchEvent(new CustomEvent("git-head-update")); + const afterMergeCommit = await this.git.revparse( + [branchInfo.current], + (err) => this.onError(err) + ); + const filesChanged = await this.git.diff([ + `${localCommit}..${afterMergeCommit}`, + "--name-only" + ]); + return filesChanged.split(/\r\n|\r|\n/).filter((value) => value.length > 0).map((e) => { + return { + path: e, + working_dir: "P", + vault_path: this.getRelativeVaultPath(e) + }; + }); + } else { + return []; + } + } + async push() { + this.plugin.setState(5 /* push */); + if (this.plugin.settings.updateSubmodules) { + const res = await this.git.env({ ...process.env, OBSIDIAN_GIT: 1 }).subModule( + [ + "foreach", + "--recursive", + `tracking=$(git for-each-ref --format='%(upstream:short)' "$(git symbolic-ref -q HEAD)"); echo $tracking; if [ ! -z "$(git diff --shortstat $tracking)" ]; then git push; fi` + ], + (err) => this.onError(err) + ); + console.log(res); + } + const status2 = await this.git.status(); + const trackingBranch = status2.tracking; + const currentBranch2 = status2.current; + if (!trackingBranch && this.plugin.settings.updateSubmodules) { + this.plugin.log( + "No tracking branch found. Ignoring push of main repo and updating submodules only." + ); + return void 0; + } + const remoteChangedFiles = (await this.git.diffSummary( + [currentBranch2, trackingBranch, "--"], + (err) => this.onError(err) + )).changed; + await this.git.env({ ...process.env, OBSIDIAN_GIT: 1 }).push((err) => this.onError(err)); + return remoteChangedFiles; + } + async getUnpushedCommits() { + const status2 = await this.git.status(); + const trackingBranch = status2.tracking; + const currentBranch2 = status2.current; + if (trackingBranch == null || currentBranch2 == null) { + return 0; + } + const remoteChangedFiles = (await this.git.diffSummary( + [currentBranch2, trackingBranch, "--"], + (err) => this.onError(err) + )).changed; + return remoteChangedFiles; + } + async canPush() { + if (this.plugin.settings.updateSubmodules === true) { + return true; + } + const status2 = await this.git.status((err) => this.onError(err)); + const trackingBranch = status2.tracking; + const currentBranch2 = status2.current; + const remoteChangedFiles = (await this.git.diffSummary([currentBranch2, trackingBranch, "--"])).changed; + return remoteChangedFiles !== 0; + } + async checkRequirements() { + if (!this.isGitInstalled()) { + return "missing-git"; + } + if (!await this.git.checkIsRepo()) { + return "missing-repo"; + } + return "valid"; + } + async branchInfo() { + const status2 = await this.git.status((err) => this.onError(err)); + const branches = await this.git.branch( + ["--no-color"], + (err) => this.onError(err) + ); + return { + current: status2.current || void 0, + tracking: status2.tracking || void 0, + branches: branches.all + }; + } + async getRemoteUrl(remote) { + try { + return await this.git.remote(["get-url", remote]) || void 0; + } catch (error) { + if (error.toString().contains(remote)) { + return void 0; + } else { + this.onError(error); + } + } + } + // https://github.com/kometenstaub/obsidian-version-history-diff/issues/3 + async log(file, relativeToVault = true, limit) { + let path2; + if (file) { + path2 = this.getRelativeRepoPath(file, relativeToVault); + } + const res = await this.git.log( + { + file: path2, + maxCount: limit, + "-m": null, + "--name-status": null + }, + (err) => this.onError(err) + ); + return res.all.map((e) => { + var _a2, _b, _c, _d; + return { + ...e, + author: { + name: e.author_name, + email: e.author_email + }, + refs: e.refs.split(", ").filter((e2) => e2.length > 0), + diff: { + ...e.diff, + files: (_b = (_a2 = e.diff) == null ? void 0 : _a2.files.map((f) => ({ + ...f, + status: f.status, + path: f.file, + hash: e.hash, + vault_path: this.getRelativeVaultPath(f.file) + }))) != null ? _b : [] + }, + fileName: (_d = (_c = e.diff) == null ? void 0 : _c.files.first()) == null ? void 0 : _d.file + }; + }); + } + async show(commitHash, file, relativeToVault = true) { + const path2 = this.getRelativeRepoPath(file, relativeToVault); + return this.git.show( + [commitHash + ":" + path2], + (err) => this.onError(err) + ); + } + async checkout(branch2, remote) { + if (remote) { + branch2 = `${remote}/${branch2}`; + } + await this.git.checkout(branch2, (err) => this.onError(err)); + if (this.plugin.settings.submoduleRecurseCheckout) { + const submodulePaths = await this.getSubmodulePaths(); + for (const submodulePath of submodulePaths) { + const branchSummary = await this.git.cwd({ path: submodulePath, root: false }).branch(); + if (Object.keys(branchSummary.branches).includes(branch2)) { + await this.git.cwd({ path: submodulePath, root: false }).checkout(branch2, (err) => this.onError(err)); + } + } + } + } + async createBranch(branch2) { + await this.git.checkout(["-b", branch2], (err) => this.onError(err)); + } + async deleteBranch(branch2, force) { + await this.git.branch( + [force ? "-D" : "-d", branch2], + (err) => this.onError(err) + ); + } + async branchIsMerged(branch2) { + const notMergedBranches = await this.git.branch( + ["--no-merged"], + (err) => this.onError(err) + ); + return !notMergedBranches.all.contains(branch2); + } + async init() { + await this.git.init(false, (err) => this.onError(err)); + } + async clone(url, dir, depth) { + await this.git.clone( + url, + path.join( + this.app.vault.adapter.getBasePath(), + dir + ), + depth ? ["--depth", `${depth}`] : [], + (err) => this.onError(err) + ); + } + async setConfig(path2, value) { + if (value == void 0) { + await this.git.raw(["config", "--local", "--unset", path2]); + } else { + await this.git.addConfig(path2, value, (err) => this.onError(err)); + } + } + async getConfig(path2) { + const config = await this.git.listConfig( + "local", + (err) => this.onError(err) + ); + return config.all[path2]; + } + async fetch(remote) { + await this.git.fetch( + remote != void 0 ? [remote] : [], + (err) => this.onError(err) + ); + } + async setRemote(name, url) { + if ((await this.getRemotes()).includes(name)) + await this.git.remote( + ["set-url", name, url], + (err) => this.onError(err) + ); + else { + await this.git.remote( + ["add", name, url], + (err) => this.onError(err) + ); + } + } + async getRemoteBranches(remote) { + const res = await this.git.branch( + ["-r", "--list", `${remote}*`], + (err) => this.onError(err) + ); + const list = []; + for (const item in res.branches) { + list.push(res.branches[item].name); + } + return list; + } + async getRemotes() { + const res = await this.git.remote([], (err) => this.onError(err)); + if (res) { + return res.trim().split("\n"); + } else { + return []; + } + } + async removeRemote(remoteName) { + await this.git.removeRemote(remoteName); + } + async updateUpstreamBranch(remoteBranch) { + try { + await this.git.branch(["--set-upstream-to", remoteBranch]); + } catch (e) { + console.error(e); + try { + await this.git.branch(["--set-upstream", remoteBranch]); + } catch (e2) { + console.error(e2); + await this.git.push( + // A type error occurs here because the third element could be undefined. + // However, it is unlikely to be undefined due to the `remoteBranch`'s format, and error handling is in place. + // Therefore, we temporarily ignore the error. + // @ts-ignore + ["--set-upstream", ...splitRemoteBranch(remoteBranch)], + (err) => this.onError(err) + ); + } + } + } + updateGitPath(gitPath) { + this.setGitInstance(); + } + updateBasePath(basePath) { + this.setGitInstance(true); + } + async getDiffString(filePath, stagedChanges = false, hash2) { + if (stagedChanges) + return await this.git.diff(["--cached", "--", filePath]); + if (hash2) + return await this.git.show([`${hash2}`, "--", filePath]); + else + return await this.git.diff(["--", filePath]); + } + async diff(file, commit1, commit2) { + return await this.git.diff([`${commit1}..${commit2}`, "--", file]); + } + async getSubmoduleOfFile(repositoryRelativeFile) { + let submoduleRoot = await this.git.raw( + [ + "-C", + path.dirname(repositoryRelativeFile), + "rev-parse", + "--show-toplevel" + ], + (err) => err && console.warn("get-submodule-of-file", err == null ? void 0 : err.message) + ); + submoduleRoot = submoduleRoot.trim(); + const superProject = await this.git.raw( + [ + "-C", + path.dirname(repositoryRelativeFile), + "rev-parse", + "--show-superproject-working-tree" + ], + (err) => err && console.warn("get-submodule-of-file", err == null ? void 0 : err.message) + ); + if (superProject.trim() === "") { + return void 0; + } + const fsAdapter = this.app.vault.adapter; + const absolutePath = fsAdapter.getFullPath( + path.normalize(repositoryRelativeFile) + ); + const newRelativePath = path.relative(submoduleRoot, absolutePath); + return { submodule: submoduleRoot, relativeFilepath: newRelativePath }; + } + async getLastCommitTime() { + const res = await this.git.log({ n: 1 }, (err) => this.onError(err)); + if (res != null && res.latest != null) { + return new Date(res.latest.date); + } + } + isGitInstalled() { + const command = (0, import_child_process2.spawnSync)( + this.plugin.localStorage.getGitPath() || "git", + ["--version"], + { + stdio: "ignore" + } + ); + if (command.error) { + console.error(command.error); + return false; + } + return true; + } + onError(error) { + if (error) { + const networkFailure = error.message.contains("Could not resolve host") || error.message.match( + /ssh: connect to host .*? port .*?: Operation timed out/ + ) || error.message.match( + /ssh: connect to host .*? port .*?: Network is unreachable/ + ); + if (!networkFailure) { + this.plugin.displayError(error.message); + this.plugin.setState(0 /* idle */); + } else if (!this.plugin.offlineMode) { + this.plugin.displayError( + "Git: Going into offline mode. Future network errors will no longer be displayed.", + 2e3 + ); + } + if (networkFailure) { + this.plugin.offlineMode = true; + this.plugin.setState(0 /* idle */); + } + } + } +}; +var zeroCommit = { + hash: "000000", + isZeroCommit: true, + summary: "" +}; +function parseBlame(blameOutputUnnormalized) { + const blameOutput = blameOutputUnnormalized.replace("\r\n", "\n"); + const blameLines = blameOutput.split("\n"); + const result = { + commits: /* @__PURE__ */ new Map(), + hashPerLine: [void 0], + // one-based indices + originalFileLineNrPerLine: [void 0], + finalFileLineNrPerLine: [void 0], + groupSizePerStartingLine: /* @__PURE__ */ new Map() + }; + let line = 1; + for (let bi = 0; bi < blameLines.length; ) { + if (startsWithNonWhitespace(blameLines[bi])) { + const lineInfo = blameLines[bi].split(" "); + const commitHash = parseLineInfoInto(lineInfo, line, result); + bi++; + for (; startsWithNonWhitespace(blameLines[bi]); bi++) { + const spaceSeparatedHeaderValues = blameLines[bi].split(" "); + parseHeaderInto(spaceSeparatedHeaderValues, result, line); + } + finalizeBlameCommitInfo(result.commits.get(commitHash)); + line += 1; + } else if (blameLines[bi] === "" && bi === blameLines.length - 1) { + } else { + throw Error( + `Expected non-whitespace line or EOF, but found: ${blameLines[bi]}` + ); + } + bi++; + } + return result; +} +function parseLineInfoInto(lineInfo, line, result) { + const hash2 = lineInfo[0]; + result.hashPerLine.push(hash2); + result.originalFileLineNrPerLine.push(parseInt(lineInfo[1])); + result.finalFileLineNrPerLine.push(parseInt(lineInfo[2])); + lineInfo.length >= 4 && result.groupSizePerStartingLine.set(line, parseInt(lineInfo[3])); + if (parseInt(lineInfo[2]) !== line) { + throw Error( + `git-blame output is out of order: ${line} vs ${lineInfo[2]}` + ); + } + return hash2; +} +function parseHeaderInto(header, out, line) { + const key2 = header[0]; + const value = header.slice(1).join(" "); + const commitHash = out.hashPerLine[line]; + const commit2 = out.commits.get(commitHash) || { + hash: commitHash, + author: {}, + committer: {}, + previous: {} + }; + switch (key2) { + case "summary": + commit2.summary = value; + break; + case "author": + commit2.author.name = value; + break; + case "author-mail": + commit2.author.email = removeEmailBrackets(value); + break; + case "author-time": + commit2.author.epochSeconds = parseInt(value); + break; + case "author-tz": + commit2.author.tz = value; + break; + case "committer": + commit2.committer.name = value; + break; + case "committer-mail": + commit2.committer.email = removeEmailBrackets(value); + break; + case "committer-time": + commit2.committer.epochSeconds = parseInt(value); + break; + case "committer-tz": + commit2.committer.tz = value; + break; + case "previous": + commit2.previous.commitHash = value; + break; + case "filename": + commit2.previous.filename = value; + break; + } + out.commits.set(commitHash, commit2); +} +function finalizeBlameCommitInfo(commit2) { + if (commit2.summary === void 0) { + throw Error(`Summary not provided for commit: ${commit2.hash}`); + } + if (isUndefinedOrEmptyObject(commit2.author)) { + commit2.author = void 0; + } + if (isUndefinedOrEmptyObject(commit2.committer)) { + commit2.committer = void 0; + } + if (isUndefinedOrEmptyObject(commit2.previous)) { + commit2.previous = void 0; + } + commit2.isZeroCommit = Boolean(commit2.hash.match(/^0*$/)); +} +function isUndefinedOrEmptyObject(obj) { + return !obj || Object.keys(obj).length === 0; +} +function startsWithNonWhitespace(str) { + return str.length > 0 && str[0].trim() === str[0]; +} +function removeEmailBrackets(gitEmail) { + const prefixCleaned = gitEmail.startsWith("<") ? gitEmail.substring(1) : gitEmail; + return prefixCleaned.endsWith(">") ? prefixCleaned.substring(0, prefixCleaned.length - 1) : prefixCleaned; +} + +// src/lineAuthor/lineAuthorProvider.ts +init_polyfill_buffer(); +var import_state4 = require("@codemirror/state"); + +// src/lineAuthor/control.ts +init_polyfill_buffer(); +var import_state2 = require("@codemirror/state"); +var import_obsidian9 = require("obsidian"); + +// src/lineAuthor/eventsPerFilepath.ts +init_polyfill_buffer(); +var SECONDS = 1e3; +var REMOVE_STALES_FREQUENCY = 60 * SECONDS; +var EventsPerFilePath = class { + constructor() { + this.eventsPerFilepath = /* @__PURE__ */ new Map(); + this.startRemoveStalesSubscribersInterval(); + } + /** + * Run the {@link handler} on the subscribers to {@link filepath}. + */ + ifFilepathDefinedTransformSubscribers(filepath, handler) { + if (!filepath) + return; + this.ensureInitialized(filepath); + return handler(this.eventsPerFilepath.get(filepath)); + } + forEachSubscriber(handler) { + this.eventsPerFilepath.forEach((subs) => subs.forEach(handler)); + } + ensureInitialized(filepath) { + if (!this.eventsPerFilepath.get(filepath)) + this.eventsPerFilepath.set(filepath, /* @__PURE__ */ new Set()); + } + startRemoveStalesSubscribersInterval() { + this.removeStalesSubscribersTimer = window.setInterval( + () => this == null ? void 0 : this.forEachSubscriber((las) => las == null ? void 0 : las.removeIfStale()), + REMOVE_STALES_FREQUENCY + ); + } + clear() { + window.clearInterval(this.removeStalesSubscribersTimer); + this.eventsPerFilepath.clear(); + } +}; +var eventsPerFilePathSingleton = new EventsPerFilePath(); + +// src/lineAuthor/model.ts +init_polyfill_buffer(); +var import_state = require("@codemirror/state"); +var import_js_sha256 = __toESM(require_sha256()); + +// src/setting/settings.ts +init_polyfill_buffer(); +var import_obsidian8 = require("obsidian"); + +// src/gitManager/isomorphicGit.ts +init_polyfill_buffer(); + +// node_modules/.pnpm/diff@5.2.0/node_modules/diff/lib/index.mjs +init_polyfill_buffer(); +function Diff() { +} +Diff.prototype = { + diff: function diff(oldString, newString) { + var _options$timeout; + var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + var callback = options.callback; + if (typeof options === "function") { + callback = options; + options = {}; + } + this.options = options; + var self2 = this; + function done(value) { + if (callback) { + setTimeout(function() { + callback(void 0, value); + }, 0); + return true; + } else { + return value; + } + } + oldString = this.castInput(oldString); + newString = this.castInput(newString); + oldString = this.removeEmpty(this.tokenize(oldString)); + newString = this.removeEmpty(this.tokenize(newString)); + var newLen = newString.length, oldLen = oldString.length; + var editLength = 1; + var maxEditLength = newLen + oldLen; + if (options.maxEditLength) { + maxEditLength = Math.min(maxEditLength, options.maxEditLength); + } + var maxExecutionTime = (_options$timeout = options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : Infinity; + var abortAfterTimestamp = Date.now() + maxExecutionTime; + var bestPath = [{ + oldPos: -1, + lastComponent: void 0 + }]; + var newPos = this.extractCommon(bestPath[0], newString, oldString, 0); + if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) { + return done([{ + value: this.join(newString), + count: newString.length + }]); + } + var minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity; + function execEditLength() { + for (var diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) { + var basePath = void 0; + var removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1]; + if (removePath) { + bestPath[diagonalPath - 1] = void 0; + } + var canAdd = false; + if (addPath) { + var addPathNewPos = addPath.oldPos - diagonalPath; + canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen; + } + var canRemove = removePath && removePath.oldPos + 1 < oldLen; + if (!canAdd && !canRemove) { + bestPath[diagonalPath] = void 0; + continue; + } + if (!canRemove || canAdd && removePath.oldPos + 1 < addPath.oldPos) { + basePath = self2.addToPath(addPath, true, void 0, 0); + } else { + basePath = self2.addToPath(removePath, void 0, true, 1); + } + newPos = self2.extractCommon(basePath, newString, oldString, diagonalPath); + if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) { + return done(buildValues(self2, basePath.lastComponent, newString, oldString, self2.useLongestToken)); + } else { + bestPath[diagonalPath] = basePath; + if (basePath.oldPos + 1 >= oldLen) { + maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1); + } + if (newPos + 1 >= newLen) { + minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1); + } + } + } + editLength++; + } + if (callback) { + (function exec() { + setTimeout(function() { + if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) { + return callback(); + } + if (!execEditLength()) { + exec(); + } + }, 0); + })(); + } else { + while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) { + var ret = execEditLength(); + if (ret) { + return ret; + } + } + } + }, + addToPath: function addToPath(path2, added, removed, oldPosInc) { + var last2 = path2.lastComponent; + if (last2 && last2.added === added && last2.removed === removed) { + return { + oldPos: path2.oldPos + oldPosInc, + lastComponent: { + count: last2.count + 1, + added, + removed, + previousComponent: last2.previousComponent + } + }; + } else { + return { + oldPos: path2.oldPos + oldPosInc, + lastComponent: { + count: 1, + added, + removed, + previousComponent: last2 + } + }; + } + }, + extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { + var newLen = newString.length, oldLen = oldString.length, oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0; + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { + newPos++; + oldPos++; + commonCount++; + } + if (commonCount) { + basePath.lastComponent = { + count: commonCount, + previousComponent: basePath.lastComponent + }; + } + basePath.oldPos = oldPos; + return newPos; + }, + equals: function equals(left, right) { + if (this.options.comparator) { + return this.options.comparator(left, right); + } else { + return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); + } + }, + removeEmpty: function removeEmpty(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } + return ret; + }, + castInput: function castInput(value) { + return value; + }, + tokenize: function tokenize(value) { + return value.split(""); + }, + join: function join3(chars) { + return chars.join(""); + } +}; +function buildValues(diff3, lastComponent, newString, oldString, useLongestToken) { + var components = []; + var nextComponent; + while (lastComponent) { + components.push(lastComponent); + nextComponent = lastComponent.previousComponent; + delete lastComponent.previousComponent; + lastComponent = nextComponent; + } + components.reverse(); + var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0; + for (; componentPos < componentLen; componentPos++) { + var component = components[componentPos]; + if (!component.removed) { + if (!component.added && useLongestToken) { + var value = newString.slice(newPos, newPos + component.count); + value = value.map(function(value2, i) { + var oldValue = oldString[oldPos + i]; + return oldValue.length > value2.length ? oldValue : value2; + }); + component.value = diff3.join(value); + } else { + component.value = diff3.join(newString.slice(newPos, newPos + component.count)); + } + newPos += component.count; + if (!component.added) { + oldPos += component.count; + } + } else { + component.value = diff3.join(oldString.slice(oldPos, oldPos + component.count)); + oldPos += component.count; + if (componentPos && components[componentPos - 1].added) { + var tmp = components[componentPos - 1]; + components[componentPos - 1] = components[componentPos]; + components[componentPos] = tmp; + } + } + } + var finalComponent = components[componentLen - 1]; + if (componentLen > 1 && typeof finalComponent.value === "string" && (finalComponent.added || finalComponent.removed) && diff3.equals("", finalComponent.value)) { + components[componentLen - 2].value += finalComponent.value; + components.pop(); + } + return components; +} +var characterDiff = new Diff(); +var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; +var reWhitespace = /\S/; +var wordDiff = new Diff(); +wordDiff.equals = function(left, right) { + if (this.options.ignoreCase) { + left = left.toLowerCase(); + right = right.toLowerCase(); + } + return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); +}; +wordDiff.tokenize = function(value) { + var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); + for (var i = 0; i < tokens.length - 1; i++) { + if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { + tokens[i] += tokens[i + 2]; + tokens.splice(i + 1, 2); + i--; + } + } + return tokens; +}; +var lineDiff = new Diff(); +lineDiff.tokenize = function(value) { + if (this.options.stripTrailingCr) { + value = value.replace(/\r\n/g, "\n"); + } + var retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/); + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); + } + for (var i = 0; i < linesAndNewlines.length; i++) { + var line = linesAndNewlines[i]; + if (i % 2 && !this.options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } else { + if (this.options.ignoreWhitespace) { + line = line.trim(); + } + retLines.push(line); + } + } + return retLines; +}; +function diffLines(oldStr, newStr, callback) { + return lineDiff.diff(oldStr, newStr, callback); +} +var sentenceDiff = new Diff(); +sentenceDiff.tokenize = function(value) { + return value.split(/(\S.+?[.!?])(?=\s+|$)/); +}; +var cssDiff = new Diff(); +cssDiff.tokenize = function(value) { + return value.split(/([{}:;,]|\s+)/); +}; +function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function(obj2) { + return typeof obj2; + }; + } else { + _typeof = function(obj2) { + return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + }; + } + return _typeof(obj); +} +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); +} +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) + return _arrayLikeToArray(arr); +} +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) + return Array.from(iter); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) + return; + if (typeof o === "string") + return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) + n = o.constructor.name; + if (n === "Map" || n === "Set") + return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) + return _arrayLikeToArray(o, minLen); +} +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) + len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) + arr2[i] = arr[i]; + return arr2; +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +var objectPrototypeToString = Object.prototype.toString; +var jsonDiff = new Diff(); +jsonDiff.useLongestToken = true; +jsonDiff.tokenize = lineDiff.tokenize; +jsonDiff.castInput = function(value) { + var _this$options = this.options, undefinedReplacement = _this$options.undefinedReplacement, _this$options$stringi = _this$options.stringifyReplacer, stringifyReplacer = _this$options$stringi === void 0 ? function(k, v) { + return typeof v === "undefined" ? undefinedReplacement : v; + } : _this$options$stringi; + return typeof value === "string" ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, " "); +}; +jsonDiff.equals = function(left, right) { + return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, "$1"), right.replace(/,([\r\n])/g, "$1")); +}; +function canonicalize(obj, stack, replacementStack, replacer, key2) { + stack = stack || []; + replacementStack = replacementStack || []; + if (replacer) { + obj = replacer(key2, obj); + } + var i; + for (i = 0; i < stack.length; i += 1) { + if (stack[i] === obj) { + return replacementStack[i]; + } + } + var canonicalizedObj; + if ("[object Array]" === objectPrototypeToString.call(obj)) { + stack.push(obj); + canonicalizedObj = new Array(obj.length); + replacementStack.push(canonicalizedObj); + for (i = 0; i < obj.length; i += 1) { + canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key2); + } + stack.pop(); + replacementStack.pop(); + return canonicalizedObj; + } + if (obj && obj.toJSON) { + obj = obj.toJSON(); + } + if (_typeof(obj) === "object" && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + replacementStack.push(canonicalizedObj); + var sortedKeys = [], _key; + for (_key in obj) { + if (obj.hasOwnProperty(_key)) { + sortedKeys.push(_key); + } + } + sortedKeys.sort(); + for (i = 0; i < sortedKeys.length; i += 1) { + _key = sortedKeys[i]; + canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); + } + stack.pop(); + replacementStack.pop(); + } else { + canonicalizedObj = obj; + } + return canonicalizedObj; +} +var arrayDiff = new Diff(); +arrayDiff.tokenize = function(value) { + return value.slice(); +}; +arrayDiff.join = arrayDiff.removeEmpty = function(value) { + return value; +}; +function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + if (!options) { + options = {}; + } + if (typeof options.context === "undefined") { + options.context = 4; + } + var diff3 = diffLines(oldStr, newStr, options); + if (!diff3) { + return; + } + diff3.push({ + value: "", + lines: [] + }); + function contextLines(lines) { + return lines.map(function(entry) { + return " " + entry; + }); + } + var hunks = []; + var oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1; + var _loop = function _loop2(i2) { + var current = diff3[i2], lines = current.lines || current.value.replace(/\n$/, "").split("\n"); + current.lines = lines; + if (current.added || current.removed) { + var _curRange; + if (!oldRangeStart) { + var prev = diff3[i2 - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + if (prev) { + curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } + (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function(entry) { + return (current.added ? "+" : "-") + entry; + }))); + if (current.added) { + newLine += lines.length; + } else { + oldLine += lines.length; + } + } else { + if (oldRangeStart) { + if (lines.length <= options.context * 2 && i2 < diff3.length - 2) { + var _curRange2; + (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines))); + } else { + var _curRange3; + var contextSize = Math.min(lines.length, options.context); + (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize)))); + var hunk = { + oldStart: oldRangeStart, + oldLines: oldLine - oldRangeStart + contextSize, + newStart: newRangeStart, + newLines: newLine - newRangeStart + contextSize, + lines: curRange + }; + if (i2 >= diff3.length - 2 && lines.length <= options.context) { + var oldEOFNewline = /\n$/.test(oldStr); + var newEOFNewline = /\n$/.test(newStr); + var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines; + if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) { + curRange.splice(hunk.oldLines, 0, "\\ No newline at end of file"); + } + if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) { + curRange.push("\\ No newline at end of file"); + } + } + hunks.push(hunk); + oldRangeStart = 0; + newRangeStart = 0; + curRange = []; + } + } + oldLine += lines.length; + newLine += lines.length; + } + }; + for (var i = 0; i < diff3.length; i++) { + _loop(i); + } + return { + oldFileName, + newFileName, + oldHeader, + newHeader, + hunks + }; +} +function formatPatch(diff3) { + if (Array.isArray(diff3)) { + return diff3.map(formatPatch).join("\n"); + } + var ret = []; + if (diff3.oldFileName == diff3.newFileName) { + ret.push("Index: " + diff3.oldFileName); + } + ret.push("==================================================================="); + ret.push("--- " + diff3.oldFileName + (typeof diff3.oldHeader === "undefined" ? "" : " " + diff3.oldHeader)); + ret.push("+++ " + diff3.newFileName + (typeof diff3.newHeader === "undefined" ? "" : " " + diff3.newHeader)); + for (var i = 0; i < diff3.hunks.length; i++) { + var hunk = diff3.hunks[i]; + if (hunk.oldLines === 0) { + hunk.oldStart -= 1; + } + if (hunk.newLines === 0) { + hunk.newStart -= 1; + } + ret.push("@@ -" + hunk.oldStart + "," + hunk.oldLines + " +" + hunk.newStart + "," + hunk.newLines + " @@"); + ret.push.apply(ret, hunk.lines); + } + return ret.join("\n") + "\n"; +} +function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options)); +} +function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { + return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); +} + +// src/gitManager/isomorphicGit.ts +var import_obsidian7 = require("obsidian"); + +// src/ui/modals/generalModal.ts +init_polyfill_buffer(); +var import_obsidian5 = require("obsidian"); +var generalModalConfigDefaults = { + options: [], + placeholder: "", + allowEmpty: false, + onlySelection: false, + initialValue: void 0 +}; +var GeneralModal = class extends import_obsidian5.SuggestModal { + constructor(config) { + super(app); + this.config = { ...generalModalConfigDefaults, ...config }; + this.setPlaceholder(this.config.placeholder); + } + open() { + super.open(); + if (this.config.initialValue != void 0) { + this.inputEl.value = this.config.initialValue; + this.inputEl.dispatchEvent(new Event("input")); + } + return new Promise((resolve) => { + this.resolve = resolve; + }); + } + selectSuggestion(value, evt) { + if (this.resolve) { + let res; + if (this.config.allowEmpty && value === " ") + res = ""; + else if (value === "...") + res = void 0; + else + res = value; + this.resolve(res); + } + super.selectSuggestion(value, evt); + } + onClose() { + if (this.resolve) + this.resolve(void 0); + } + getSuggestions(query) { + if (this.config.onlySelection) { + return this.config.options; + } else if (this.config.allowEmpty) { + return [query.length > 0 ? query : " ", ...this.config.options]; + } else { + return [query.length > 0 ? query : "...", ...this.config.options]; + } + } + renderSuggestion(value, el) { + el.setText(value); + } + onChooseSuggestion(item, evt) { + } +}; + +// src/gitManager/myAdapter.ts +init_polyfill_buffer(); +var import_obsidian6 = require("obsidian"); +var MyAdapter = class { + constructor(vault, plugin) { + this.plugin = plugin; + this.promises = {}; + this.adapter = vault.adapter; + this.vault = vault; + this.lastBasePath = this.plugin.settings.basePath; + this.promises.readFile = this.readFile.bind(this); + this.promises.writeFile = this.writeFile.bind(this); + this.promises.readdir = this.readdir.bind(this); + this.promises.mkdir = this.mkdir.bind(this); + this.promises.rmdir = this.rmdir.bind(this); + this.promises.stat = this.stat.bind(this); + this.promises.unlink = this.unlink.bind(this); + this.promises.lstat = this.lstat.bind(this); + this.promises.readlink = this.readlink.bind(this); + this.promises.symlink = this.symlink.bind(this); + } + async readFile(path2, opts) { + var _a2; + this.maybeLog("Read: " + path2 + JSON.stringify(opts)); + if (opts == "utf8" || opts.encoding == "utf8") { + const file = this.vault.getAbstractFileByPath(path2); + if (file instanceof import_obsidian6.TFile) { + this.maybeLog("Reuse"); + return this.vault.read(file); + } else { + return this.adapter.read(path2); + } + } else { + if (path2.endsWith(this.gitDir + "/index")) { + if (this.plugin.settings.basePath != this.lastBasePath) { + this.clearIndex(); + this.lastBasePath = this.plugin.settings.basePath; + return this.adapter.readBinary(path2); + } + return (_a2 = this.index) != null ? _a2 : this.adapter.readBinary(path2); + } + const file = this.vault.getAbstractFileByPath(path2); + if (file instanceof import_obsidian6.TFile) { + this.maybeLog("Reuse"); + return this.vault.readBinary(file); + } else { + return this.adapter.readBinary(path2); + } + } + } + async writeFile(path2, data) { + this.maybeLog("Write: " + path2); + if (typeof data === "string") { + const file = this.vault.getAbstractFileByPath(path2); + if (file instanceof import_obsidian6.TFile) { + return this.vault.modify(file, data); + } else { + return this.adapter.write(path2, data); + } + } else { + if (path2.endsWith(this.gitDir + "/index")) { + this.index = data; + this.indexmtime = Date.now(); + } else { + const file = this.vault.getAbstractFileByPath(path2); + if (file instanceof import_obsidian6.TFile) { + return this.vault.modifyBinary(file, data); + } else { + return this.adapter.writeBinary(path2, data); + } + } + } + } + async readdir(path2) { + if (path2 === ".") + path2 = "/"; + const res = await this.adapter.list(path2); + const all = [...res.files, ...res.folders]; + let formattedAll; + if (path2 !== "/") { + formattedAll = all.map( + (e) => (0, import_obsidian6.normalizePath)(e.substring(path2.length)) + ); + } else { + formattedAll = all; + } + return formattedAll; + } + async mkdir(path2) { + return this.adapter.mkdir(path2); + } + async rmdir(path2, opts) { + var _a2, _b; + return this.adapter.rmdir(path2, (_b = (_a2 = opts == null ? void 0 : opts.options) == null ? void 0 : _a2.recursive) != null ? _b : false); + } + async stat(path2) { + if (path2.endsWith(this.gitDir + "/index")) { + if (this.index !== void 0 && this.indexctime != void 0 && this.indexmtime != void 0) { + return { + isFile: () => true, + isDirectory: () => false, + isSymbolicLink: () => false, + size: this.index.length, + type: "file", + ctimeMs: this.indexctime, + mtimeMs: this.indexmtime + }; + } else { + const stat = await this.adapter.stat(path2); + if (stat == void 0) { + throw { code: "ENOENT" }; + } + this.indexctime = stat.ctime; + this.indexmtime = stat.mtime; + return { + ctimeMs: stat.ctime, + mtimeMs: stat.mtime, + size: stat.size, + type: "file", + isFile: () => true, + isDirectory: () => false, + isSymbolicLink: () => false + }; + } + } + if (path2 === ".") + path2 = "/"; + const file = this.vault.getAbstractFileByPath(path2); + this.maybeLog("Stat: " + path2); + if (file instanceof import_obsidian6.TFile) { + this.maybeLog("Reuse stat"); + return { + ctimeMs: file.stat.ctime, + mtimeMs: file.stat.mtime, + size: file.stat.size, + type: "file", + isFile: () => true, + isDirectory: () => false, + isSymbolicLink: () => false + }; + } else { + const stat = await this.adapter.stat(path2); + if (stat) { + return { + ctimeMs: stat.ctime, + mtimeMs: stat.mtime, + size: stat.size, + type: stat.type === "folder" ? "directory" : stat.type, + isFile: () => stat.type === "file", + isDirectory: () => stat.type === "folder", + isSymbolicLink: () => false + }; + } else { + throw { code: "ENOENT" }; + } + } + } + async unlink(path2) { + return this.adapter.remove(path2); + } + async lstat(path2) { + return this.stat(path2); + } + async readlink(path2) { + throw new Error(`readlink of (${path2}) is not implemented.`); + } + async symlink(path2) { + throw new Error(`symlink of (${path2}) is not implemented.`); + } + async saveAndClear() { + if (this.index !== void 0) { + await this.adapter.writeBinary( + this.plugin.gitManager.getRelativeVaultPath( + this.gitDir + "/index" + ), + this.index, + { + ctime: this.indexctime, + mtime: this.indexmtime + } + ); + } + this.clearIndex(); + } + clearIndex() { + this.index = void 0; + this.indexctime = void 0; + this.indexmtime = void 0; + } + get gitDir() { + return this.plugin.settings.gitDir || ".git"; + } + maybeLog(text2) { + } +}; + +// src/gitManager/isomorphicGit.ts +var IsomorphicGit = class extends GitManager { + constructor(plugin) { + super(plugin); + this.FILE = 0; + this.HEAD = 1; + this.WORKDIR = 2; + this.STAGE = 3; + // Mapping from statusMatrix to git status codes based off git status --short + // See: https://isomorphic-git.org/docs/en/statusMatrix + this.status_mapping = { + "000": " ", + "003": "AD", + "020": "??", + "022": "A ", + "023": "AM", + "100": "D ", + "101": " D", + "103": "MD", + "110": "DA", + // Technically, two files: first one is deleted "D " and second one is untracked "??" + "111": " ", + "113": "MM", + "120": "DA", + // Same as "110" + "121": " M", + "122": "M ", + "123": "MM" + }; + this.noticeLength = 999999; + this.fs = new MyAdapter(this.app.vault, this.plugin); + } + getRepo() { + return { + fs: this.fs, + dir: this.plugin.settings.basePath, + gitdir: this.plugin.settings.gitDir || void 0, + onAuth: () => { + var _a2, _b; + return { + username: (_a2 = this.plugin.localStorage.getUsername()) != null ? _a2 : void 0, + password: (_b = this.plugin.localStorage.getPassword()) != null ? _b : void 0 + }; + }, + onAuthFailure: async () => { + new import_obsidian7.Notice( + "Authentication failed. Please try with different credentials" + ); + const username = await new GeneralModal({ + placeholder: "Specify your username" + }).open(); + if (username) { + const password = await new GeneralModal({ + placeholder: "Specify your password/personal access token" + }).open(); + if (password) { + this.plugin.localStorage.setUsername(username); + this.plugin.localStorage.setPassword(password); + return { + username, + password + }; + } + } + return { cancel: true }; + }, + http: { + async request({ + url, + method: method2, + headers, + body + }) { + if (body) { + body = await collect2(body); + body = body.buffer; + } + const res = await (0, import_obsidian7.requestUrl)({ + url, + method: method2, + headers, + body, + throw: false + }); + return { + url, + method: method2, + headers: res.headers, + body: [new Uint8Array(res.arrayBuffer)], + statusCode: res.status, + statusMessage: res.status.toString() + }; + } + } + }; + } + async wrapFS(call) { + try { + const res = await call; + await this.fs.saveAndClear(); + return res; + } catch (error) { + await this.fs.saveAndClear(); + throw error; + } + } + async status() { + let notice; + const timeout = window.setTimeout(function() { + notice = new import_obsidian7.Notice( + "This takes longer: Getting status", + this.noticeLength + ); + }, 2e4); + try { + this.plugin.setState(1 /* status */); + const status2 = (await this.wrapFS(isomorphic_git_default.statusMatrix({ ...this.getRepo() }))).map((row) => this.getFileStatusResult(row)); + const changed = status2.filter( + (fileStatus) => fileStatus.working_dir !== " " + ); + const staged = status2.filter( + (fileStatus) => fileStatus.index !== " " && fileStatus.index !== "U" + ); + const conflicted = []; + window.clearTimeout(timeout); + notice == null ? void 0 : notice.hide(); + return { all: status2, changed, staged, conflicted }; + } catch (error) { + window.clearTimeout(timeout); + notice == null ? void 0 : notice.hide(); + this.plugin.displayError(error); + throw error; + } + } + async commitAll({ + message, + status: status2, + unstagedFiles + }) { + try { + await this.checkAuthorInfo(); + await this.stageAll({ status: status2, unstagedFiles }); + return this.commit({ message }); + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async commit({ + message + }) { + try { + await this.checkAuthorInfo(); + this.plugin.setState(4 /* commit */); + const formatMessage = await this.formatCommitMessage(message); + const hadConflict = this.plugin.localStorage.getConflict(); + let parent = void 0; + if (hadConflict) { + const branchInfo = await this.branchInfo(); + parent = [branchInfo.current, branchInfo.tracking]; + } + await this.wrapFS( + isomorphic_git_default.commit({ + ...this.getRepo(), + message: formatMessage, + parent + }) + ); + this.plugin.localStorage.setConflict(false); + return; + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async stage(filepath, relativeToVault) { + const gitPath = this.getRelativeRepoPath(filepath, relativeToVault); + let vaultPath; + if (relativeToVault) { + vaultPath = filepath; + } else { + vaultPath = this.getRelativeVaultPath(filepath); + } + try { + this.plugin.setState(3 /* add */); + if (await this.app.vault.adapter.exists(vaultPath)) { + await this.wrapFS( + isomorphic_git_default.add({ ...this.getRepo(), filepath: gitPath }) + ); + } else { + await this.wrapFS( + isomorphic_git_default.remove({ ...this.getRepo(), filepath: gitPath }) + ); + } + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async stageAll({ + dir, + status: status2, + unstagedFiles + }) { + try { + if (status2) { + await Promise.all( + status2.changed.map( + (file) => file.working_dir !== "D" ? this.wrapFS( + isomorphic_git_default.add({ + ...this.getRepo(), + filepath: file.path + }) + ) : isomorphic_git_default.remove({ + ...this.getRepo(), + filepath: file.path + }) + ) + ); + } else { + const filesToStage = unstagedFiles != null ? unstagedFiles : await this.getUnstagedFiles(dir != null ? dir : "."); + await Promise.all( + filesToStage.map( + ({ filepath, deleted }) => deleted ? isomorphic_git_default.remove({ ...this.getRepo(), filepath }) : this.wrapFS( + isomorphic_git_default.add({ ...this.getRepo(), filepath }) + ) + ) + ); + } + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async unstage(filepath, relativeToVault) { + try { + this.plugin.setState(3 /* add */); + filepath = this.getRelativeRepoPath(filepath, relativeToVault); + await this.wrapFS( + isomorphic_git_default.resetIndex({ ...this.getRepo(), filepath }) + ); + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async unstageAll({ + dir, + status: status2 + }) { + try { + let staged; + if (status2) { + staged = status2.staged.map((file) => file.path); + } else { + const res = await this.getStagedFiles(dir != null ? dir : "."); + staged = res.map(({ filepath }) => filepath); + } + await this.wrapFS( + Promise.all( + staged.map( + (file) => isomorphic_git_default.resetIndex({ ...this.getRepo(), filepath: file }) + ) + ) + ); + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async discard(filepath) { + try { + this.plugin.setState(3 /* add */); + await this.wrapFS( + isomorphic_git_default.checkout({ + ...this.getRepo(), + filepaths: [filepath], + force: true + }) + ); + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async discardAll({ + dir, + status: status2 + }) { + let files = []; + if (status2) { + if (dir != void 0) { + files = status2.changed.filter((file) => file.path.startsWith(dir)).map((file) => file.path); + } else { + files = status2.changed.map((file) => file.path); + } + } else { + files = (await this.getUnstagedFiles(dir)).map( + ({ filepath }) => filepath + ); + } + try { + await this.wrapFS( + isomorphic_git_default.checkout({ + ...this.getRepo(), + filepaths: files, + force: true + }) + ); + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + getProgressText(action, event) { + let out = `${action} progress:`; + if (event.phase) { + out = `${out} ${event.phase}:`; + } + if (event.loaded) { + out = `${out} ${event.loaded}`; + if (event.total) { + out = `${out} of ${event.total}`; + } + } + return out; + } + resolveRef(ref) { + return this.wrapFS(isomorphic_git_default.resolveRef({ ...this.getRepo(), ref })); + } + async pull() { + const progressNotice = this.showNotice("Initializing pull"); + try { + this.plugin.setState(2 /* pull */); + const localCommit = await this.resolveRef("HEAD"); + await this.fetch(); + const branchInfo = await this.branchInfo(); + await this.checkAuthorInfo(); + const mergeRes = await this.wrapFS( + isomorphic_git_default.merge({ + ...this.getRepo(), + ours: branchInfo.current, + theirs: branchInfo.tracking, + abortOnConflict: false + }) + ); + if (!mergeRes.alreadyMerged) { + await this.wrapFS( + isomorphic_git_default.checkout({ + ...this.getRepo(), + ref: branchInfo.current, + onProgress: (progress) => { + if (progressNotice !== void 0) { + progressNotice.noticeEl.innerText = this.getProgressText("Checkout", progress); + } + }, + remote: branchInfo.remote + }) + ); + } + progressNotice == null ? void 0 : progressNotice.hide(); + const upstreamCommit = await this.resolveRef("HEAD"); + const changedFiles = await this.getFileChangesCount( + localCommit, + upstreamCommit + ); + this.showNotice("Finished pull", false); + return changedFiles.map((file) => ({ + path: file.path, + working_dir: "P", + index: "P", + vault_path: this.getRelativeVaultPath(file.path) + })); + } catch (error) { + progressNotice == null ? void 0 : progressNotice.hide(); + if (error instanceof Errors.MergeConflictError) { + this.plugin.handleConflict( + error.data.filepaths.map( + (file) => this.getRelativeVaultPath(file) + ) + ); + } + this.plugin.displayError(error); + throw error; + } + } + async push() { + if (!await this.canPush()) { + return 0; + } + const progressNotice = this.showNotice("Initializing push"); + try { + this.plugin.setState(1 /* status */); + const status2 = await this.branchInfo(); + const trackingBranch = status2.tracking; + const currentBranch2 = status2.current; + const numChangedFiles = (await this.getFileChangesCount(currentBranch2, trackingBranch)).length; + this.plugin.setState(5 /* push */); + await this.wrapFS( + isomorphic_git_default.push({ + ...this.getRepo(), + onProgress: (progress) => { + if (progressNotice !== void 0) { + progressNotice.noticeEl.innerText = this.getProgressText("Pushing", progress); + } + } + }) + ); + progressNotice == null ? void 0 : progressNotice.hide(); + return numChangedFiles; + } catch (error) { + progressNotice == null ? void 0 : progressNotice.hide(); + this.plugin.displayError(error); + throw error; + } + } + async getUnpushedCommits() { + const status2 = await this.branchInfo(); + const trackingBranch = status2.tracking; + const currentBranch2 = status2.current; + if (trackingBranch == null || currentBranch2 == null) { + return 0; + } + const localCommit = await this.resolveRef(currentBranch2); + const upstreamCommit = await this.resolveRef(trackingBranch); + const changedFiles = await this.getFileChangesCount( + localCommit, + upstreamCommit + ); + return changedFiles.length; + } + async canPush() { + const status2 = await this.branchInfo(); + const trackingBranch = status2.tracking; + const currentBranch2 = status2.current; + const current = await this.resolveRef(currentBranch2); + const tracking = await this.resolveRef(trackingBranch); + return current != tracking; + } + async checkRequirements() { + const headExists = await this.plugin.app.vault.adapter.exists( + `${this.getRepo().dir}/.git/HEAD` + ); + return headExists ? "valid" : "missing-repo"; + } + async branchInfo() { + var _a2, _b; + try { + const current = await isomorphic_git_default.currentBranch(this.getRepo()) || ""; + const branches = await isomorphic_git_default.listBranches(this.getRepo()); + const remote = (_a2 = await this.getConfig(`branch.${current}.remote`)) != null ? _a2 : "origin"; + const trackingBranch = (_b = await this.getConfig(`branch.${current}.merge`)) == null ? void 0 : _b.split("refs/heads")[1]; + const tracking = trackingBranch ? remote + trackingBranch : void 0; + return { + current, + tracking, + branches, + remote + }; + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async getCurrentRemote() { + var _a2; + const current = await isomorphic_git_default.currentBranch(this.getRepo()) || ""; + const remote = (_a2 = await this.getConfig(`branch.${current}.remote`)) != null ? _a2 : "origin"; + return remote; + } + async checkout(branch2, remote) { + try { + return this.wrapFS( + isomorphic_git_default.checkout({ + ...this.getRepo(), + ref: branch2, + force: !!remote, + remote + }) + ); + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async createBranch(branch2) { + try { + await this.wrapFS( + isomorphic_git_default.branch({ ...this.getRepo(), ref: branch2, checkout: true }) + ); + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async deleteBranch(branch2) { + try { + await this.wrapFS( + isomorphic_git_default.deleteBranch({ ...this.getRepo(), ref: branch2 }) + ); + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async branchIsMerged(_) { + return true; + } + async init() { + try { + await this.wrapFS(isomorphic_git_default.init(this.getRepo())); + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async clone(url, dir, depth) { + const progressNotice = this.showNotice("Initializing clone"); + try { + await this.wrapFS( + isomorphic_git_default.clone({ + ...this.getRepo(), + dir, + url, + depth, + onProgress: (progress) => { + if (progressNotice !== void 0) { + progressNotice.noticeEl.innerText = this.getProgressText("Cloning", progress); + } + } + }) + ); + progressNotice == null ? void 0 : progressNotice.hide(); + } catch (error) { + progressNotice == null ? void 0 : progressNotice.hide(); + this.plugin.displayError(error); + throw error; + } + } + async setConfig(path2, value) { + try { + return this.wrapFS( + isomorphic_git_default.setConfig({ + ...this.getRepo(), + path: path2, + value + }) + ); + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async getConfig(path2) { + try { + return this.wrapFS( + isomorphic_git_default.getConfig({ + ...this.getRepo(), + path: path2 + }) + ); + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async fetch(remote) { + const progressNotice = this.showNotice("Initializing fetch"); + try { + const args = { + ...this.getRepo(), + onProgress: (progress) => { + if (progressNotice !== void 0) { + progressNotice.noticeEl.innerText = this.getProgressText("Fetching", progress); + } + }, + remote: remote != null ? remote : await this.getCurrentRemote() + }; + await this.wrapFS(isomorphic_git_default.fetch(args)); + progressNotice == null ? void 0 : progressNotice.hide(); + } catch (error) { + this.plugin.displayError(error); + progressNotice == null ? void 0 : progressNotice.hide(); + throw error; + } + } + async setRemote(name, url) { + try { + await this.wrapFS( + isomorphic_git_default.addRemote({ + ...this.getRepo(), + remote: name, + url, + force: true + }) + ); + } catch (error) { + this.plugin.displayError(error); + throw error; + } + } + async getRemoteBranches(remote) { + let remoteBranches = []; + remoteBranches.push( + ...await this.wrapFS( + isomorphic_git_default.listBranches({ ...this.getRepo(), remote }) + ) + ); + remoteBranches.remove("HEAD"); + remoteBranches = remoteBranches.map((e) => `${remote}/${e}`); + return remoteBranches; + } + async getRemotes() { + return (await this.wrapFS(isomorphic_git_default.listRemotes({ ...this.getRepo() }))).map( + (remoteUrl) => remoteUrl.remote + ); + } + async removeRemote(remoteName) { + await this.wrapFS( + isomorphic_git_default.deleteRemote({ ...this.getRepo(), remote: remoteName }) + ); + } + async getRemoteUrl(remote) { + var _a2; + return (_a2 = (await this.wrapFS(isomorphic_git_default.listRemotes({ ...this.getRepo() }))).filter((item) => item.remote == remote)[0]) == null ? void 0 : _a2.url; + } + async log(_, __ = true, limit) { + const logs = await this.wrapFS( + isomorphic_git_default.log({ ...this.getRepo(), depth: limit }) + ); + return Promise.all( + logs.map(async (log2) => { + const completeMessage = log2.commit.message.split("\n\n"); + return { + message: completeMessage[0], + author: { + name: log2.commit.author.name, + email: log2.commit.author.email + }, + body: completeMessage.slice(1).join("\n\n"), + date: new Date( + log2.commit.committer.timestamp + ).toDateString(), + diff: { + changed: 0, + files: (await this.getFileChangesCount( + log2.commit.parent.first(), + log2.oid + )).map((item) => { + return { + path: item.path, + status: item.type, + vault_path: this.getRelativeVaultPath( + item.path + ), + hash: log2.oid, + binary: void 0 + }; + }) + }, + hash: log2.oid, + refs: [] + }; + }) + ); + } + updateBasePath(basePath) { + this.getRepo().dir = basePath; + } + async updateUpstreamBranch(remoteBranch) { + const [remote, branch2] = splitRemoteBranch(remoteBranch); + const branchInfo = await this.branchInfo(); + await this.setConfig( + `branch.${branchInfo.current}.merge`, + `refs/heads/${branch2}` + ); + await this.setConfig(`branch.${branch2}.remote`, remote); + } + updateGitPath(_) { + return; + } + async getFileChangesCount(commitHash1, commitHash2) { + return this.walkDifference({ + walkers: [ + isomorphic_git_default.TREE({ ref: commitHash1 }), + isomorphic_git_default.TREE({ ref: commitHash2 }) + ] + }); + } + async walkDifference({ + walkers, + dir: base + }) { + const res = await this.wrapFS( + isomorphic_git_default.walk({ + ...this.getRepo(), + trees: walkers, + map: async function(filepath, [A, B]) { + if (!worthWalking2(filepath, base)) { + return null; + } + if (await (A == null ? void 0 : A.type()) === "tree" || await (B == null ? void 0 : B.type()) === "tree") { + return; + } + const Aoid = await (A == null ? void 0 : A.oid()); + const Boid = await (B == null ? void 0 : B.oid()); + let type = "equal"; + if (Aoid !== Boid) { + type = "M"; + } + if (Aoid === void 0) { + type = "A"; + } + if (Boid === void 0) { + type = "D"; + } + if (Aoid === void 0 && Boid === void 0) { + console.log("Something weird happened:"); + console.log(A); + console.log(B); + } + if (type === "equal") { + return; + } + return { + path: filepath, + type + }; + } + }) + ); + return res; + } + async getStagedFiles(dir = ".") { + const res = await this.walkDifference({ + walkers: [isomorphic_git_default.TREE({ ref: "HEAD" }), isomorphic_git_default.STAGE()], + dir + }); + return res.map((file) => { + return { + vault_path: this.getRelativeVaultPath(file.path), + filepath: file.path + }; + }); + } + async getUnstagedFiles(base = ".") { + let notice; + const timeout = window.setTimeout(function() { + notice = new import_obsidian7.Notice( + "This takes longer: Getting status", + this.noticeLength + ); + }, 2e4); + try { + const repo = this.getRepo(); + const res = await this.wrapFS( + //Modified from `git.statusMatrix` + isomorphic_git_default.walk({ + ...repo, + trees: [isomorphic_git_default.WORKDIR(), isomorphic_git_default.STAGE()], + map: async function(filepath, [workdir, stage]) { + if (!stage && workdir) { + const isIgnored2 = await isomorphic_git_default.isIgnored({ + ...repo, + filepath + }); + if (isIgnored2) { + return null; + } + } + if (!worthWalking2(filepath, base)) { + return null; + } + const [workdirType, stageType] = await Promise.all([ + workdir && workdir.type(), + stage && stage.type() + ]); + const isBlob = [workdirType, stageType].includes( + "blob" + ); + if ((workdirType === "tree" || workdirType === "special") && !isBlob) + return; + if (stageType === "commit") + return null; + if ((stageType === "tree" || stageType === "special") && !isBlob) + return; + const stageOid = stageType === "blob" ? await stage.oid() : void 0; + let workdirOid; + if (workdirType === "blob" && stageType !== "blob") { + workdirOid = "42"; + } else if (workdirType === "blob") { + workdirOid = await workdir.oid(); + } + if (!workdirOid) { + return { + filepath, + deleted: true + }; + } + if (workdirOid !== stageOid) { + return { + filepath, + deleted: false + }; + } + return null; + } + }) + ); + window.clearTimeout(timeout); + notice == null ? void 0 : notice.hide(); + return res; + } catch (error) { + window.clearTimeout(timeout); + notice == null ? void 0 : notice.hide(); + this.plugin.displayError(error); + throw error; + } + } + async getDiffString(filePath, stagedChanges = false, hash2) { + const vaultPath = this.getRelativeVaultPath(filePath); + const map = async (file, [A]) => { + if (filePath == file) { + const oid = await A.oid(); + const contents = await isomorphic_git_default.readBlob({ + ...this.getRepo(), + oid + }); + return contents.blob; + } + }; + if (hash2) { + const commitContent = await readBlob({ + ...this.getRepo(), + filepath: filePath, + oid: hash2 + }).then((headBlob) => new TextDecoder().decode(headBlob.blob)).catch((err) => { + if (err instanceof isomorphic_git_default.Errors.NotFoundError) + return void 0; + throw err; + }); + const commit2 = await isomorphic_git_default.readCommit({ + ...this.getRepo(), + oid: hash2 + }); + const previousContent = await readBlob({ + ...this.getRepo(), + filepath: filePath, + oid: commit2.commit.parent.first() + }).then((headBlob) => new TextDecoder().decode(headBlob.blob)).catch((err) => { + if (err instanceof isomorphic_git_default.Errors.NotFoundError) + return void 0; + throw err; + }); + const diff3 = createPatch( + vaultPath, + previousContent != null ? previousContent : "", + commitContent != null ? commitContent : "" + ); + return diff3; + } + const stagedBlob = (await isomorphic_git_default.walk({ + ...this.getRepo(), + trees: [isomorphic_git_default.STAGE()], + map + })).first(); + const stagedContent = new TextDecoder().decode(stagedBlob); + if (stagedChanges) { + const headContent = await this.resolveRef("HEAD").then( + (oid) => readBlob({ + ...this.getRepo(), + filepath: filePath, + oid + }) + ).then((headBlob) => new TextDecoder().decode(headBlob.blob)).catch((err) => { + if (err instanceof isomorphic_git_default.Errors.NotFoundError) + return void 0; + throw err; + }); + const diff3 = createPatch( + vaultPath, + headContent != null ? headContent : "", + stagedContent + ); + return diff3; + } else { + let workdirContent; + if (await this.app.vault.adapter.exists(vaultPath)) { + workdirContent = await this.app.vault.adapter.read(vaultPath); + } else { + workdirContent = ""; + } + const diff3 = createPatch(vaultPath, stagedContent, workdirContent); + return diff3; + } + } + async getLastCommitTime() { + const repo = this.getRepo(); + const oid = await this.resolveRef("HEAD"); + const commit2 = await isomorphic_git_default.readCommit({ ...repo, oid }); + const date = commit2.commit.committer.timestamp; + return new Date(date * 1e3); + } + getFileStatusResult(row) { + const status2 = this.status_mapping[`${row[this.HEAD]}${row[this.WORKDIR]}${row[this.STAGE]}`]; + return { + index: status2[0] == "?" ? "U" : status2[0], + working_dir: status2[1] == "?" ? "U" : status2[1], + path: row[this.FILE], + vault_path: this.getRelativeVaultPath(row[this.FILE]) + }; + } + async checkAuthorInfo() { + const name = await this.getConfig("user.name"); + const email = await this.getConfig("user.email"); + if (!name || !email) { + throw "Git author information is not set. Please set it in the settings."; + } + } + showNotice(message, infinity = true) { + if (!this.plugin.settings.disablePopups) { + return new import_obsidian7.Notice( + message, + infinity ? this.noticeLength : void 0 + ); + } + } +}; +function fromValue2(value) { + let queue = [value]; + return { + next() { + return Promise.resolve({ + done: queue.length === 0, + value: queue.pop() + }); + }, + return() { + queue = []; + return {}; + }, + [Symbol.asyncIterator]() { + return this; + } + }; +} +function getIterator2(iterable) { + if (iterable[Symbol.asyncIterator]) { + return iterable[Symbol.asyncIterator](); + } + if (iterable[Symbol.iterator]) { + return iterable[Symbol.iterator](); + } + if (iterable.next) { + return iterable; + } + return fromValue2(iterable); +} +async function forAwait2(iterable, cb) { + const iter = getIterator2(iterable); + while (true) { + const { value, done } = await iter.next(); + if (value) + await cb(value); + if (done) + break; + } + if (iter.return) + iter.return(); +} +async function collect2(iterable) { + let size = 0; + const buffers = []; + await forAwait2(iterable, (value) => { + buffers.push(value); + size += value.byteLength; + }); + const result = new Uint8Array(size); + let nextIndex = 0; + for (const buffer2 of buffers) { + result.set(buffer2, nextIndex); + nextIndex += buffer2.byteLength; + } + return result; +} + +// src/setting/settings.ts +var FORMAT_STRING_REFERENCE_URL = "https://momentjs.com/docs/#/parsing/string-format/"; +var LINE_AUTHOR_FEATURE_WIKI_LINK = "https://publish.obsidian.md/git-doc/Line+Authoring"; +var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { + constructor() { + super(...arguments); + this.lineAuthorColorSettings = /* @__PURE__ */ new Map(); + } + // narrow type from PluginSettingTab.plugin + get settings() { + return this.plugin.settings; + } + display() { + const { containerEl } = this; + const plugin = this.plugin; + const commitOrBackup = plugin.settings.differentIntervalCommitAndPush ? "commit" : "backup"; + const gitReady = plugin.gitReady; + containerEl.empty(); + containerEl.createEl("h2", { text: "Git Backup settings" }); + if (!gitReady) { + containerEl.createEl("p", { + text: "Git is not ready. When all settings are correct you can configure auto backup, etc." + }); + } + if (gitReady) { + containerEl.createEl("br"); + containerEl.createEl("h3", { text: "Automatic" }); + new import_obsidian8.Setting(containerEl).setName("Split automatic commit and push").setDesc("Enable to use separate timer for commit and push").addToggle( + (toggle) => toggle.setValue( + plugin.settings.differentIntervalCommitAndPush + ).onChange((value) => { + plugin.settings.differentIntervalCommitAndPush = value; + plugin.saveSettings(); + plugin.clearAutoBackup(); + plugin.clearAutoPush(); + if (plugin.settings.autoSaveInterval > 0) { + plugin.startAutoBackup( + plugin.settings.autoSaveInterval + ); + } + if (value && plugin.settings.autoPushInterval > 0) { + plugin.startAutoPush( + plugin.settings.autoPushInterval + ); + } + this.display(); + }) + ); + new import_obsidian8.Setting(containerEl).setName(`Vault ${commitOrBackup} interval (minutes)`).setDesc( + `${plugin.settings.differentIntervalCommitAndPush ? "Commit" : "Commit and push"} changes every X minutes. Set to 0 (default) to disable. (See below setting for further configuration!)` + ).addText( + (text2) => text2.setValue(String(plugin.settings.autoSaveInterval)).onChange((value) => { + if (!isNaN(Number(value))) { + plugin.settings.autoSaveInterval = Number(value); + plugin.saveSettings(); + if (plugin.settings.autoSaveInterval > 0) { + plugin.clearAutoBackup(); + plugin.startAutoBackup( + plugin.settings.autoSaveInterval + ); + new import_obsidian8.Notice( + `Automatic ${commitOrBackup} enabled! Every ${formatMinutes( + plugin.settings.autoSaveInterval + )}.` + ); + } else if (plugin.settings.autoSaveInterval <= 0) { + plugin.clearAutoBackup() && new import_obsidian8.Notice( + `Automatic ${commitOrBackup} disabled!` + ); + } + } else { + new import_obsidian8.Notice("Please specify a valid number."); + } + }) + ); + if (!plugin.settings.setLastSaveToLastCommit) + new import_obsidian8.Setting(containerEl).setName(`Auto Backup after stopping file edits`).setDesc( + `Requires the ${commitOrBackup} interval not to be 0. + If turned on, do auto ${commitOrBackup} every ${formatMinutes( + plugin.settings.autoSaveInterval + )} after stopping file edits. + This also prevents auto ${commitOrBackup} while editing a file. If turned off, it's independent from the last change.` + ).addToggle( + (toggle) => toggle.setValue(plugin.settings.autoBackupAfterFileChange).onChange((value) => { + plugin.settings.autoBackupAfterFileChange = value; + this.display(); + plugin.saveSettings(); + plugin.clearAutoBackup(); + if (plugin.settings.autoSaveInterval > 0) { + plugin.startAutoBackup( + plugin.settings.autoSaveInterval + ); + } + }) + ); + if (!plugin.settings.autoBackupAfterFileChange) + new import_obsidian8.Setting(containerEl).setName(`Auto ${commitOrBackup} after latest commit`).setDesc( + `If turned on, set last auto ${commitOrBackup} time to latest commit` + ).addToggle( + (toggle) => toggle.setValue(plugin.settings.setLastSaveToLastCommit).onChange(async (value) => { + plugin.settings.setLastSaveToLastCommit = value; + plugin.saveSettings(); + this.display(); + plugin.clearAutoBackup(); + await plugin.setUpAutoBackup(); + }) + ); + if (plugin.settings.differentIntervalCommitAndPush) { + new import_obsidian8.Setting(containerEl).setName(`Vault push interval (minutes)`).setDesc( + "Push changes every X minutes. Set to 0 (default) to disable." + ).addText( + (text2) => text2.setValue(String(plugin.settings.autoPushInterval)).onChange((value) => { + if (!isNaN(Number(value))) { + plugin.settings.autoPushInterval = Number(value); + plugin.saveSettings(); + if (plugin.settings.autoPushInterval > 0) { + plugin.clearAutoPush(); + plugin.startAutoPush( + plugin.settings.autoPushInterval + ); + new import_obsidian8.Notice( + `Automatic push enabled! Every ${formatMinutes( + plugin.settings.autoPushInterval + )}.` + ); + } else if (plugin.settings.autoPushInterval <= 0) { + plugin.clearAutoPush() && new import_obsidian8.Notice( + "Automatic push disabled!" + ); + } + } else { + new import_obsidian8.Notice( + "Please specify a valid number." + ); + } + }) + ); + } + new import_obsidian8.Setting(containerEl).setName("Auto pull interval (minutes)").setDesc( + "Pull changes every X minutes. Set to 0 (default) to disable." + ).addText( + (text2) => text2.setValue(String(plugin.settings.autoPullInterval)).onChange((value) => { + if (!isNaN(Number(value))) { + plugin.settings.autoPullInterval = Number(value); + plugin.saveSettings(); + if (plugin.settings.autoPullInterval > 0) { + plugin.clearAutoPull(); + plugin.startAutoPull( + plugin.settings.autoPullInterval + ); + new import_obsidian8.Notice( + `Automatic pull enabled! Every ${formatMinutes( + plugin.settings.autoPullInterval + )}.` + ); + } else if (plugin.settings.autoPullInterval <= 0) { + plugin.clearAutoPull() && new import_obsidian8.Notice("Automatic pull disabled!"); + } + } else { + new import_obsidian8.Notice("Please specify a valid number."); + } + }) + ); + new import_obsidian8.Setting(containerEl).setName("Specify custom commit message on auto backup").setDesc("You will get a pop up to specify your message").addToggle( + (toggle) => toggle.setValue(plugin.settings.customMessageOnAutoBackup).onChange((value) => { + plugin.settings.customMessageOnAutoBackup = value; + plugin.saveSettings(); + }) + ); + new import_obsidian8.Setting(containerEl).setName("Commit message on auto backup/commit").setDesc( + "Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message)" + ).addTextArea( + (text2) => text2.setPlaceholder("vault backup: {{date}}").setValue(plugin.settings.autoCommitMessage).onChange((value) => { + plugin.settings.autoCommitMessage = value; + plugin.saveSettings(); + }) + ); + containerEl.createEl("br"); + containerEl.createEl("h3", { text: "Commit message" }); + new import_obsidian8.Setting(containerEl).setName("Commit message on manual backup/commit").setDesc( + "Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message)" + ).addTextArea( + (text2) => text2.setPlaceholder("vault backup: {{date}}").setValue( + plugin.settings.commitMessage ? plugin.settings.commitMessage : "" + ).onChange((value) => { + plugin.settings.commitMessage = value; + plugin.saveSettings(); + }) + ); + const datePlaceholderSetting = new import_obsidian8.Setting(containerEl).setName("{{date}} placeholder format").addText( + (text2) => text2.setPlaceholder(plugin.settings.commitDateFormat).setValue(plugin.settings.commitDateFormat).onChange(async (value) => { + plugin.settings.commitDateFormat = value; + await plugin.saveSettings(); + }) + ); + datePlaceholderSetting.descEl.innerHTML = ` + Specify custom date format. E.g. "${DATE_TIME_FORMAT_SECONDS}. See Moment.js for more formats.`; + new import_obsidian8.Setting(containerEl).setName("{{hostname}} placeholder replacement").setDesc("Specify custom hostname for every device.").addText( + (text2) => { + var _a2; + return text2.setValue((_a2 = plugin.localStorage.getHostname()) != null ? _a2 : "").onChange(async (value) => { + plugin.localStorage.setHostname(value); + }); + } + ); + new import_obsidian8.Setting(containerEl).setName("Preview commit message").addButton( + (button) => button.setButtonText("Preview").onClick(async () => { + const commitMessagePreview = await plugin.gitManager.formatCommitMessage( + plugin.settings.commitMessage + ); + new import_obsidian8.Notice(`${commitMessagePreview}`); + }) + ); + new import_obsidian8.Setting(containerEl).setName("List filenames affected by commit in the commit body").addToggle( + (toggle) => toggle.setValue(plugin.settings.listChangedFilesInMessageBody).onChange((value) => { + plugin.settings.listChangedFilesInMessageBody = value; + plugin.saveSettings(); + }) + ); + containerEl.createEl("br"); + containerEl.createEl("h3", { text: "Backup" }); + if (plugin.gitManager instanceof SimpleGit) + new import_obsidian8.Setting(containerEl).setName("Sync Method").setDesc( + "Selects the method used for handling new changes found in your remote git repository." + ).addDropdown((dropdown) => { + const options = { + merge: "Merge", + rebase: "Rebase", + reset: "Other sync service (Only updates the HEAD without touching the working directory)" + }; + dropdown.addOptions(options); + dropdown.setValue(plugin.settings.syncMethod); + dropdown.onChange(async (option) => { + plugin.settings.syncMethod = option; + plugin.saveSettings(); + }); + }); + new import_obsidian8.Setting(containerEl).setName("Pull updates on startup").setDesc("Automatically pull updates when Obsidian starts").addToggle( + (toggle) => toggle.setValue(plugin.settings.autoPullOnBoot).onChange((value) => { + plugin.settings.autoPullOnBoot = value; + plugin.saveSettings(); + }) + ); + new import_obsidian8.Setting(containerEl).setName("Push on backup").setDesc("Disable to only commit changes").addToggle( + (toggle) => toggle.setValue(!plugin.settings.disablePush).onChange((value) => { + plugin.settings.disablePush = !value; + plugin.saveSettings(); + }) + ); + new import_obsidian8.Setting(containerEl).setName("Pull changes before push").setDesc("Commit -> pull -> push (Only if pushing is enabled)").addToggle( + (toggle) => toggle.setValue(plugin.settings.pullBeforePush).onChange((value) => { + plugin.settings.pullBeforePush = value; + plugin.saveSettings(); + }) + ); + if (plugin.gitManager instanceof SimpleGit) { + containerEl.createEl("br"); + containerEl.createEl("h3", { text: "Line author information" }); + this.addLineAuthorInfoSettings(); + } + } + containerEl.createEl("br"); + containerEl.createEl("h3", { text: "History View" }); + new import_obsidian8.Setting(containerEl).setName("Show Author").setDesc("Show the author of the commit in the history view").addDropdown((dropdown) => { + const options = { + hide: "Hide", + full: "Full", + initials: "Initials" + }; + dropdown.addOptions(options); + dropdown.setValue(plugin.settings.authorInHistoryView); + dropdown.onChange(async (option) => { + plugin.settings.authorInHistoryView = option; + plugin.saveSettings(); + plugin.refresh(); + }); + }); + new import_obsidian8.Setting(containerEl).setName("Show Date").setDesc( + "Show the date of the commit in the history view. The {{date}} placeholder format is used to display the date." + ).addToggle( + (toggle) => toggle.setValue(plugin.settings.dateInHistoryView).onChange((value) => { + plugin.settings.dateInHistoryView = value; + plugin.saveSettings(); + plugin.refresh(); + }) + ); + containerEl.createEl("br"); + containerEl.createEl("h3", { text: "Source Control View" }); + new import_obsidian8.Setting(containerEl).setName( + "Automatically refresh Source Control View on file changes" + ).setDesc( + "On slower machines this may cause lags. If so, just disable this option" + ).addToggle( + (toggle) => toggle.setValue(plugin.settings.refreshSourceControl).onChange((value) => { + plugin.settings.refreshSourceControl = value; + plugin.saveSettings(); + }) + ); + new import_obsidian8.Setting(containerEl).setName("Source Control View refresh interval").setDesc( + "Milliseconds to wait after file change before refreshing the Source Control View" + ).addText( + (toggle) => toggle.setValue( + plugin.settings.refreshSourceControlTimer.toString() + ).setPlaceholder("7000").onChange((value) => { + plugin.settings.refreshSourceControlTimer = Math.max( + parseInt(value), + 500 + ); + plugin.saveSettings(); + plugin.setRefreshDebouncer(); + }) + ); + containerEl.createEl("br"); + containerEl.createEl("h3", { text: "Miscellaneous" }); + new import_obsidian8.Setting(containerEl).setName("Disable notifications").setDesc( + "Disable notifications for git operations to minimize distraction (refer to status bar for updates). Errors are still shown as notifications even if you enable this setting" + ).addToggle( + (toggle) => toggle.setValue(plugin.settings.disablePopups).onChange((value) => { + plugin.settings.disablePopups = value; + this.display(); + plugin.saveSettings(); + }) + ); + if (!plugin.settings.disablePopups) + new import_obsidian8.Setting(containerEl).setName("Hide notifications for no changes").setDesc( + "Don't show notifications when there are no changes to commit/push" + ).addToggle( + (toggle) => toggle.setValue(plugin.settings.disablePopupsForNoChanges).onChange((value) => { + plugin.settings.disablePopupsForNoChanges = value; + plugin.saveSettings(); + }) + ); + new import_obsidian8.Setting(containerEl).setName("Show status bar").setDesc( + "Obsidian must be restarted for the changes to take affect" + ).addToggle( + (toggle) => toggle.setValue(plugin.settings.showStatusBar).onChange((value) => { + plugin.settings.showStatusBar = value; + plugin.saveSettings(); + }) + ); + new import_obsidian8.Setting(containerEl).setName("Show stage/unstage button in file menu").addToggle( + (toggle) => toggle.setValue(plugin.settings.showFileMenu).onChange((value) => { + plugin.settings.showFileMenu = value; + plugin.saveSettings(); + }) + ); + new import_obsidian8.Setting(containerEl).setName("Show branch status bar").setDesc( + "Obsidian must be restarted for the changes to take affect" + ).addToggle( + (toggle) => toggle.setValue(plugin.settings.showBranchStatusBar).onChange((value) => { + plugin.settings.showBranchStatusBar = value; + plugin.saveSettings(); + }) + ); + new import_obsidian8.Setting(containerEl).setName("Show the count of modified files in the status bar").addToggle( + (toggle) => toggle.setValue(plugin.settings.changedFilesInStatusBar).onChange((value) => { + plugin.settings.changedFilesInStatusBar = value; + plugin.saveSettings(); + }) + ); + containerEl.createEl("br"); + if (plugin.gitManager instanceof IsomorphicGit) { + containerEl.createEl("h3", { + text: "Authentication/Commit Author" + }); + } else { + containerEl.createEl("h3", { text: "Commit Author" }); + } + if (plugin.gitManager instanceof IsomorphicGit) + new import_obsidian8.Setting(containerEl).setName( + "Username on your git server. E.g. your username on GitHub" + ).addText((cb) => { + var _a2; + cb.setValue((_a2 = plugin.localStorage.getUsername()) != null ? _a2 : ""); + cb.onChange((value) => { + plugin.localStorage.setUsername(value); + }); + }); + if (plugin.gitManager instanceof IsomorphicGit) + new import_obsidian8.Setting(containerEl).setName("Password/Personal access token").setDesc( + "Type in your password. You won't be able to see it again." + ).addText((cb) => { + cb.inputEl.autocapitalize = "off"; + cb.inputEl.autocomplete = "off"; + cb.inputEl.spellcheck = false; + cb.onChange((value) => { + plugin.localStorage.setPassword(value); + }); + }); + if (plugin.gitReady) + new import_obsidian8.Setting(containerEl).setName("Author name for commit").addText(async (cb) => { + cb.setValue(await plugin.gitManager.getConfig("user.name")); + cb.onChange((value) => { + plugin.gitManager.setConfig( + "user.name", + value == "" ? void 0 : value + ); + }); + }); + if (plugin.gitReady) + new import_obsidian8.Setting(containerEl).setName("Author email for commit").addText(async (cb) => { + cb.setValue( + await plugin.gitManager.getConfig("user.email") + ); + cb.onChange((value) => { + plugin.gitManager.setConfig( + "user.email", + value == "" ? void 0 : value + ); + }); + }); + containerEl.createEl("br"); + containerEl.createEl("h3", { text: "Advanced" }); + if (plugin.gitManager instanceof SimpleGit) { + new import_obsidian8.Setting(containerEl).setName("Update submodules").setDesc( + '"Create backup" and "pull" takes care of submodules. Missing features: Conflicted files, count of pulled/pushed/committed files. Tracking branch needs to be set for each submodule' + ).addToggle( + (toggle) => toggle.setValue(plugin.settings.updateSubmodules).onChange((value) => { + plugin.settings.updateSubmodules = value; + plugin.saveSettings(); + }) + ); + if (plugin.settings.updateSubmodules) { + new import_obsidian8.Setting(containerEl).setName("Submodule recurse checkout/switch").setDesc( + "Whenever a checkout happens on the root repository, recurse the checkout on the submodules (if the branches exist)." + ).addToggle( + (toggle) => toggle.setValue(plugin.settings.submoduleRecurseCheckout).onChange((value) => { + plugin.settings.submoduleRecurseCheckout = value; + plugin.saveSettings(); + }) + ); + } + } + if (plugin.gitManager instanceof SimpleGit) + new import_obsidian8.Setting(containerEl).setName("Custom Git binary path").addText((cb) => { + var _a2; + cb.setValue((_a2 = plugin.localStorage.getGitPath()) != null ? _a2 : ""); + cb.setPlaceholder("git"); + cb.onChange((value) => { + plugin.localStorage.setGitPath(value); + plugin.gitManager.updateGitPath(value || "git"); + }); + }); + if (plugin.gitManager instanceof SimpleGit) + new import_obsidian8.Setting(containerEl).setName("Additional environment variables").setDesc( + "Use each line for a new environment variable in the format KEY=VALUE" + ).addTextArea((cb) => { + cb.setPlaceholder("GIT_DIR=/path/to/git/dir"); + cb.setValue(plugin.localStorage.getEnvVars().join("\n")); + cb.onChange((value) => { + plugin.localStorage.setEnvVars(value.split("\n")); + }); + }); + if (plugin.gitManager instanceof SimpleGit) + new import_obsidian8.Setting(containerEl).setName("Additional PATH environment variable paths").setDesc("Use each line for one path").addTextArea((cb) => { + cb.setValue(plugin.localStorage.getPATHPaths().join("\n")); + cb.onChange((value) => { + plugin.localStorage.setPATHPaths(value.split("\n")); + }); + }); + if (plugin.gitManager instanceof SimpleGit) + new import_obsidian8.Setting(containerEl).setName("Reload with new environment variables").setDesc( + "Removing previously added environment variables will not take effect until Obsidian is restarted." + ).addButton((cb) => { + cb.setButtonText("Reload"); + cb.setCta(); + cb.onClick(() => { + plugin.gitManager.setGitInstance(); + }); + }); + new import_obsidian8.Setting(containerEl).setName("Custom base path (Git repository path)").setDesc( + ` + Sets the relative path to the vault from which the Git binary should be executed. + Mostly used to set the path to the Git repository, which is only required if the Git repository is below the vault root directory. Use "\\" instead of "/" on Windows. + ` + ).addText((cb) => { + cb.setValue(plugin.settings.basePath); + cb.setPlaceholder("directory/directory-with-git-repo"); + cb.onChange((value) => { + plugin.settings.basePath = value; + plugin.saveSettings(); + plugin.gitManager.updateBasePath(value || ""); + }); + }); + new import_obsidian8.Setting(containerEl).setName("Custom Git directory path (Instead of '.git')").setDesc( + `Requires restart of Obsidian to take effect. Use "\\" instead of "/" on Windows.` + ).addText((cb) => { + cb.setValue(plugin.settings.gitDir); + cb.setPlaceholder(".git"); + cb.onChange((value) => { + plugin.settings.gitDir = value; + plugin.saveSettings(); + }); + }); + new import_obsidian8.Setting(containerEl).setName("Disable on this device").setDesc( + "Disables the plugin on this device. This setting is not synced." + ).addToggle( + (toggle) => toggle.setValue(plugin.localStorage.getPluginDisabled()).onChange((value) => { + plugin.localStorage.setPluginDisabled(value); + if (value) { + plugin.unloadPlugin(); + } else { + plugin.loadPlugin(); + } + new import_obsidian8.Notice( + "Obsidian must be restarted for the changes to take affect" + ); + }) + ); + new import_obsidian8.Setting(containerEl).setName("Donate").setDesc( + "If you like this Plugin, consider donating to support continued development." + ).addButton((bt) => { + bt.buttonEl.outerHTML = "Buy Me a Coffee at ko-fi.com"; + }); + const info = containerEl.createDiv(); + info.setAttr("align", "center"); + info.setText( + "Debugging and logging:\nYou can always see the logs of this and every other plugin by opening the console with" + ); + const keys = containerEl.createDiv(); + keys.setAttr("align", "center"); + keys.addClass("obsidian-git-shortcuts"); + if (import_obsidian8.Platform.isMacOS === true) { + keys.createEl("kbd", { text: "CMD (\u2318) + OPTION (\u2325) + I" }); + } else { + keys.createEl("kbd", { text: "CTRL + SHIFT + I" }); + } + } + configureLineAuthorShowStatus(show) { + this.settings.lineAuthor.show = show; + this.plugin.saveSettings(); + if (show) + this.plugin.lineAuthoringFeature.activateFeature(); + else + this.plugin.lineAuthoringFeature.deactivateFeature(); + } + /** + * Persists the setting {@link key} with value {@link value} and + * refreshes the line author info views. + */ + lineAuthorSettingHandler(key2, value) { + this.settings.lineAuthor[key2] = value; + this.plugin.saveSettings(); + this.plugin.lineAuthoringFeature.refreshLineAuthorViews(); + } + /** + * Ensure, that certain last shown values are persisten in the settings. + * + * Necessary for the line author info gutter context menus. + */ + beforeSaveSettings() { + const laSettings = this.settings.lineAuthor; + if (laSettings.authorDisplay !== "hide") { + laSettings.lastShownAuthorDisplay = laSettings.authorDisplay; + } + if (laSettings.dateTimeFormatOptions !== "hide") { + laSettings.lastShownDateTimeFormatOptions = laSettings.dateTimeFormatOptions; + } + } + addLineAuthorInfoSettings() { + const baseLineAuthorInfoSetting = new import_obsidian8.Setting(this.containerEl).setName( + "Show commit authoring information next to each line" + ); + if (!this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform()) { + baseLineAuthorInfoSetting.setDesc("Only available on desktop currently.").setDisabled(true); + } + baseLineAuthorInfoSetting.descEl.innerHTML = ` + Feature guide and quick examples
+ The commit hash, author name and authoring date can all be individually toggled.
Hide everything, to only show the age-colored sidebar.`; + baseLineAuthorInfoSetting.addToggle( + (toggle) => toggle.setValue(this.settings.lineAuthor.show).onChange((value) => { + this.configureLineAuthorShowStatus(value); + this.display(); + }) + ); + if (this.settings.lineAuthor.show) { + const trackMovement = new import_obsidian8.Setting(this.containerEl).setName("Follow movement and copies across files and commits").setDesc("").addDropdown((dropdown) => { + dropdown.addOptions({ + inactive: "Do not follow (default)", + "same-commit": "Follow within same commit", + "all-commits": "Follow within all commits (maybe slow)" + }); + dropdown.setValue(this.settings.lineAuthor.followMovement); + dropdown.onChange( + (value) => this.lineAuthorSettingHandler("followMovement", value) + ); + }); + trackMovement.descEl.innerHTML = ` + By default (deactivated), each line only shows the newest commit where it was changed. +
+ With same commit, cut-copy-paste-ing of text is followed within the same commit and the original commit of authoring will be shown. +
+ With all commits, cut-copy-paste-ing text inbetween multiple commits will be detected. +
+ It uses git-blame and + for matches (at least ${GIT_LINE_AUTHORING_MOVEMENT_DETECTION_MINIMAL_LENGTH} characters) within the same (or all) commit(s), the originating commit's information is shown.`; + new import_obsidian8.Setting(this.containerEl).setName("Show commit hash").addToggle((tgl) => { + tgl.setValue(this.settings.lineAuthor.showCommitHash); + tgl.onChange( + async (value) => this.lineAuthorSettingHandler("showCommitHash", value) + ); + }); + new import_obsidian8.Setting(this.containerEl).setName("Author name display").setDesc("If and how the author is displayed").addDropdown((dropdown) => { + const options = { + hide: "Hide", + initials: "Initials (default)", + "first name": "First name", + "last name": "Last name", + full: "Full name" + }; + dropdown.addOptions(options); + dropdown.setValue(this.settings.lineAuthor.authorDisplay); + dropdown.onChange( + async (value) => this.lineAuthorSettingHandler("authorDisplay", value) + ); + }); + new import_obsidian8.Setting(this.containerEl).setName("Authoring date display").setDesc( + "If and how the date and time of authoring the line is displayed" + ).addDropdown((dropdown) => { + const options = { + hide: "Hide", + date: "Date (default)", + datetime: "Date and time", + "natural language": "Natural language", + custom: "Custom" + }; + dropdown.addOptions(options); + dropdown.setValue( + this.settings.lineAuthor.dateTimeFormatOptions + ); + dropdown.onChange( + async (value) => { + this.lineAuthorSettingHandler( + "dateTimeFormatOptions", + value + ); + this.display(); + } + ); + }); + if (this.settings.lineAuthor.dateTimeFormatOptions === "custom") { + const dateTimeFormatCustomStringSetting = new import_obsidian8.Setting( + this.containerEl + ); + dateTimeFormatCustomStringSetting.setName("Custom authoring date format").addText((cb) => { + cb.setValue( + this.settings.lineAuthor.dateTimeFormatCustomString + ); + cb.setPlaceholder("YYYY-MM-DD HH:mm"); + cb.onChange((value) => { + this.lineAuthorSettingHandler( + "dateTimeFormatCustomString", + value + ); + dateTimeFormatCustomStringSetting.descEl.innerHTML = this.previewCustomDateTimeDescriptionHtml( + value + ); + }); + }); + dateTimeFormatCustomStringSetting.descEl.innerHTML = this.previewCustomDateTimeDescriptionHtml( + this.settings.lineAuthor.dateTimeFormatCustomString + ); + } + new import_obsidian8.Setting(this.containerEl).setName("Authoring date display timezone").addDropdown((dropdown) => { + const options = { + "viewer-local": "My local (default)", + "author-local": "Author's local", + utc0000: "UTC+0000/Z" + }; + dropdown.addOptions(options); + dropdown.setValue( + this.settings.lineAuthor.dateTimeTimezone + ); + dropdown.onChange( + async (value) => this.lineAuthorSettingHandler("dateTimeTimezone", value) + ); + }).descEl.innerHTML = ` + The time-zone in which the authoring date should be shown. + Either your local time-zone (default), + the author's time-zone during commit creation or + UTC\xB100:00. + `; + const oldestAgeSetting = new import_obsidian8.Setting(this.containerEl).setName( + "Oldest age in coloring" + ); + oldestAgeSetting.descEl.innerHTML = this.previewOldestAgeDescriptionHtml( + this.settings.lineAuthor.coloringMaxAge + )[0]; + oldestAgeSetting.addText((text2) => { + text2.setPlaceholder("1y"); + text2.setValue(this.settings.lineAuthor.coloringMaxAge); + text2.onChange((value) => { + const [preview, valid] = this.previewOldestAgeDescriptionHtml(value); + oldestAgeSetting.descEl.innerHTML = preview; + if (valid) { + this.lineAuthorSettingHandler("coloringMaxAge", value); + this.refreshColorSettingsName("oldest"); + } + }); + }); + this.createColorSetting("newest"); + this.createColorSetting("oldest"); + new import_obsidian8.Setting(this.containerEl).setName("Text color").addText((field) => { + field.setValue(this.settings.lineAuthor.textColorCss); + field.onChange((value) => { + this.lineAuthorSettingHandler("textColorCss", value); + }); + }).descEl.innerHTML = ` + The CSS color of the gutter text.
+ + It is higly recommended to use + + CSS variables + defined by themes + (e.g.
var(--text-muted)
or +
var(--text-on-accent)
, + because they automatically adapt to theme changes.
+ + See: + List of available CSS variables in Obsidian + + `; + new import_obsidian8.Setting(this.containerEl).setName("Ignore whitespace and newlines in changes").addToggle((tgl) => { + tgl.setValue(this.settings.lineAuthor.ignoreWhitespace); + tgl.onChange( + (value) => this.lineAuthorSettingHandler("ignoreWhitespace", value) + ); + }).descEl.innerHTML = ` + Whitespace and newlines are interpreted as + part of the document and in changes + by default (hence not ignored). + This makes the last line being shown as 'changed' + when a new subsequent line is added, + even if the previously last line's text is the same. +
+ If you don't care about purely-whitespace changes + (e.g. list nesting / quote indentation changes), + then activating this will provide more meaningful change detection. + `; + } + } + createColorSetting(which) { + const setting = new import_obsidian8.Setting(this.containerEl).setName("").addText((text2) => { + const color = pickColor(which, this.settings.lineAuthor); + const defaultColor = pickColor( + which, + DEFAULT_SETTINGS.lineAuthor + ); + text2.setPlaceholder(rgbToString(defaultColor)); + text2.setValue(rgbToString(color)); + text2.onChange((colorNew) => { + const rgb = convertToRgb(colorNew); + if (rgb !== void 0) { + const key2 = which === "newest" ? "colorNew" : "colorOld"; + this.lineAuthorSettingHandler(key2, rgb); + } + this.refreshColorSettingsDesc(which, rgb); + }); + }); + this.lineAuthorColorSettings.set(which, setting); + this.refreshColorSettingsName(which); + this.refreshColorSettingsDesc( + which, + pickColor(which, this.settings.lineAuthor) + ); + } + refreshColorSettingsName(which) { + const settingsDom = this.lineAuthorColorSettings.get(which); + if (settingsDom) { + const whichDescriber = which === "oldest" ? `oldest (${this.settings.lineAuthor.coloringMaxAge} or older)` : "newest"; + settingsDom.nameEl.innerText = `Color for ${whichDescriber} commits`; + } + } + refreshColorSettingsDesc(which, rgb) { + const settingsDom = this.lineAuthorColorSettings.get(which); + if (settingsDom) { + settingsDom.descEl.innerHTML = this.colorSettingPreviewDescHtml( + which, + this.settings.lineAuthor, + rgb !== void 0 + ); + } + } + colorSettingPreviewDescHtml(which, laSettings, colorIsValid) { + const rgbStr = colorIsValid ? previewColor(which, laSettings) : `rgba(127,127,127,0.3)`; + const today = import_obsidian8.moment.unix(import_obsidian8.moment.now() / 1e3).format("YYYY-MM-DD"); + const text2 = colorIsValid ? `abcdef Author Name ${today}` : "invalid color"; + const preview = `
${text2}
`; + return `Supports 'rgb(r,g,b)', 'hsl(h,s,l)', hex (#) and + named colors (e.g. 'black', 'purple'). Color preview: ${preview}`; + } + previewCustomDateTimeDescriptionHtml(dateTimeFormatCustomString) { + const formattedDateTime = (0, import_obsidian8.moment)().format(dateTimeFormatCustomString); + return `
Format string to display the authoring date.
Currently: ${formattedDateTime}`; + } + previewOldestAgeDescriptionHtml(coloringMaxAge) { + const duration = parseColoringMaxAgeDuration(coloringMaxAge); + const durationString = duration !== void 0 ? `${duration.asDays()} days` : "invalid!"; + return [ + `The oldest age in the line author coloring. Everything older will have the same color. +
Smallest valid age is "1d". Currently: ${durationString}`, + duration + ]; + } +}; +function pickColor(which, las) { + return which === "oldest" ? las.colorOld : las.colorNew; +} +function parseColoringMaxAgeDuration(durationString) { + const duration = import_obsidian8.moment.duration("P" + durationString.toUpperCase()); + return duration.isValid() && duration.asDays() && duration.asDays() >= 1 ? duration : void 0; +} + +// src/lineAuthor/model.ts +function lineAuthoringId(head, objHash, path2) { + if (head === void 0 || objHash === void 0 || path2 === void 0) { + return void 0; + } + return `head${head}-obj${objHash}-path${path2}`; +} +var LineAuthoringContainerType = import_state.Annotation.define(); +function newComputationResultAsTransaction(key2, la, state) { + return state.update({ + annotations: LineAuthoringContainerType.of({ + key: key2, + la, + lineOffsetsFromUnsavedChanges: /* @__PURE__ */ new Map() + }) + }); +} +function getLineAuthorAnnotation(tr) { + return tr.annotation(LineAuthoringContainerType); +} +var lineAuthorState = import_state.StateField.define({ + create: (_state) => void 0, + /** + * The state can be updated from either an annotated transaction containing + * the newest line authoring (for the saved document) - or from + * unsaved changes of the document as the user is actively typing in the editor. + * + * In the first case, we take the new line authoring and discard anything we had remembered + * from unsaved changes. In the second case, we use the unsaved changes in {@link enrichUnsavedChanges} to pre-compute information to immediately update the + * line author gutter without needing to wait until the document is saved and the + * line authoring is properly computed. + */ + update: (previous, transaction) => { + var _a2; + return (_a2 = getLineAuthorAnnotation(transaction)) != null ? _a2 : enrichUnsavedChanges(transaction, previous); + }, + // compare cache keys. + // equality rate is >= 95% :) + // hence avoids recomputation of views + compare: (l, r) => (l == null ? void 0 : l.key) === (r == null ? void 0 : r.key) +}); +function laStateDigest(laState) { + var _a2; + const digest = import_js_sha256.sha256.create(); + if (!laState) + return digest; + const { la, key: key2, lineOffsetsFromUnsavedChanges } = laState; + digest.update(la === "untracked" ? "t" : "f"); + digest.update(key2); + for (const [k, v] of (_a2 = lineOffsetsFromUnsavedChanges.entries()) != null ? _a2 : []) + digest.update([k, v]); + return digest; +} +var latestSettings = { + get: void 0, + save: void 0 +}; +function provideSettingsAccess(settingsGetter, settingsSetter) { + latestSettings.get = settingsGetter; + latestSettings.save = settingsSetter; +} +function maxAgeInDaysFromSettings(settings) { + var _a2, _b; + return (_b = (_a2 = parseColoringMaxAgeDuration(settings.coloringMaxAge)) == null ? void 0 : _a2.asDays()) != null ? _b : parseColoringMaxAgeDuration( + DEFAULT_SETTINGS.lineAuthor.coloringMaxAge + ).asDays(); +} +function enrichUnsavedChanges(tr, prev) { + if (!prev) + return void 0; + if (!tr.changes.empty) { + tr.changes.iterChanges((fromA, toA, fromB, toB) => { + var _a2; + const oldDoc = tr.startState.doc; + const { newDoc } = tr; + const beforeFrom = oldDoc.lineAt(fromA).number; + const beforeTo = oldDoc.lineAt(toA).number; + const afterFrom = newDoc.lineAt(fromB).number; + const afterTo = newDoc.lineAt(toB).number; + const beforeLen = beforeTo - beforeFrom + 1; + const afterLen = afterTo - afterFrom + 1; + for (let afterI = afterFrom; afterI <= afterTo; afterI++) { + let offset = (_a2 = prev.lineOffsetsFromUnsavedChanges.get(afterI)) != null ? _a2 : 0; + const isLastLine = afterTo === afterI; + const changeInNumberOfLines = afterLen - beforeLen; + if (isLastLine) + offset += changeInNumberOfLines; + prev.lineOffsetsFromUnsavedChanges.set(afterI, offset); + } + }); + } + return prev; +} + +// src/lineAuthor/control.ts +var LineAuthoringSubscriber = class { + // remember path to detect and adapt to renames + constructor(state) { + this.state = state; + this.subscribeMe(); + } + async notifyLineAuthoring(id, la) { + if (this.view === void 0) { + console.warn( + `Git: View is not defined for editor cache key. Unforeseen situation. id: ${id}` + ); + return; + } + const state = this.view.state; + const transaction = newComputationResultAsTransaction(id, la, state); + this.view.dispatch(transaction); + } + updateToNewState(state) { + const filepathChanged = this.lastSeenPath && this.filepath != this.lastSeenPath; + this.state = state; + if (filepathChanged) { + this.unsubscribeMe(this.lastSeenPath); + this.subscribeMe(); + } + return this; + } + removeIfStale() { + if (this.view.destroyed) { + this.unsubscribeMe(this.lastSeenPath); + } + } + subscribeMe() { + if (this.filepath === void 0) + return; + eventsPerFilePathSingleton.ifFilepathDefinedTransformSubscribers( + this.filepath, + (subs) => subs.add(this) + ); + this.lastSeenPath = this.filepath; + } + unsubscribeMe(oldFilepath) { + eventsPerFilePathSingleton.ifFilepathDefinedTransformSubscribers( + oldFilepath, + (subs) => subs.delete(this) + ); + } + get filepath() { + var _a2, _b; + return (_b = (_a2 = this.state.field(import_obsidian9.editorViewField)) == null ? void 0 : _a2.file) == null ? void 0 : _b.path; + } + get view() { + return this.state.field(import_obsidian9.editorEditorField); + } +}; +var subscribeNewEditor = import_state2.StateField.define({ + create: (state) => new LineAuthoringSubscriber(state), + update: (v, transaction) => v.updateToNewState(transaction.state), + compare: (a, b) => a === b +}); + +// src/lineAuthor/view/cache.ts +init_polyfill_buffer(); +function clearViewCache() { + longestRenderedGutter = void 0; + renderedAgeInDaysForAdaptiveInitialColoring = []; + ageIdx = 0; + gutterInstances.clear(); + gutterMarkersRangeSet.clear(); + attachedGutterElements.clear(); +} +var longestRenderedGutter = void 0; +var getLongestRenderedGutter = () => longestRenderedGutter; +function conditionallyUpdateLongestRenderedGutter(gutter2, text2) { + var _a2; + const length = text2.length; + if (length < ((_a2 = longestRenderedGutter == null ? void 0 : longestRenderedGutter.length) != null ? _a2 : 0)) + return; + longestRenderedGutter = { gutter: gutter2, length, text: text2 }; + const settings = latestSettings.get(); + if (length !== settings.gutterSpacingFallbackLength) { + settings.gutterSpacingFallbackLength = length; + latestSettings.save(settings); + } +} +var renderedAgeInDaysForAdaptiveInitialColoring = []; +var ADAPTIVE_INITIAL_COLORING_AGE_CACHE_SIZE = 15; +var ageIdx = 0; +function recordRenderedAgeInDays(age) { + renderedAgeInDaysForAdaptiveInitialColoring[ageIdx] = age; + ageIdx = (ageIdx + 1) % ADAPTIVE_INITIAL_COLORING_AGE_CACHE_SIZE; +} +function computeAdaptiveInitialColoringAgeInDays() { + return median(renderedAgeInDaysForAdaptiveInitialColoring); +} +var gutterInstances = /* @__PURE__ */ new Map(); +var gutterMarkersRangeSet = /* @__PURE__ */ new Map(); +var attachedGutterElements = /* @__PURE__ */ new Set(); + +// src/lineAuthor/view/view.ts +init_polyfill_buffer(); +var import_state3 = require("@codemirror/state"); +var import_view2 = require("@codemirror/view"); + +// src/lineAuthor/view/gutter/gutter.ts +init_polyfill_buffer(); +var import_view = require("@codemirror/view"); +var import_js_sha2562 = __toESM(require_sha256()); +var import_obsidian10 = require("obsidian"); + +// src/lineAuthor/view/contextMenu.ts +init_polyfill_buffer(); + +// src/lineAuthor/view/gutter/gutterElementSearch.ts +init_polyfill_buffer(); +var mouseXY = { x: -10, y: -10 }; +function prepareGutterSearchForContextMenuHandling() { + if (mouseXY.x === -10) { + window.addEventListener("mousedown", (e) => { + mouseXY.x = e.clientX; + mouseXY.y = e.clientY; + }); + } +} +function findGutterElementUnderMouse() { + for (const elt of attachedGutterElements) { + if (contains(elt, mouseXY)) + return elt; + } +} +function contains(elt, pt) { + const { x, y, width, height } = elt.getBoundingClientRect(); + return x <= pt.x && pt.x <= x + width && y <= pt.y && pt.y <= y + height; +} + +// src/pluginGlobalRef.ts +init_polyfill_buffer(); +var pluginRef = {}; + +// src/lineAuthor/view/contextMenu.ts +var COMMIT_ATTR = "data-commit"; +function handleContextMenu(menu, editor, _mdv) { + if (editor.hasFocus()) + return; + const gutterElement = findGutterElementUnderMouse(); + if (!gutterElement) + return; + const info = getCommitInfo(gutterElement); + if (!info) + return; + if (!info.isZeroCommit && !info.isWaitingGutter) { + addCopyHashMenuItem(info, menu); + } + addConfigurableLineAuthorSettings("showCommitHash", menu); + addConfigurableLineAuthorSettings("authorDisplay", menu); + addConfigurableLineAuthorSettings("dateTimeFormatOptions", menu); +} +function addCopyHashMenuItem(commit2, menu) { + menu.addItem( + (item) => item.setTitle("Copy commit hash").setIcon("copy").setSection("obs-git-line-author-copy").onClick((_e) => navigator.clipboard.writeText(commit2.hash)) + ); +} +function addConfigurableLineAuthorSettings(key2, menu) { + var _a2, _b; + let title; + let actionNewValue; + const settings = pluginRef.plugin.settings.lineAuthor; + const currentValue = settings[key2]; + const currentlyShown = typeof currentValue === "boolean" ? currentValue : currentValue !== "hide"; + const defaultValue = DEFAULT_SETTINGS.lineAuthor[key2]; + if (key2 === "showCommitHash") { + title = "Show commit hash"; + actionNewValue = !currentValue; + } else if (key2 === "authorDisplay") { + const showOption = (_a2 = settings.lastShownAuthorDisplay) != null ? _a2 : defaultValue; + title = "Show author " + (currentlyShown ? currentValue : showOption); + actionNewValue = currentlyShown ? "hide" : showOption; + } else if (key2 === "dateTimeFormatOptions") { + const showOption = (_b = settings.lastShownDateTimeFormatOptions) != null ? _b : defaultValue; + title = "Show " + (currentlyShown ? currentValue : showOption); + title += !title.contains("date") ? " date" : ""; + actionNewValue = currentlyShown ? "hide" : showOption; + } else { + impossibleBranch(key2); + } + menu.addItem( + (item) => item.setTitle(title).setSection("obs-git-line-author-configure").setChecked(currentlyShown).onClick( + (_e) => { + var _a3, _b2; + return (_b2 = (_a3 = pluginRef.plugin) == null ? void 0 : _a3.settingsTab) == null ? void 0 : _b2.lineAuthorSettingHandler( + key2, + actionNewValue + ); + } + ) + ); +} +function enrichCommitInfoForContextMenu(commit2, isWaitingGutter, elt) { + elt.setAttr( + COMMIT_ATTR, + JSON.stringify({ + hash: commit2.hash, + isZeroCommit: commit2.isZeroCommit, + isWaitingGutter + }) + ); +} +function getCommitInfo(elt) { + const commitInfoStr = elt.getAttr(COMMIT_ATTR); + return commitInfoStr ? JSON.parse(commitInfoStr) : void 0; +} + +// src/lineAuthor/view/gutter/coloring.ts +init_polyfill_buffer(); +function previewColor(which, settings) { + return which === "oldest" ? coloringBasedOnCommitAge(0, false, settings).color : coloringBasedOnCommitAge(void 0, true, settings).color; +} +function coloringBasedOnCommitAge(commitAuthorEpochSeonds, isZeroCommit, settings) { + const maxAgeInDays = maxAgeInDaysFromSettings(settings); + const epochSecondsNow = Date.now() / 1e3; + const authoringEpochSeconds = commitAuthorEpochSeonds != null ? commitAuthorEpochSeonds : 0; + const secondsSinceCommit = isZeroCommit ? 0 : epochSecondsNow - authoringEpochSeconds; + const daysSinceCommit = secondsSinceCommit / 60 / 60 / 24; + const x = Math.pow( + Math.clamp(daysSinceCommit / maxAgeInDays, 0, 1), + 1 / 2.3 + ); + const dark = isDarkMode(); + const color0 = settings.colorNew; + const color1 = settings.colorOld; + const scaling = dark ? 0.4 : 1; + const r = lin(color0.r, color1.r, x) * scaling; + const g = lin(color0.g, color1.g, x) * scaling; + const b = lin(color0.b, color1.b, x) * scaling; + const a = dark ? 0.75 : 0.25; + return { color: `rgba(${r},${g},${b},${a})`, daysSinceCommit }; +} +function lin(z0, z1, x) { + return z0 + (z1 - z0) * x; +} +function isDarkMode() { + const obsidian = window == null ? void 0 : window.app; + return (obsidian == null ? void 0 : obsidian.getTheme()) === "obsidian"; +} +function setTextColorCssBasedOnSetting(settings) { + document.body.style.setProperty( + "--obs-git-gutter-text", + settings.textColorCss + ); +} + +// src/lineAuthor/view/gutter/commitChoice.ts +init_polyfill_buffer(); +function chooseNewestCommit(lineAuthoring, startLine, endLine) { + let newest = void 0; + for (let line = startLine; line <= endLine; line++) { + const currentHash = lineAuthoring.hashPerLine[line]; + const currentCommit = lineAuthoring.commits.get(currentHash); + if (!newest || currentCommit.isZeroCommit || isNewerThan(currentCommit, newest)) { + newest = currentCommit; + } + } + return newest; +} +function isNewerThan(left, right) { + var _a2, _b, _c, _d; + const l = (_b = (_a2 = left.author) == null ? void 0 : _a2.epochSeconds) != null ? _b : 0; + const r = (_d = (_c = right.author) == null ? void 0 : _c.epochSeconds) != null ? _d : 0; + return l > r; +} + +// src/lineAuthor/view/gutter/gutter.ts +var VALUE_NOT_FOUND_FALLBACK = "-"; +var NEW_CHANGE_CHARACTER = "+"; +var NEW_CHANGE_NUMBER_OF_CHARACTERS = 3; +var DIFFERING_AUTHOR_COMMITTER_MARKER = "*"; +var NON_WHITESPACE_REGEXP = /\S/g; +var UNINTRUSIVE_CHARACTER_FOR_WAITING_RENDERING = "%"; +var TextGutter = class extends import_view.GutterMarker { + constructor(text2) { + super(); + this.text = text2; + } + eq(other) { + return this.text === (other == null ? void 0 : other.text); + } + toDOM() { + return document.createTextNode(this.text); + } + destroy(dom) { + if (!document.body.contains(dom)) + dom.remove(); + } +}; +var LineAuthoringGutter = class extends import_view.GutterMarker { + /** + * **This should only be called {@link lineAuthoringGutterMarker}!** + * + * We want to avoid creating the same instance multiple times for improved performance. + */ + constructor(lineAuthoring, startLine, endLine, key2, settings, options) { + super(); + this.lineAuthoring = lineAuthoring; + this.startLine = startLine; + this.endLine = endLine; + this.key = key2; + this.settings = settings; + this.options = options; + this.point = false; + this.elementClass = "obs-git-blame-gutter"; + } + // Equality used by CodeMirror for optimisations + eq(other) { + return this.key === (other == null ? void 0 : other.key) && this.startLine === (other == null ? void 0 : other.startLine) && this.endLine === (other == null ? void 0 : other.endLine) && (this == null ? void 0 : this.options) === (other == null ? void 0 : other.options); + } + /** + * Renders to a Html node. + * + * It choses the newest commit within the line-range, + * renders it, makes adjustments for fake-commits and finally warps + * it into HTML. + * + * The DOM is actually precomputed with {@link computeDom}, + * which provides a finaliser to run before the DOM is handed over to CodeMirror. + * This is done, because this method is called frequently. It is called, + * whenever a gutter gets into the viewport and needs to be rendered. + * + * The age in days is recorded via {@link recordRenderedAgeInDays} to enable adaptive coloring. + */ + toDOM() { + var _a2; + this.precomputedDomProvider = (_a2 = this.precomputedDomProvider) != null ? _a2 : this.computeDom(); + return this.precomputedDomProvider(); + } + destroy(dom) { + if (!document.body.contains(dom)) { + dom.remove(); + attachedGutterElements.delete(dom); + } + } + /** + * Prepares the DOM for this gutter. + */ + computeDom() { + const commit2 = chooseNewestCommit( + this.lineAuthoring, + this.startLine, + this.endLine + ); + let toBeRenderedText = commit2.isZeroCommit ? "" : this.renderNonZeroCommit(commit2); + const isTrueCommit = !commit2.isZeroCommit && this.options !== "waiting-for-result"; + if (isTrueCommit) { + conditionallyUpdateLongestRenderedGutter(this, toBeRenderedText); + } else { + toBeRenderedText = this.adaptTextForFakeCommit( + commit2, + toBeRenderedText, + this.options + ); + } + const domProvider = this.createHtmlNode( + commit2, + toBeRenderedText, + this.options === "waiting-for-result" + ); + return domProvider; + } + createHtmlNode(commit2, text2, isWaitingGutter) { + var _a2; + const templateElt = window.createDiv(); + templateElt.innerText = text2; + const { color, daysSinceCommit } = coloringBasedOnCommitAge( + (_a2 = commit2 == null ? void 0 : commit2.author) == null ? void 0 : _a2.epochSeconds, + commit2 == null ? void 0 : commit2.isZeroCommit, + this.settings + ); + templateElt.style.backgroundColor = color; + enrichCommitInfoForContextMenu(commit2, isWaitingGutter, templateElt); + function prepareForDomAttachment() { + const elt = templateElt.cloneNode(true); + attachedGutterElements.add(elt); + if (!isWaitingGutter) + recordRenderedAgeInDays(daysSinceCommit); + return elt; + } + return prepareForDomAttachment; + } + renderNonZeroCommit(commit2) { + const optionalShortHash = this.settings.showCommitHash ? this.renderHash(commit2) : ""; + const optionalAuthorName = this.settings.authorDisplay === "hide" ? "" : `${this.renderAuthorName( + commit2, + this.settings.authorDisplay + )}`; + const optionalAuthoringDate = this.settings.dateTimeFormatOptions === "hide" ? "" : `${this.renderAuthoringDate( + commit2, + this.settings.dateTimeFormatOptions, + this.settings.dateTimeFormatCustomString, + this.settings.dateTimeTimezone + )}`; + const parts = [ + optionalShortHash, + optionalAuthorName, + optionalAuthoringDate + ]; + return parts.filter((x) => x.length >= 1).join(" "); + } + renderHash(nonZeroCommit) { + return nonZeroCommit.hash.substring(0, 6); + } + renderAuthorName(nonZeroCommit, authorDisplay) { + var _a2, _b, _c, _d; + const name = (_b = (_a2 = nonZeroCommit == null ? void 0 : nonZeroCommit.author) == null ? void 0 : _a2.name) != null ? _b : ""; + const words = name.split(" ").filter((word) => word.length >= 1); + let rendered; + switch (authorDisplay) { + case "initials": + rendered = words.map((word) => word[0].toUpperCase()).join(""); + break; + case "first name": + rendered = (_c = words.first()) != null ? _c : VALUE_NOT_FOUND_FALLBACK; + break; + case "last name": + rendered = (_d = words.last()) != null ? _d : VALUE_NOT_FOUND_FALLBACK; + break; + case "full": + rendered = name; + break; + default: + return impossibleBranch(authorDisplay); + } + if (!strictDeepEqual(nonZeroCommit == null ? void 0 : nonZeroCommit.author, nonZeroCommit == null ? void 0 : nonZeroCommit.committer)) { + rendered = rendered + DIFFERING_AUTHOR_COMMITTER_MARKER; + } + return rendered; + } + renderAuthoringDate(nonZeroCommit, dateTimeFormatOptions, dateTimeFormatCustomString, dateTimeTimezone) { + var _a2; + const FALLBACK_COMMIT_DATE = "?"; + if (((_a2 = nonZeroCommit == null ? void 0 : nonZeroCommit.author) == null ? void 0 : _a2.epochSeconds) === void 0) + return FALLBACK_COMMIT_DATE; + let dateTimeFormatting; + switch (dateTimeFormatOptions) { + case "date": + dateTimeFormatting = DATE_FORMAT; + break; + case "datetime": + dateTimeFormatting = DATE_TIME_FORMAT_MINUTES; + break; + case "custom": + dateTimeFormatting = dateTimeFormatCustomString; + break; + case "natural language": + dateTimeFormatting = (time) => { + const diff3 = time.diff((0, import_obsidian10.moment)()); + const addFluentSuffix = true; + return import_obsidian10.moment.duration(diff3).humanize(addFluentSuffix); + }; + break; + default: + return impossibleBranch(dateTimeFormatOptions); + } + let authoringDate = import_obsidian10.moment.unix( + nonZeroCommit.author.epochSeconds + ); + switch (dateTimeTimezone) { + case "viewer-local": + break; + case "author-local": + authoringDate = authoringDate.utcOffset( + nonZeroCommit.author.tz + ); + dateTimeFormatting += " Z"; + break; + case "utc0000": + authoringDate = authoringDate.utc(); + dateTimeFormatting += "[Z]"; + break; + default: + return impossibleBranch(dateTimeTimezone); + } + if (typeof dateTimeFormatting === "string") { + return authoringDate.format(dateTimeFormatting); + } else { + return dateTimeFormatting(authoringDate); + } + } + adaptTextForFakeCommit(commit2, toBeRenderedText, options) { + var _a2, _b, _c, _d; + const original = (_b = (_a2 = getLongestRenderedGutter()) == null ? void 0 : _a2.text) != null ? _b : toBeRenderedText; + const fillCharacter = options !== "waiting-for-result" && commit2.isZeroCommit ? NEW_CHANGE_CHARACTER : UNINTRUSIVE_CHARACTER_FOR_WAITING_RENDERING; + toBeRenderedText = original.replace( + NON_WHITESPACE_REGEXP, + fillCharacter + ); + const desiredTextLength = (_d = (_c = latestSettings.get()) == null ? void 0 : _c.gutterSpacingFallbackLength) != null ? _d : toBeRenderedText.length; + toBeRenderedText = resizeToLength( + toBeRenderedText, + desiredTextLength, + fillCharacter + ); + if (options !== "waiting-for-result" && commit2.isZeroCommit) { + const numberOfLastCharactersToKeep = Math.min( + desiredTextLength, + NEW_CHANGE_NUMBER_OF_CHARACTERS + ); + toBeRenderedText = prefixOfLengthAsWhitespace( + toBeRenderedText, + desiredTextLength - numberOfLastCharactersToKeep + ); + } + return toBeRenderedText; + } +}; +function lineAuthoringGutterMarker(la, startLine, endLine, key2, settings, options) { + const digest = import_js_sha2562.sha256.create(); + digest.update(Object.values(settings).join(",")); + digest.update(`s${startLine}-e${endLine}-k${key2}-o${options}`); + const cacheKey = digest.hex(); + const cached = gutterInstances.get(cacheKey); + if (cached) + return cached; + const result = new LineAuthoringGutter( + la, + startLine, + endLine, + key2, + settings, + options + ); + gutterInstances.set(cacheKey, result); + return result; +} + +// src/lineAuthor/view/gutter/initial.ts +init_polyfill_buffer(); +var import_obsidian11 = require("obsidian"); +function initialSpacingGutter() { + var _a2, _b; + const length = (_b = (_a2 = latestSettings.get()) == null ? void 0 : _a2.gutterSpacingFallbackLength) != null ? _b : DEFAULT_SETTINGS.lineAuthor.gutterSpacingFallbackLength; + return new TextGutter(Array(length).fill("-").join("")); +} +function initialLineAuthoringGutter(settings) { + const { lineAuthoring, ageForInitialRender } = adaptiveInitialColoredWaitingLineAuthoring(settings); + return lineAuthoringGutterMarker( + lineAuthoring, + 1, + 1, + "initialGutter" + ageForInitialRender, + // use a age coloring based cache key + settings, + "waiting-for-result" + ); +} +function adaptiveInitialColoredWaitingLineAuthoring(settings) { + var _a2; + const ageForInitialRender = (_a2 = computeAdaptiveInitialColoringAgeInDays()) != null ? _a2 : maxAgeInDaysFromSettings(settings) * 0.25; + const slightlyOlderAgeForInitialRender = (0, import_obsidian11.moment)().add( + -ageForInitialRender, + "days" + ); + const dummyAuthor = { + name: "", + epochSeconds: momentToEpochSeconds(slightlyOlderAgeForInitialRender), + tz: "+0000" + }; + const dummyCommit = { + hash: "waiting-for-result", + author: dummyAuthor, + committer: dummyAuthor, + isZeroCommit: false + }; + return { + lineAuthoring: { + hashPerLine: [void 0, "waiting-for-result"], + commits: /* @__PURE__ */ new Map([["waiting-for-result", dummyCommit]]) + }, + ageForInitialRender + }; +} + +// src/lineAuthor/view/gutter/untrackedFile.ts +init_polyfill_buffer(); +function newUntrackedFileGutter(key2, settings) { + const dummyLineAuthoring = { + hashPerLine: [void 0, "000000"], + commits: /* @__PURE__ */ new Map([["000000", zeroCommit]]) + }; + return lineAuthoringGutterMarker(dummyLineAuthoring, 1, 1, key2, settings); +} + +// src/lineAuthor/view/view.ts +var UNDISPLAYED = new TextGutter(""); +var lineAuthorGutter = (0, import_view2.gutter)({ + class: "line-author-gutter-container", + markers(view) { + const lineAuthoring = view.state.field(lineAuthorState, false); + return lineAuthoringGutterMarkersRangeSet(view, lineAuthoring); + }, + lineMarkerChange(update2) { + const newLineAuthoringId = laStateDigest( + update2.state.field(lineAuthorState) + ); + const oldLineAuthoringId = laStateDigest( + update2.startState.field(lineAuthorState) + ); + return oldLineAuthoringId !== newLineAuthoringId; + }, + renderEmptyElements: true, + initialSpacer: (view) => { + temporaryWorkaroundGutterSpacingForRenderedLineAuthoring(view); + return initialSpacingGutter(); + }, + updateSpacer: (_sp, update2) => { + var _a2, _b; + temporaryWorkaroundGutterSpacingForRenderedLineAuthoring(update2.view); + return (_b = (_a2 = getLongestRenderedGutter()) == null ? void 0 : _a2.gutter) != null ? _b : initialSpacingGutter(); + } +}); +function lineAuthoringGutterMarkersRangeSet(view, optLA) { + const digest = laStateDigest(optLA); + const doc = view.state.doc; + const lineBlockEndPos = /* @__PURE__ */ new Map(); + for (let line = 1; line <= doc.lines; line++) { + const from = doc.line(line).from; + const to = view.lineBlockAt(from).to; + lineBlockEndPos.set(line, [from, to]); + digest.update([from, to, 0]); + } + const laSettings = latestSettings.get(); + digest.update("s" + Object.values(latestSettings).join(",")); + const cacheKey = digest.hex(); + const cached = gutterMarkersRangeSet.get(cacheKey); + if (cached) + return cached; + const { result, allowCache } = computeLineAuthoringGutterMarkersRangeSet( + doc, + lineBlockEndPos, + laSettings, + optLA + ); + if (allowCache) + gutterMarkersRangeSet.set(cacheKey, result); + return result; +} +function computeLineAuthoringGutterMarkersRangeSet(doc, blocksPerLine, settings, optLA) { + let allowCache = true; + const docLastLine = doc.lines; + const ranges = []; + function add2(from, to, gutter2) { + return ranges.push(gutter2.range(from, to)); + } + const lineFrom = computeLineMappingForUnsavedChanges(docLastLine, optLA); + const emptyDoc = doc.length === 0; + const lastLineIsEmpty = doc.iterLines(docLastLine, docLastLine + 1).next().value === ""; + for (let startLine = 1; startLine <= docLastLine; startLine++) { + const [from, to] = blocksPerLine.get(startLine); + const endLine = doc.lineAt(to).number; + if (emptyDoc) { + add2(from, to, UNDISPLAYED); + continue; + } + if (startLine === docLastLine && lastLineIsEmpty) { + add2(from, to, UNDISPLAYED); + continue; + } + if (optLA === void 0) { + add2(from, to, initialLineAuthoringGutter(settings)); + allowCache = false; + continue; + } + const { key: key2, la } = optLA; + if (la === "untracked") { + add2(from, to, newUntrackedFileGutter(la, settings)); + continue; + } + const lastAuthorLine = la.hashPerLine.length - 1; + const laStartLine = lineFrom[startLine]; + const laEndLine = lineFrom[endLine]; + if (laEndLine && laEndLine > lastAuthorLine) { + add2(from, to, UNDISPLAYED); + } + if (laStartLine !== void 0 && between(1, laStartLine, lastAuthorLine) && laEndLine !== void 0 && between(1, laEndLine, lastAuthorLine)) { + add2( + from, + to, + lineAuthoringGutterMarker( + la, + laStartLine, + laEndLine, + key2, + settings + ) + ); + continue; + } + if (lastAuthorLine < 1) { + add2(from, to, initialLineAuthoringGutter(settings)); + allowCache = false; + continue; + } + const start = Math.clamp(laStartLine != null ? laStartLine : startLine, 1, lastAuthorLine); + const end = Math.clamp(laEndLine != null ? laEndLine : endLine, 1, lastAuthorLine); + add2( + from, + to, + lineAuthoringGutterMarker( + la, + start, + end, + key2 + "computing", + settings, + "waiting-for-result" + ) + ); + } + return { result: import_state3.RangeSet.of( + ranges, + /* sort = */ + true + ), allowCache }; +} +function computeLineMappingForUnsavedChanges(docLastLine, optLA) { + if (!(optLA == null ? void 0 : optLA.lineOffsetsFromUnsavedChanges)) { + return Array.from(new Array(docLastLine + 1), (ln) => ln); + } + const lineFrom = [void 0]; + let cumulativeLineOffset = 0; + for (let ln = 1; ln <= docLastLine; ln++) { + const unsavedChanges = optLA.lineOffsetsFromUnsavedChanges.get(ln); + cumulativeLineOffset += unsavedChanges != null ? unsavedChanges : 0; + lineFrom[ln] = unsavedChanges === void 0 ? ln - cumulativeLineOffset : void 0; + } + return lineFrom; +} +function temporaryWorkaroundGutterSpacingForRenderedLineAuthoring(view) { + const guttersContainers = view.dom.querySelectorAll( + ".cm-gutters" + ); + guttersContainers.forEach((cont) => { + if (!(cont == null ? void 0 : cont.style)) + return; + if (!cont.style.marginLeft) { + cont.style.marginLeft = "unset"; + } + }); +} + +// src/lineAuthor/lineAuthorProvider.ts +var LineAuthorProvider = class { + constructor(plugin) { + this.plugin = plugin; + /** + * Saves all computed line authoring results. + * + * See {@link LineAuthoringId} + */ + this.lineAuthorings = /* @__PURE__ */ new Map(); + } + async trackChanged(file) { + this.trackChangedHelper(file).catch((reason) => { + console.warn("Git: Error in trackChanged." + reason); + return Promise.reject(reason); + }); + } + async trackChangedHelper(file) { + if (!file) + return; + if (file.path === void 0) { + console.warn( + "Git: Attempted to track change of undefined filepath. Unforeseen situation." + ); + return; + } + this.computeLineAuthorInfo(file.path); + } + destroy() { + this.lineAuthorings.clear(); + eventsPerFilePathSingleton.clear(); + clearViewCache(); + } + async computeLineAuthorInfo(filepath) { + const gitManager = this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform().gitManager; + const headRevision = await gitManager.submoduleAwareHeadRevisonInContainingDirectory( + filepath + ); + const fileHash = await gitManager.hashObject(filepath); + const key2 = lineAuthoringId(headRevision, fileHash, filepath); + if (key2 === void 0) { + return; + } + if (this.lineAuthorings.has(key2)) { + } else { + const gitAuthorResult = await gitManager.blame( + filepath, + this.plugin.settings.lineAuthor.followMovement, + this.plugin.settings.lineAuthor.ignoreWhitespace + ); + this.lineAuthorings.set(key2, gitAuthorResult); + } + this.notifyComputationResultToSubscribers(filepath, key2); + } + notifyComputationResultToSubscribers(filepath, key2) { + eventsPerFilePathSingleton.ifFilepathDefinedTransformSubscribers( + filepath, + async (subs) => subs.forEach( + (sub) => sub.notifyLineAuthoring(key2, this.lineAuthorings.get(key2)) + ) + ); + } +}; +var enabledLineAuthorInfoExtensions = import_state4.Prec.high([ + subscribeNewEditor, + lineAuthorState, + lineAuthorGutter +]); + +// src/lineAuthor/lineAuthorIntegration.ts +var LineAuthoringFeature = class { + constructor(plg) { + this.plg = plg; + this.codeMirrorExtensions = []; + this.handleWorkspaceLeaf = (leaf) => { + const obsView = leaf == null ? void 0 : leaf.view; + const file = obsView == null ? void 0 : obsView.file; + if (!this.lineAuthorInfoProvider) { + console.warn( + "Git: undefined lineAuthorInfoProvider. Unexpected situation." + ); + return; + } + if (file === void 0 || (obsView == null ? void 0 : obsView.allowNoFile) === true) + return; + this.lineAuthorInfoProvider.trackChanged(file); + }; + } + // ========================= INIT and DE-INIT ========================== + onLoadPlugin() { + this.plg.registerEditorExtension(this.codeMirrorExtensions); + provideSettingsAccess( + () => this.plg.settings.lineAuthor, + (laSettings) => { + this.plg.settings.lineAuthor = laSettings; + this.plg.saveSettings(); + } + ); + } + conditionallyActivateBySettings() { + if (this.plg.settings.lineAuthor.show) { + this.activateFeature(); + } + } + activateFeature() { + try { + if (!this.isAvailableOnCurrentPlatform().available) + return; + setTextColorCssBasedOnSetting(this.plg.settings.lineAuthor); + this.lineAuthorInfoProvider = new LineAuthorProvider(this.plg); + this.createEventHandlers(); + this.activateCodeMirrorExtensions(); + console.log(this.plg.manifest.name + ": Enabled line authoring."); + } catch (e) { + console.warn("Git: Error while loading line authoring feature.", e); + this.deactivateFeature(); + } + } + /** + * Deactivates the feature. This function is very defensive, as it is also + * called to cleanup, if a critical error in the line authoring has occurred. + */ + deactivateFeature() { + var _a2; + this.destroyEventHandlers(); + this.deactivateCodeMirrorExtensions(); + (_a2 = this.lineAuthorInfoProvider) == null ? void 0 : _a2.destroy(); + this.lineAuthorInfoProvider = void 0; + console.log(this.plg.manifest.name + ": Disabled line authoring."); + } + isAvailableOnCurrentPlatform() { + return { + available: this.plg.useSimpleGit && import_obsidian12.Platform.isDesktopApp, + gitManager: this.plg.gitManager instanceof SimpleGit ? this.plg.gitManager : void 0 + }; + } + // ========================= REFRESH ========================== + refreshLineAuthorViews() { + if (this.plg.settings.lineAuthor.show) { + this.deactivateFeature(); + this.activateFeature(); + } + } + // ========================= CODEMIRROR EXTENSIONS ========================== + activateCodeMirrorExtensions() { + this.codeMirrorExtensions.push(enabledLineAuthorInfoExtensions); + this.plg.app.workspace.updateOptions(); + this.plg.app.workspace.iterateAllLeaves(this.handleWorkspaceLeaf); + } + deactivateCodeMirrorExtensions() { + for (const ext of this.codeMirrorExtensions) { + this.codeMirrorExtensions.remove(ext); + } + this.plg.app.workspace.updateOptions(); + } + // ========================= HANDLERS ========================== + createEventHandlers() { + this.gutterContextMenuEvent = this.createGutterContextMenuHandler(); + this.fileOpenEvent = this.createFileOpenEvent(); + this.workspaceLeafChangeEvent = this.createWorkspaceLeafChangeEvent(); + this.fileModificationEvent = this.createVaultFileModificationHandler(); + this.refreshOnCssChangeEvent = this.createCssRefreshHandler(); + this.fileRenameEvent = this.createFileRenameEvent(); + prepareGutterSearchForContextMenuHandling(); + this.plg.registerEvent(this.gutterContextMenuEvent); + this.plg.registerEvent(this.refreshOnCssChangeEvent); + this.plg.registerEvent(this.fileOpenEvent); + this.plg.registerEvent(this.workspaceLeafChangeEvent); + this.plg.registerEvent(this.fileModificationEvent); + this.plg.registerEvent(this.fileRenameEvent); + } + destroyEventHandlers() { + this.plg.app.workspace.offref(this.refreshOnCssChangeEvent); + this.plg.app.workspace.offref(this.fileOpenEvent); + this.plg.app.workspace.offref(this.workspaceLeafChangeEvent); + this.plg.app.workspace.offref(this.refreshOnCssChangeEvent); + this.plg.app.vault.offref(this.fileRenameEvent); + this.plg.app.workspace.offref(this.gutterContextMenuEvent); + } + createFileOpenEvent() { + return this.plg.app.workspace.on( + "file-open", + (file) => { + var _a2; + return (_a2 = this.lineAuthorInfoProvider) == null ? void 0 : _a2.trackChanged(file); + } + ); + } + createWorkspaceLeafChangeEvent() { + return this.plg.app.workspace.on( + "active-leaf-change", + this.handleWorkspaceLeaf + ); + } + createFileRenameEvent() { + return this.plg.app.vault.on( + "rename", + (file, _old) => { + var _a2; + return file instanceof import_obsidian12.TFile && ((_a2 = this.lineAuthorInfoProvider) == null ? void 0 : _a2.trackChanged(file)); + } + ); + } + createVaultFileModificationHandler() { + return this.plg.app.vault.on( + "modify", + (anyPath) => { + var _a2; + return anyPath instanceof import_obsidian12.TFile && ((_a2 = this.lineAuthorInfoProvider) == null ? void 0 : _a2.trackChanged(anyPath)); + } + ); + } + createCssRefreshHandler() { + return this.plg.app.workspace.on( + "css-change", + () => this.refreshLineAuthorViews() + ); + } + createGutterContextMenuHandler() { + return this.plg.app.workspace.on("editor-menu", handleContextMenu); + } +}; + +// src/promiseQueue.ts +init_polyfill_buffer(); +var PromiseQueue = class { + constructor() { + this.tasks = []; + } + addTask(task) { + this.tasks.push(task); + if (this.tasks.length === 1) { + this.handleTask(); + } + } + async handleTask() { + if (this.tasks.length > 0) { + this.tasks[0]().finally(() => { + this.tasks.shift(); + this.handleTask(); + }); + } + } +}; + +// src/statusBar.ts +init_polyfill_buffer(); +var import_obsidian13 = require("obsidian"); +var StatusBar = class { + constructor(statusBarEl, plugin) { + this.statusBarEl = statusBarEl; + this.plugin = plugin; + this.messages = []; + this.base = "obsidian-git-statusbar-"; + this.statusBarEl.setAttribute("data-tooltip-position", "top"); + addEventListener("git-refresh", this.refreshCommitTimestamp.bind(this)); + } + displayMessage(message, timeout) { + this.messages.push({ + message: `Git: ${message.slice(0, 100)}`, + timeout + }); + this.display(); + } + display() { + if (this.messages.length > 0 && !this.currentMessage) { + this.currentMessage = this.messages.shift(); + this.statusBarEl.addClass(this.base + "message"); + this.statusBarEl.ariaLabel = ""; + this.statusBarEl.setText(this.currentMessage.message); + this.lastMessageTimestamp = Date.now(); + } else if (this.currentMessage) { + const messageAge = Date.now() - this.lastMessageTimestamp; + if (messageAge >= this.currentMessage.timeout) { + this.currentMessage = null; + this.lastMessageTimestamp = null; + } + } else { + this.displayState(); + } + } + displayState() { + if (this.statusBarEl.getText().length > 3 || !this.statusBarEl.hasChildNodes()) { + this.statusBarEl.empty(); + this.iconEl = this.statusBarEl.createDiv(); + this.textEl = this.statusBarEl.createDiv(); + this.textEl.style.float = "right"; + this.textEl.style.marginLeft = "5px"; + this.iconEl.style.float = "left"; + } + switch (this.plugin.state) { + case 0 /* idle */: + this.displayFromNow(); + break; + case 1 /* status */: + this.statusBarEl.ariaLabel = "Checking repository status..."; + (0, import_obsidian13.setIcon)(this.iconEl, "refresh-cw"); + this.statusBarEl.addClass(this.base + "status"); + break; + case 3 /* add */: + this.statusBarEl.ariaLabel = "Adding files..."; + (0, import_obsidian13.setIcon)(this.iconEl, "refresh-w"); + this.statusBarEl.addClass(this.base + "add"); + break; + case 4 /* commit */: + this.statusBarEl.ariaLabel = "Committing changes..."; + (0, import_obsidian13.setIcon)(this.iconEl, "git-commit"); + this.statusBarEl.addClass(this.base + "commit"); + break; + case 5 /* push */: + this.statusBarEl.ariaLabel = "Pushing changes..."; + (0, import_obsidian13.setIcon)(this.iconEl, "upload"); + this.statusBarEl.addClass(this.base + "push"); + break; + case 2 /* pull */: + this.statusBarEl.ariaLabel = "Pulling changes..."; + (0, import_obsidian13.setIcon)(this.iconEl, "download"); + this.statusBarEl.addClass(this.base + "pull"); + break; + case 6 /* conflicted */: + this.statusBarEl.ariaLabel = "You have conflict files..."; + (0, import_obsidian13.setIcon)(this.iconEl, "alert-circle"); + this.statusBarEl.addClass(this.base + "conflict"); + break; + default: + this.statusBarEl.ariaLabel = "Failed on initialization!"; + (0, import_obsidian13.setIcon)(this.iconEl, "alert-triangle"); + this.statusBarEl.addClass(this.base + "failed-init"); + break; + } + } + displayFromNow() { + var _a2; + const timestamp = this.lastCommitTimestamp; + if (timestamp) { + const moment6 = window.moment; + const fromNow = moment6(timestamp).fromNow(); + this.statusBarEl.ariaLabel = `${this.plugin.offlineMode ? "Offline: " : ""}Last Commit: ${fromNow}`; + if ((_a2 = this.unPushedCommits) != null ? _a2 : 0 > 0) { + this.statusBarEl.ariaLabel += ` +(${this.unPushedCommits} unpushed commits)`; + } + } else { + this.statusBarEl.ariaLabel = this.plugin.offlineMode ? "Git is offline" : "Git is ready"; + } + if (this.plugin.offlineMode) { + (0, import_obsidian13.setIcon)(this.iconEl, "globe"); + } else { + (0, import_obsidian13.setIcon)(this.iconEl, "check"); + } + if (this.plugin.settings.changedFilesInStatusBar && this.plugin.cachedStatus) { + this.textEl.setText( + this.plugin.cachedStatus.changed.length.toString() + ); + } + this.statusBarEl.addClass(this.base + "idle"); + } + async refreshCommitTimestamp() { + this.lastCommitTimestamp = await this.plugin.gitManager.getLastCommitTime(); + this.unPushedCommits = await this.plugin.gitManager.getUnpushedCommits(); + } +}; + +// src/ui/modals/changedFilesModal.ts +init_polyfill_buffer(); +var import_obsidian14 = require("obsidian"); +var ChangedFilesModal = class extends import_obsidian14.FuzzySuggestModal { + constructor(plugin, changedFiles) { + super(plugin.app); + this.plugin = plugin; + this.changedFiles = changedFiles; + this.setPlaceholder( + "Not supported files will be opened by default app!" + ); + } + getItems() { + return this.changedFiles; + } + getItemText(item) { + if (item.index == "U" && item.working_dir == "U") { + return `Untracked | ${item.vault_path}`; + } + let working_dir = ""; + let index2 = ""; + if (item.working_dir != " ") + working_dir = `Working Dir: ${item.working_dir} `; + if (item.index != " ") + index2 = `Index: ${item.index}`; + return `${working_dir}${index2} | ${item.vault_path}`; + } + onChooseItem(item, _) { + if (this.plugin.app.metadataCache.getFirstLinkpathDest( + item.vault_path, + "" + ) == null) { + this.app.openWithDefaultApp(item.vault_path); + } else { + this.plugin.app.workspace.openLinkText(item.vault_path, "/"); + } + } +}; + +// src/ui/modals/customMessageModal.ts +init_polyfill_buffer(); +var import_obsidian15 = require("obsidian"); +var CustomMessageModal = class extends import_obsidian15.SuggestModal { + constructor(plugin, fromAutoBackup) { + super(plugin.app); + this.fromAutoBackup = fromAutoBackup; + this.resolve = null; + this.plugin = plugin; + this.setPlaceholder( + "Type your message and select optional the version with the added date." + ); + } + open() { + super.open(); + return new Promise((resolve) => { + this.resolve = resolve; + }); + } + onClose() { + if (this.resolve) + this.resolve(void 0); + } + selectSuggestion(value, evt) { + if (this.resolve) + this.resolve(value); + super.selectSuggestion(value, evt); + } + getSuggestions(query) { + const date = window.moment().format(this.plugin.settings.commitDateFormat); + if (query == "") + query = "..."; + return [query, `${date}: ${query}`, `${query}: ${date}`]; + } + renderSuggestion(value, el) { + el.innerText = value; + } + onChooseSuggestion(item, _) { + } +}; + +// src/openInGitHub.ts +init_polyfill_buffer(); +var import_obsidian16 = require("obsidian"); +async function openLineInGitHub(editor, file, manager) { + const data = await getData(manager); + if (data.result === "failure") { + new import_obsidian16.Notice(data.reason); + return; + } + const { isGitHub, branch: branch2, repo, user } = data; + if (isGitHub) { + const path2 = manager.getRelativeRepoPath(file.path); + const from = editor.getCursor("from").line + 1; + const to = editor.getCursor("to").line + 1; + if (from === to) { + window.open( + `https://github.com/${user}/${repo}/blob/${branch2}/${path2}?plain=1#L${from}` + ); + } else { + window.open( + `https://github.com/${user}/${repo}/blob/${branch2}/${path2}?plain=1#L${from}-L${to}` + ); + } + } else { + new import_obsidian16.Notice("It seems like you are not using GitHub"); + } +} +async function openHistoryInGitHub(file, manager) { + const data = await getData(manager); + if (data.result === "failure") { + new import_obsidian16.Notice(data.reason); + return; + } + const { isGitHub, branch: branch2, repo, user } = data; + const path2 = manager.getRelativeRepoPath(file.path); + if (isGitHub) { + window.open( + `https://github.com/${user}/${repo}/commits/${branch2}/${path2}` + ); + } else { + new import_obsidian16.Notice("It seems like you are not using GitHub"); + } +} +async function getData(manager) { + const branchInfo = await manager.branchInfo(); + const remoteBranch = branchInfo.tracking; + const branch2 = branchInfo.current; + if (remoteBranch == null) { + return { + result: "failure", + reason: "Remote branch is not configured" + }; + } + if (branch2 == null) { + return { + result: "failure", + reason: "Failed to get current branch name" + }; + } + const remote = remoteBranch.substring(0, remoteBranch.indexOf("/")); + const remoteUrl = await manager.getConfig( + `remote.${remote}.url` + ); + const [isGitHub, httpsUser, httpsRepo, sshUser, sshRepo] = remoteUrl.match( + /(?:^https:\/\/github\.com\/(.*)\/(.*)\.git$)|(?:^[a-zA-Z]+@github\.com:(.*)\/(.*)\.git$)/ + ); + return { + result: "success", + isGitHub: !!isGitHub, + repo: httpsRepo || sshRepo, + user: httpsUser || sshUser, + branch: branch2 + }; +} + +// src/setting/localStorageSettings.ts +init_polyfill_buffer(); +var LocalStorageSettings = class { + constructor(plugin) { + this.plugin = plugin; + this.prefix = this.plugin.manifest.id + ":"; + } + migrate() { + const keys = [ + "password", + "hostname", + "conflict", + "lastAutoPull", + "lastAutoBackup", + "lastAutoPush", + "gitPath", + "pluginDisabled" + ]; + for (const key2 of keys) { + const old = localStorage.getItem(this.prefix + key2); + if (app.loadLocalStorage(this.prefix + key2) == null && old != null) { + if (old != null) { + app.saveLocalStorage(this.prefix + key2, old); + localStorage.removeItem(this.prefix + key2); + } + } + } + } + getPassword() { + return app.loadLocalStorage(this.prefix + "password"); + } + setPassword(value) { + return app.saveLocalStorage(this.prefix + "password", value); + } + getUsername() { + return app.loadLocalStorage(this.prefix + "username"); + } + setUsername(value) { + return app.saveLocalStorage(this.prefix + "username", value); + } + getHostname() { + return app.loadLocalStorage(this.prefix + "hostname"); + } + setHostname(value) { + return app.saveLocalStorage(this.prefix + "hostname", value); + } + getConflict() { + return app.loadLocalStorage(this.prefix + "conflict") == "true"; + } + setConflict(value) { + return app.saveLocalStorage(this.prefix + "conflict", `${value}`); + } + getLastAutoPull() { + return app.loadLocalStorage(this.prefix + "lastAutoPull"); + } + setLastAutoPull(value) { + return app.saveLocalStorage(this.prefix + "lastAutoPull", value); + } + getLastAutoBackup() { + return app.loadLocalStorage(this.prefix + "lastAutoBackup"); + } + setLastAutoBackup(value) { + return app.saveLocalStorage(this.prefix + "lastAutoBackup", value); + } + getLastAutoPush() { + return app.loadLocalStorage(this.prefix + "lastAutoPush"); + } + setLastAutoPush(value) { + return app.saveLocalStorage(this.prefix + "lastAutoPush", value); + } + getGitPath() { + return app.loadLocalStorage(this.prefix + "gitPath"); + } + setGitPath(value) { + return app.saveLocalStorage(this.prefix + "gitPath", value); + } + getPATHPaths() { + var _a2, _b; + return (_b = (_a2 = app.loadLocalStorage(this.prefix + "PATHPaths")) == null ? void 0 : _a2.split(":")) != null ? _b : []; + } + setPATHPaths(value) { + return app.saveLocalStorage(this.prefix + "PATHPaths", value.join(":")); + } + getEnvVars() { + var _a2; + return JSON.parse( + (_a2 = app.loadLocalStorage(this.prefix + "envVars")) != null ? _a2 : "[]" + ); + } + setEnvVars(value) { + return app.saveLocalStorage( + this.prefix + "envVars", + JSON.stringify(value) + ); + } + getPluginDisabled() { + return app.loadLocalStorage(this.prefix + "pluginDisabled") == "true"; + } + setPluginDisabled(value) { + return app.saveLocalStorage(this.prefix + "pluginDisabled", `${value}`); + } +}; + +// src/ui/diff/diffView.ts +init_polyfill_buffer(); + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/diff2html.js +init_polyfill_buffer(); + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/diff-parser.js +init_polyfill_buffer(); + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/types.js +init_polyfill_buffer(); +var LineType; +(function(LineType2) { + LineType2["INSERT"] = "insert"; + LineType2["DELETE"] = "delete"; + LineType2["CONTEXT"] = "context"; +})(LineType || (LineType = {})); +var OutputFormatType = { + LINE_BY_LINE: "line-by-line", + SIDE_BY_SIDE: "side-by-side" +}; +var LineMatchingType = { + LINES: "lines", + WORDS: "words", + NONE: "none" +}; +var DiffStyleType = { + WORD: "word", + CHAR: "char" +}; +var ColorSchemeType; +(function(ColorSchemeType2) { + ColorSchemeType2["AUTO"] = "auto"; + ColorSchemeType2["DARK"] = "dark"; + ColorSchemeType2["LIGHT"] = "light"; +})(ColorSchemeType || (ColorSchemeType = {})); + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/utils.js +init_polyfill_buffer(); +var specials = [ + "-", + "[", + "]", + "/", + "{", + "}", + "(", + ")", + "*", + "+", + "?", + ".", + "\\", + "^", + "$", + "|" +]; +var regex = RegExp("[" + specials.join("\\") + "]", "g"); +function escapeForRegExp(str) { + return str.replace(regex, "\\$&"); +} +function unifyPath(path2) { + return path2 ? path2.replace(/\\/g, "/") : path2; +} +function hashCode(text2) { + let i, chr, len; + let hash2 = 0; + for (i = 0, len = text2.length; i < len; i++) { + chr = text2.charCodeAt(i); + hash2 = (hash2 << 5) - hash2 + chr; + hash2 |= 0; + } + return hash2; +} + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/diff-parser.js +function getExtension(filename, language) { + const filenameParts = filename.split("."); + return filenameParts.length > 1 ? filenameParts[filenameParts.length - 1] : language; +} +function startsWithAny(str, prefixes) { + return prefixes.reduce((startsWith, prefix) => startsWith || str.startsWith(prefix), false); +} +var baseDiffFilenamePrefixes = ["a/", "b/", "i/", "w/", "c/", "o/"]; +function getFilename(line, linePrefix, extraPrefix) { + const prefixes = extraPrefix !== void 0 ? [...baseDiffFilenamePrefixes, extraPrefix] : baseDiffFilenamePrefixes; + const FilenameRegExp = linePrefix ? new RegExp(`^${escapeForRegExp(linePrefix)} "?(.+?)"?$`) : new RegExp('^"?(.+?)"?$'); + const [, filename = ""] = FilenameRegExp.exec(line) || []; + const matchingPrefix = prefixes.find((p) => filename.indexOf(p) === 0); + const fnameWithoutPrefix = matchingPrefix ? filename.slice(matchingPrefix.length) : filename; + return fnameWithoutPrefix.replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/, ""); +} +function getSrcFilename(line, srcPrefix) { + return getFilename(line, "---", srcPrefix); +} +function getDstFilename(line, dstPrefix) { + return getFilename(line, "+++", dstPrefix); +} +function parse(diffInput, config = {}) { + const files = []; + let currentFile = null; + let currentBlock = null; + let oldLine = null; + let oldLine2 = null; + let newLine = null; + let possibleOldName = null; + let possibleNewName = null; + const oldFileNameHeader = "--- "; + const newFileNameHeader = "+++ "; + const hunkHeaderPrefix = "@@"; + const oldMode = /^old mode (\d{6})/; + const newMode = /^new mode (\d{6})/; + const deletedFileMode = /^deleted file mode (\d{6})/; + const newFileMode = /^new file mode (\d{6})/; + const copyFrom = /^copy from "?(.+)"?/; + const copyTo = /^copy to "?(.+)"?/; + const renameFrom = /^rename from "?(.+)"?/; + const renameTo = /^rename to "?(.+)"?/; + const similarityIndex = /^similarity index (\d+)%/; + const dissimilarityIndex = /^dissimilarity index (\d+)%/; + const index2 = /^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/; + const binaryFiles = /^Binary files (.*) and (.*) differ/; + const binaryDiff = /^GIT binary patch/; + const combinedIndex = /^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/; + const combinedMode = /^mode (\d{6}),(\d{6})\.\.(\d{6})/; + const combinedNewFile = /^new file mode (\d{6})/; + const combinedDeletedFile = /^deleted file mode (\d{6}),(\d{6})/; + const diffLines2 = diffInput.replace(/\\ No newline at end of file/g, "").replace(/\r\n?/g, "\n").split("\n"); + function saveBlock() { + if (currentBlock !== null && currentFile !== null) { + currentFile.blocks.push(currentBlock); + currentBlock = null; + } + } + function saveFile() { + if (currentFile !== null) { + if (!currentFile.oldName && possibleOldName !== null) { + currentFile.oldName = possibleOldName; + } + if (!currentFile.newName && possibleNewName !== null) { + currentFile.newName = possibleNewName; + } + if (currentFile.newName) { + files.push(currentFile); + currentFile = null; + } + } + possibleOldName = null; + possibleNewName = null; + } + function startFile() { + saveBlock(); + saveFile(); + currentFile = { + blocks: [], + deletedLines: 0, + addedLines: 0 + }; + } + function startBlock(line) { + saveBlock(); + let values; + if (currentFile !== null) { + if (values = /^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(line)) { + currentFile.isCombined = false; + oldLine = parseInt(values[1], 10); + newLine = parseInt(values[2], 10); + } else if (values = /^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(line)) { + currentFile.isCombined = true; + oldLine = parseInt(values[1], 10); + oldLine2 = parseInt(values[2], 10); + newLine = parseInt(values[3], 10); + } else { + if (line.startsWith(hunkHeaderPrefix)) { + console.error("Failed to parse lines, starting in 0!"); + } + oldLine = 0; + newLine = 0; + currentFile.isCombined = false; + } + } + currentBlock = { + lines: [], + oldStartLine: oldLine, + oldStartLine2: oldLine2, + newStartLine: newLine, + header: line + }; + } + function createLine(line) { + if (currentFile === null || currentBlock === null || oldLine === null || newLine === null) + return; + const currentLine = { + content: line + }; + const addedPrefixes = currentFile.isCombined ? ["+ ", " +", "++"] : ["+"]; + const deletedPrefixes = currentFile.isCombined ? ["- ", " -", "--"] : ["-"]; + if (startsWithAny(line, addedPrefixes)) { + currentFile.addedLines++; + currentLine.type = LineType.INSERT; + currentLine.oldNumber = void 0; + currentLine.newNumber = newLine++; + } else if (startsWithAny(line, deletedPrefixes)) { + currentFile.deletedLines++; + currentLine.type = LineType.DELETE; + currentLine.oldNumber = oldLine++; + currentLine.newNumber = void 0; + } else { + currentLine.type = LineType.CONTEXT; + currentLine.oldNumber = oldLine++; + currentLine.newNumber = newLine++; + } + currentBlock.lines.push(currentLine); + } + function existHunkHeader(line, lineIdx) { + let idx = lineIdx; + while (idx < diffLines2.length - 3) { + if (line.startsWith("diff")) { + return false; + } + if (diffLines2[idx].startsWith(oldFileNameHeader) && diffLines2[idx + 1].startsWith(newFileNameHeader) && diffLines2[idx + 2].startsWith(hunkHeaderPrefix)) { + return true; + } + idx++; + } + return false; + } + diffLines2.forEach((line, lineIndex) => { + if (!line || line.startsWith("*")) { + return; + } + let values; + const prevLine = diffLines2[lineIndex - 1]; + const nxtLine = diffLines2[lineIndex + 1]; + const afterNxtLine = diffLines2[lineIndex + 2]; + if (line.startsWith("diff --git") || line.startsWith("diff --combined")) { + startFile(); + const gitDiffStart = /^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/; + if (values = gitDiffStart.exec(line)) { + possibleOldName = getFilename(values[1], void 0, config.dstPrefix); + possibleNewName = getFilename(values[2], void 0, config.srcPrefix); + } + if (currentFile === null) { + throw new Error("Where is my file !!!"); + } + currentFile.isGitDiff = true; + return; + } + if (line.startsWith("Binary files") && !(currentFile === null || currentFile === void 0 ? void 0 : currentFile.isGitDiff)) { + startFile(); + const unixDiffBinaryStart = /^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/; + if (values = unixDiffBinaryStart.exec(line)) { + possibleOldName = getFilename(values[1], void 0, config.dstPrefix); + possibleNewName = getFilename(values[2], void 0, config.srcPrefix); + } + if (currentFile === null) { + throw new Error("Where is my file !!!"); + } + currentFile.isBinary = true; + return; + } + if (!currentFile || !currentFile.isGitDiff && currentFile && line.startsWith(oldFileNameHeader) && nxtLine.startsWith(newFileNameHeader) && afterNxtLine.startsWith(hunkHeaderPrefix)) { + startFile(); + } + if (currentFile === null || currentFile === void 0 ? void 0 : currentFile.isTooBig) { + return; + } + if (currentFile && (typeof config.diffMaxChanges === "number" && currentFile.addedLines + currentFile.deletedLines > config.diffMaxChanges || typeof config.diffMaxLineLength === "number" && line.length > config.diffMaxLineLength)) { + currentFile.isTooBig = true; + currentFile.addedLines = 0; + currentFile.deletedLines = 0; + currentFile.blocks = []; + currentBlock = null; + const message = typeof config.diffTooBigMessage === "function" ? config.diffTooBigMessage(files.length) : "Diff too big to be displayed"; + startBlock(message); + return; + } + if (line.startsWith(oldFileNameHeader) && nxtLine.startsWith(newFileNameHeader) || line.startsWith(newFileNameHeader) && prevLine.startsWith(oldFileNameHeader)) { + if (currentFile && !currentFile.oldName && line.startsWith("--- ") && (values = getSrcFilename(line, config.srcPrefix))) { + currentFile.oldName = values; + currentFile.language = getExtension(currentFile.oldName, currentFile.language); + return; + } + if (currentFile && !currentFile.newName && line.startsWith("+++ ") && (values = getDstFilename(line, config.dstPrefix))) { + currentFile.newName = values; + currentFile.language = getExtension(currentFile.newName, currentFile.language); + return; + } + } + if (currentFile && (line.startsWith(hunkHeaderPrefix) || currentFile.isGitDiff && currentFile.oldName && currentFile.newName && !currentBlock)) { + startBlock(line); + return; + } + if (currentBlock && (line.startsWith("+") || line.startsWith("-") || line.startsWith(" "))) { + createLine(line); + return; + } + const doesNotExistHunkHeader = !existHunkHeader(line, lineIndex); + if (currentFile === null) { + throw new Error("Where is my file !!!"); + } + if (values = oldMode.exec(line)) { + currentFile.oldMode = values[1]; + } else if (values = newMode.exec(line)) { + currentFile.newMode = values[1]; + } else if (values = deletedFileMode.exec(line)) { + currentFile.deletedFileMode = values[1]; + currentFile.isDeleted = true; + } else if (values = newFileMode.exec(line)) { + currentFile.newFileMode = values[1]; + currentFile.isNew = true; + } else if (values = copyFrom.exec(line)) { + if (doesNotExistHunkHeader) { + currentFile.oldName = values[1]; + } + currentFile.isCopy = true; + } else if (values = copyTo.exec(line)) { + if (doesNotExistHunkHeader) { + currentFile.newName = values[1]; + } + currentFile.isCopy = true; + } else if (values = renameFrom.exec(line)) { + if (doesNotExistHunkHeader) { + currentFile.oldName = values[1]; + } + currentFile.isRename = true; + } else if (values = renameTo.exec(line)) { + if (doesNotExistHunkHeader) { + currentFile.newName = values[1]; + } + currentFile.isRename = true; + } else if (values = binaryFiles.exec(line)) { + currentFile.isBinary = true; + currentFile.oldName = getFilename(values[1], void 0, config.srcPrefix); + currentFile.newName = getFilename(values[2], void 0, config.dstPrefix); + startBlock("Binary file"); + } else if (binaryDiff.test(line)) { + currentFile.isBinary = true; + startBlock(line); + } else if (values = similarityIndex.exec(line)) { + currentFile.unchangedPercentage = parseInt(values[1], 10); + } else if (values = dissimilarityIndex.exec(line)) { + currentFile.changedPercentage = parseInt(values[1], 10); + } else if (values = index2.exec(line)) { + currentFile.checksumBefore = values[1]; + currentFile.checksumAfter = values[2]; + values[3] && (currentFile.mode = values[3]); + } else if (values = combinedIndex.exec(line)) { + currentFile.checksumBefore = [values[2], values[3]]; + currentFile.checksumAfter = values[1]; + } else if (values = combinedMode.exec(line)) { + currentFile.oldMode = [values[2], values[3]]; + currentFile.newMode = values[1]; + } else if (values = combinedNewFile.exec(line)) { + currentFile.newFileMode = values[1]; + currentFile.isNew = true; + } else if (values = combinedDeletedFile.exec(line)) { + currentFile.deletedFileMode = values[1]; + currentFile.isDeleted = true; + } + }); + saveBlock(); + saveFile(); + return files; +} + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/file-list-renderer.js +init_polyfill_buffer(); + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/render-utils.js +init_polyfill_buffer(); + +// node_modules/.pnpm/diff@5.1.0/node_modules/diff/lib/index.mjs +init_polyfill_buffer(); +function Diff2() { +} +Diff2.prototype = { + diff: function diff2(oldString, newString) { + var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + var callback = options.callback; + if (typeof options === "function") { + callback = options; + options = {}; + } + this.options = options; + var self2 = this; + function done(value) { + if (callback) { + setTimeout(function() { + callback(void 0, value); + }, 0); + return true; + } else { + return value; + } + } + oldString = this.castInput(oldString); + newString = this.castInput(newString); + oldString = this.removeEmpty(this.tokenize(oldString)); + newString = this.removeEmpty(this.tokenize(newString)); + var newLen = newString.length, oldLen = oldString.length; + var editLength = 1; + var maxEditLength = newLen + oldLen; + if (options.maxEditLength) { + maxEditLength = Math.min(maxEditLength, options.maxEditLength); + } + var bestPath = [{ + newPos: -1, + components: [] + }]; + var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); + if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + return done([{ + value: this.join(newString), + count: newString.length + }]); + } + function execEditLength() { + for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + var basePath = void 0; + var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; + if (addPath) { + bestPath[diagonalPath - 1] = void 0; + } + var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; + if (!canAdd && !canRemove) { + bestPath[diagonalPath] = void 0; + continue; + } + if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { + basePath = clonePath(removePath); + self2.pushComponent(basePath.components, void 0, true); + } else { + basePath = addPath; + basePath.newPos++; + self2.pushComponent(basePath.components, true, void 0); + } + _oldPos = self2.extractCommon(basePath, newString, oldString, diagonalPath); + if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { + return done(buildValues2(self2, basePath.components, newString, oldString, self2.useLongestToken)); + } else { + bestPath[diagonalPath] = basePath; + } + } + editLength++; + } + if (callback) { + (function exec() { + setTimeout(function() { + if (editLength > maxEditLength) { + return callback(); + } + if (!execEditLength()) { + exec(); + } + }, 0); + })(); + } else { + while (editLength <= maxEditLength) { + var ret = execEditLength(); + if (ret) { + return ret; + } + } + } + }, + pushComponent: function pushComponent(components, added, removed) { + var last2 = components[components.length - 1]; + if (last2 && last2.added === added && last2.removed === removed) { + components[components.length - 1] = { + count: last2.count + 1, + added, + removed + }; + } else { + components.push({ + count: 1, + added, + removed + }); + } + }, + extractCommon: function extractCommon2(basePath, newString, oldString, diagonalPath) { + var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0; + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { + newPos++; + oldPos++; + commonCount++; + } + if (commonCount) { + basePath.components.push({ + count: commonCount + }); + } + basePath.newPos = newPos; + return oldPos; + }, + equals: function equals2(left, right) { + if (this.options.comparator) { + return this.options.comparator(left, right); + } else { + return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); + } + }, + removeEmpty: function removeEmpty2(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } + return ret; + }, + castInput: function castInput2(value) { + return value; + }, + tokenize: function tokenize2(value) { + return value.split(""); + }, + join: function join4(chars) { + return chars.join(""); + } +}; +function buildValues2(diff3, components, newString, oldString, useLongestToken) { + var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0; + for (; componentPos < componentLen; componentPos++) { + var component = components[componentPos]; + if (!component.removed) { + if (!component.added && useLongestToken) { + var value = newString.slice(newPos, newPos + component.count); + value = value.map(function(value2, i) { + var oldValue = oldString[oldPos + i]; + return oldValue.length > value2.length ? oldValue : value2; + }); + component.value = diff3.join(value); + } else { + component.value = diff3.join(newString.slice(newPos, newPos + component.count)); + } + newPos += component.count; + if (!component.added) { + oldPos += component.count; + } + } else { + component.value = diff3.join(oldString.slice(oldPos, oldPos + component.count)); + oldPos += component.count; + if (componentPos && components[componentPos - 1].added) { + var tmp = components[componentPos - 1]; + components[componentPos - 1] = components[componentPos]; + components[componentPos] = tmp; + } + } + } + var lastComponent = components[componentLen - 1]; + if (componentLen > 1 && typeof lastComponent.value === "string" && (lastComponent.added || lastComponent.removed) && diff3.equals("", lastComponent.value)) { + components[componentLen - 2].value += lastComponent.value; + components.pop(); + } + return components; +} +function clonePath(path2) { + return { + newPos: path2.newPos, + components: path2.components.slice(0) + }; +} +var characterDiff2 = new Diff2(); +function diffChars(oldStr, newStr, options) { + return characterDiff2.diff(oldStr, newStr, options); +} +var extendedWordChars2 = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; +var reWhitespace2 = /\S/; +var wordDiff2 = new Diff2(); +wordDiff2.equals = function(left, right) { + if (this.options.ignoreCase) { + left = left.toLowerCase(); + right = right.toLowerCase(); + } + return left === right || this.options.ignoreWhitespace && !reWhitespace2.test(left) && !reWhitespace2.test(right); +}; +wordDiff2.tokenize = function(value) { + var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); + for (var i = 0; i < tokens.length - 1; i++) { + if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars2.test(tokens[i]) && extendedWordChars2.test(tokens[i + 2])) { + tokens[i] += tokens[i + 2]; + tokens.splice(i + 1, 2); + i--; + } + } + return tokens; +}; +function diffWordsWithSpace(oldStr, newStr, options) { + return wordDiff2.diff(oldStr, newStr, options); +} +var lineDiff2 = new Diff2(); +lineDiff2.tokenize = function(value) { + var retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/); + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); + } + for (var i = 0; i < linesAndNewlines.length; i++) { + var line = linesAndNewlines[i]; + if (i % 2 && !this.options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } else { + if (this.options.ignoreWhitespace) { + line = line.trim(); + } + retLines.push(line); + } + } + return retLines; +}; +var sentenceDiff2 = new Diff2(); +sentenceDiff2.tokenize = function(value) { + return value.split(/(\S.+?[.!?])(?=\s+|$)/); +}; +var cssDiff2 = new Diff2(); +cssDiff2.tokenize = function(value) { + return value.split(/([{}:;,]|\s+)/); +}; +function _typeof2(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof2 = function(obj2) { + return typeof obj2; + }; + } else { + _typeof2 = function(obj2) { + return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + }; + } + return _typeof2(obj); +} +var objectPrototypeToString2 = Object.prototype.toString; +var jsonDiff2 = new Diff2(); +jsonDiff2.useLongestToken = true; +jsonDiff2.tokenize = lineDiff2.tokenize; +jsonDiff2.castInput = function(value) { + var _this$options = this.options, undefinedReplacement = _this$options.undefinedReplacement, _this$options$stringi = _this$options.stringifyReplacer, stringifyReplacer = _this$options$stringi === void 0 ? function(k, v) { + return typeof v === "undefined" ? undefinedReplacement : v; + } : _this$options$stringi; + return typeof value === "string" ? value : JSON.stringify(canonicalize2(value, null, null, stringifyReplacer), stringifyReplacer, " "); +}; +jsonDiff2.equals = function(left, right) { + return Diff2.prototype.equals.call(jsonDiff2, left.replace(/,([\r\n])/g, "$1"), right.replace(/,([\r\n])/g, "$1")); +}; +function canonicalize2(obj, stack, replacementStack, replacer, key2) { + stack = stack || []; + replacementStack = replacementStack || []; + if (replacer) { + obj = replacer(key2, obj); + } + var i; + for (i = 0; i < stack.length; i += 1) { + if (stack[i] === obj) { + return replacementStack[i]; + } + } + var canonicalizedObj; + if ("[object Array]" === objectPrototypeToString2.call(obj)) { + stack.push(obj); + canonicalizedObj = new Array(obj.length); + replacementStack.push(canonicalizedObj); + for (i = 0; i < obj.length; i += 1) { + canonicalizedObj[i] = canonicalize2(obj[i], stack, replacementStack, replacer, key2); + } + stack.pop(); + replacementStack.pop(); + return canonicalizedObj; + } + if (obj && obj.toJSON) { + obj = obj.toJSON(); + } + if (_typeof2(obj) === "object" && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + replacementStack.push(canonicalizedObj); + var sortedKeys = [], _key; + for (_key in obj) { + if (obj.hasOwnProperty(_key)) { + sortedKeys.push(_key); + } + } + sortedKeys.sort(); + for (i = 0; i < sortedKeys.length; i += 1) { + _key = sortedKeys[i]; + canonicalizedObj[_key] = canonicalize2(obj[_key], stack, replacementStack, replacer, _key); + } + stack.pop(); + replacementStack.pop(); + } else { + canonicalizedObj = obj; + } + return canonicalizedObj; +} +var arrayDiff2 = new Diff2(); +arrayDiff2.tokenize = function(value) { + return value.slice(); +}; +arrayDiff2.join = arrayDiff2.removeEmpty = function(value) { + return value; +}; + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/rematch.js +init_polyfill_buffer(); +function levenshtein(a, b) { + if (a.length === 0) { + return b.length; + } + if (b.length === 0) { + return a.length; + } + const matrix = []; + let i; + for (i = 0; i <= b.length; i++) { + matrix[i] = [i]; + } + let j; + for (j = 0; j <= a.length; j++) { + matrix[0][j] = j; + } + for (i = 1; i <= b.length; i++) { + for (j = 1; j <= a.length; j++) { + if (b.charAt(i - 1) === a.charAt(j - 1)) { + matrix[i][j] = matrix[i - 1][j - 1]; + } else { + matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, Math.min(matrix[i][j - 1] + 1, matrix[i - 1][j] + 1)); + } + } + } + return matrix[b.length][a.length]; +} +function newDistanceFn(str) { + return (x, y) => { + const xValue = str(x).trim(); + const yValue = str(y).trim(); + const lev = levenshtein(xValue, yValue); + return lev / (xValue.length + yValue.length); + }; +} +function newMatcherFn(distance2) { + function findBestMatch(a, b, cache = /* @__PURE__ */ new Map()) { + let bestMatchDist = Infinity; + let bestMatch; + for (let i = 0; i < a.length; ++i) { + for (let j = 0; j < b.length; ++j) { + const cacheKey = JSON.stringify([a[i], b[j]]); + let md; + if (!(cache.has(cacheKey) && (md = cache.get(cacheKey)))) { + md = distance2(a[i], b[j]); + cache.set(cacheKey, md); + } + if (md < bestMatchDist) { + bestMatchDist = md; + bestMatch = { indexA: i, indexB: j, score: bestMatchDist }; + } + } + } + return bestMatch; + } + function group(a, b, level = 0, cache = /* @__PURE__ */ new Map()) { + const bm = findBestMatch(a, b, cache); + if (!bm || a.length + b.length < 3) { + return [[a, b]]; + } + const a1 = a.slice(0, bm.indexA); + const b1 = b.slice(0, bm.indexB); + const aMatch = [a[bm.indexA]]; + const bMatch = [b[bm.indexB]]; + const tailA = bm.indexA + 1; + const tailB = bm.indexB + 1; + const a2 = a.slice(tailA); + const b2 = b.slice(tailB); + const group1 = group(a1, b1, level + 1, cache); + const groupMatch = group(aMatch, bMatch, level + 1, cache); + const group2 = group(a2, b2, level + 1, cache); + let result = groupMatch; + if (bm.indexA > 0 || bm.indexB > 0) { + result = group1.concat(result); + } + if (a.length > tailA || b.length > tailB) { + result = result.concat(group2); + } + return result; + } + return group; +} + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/render-utils.js +var CSSLineClass = { + INSERTS: "d2h-ins", + DELETES: "d2h-del", + CONTEXT: "d2h-cntx", + INFO: "d2h-info", + INSERT_CHANGES: "d2h-ins d2h-change", + DELETE_CHANGES: "d2h-del d2h-change" +}; +var defaultRenderConfig = { + matching: LineMatchingType.NONE, + matchWordsThreshold: 0.25, + maxLineLengthHighlight: 1e4, + diffStyle: DiffStyleType.WORD, + colorScheme: ColorSchemeType.LIGHT +}; +var separator = "/"; +var distance = newDistanceFn((change) => change.value); +var matcher = newMatcherFn(distance); +function isDevNullName(name) { + return name.indexOf("dev/null") !== -1; +} +function removeInsElements(line) { + return line.replace(/(]*>((.|\n)*?)<\/ins>)/g, ""); +} +function removeDelElements(line) { + return line.replace(/(]*>((.|\n)*?)<\/del>)/g, ""); +} +function toCSSClass(lineType) { + switch (lineType) { + case LineType.CONTEXT: + return CSSLineClass.CONTEXT; + case LineType.INSERT: + return CSSLineClass.INSERTS; + case LineType.DELETE: + return CSSLineClass.DELETES; + } +} +function colorSchemeToCss(colorScheme) { + switch (colorScheme) { + case ColorSchemeType.DARK: + return "d2h-dark-color-scheme"; + case ColorSchemeType.AUTO: + return "d2h-auto-color-scheme"; + case ColorSchemeType.LIGHT: + default: + return "d2h-light-color-scheme"; + } +} +function prefixLength(isCombined) { + return isCombined ? 2 : 1; +} +function escapeForHtml(str) { + return str.slice(0).replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/"); +} +function deconstructLine(line, isCombined, escape = true) { + const indexToSplit = prefixLength(isCombined); + return { + prefix: line.substring(0, indexToSplit), + content: escape ? escapeForHtml(line.substring(indexToSplit)) : line.substring(indexToSplit) + }; +} +function filenameDiff(file) { + const oldFilename = unifyPath(file.oldName); + const newFilename = unifyPath(file.newName); + if (oldFilename !== newFilename && !isDevNullName(oldFilename) && !isDevNullName(newFilename)) { + const prefixPaths = []; + const suffixPaths = []; + const oldFilenameParts = oldFilename.split(separator); + const newFilenameParts = newFilename.split(separator); + const oldFilenamePartsSize = oldFilenameParts.length; + const newFilenamePartsSize = newFilenameParts.length; + let i = 0; + let j = oldFilenamePartsSize - 1; + let k = newFilenamePartsSize - 1; + while (i < j && i < k) { + if (oldFilenameParts[i] === newFilenameParts[i]) { + prefixPaths.push(newFilenameParts[i]); + i += 1; + } else { + break; + } + } + while (j > i && k > i) { + if (oldFilenameParts[j] === newFilenameParts[k]) { + suffixPaths.unshift(newFilenameParts[k]); + j -= 1; + k -= 1; + } else { + break; + } + } + const finalPrefix = prefixPaths.join(separator); + const finalSuffix = suffixPaths.join(separator); + const oldRemainingPath = oldFilenameParts.slice(i, j + 1).join(separator); + const newRemainingPath = newFilenameParts.slice(i, k + 1).join(separator); + if (finalPrefix.length && finalSuffix.length) { + return finalPrefix + separator + "{" + oldRemainingPath + " \u2192 " + newRemainingPath + "}" + separator + finalSuffix; + } else if (finalPrefix.length) { + return finalPrefix + separator + "{" + oldRemainingPath + " \u2192 " + newRemainingPath + "}"; + } else if (finalSuffix.length) { + return "{" + oldRemainingPath + " \u2192 " + newRemainingPath + "}" + separator + finalSuffix; + } + return oldFilename + " \u2192 " + newFilename; + } else if (!isDevNullName(newFilename)) { + return newFilename; + } else { + return oldFilename; + } +} +function getHtmlId(file) { + return `d2h-${hashCode(filenameDiff(file)).toString().slice(-6)}`; +} +function getFileIcon(file) { + let templateName = "file-changed"; + if (file.isRename) { + templateName = "file-renamed"; + } else if (file.isCopy) { + templateName = "file-renamed"; + } else if (file.isNew) { + templateName = "file-added"; + } else if (file.isDeleted) { + templateName = "file-deleted"; + } else if (file.newName !== file.oldName) { + templateName = "file-renamed"; + } + return templateName; +} +function diffHighlight(diffLine1, diffLine2, isCombined, config = {}) { + const { matching, maxLineLengthHighlight, matchWordsThreshold, diffStyle } = Object.assign(Object.assign({}, defaultRenderConfig), config); + const line1 = deconstructLine(diffLine1, isCombined, false); + const line2 = deconstructLine(diffLine2, isCombined, false); + if (line1.content.length > maxLineLengthHighlight || line2.content.length > maxLineLengthHighlight) { + return { + oldLine: { + prefix: line1.prefix, + content: escapeForHtml(line1.content) + }, + newLine: { + prefix: line2.prefix, + content: escapeForHtml(line2.content) + } + }; + } + const diff3 = diffStyle === "char" ? diffChars(line1.content, line2.content) : diffWordsWithSpace(line1.content, line2.content); + const changedWords = []; + if (diffStyle === "word" && matching === "words") { + const removed = diff3.filter((element2) => element2.removed); + const added = diff3.filter((element2) => element2.added); + const chunks = matcher(added, removed); + chunks.forEach((chunk) => { + if (chunk[0].length === 1 && chunk[1].length === 1) { + const dist = distance(chunk[0][0], chunk[1][0]); + if (dist < matchWordsThreshold) { + changedWords.push(chunk[0][0]); + changedWords.push(chunk[1][0]); + } + } + }); + } + const highlightedLine = diff3.reduce((highlightedLine2, part) => { + const elemType = part.added ? "ins" : part.removed ? "del" : null; + const addClass = changedWords.indexOf(part) > -1 ? ' class="d2h-change"' : ""; + const escapedValue = escapeForHtml(part.value); + return elemType !== null ? `${highlightedLine2}<${elemType}${addClass}>${escapedValue}` : `${highlightedLine2}${escapedValue}`; + }, ""); + return { + oldLine: { + prefix: line1.prefix, + content: removeInsElements(highlightedLine) + }, + newLine: { + prefix: line2.prefix, + content: removeDelElements(highlightedLine) + } + }; +} + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/file-list-renderer.js +var baseTemplatesPath = "file-summary"; +var iconsBaseTemplatesPath = "icon"; +var defaultFileListRendererConfig = { + colorScheme: defaultRenderConfig.colorScheme +}; +var FileListRenderer = class { + constructor(hoganUtils, config = {}) { + this.hoganUtils = hoganUtils; + this.config = Object.assign(Object.assign({}, defaultFileListRendererConfig), config); + } + render(diffFiles) { + const files = diffFiles.map((file) => this.hoganUtils.render(baseTemplatesPath, "line", { + fileHtmlId: getHtmlId(file), + oldName: file.oldName, + newName: file.newName, + fileName: filenameDiff(file), + deletedLines: "-" + file.deletedLines, + addedLines: "+" + file.addedLines + }, { + fileIcon: this.hoganUtils.template(iconsBaseTemplatesPath, getFileIcon(file)) + })).join("\n"); + return this.hoganUtils.render(baseTemplatesPath, "wrapper", { + colorScheme: colorSchemeToCss(this.config.colorScheme), + filesNumber: diffFiles.length, + files + }); + } +}; + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/line-by-line-renderer.js +init_polyfill_buffer(); +var defaultLineByLineRendererConfig = Object.assign(Object.assign({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 }); +var genericTemplatesPath = "generic"; +var baseTemplatesPath2 = "line-by-line"; +var iconsBaseTemplatesPath2 = "icon"; +var tagsBaseTemplatesPath = "tag"; +var LineByLineRenderer = class { + constructor(hoganUtils, config = {}) { + this.hoganUtils = hoganUtils; + this.config = Object.assign(Object.assign({}, defaultLineByLineRendererConfig), config); + } + render(diffFiles) { + const diffsHtml = diffFiles.map((file) => { + let diffs; + if (file.blocks.length) { + diffs = this.generateFileHtml(file); + } else { + diffs = this.generateEmptyDiff(); + } + return this.makeFileDiffHtml(file, diffs); + }).join("\n"); + return this.hoganUtils.render(genericTemplatesPath, "wrapper", { + colorScheme: colorSchemeToCss(this.config.colorScheme), + content: diffsHtml + }); + } + makeFileDiffHtml(file, diffs) { + if (this.config.renderNothingWhenEmpty && Array.isArray(file.blocks) && file.blocks.length === 0) + return ""; + const fileDiffTemplate = this.hoganUtils.template(baseTemplatesPath2, "file-diff"); + const filePathTemplate = this.hoganUtils.template(genericTemplatesPath, "file-path"); + const fileIconTemplate = this.hoganUtils.template(iconsBaseTemplatesPath2, "file"); + const fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath, getFileIcon(file)); + return fileDiffTemplate.render({ + file, + fileHtmlId: getHtmlId(file), + diffs, + filePath: filePathTemplate.render({ + fileDiffName: filenameDiff(file) + }, { + fileIcon: fileIconTemplate, + fileTag: fileTagTemplate + }) + }); + } + generateEmptyDiff() { + return this.hoganUtils.render(genericTemplatesPath, "empty-diff", { + contentClass: "d2h-code-line", + CSSLineClass + }); + } + generateFileHtml(file) { + const matcher2 = newMatcherFn(newDistanceFn((e) => deconstructLine(e.content, file.isCombined).content)); + return file.blocks.map((block) => { + let lines = this.hoganUtils.render(genericTemplatesPath, "block-header", { + CSSLineClass, + blockHeader: file.isTooBig ? block.header : escapeForHtml(block.header), + lineClass: "d2h-code-linenumber", + contentClass: "d2h-code-line" + }); + this.applyLineGroupping(block).forEach(([contextLines, oldLines, newLines]) => { + if (oldLines.length && newLines.length && !contextLines.length) { + this.applyRematchMatching(oldLines, newLines, matcher2).map(([oldLines2, newLines2]) => { + const { left, right } = this.processChangedLines(file, file.isCombined, oldLines2, newLines2); + lines += left; + lines += right; + }); + } else if (contextLines.length) { + contextLines.forEach((line) => { + const { prefix, content } = deconstructLine(line.content, file.isCombined); + lines += this.generateSingleLineHtml(file, { + type: CSSLineClass.CONTEXT, + prefix, + content, + oldNumber: line.oldNumber, + newNumber: line.newNumber + }); + }); + } else if (oldLines.length || newLines.length) { + const { left, right } = this.processChangedLines(file, file.isCombined, oldLines, newLines); + lines += left; + lines += right; + } else { + console.error("Unknown state reached while processing groups of lines", contextLines, oldLines, newLines); + } + }); + return lines; + }).join("\n"); + } + applyLineGroupping(block) { + const blockLinesGroups = []; + let oldLines = []; + let newLines = []; + for (let i = 0; i < block.lines.length; i++) { + const diffLine = block.lines[i]; + if (diffLine.type !== LineType.INSERT && newLines.length || diffLine.type === LineType.CONTEXT && oldLines.length > 0) { + blockLinesGroups.push([[], oldLines, newLines]); + oldLines = []; + newLines = []; + } + if (diffLine.type === LineType.CONTEXT) { + blockLinesGroups.push([[diffLine], [], []]); + } else if (diffLine.type === LineType.INSERT && oldLines.length === 0) { + blockLinesGroups.push([[], [], [diffLine]]); + } else if (diffLine.type === LineType.INSERT && oldLines.length > 0) { + newLines.push(diffLine); + } else if (diffLine.type === LineType.DELETE) { + oldLines.push(diffLine); + } + } + if (oldLines.length || newLines.length) { + blockLinesGroups.push([[], oldLines, newLines]); + oldLines = []; + newLines = []; + } + return blockLinesGroups; + } + applyRematchMatching(oldLines, newLines, matcher2) { + const comparisons = oldLines.length * newLines.length; + const maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map((elem) => elem.content.length))); + const doMatching = comparisons < this.config.matchingMaxComparisons && maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison && (this.config.matching === "lines" || this.config.matching === "words"); + return doMatching ? matcher2(oldLines, newLines) : [[oldLines, newLines]]; + } + processChangedLines(file, isCombined, oldLines, newLines) { + const fileHtml = { + right: "", + left: "" + }; + const maxLinesNumber = Math.max(oldLines.length, newLines.length); + for (let i = 0; i < maxLinesNumber; i++) { + const oldLine = oldLines[i]; + const newLine = newLines[i]; + const diff3 = oldLine !== void 0 && newLine !== void 0 ? diffHighlight(oldLine.content, newLine.content, isCombined, this.config) : void 0; + const preparedOldLine = oldLine !== void 0 && oldLine.oldNumber !== void 0 ? Object.assign(Object.assign({}, diff3 !== void 0 ? { + prefix: diff3.oldLine.prefix, + content: diff3.oldLine.content, + type: CSSLineClass.DELETE_CHANGES + } : Object.assign(Object.assign({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) })), { oldNumber: oldLine.oldNumber, newNumber: oldLine.newNumber }) : void 0; + const preparedNewLine = newLine !== void 0 && newLine.newNumber !== void 0 ? Object.assign(Object.assign({}, diff3 !== void 0 ? { + prefix: diff3.newLine.prefix, + content: diff3.newLine.content, + type: CSSLineClass.INSERT_CHANGES + } : Object.assign(Object.assign({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) })), { oldNumber: newLine.oldNumber, newNumber: newLine.newNumber }) : void 0; + const { left, right } = this.generateLineHtml(file, preparedOldLine, preparedNewLine); + fileHtml.left += left; + fileHtml.right += right; + } + return fileHtml; + } + generateLineHtml(file, oldLine, newLine) { + return { + left: this.generateSingleLineHtml(file, oldLine), + right: this.generateSingleLineHtml(file, newLine) + }; + } + generateSingleLineHtml(file, line) { + if (line === void 0) + return ""; + const lineNumberHtml = this.hoganUtils.render(baseTemplatesPath2, "numbers", { + oldNumber: line.oldNumber || "", + newNumber: line.newNumber || "" + }); + return this.hoganUtils.render(genericTemplatesPath, "line", { + type: line.type, + lineClass: "d2h-code-linenumber", + contentClass: "d2h-code-line", + prefix: line.prefix === " " ? " " : line.prefix, + content: line.content, + lineNumber: lineNumberHtml, + line, + file + }); + } +}; + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/side-by-side-renderer.js +init_polyfill_buffer(); +var defaultSideBySideRendererConfig = Object.assign(Object.assign({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 }); +var genericTemplatesPath2 = "generic"; +var baseTemplatesPath3 = "side-by-side"; +var iconsBaseTemplatesPath3 = "icon"; +var tagsBaseTemplatesPath2 = "tag"; +var SideBySideRenderer = class { + constructor(hoganUtils, config = {}) { + this.hoganUtils = hoganUtils; + this.config = Object.assign(Object.assign({}, defaultSideBySideRendererConfig), config); + } + render(diffFiles) { + const diffsHtml = diffFiles.map((file) => { + let diffs; + if (file.blocks.length) { + diffs = this.generateFileHtml(file); + } else { + diffs = this.generateEmptyDiff(); + } + return this.makeFileDiffHtml(file, diffs); + }).join("\n"); + return this.hoganUtils.render(genericTemplatesPath2, "wrapper", { + colorScheme: colorSchemeToCss(this.config.colorScheme), + content: diffsHtml + }); + } + makeFileDiffHtml(file, diffs) { + if (this.config.renderNothingWhenEmpty && Array.isArray(file.blocks) && file.blocks.length === 0) + return ""; + const fileDiffTemplate = this.hoganUtils.template(baseTemplatesPath3, "file-diff"); + const filePathTemplate = this.hoganUtils.template(genericTemplatesPath2, "file-path"); + const fileIconTemplate = this.hoganUtils.template(iconsBaseTemplatesPath3, "file"); + const fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath2, getFileIcon(file)); + return fileDiffTemplate.render({ + file, + fileHtmlId: getHtmlId(file), + diffs, + filePath: filePathTemplate.render({ + fileDiffName: filenameDiff(file) + }, { + fileIcon: fileIconTemplate, + fileTag: fileTagTemplate + }) + }); + } + generateEmptyDiff() { + return { + right: "", + left: this.hoganUtils.render(genericTemplatesPath2, "empty-diff", { + contentClass: "d2h-code-side-line", + CSSLineClass + }) + }; + } + generateFileHtml(file) { + const matcher2 = newMatcherFn(newDistanceFn((e) => deconstructLine(e.content, file.isCombined).content)); + return file.blocks.map((block) => { + const fileHtml = { + left: this.makeHeaderHtml(block.header, file), + right: this.makeHeaderHtml("") + }; + this.applyLineGroupping(block).forEach(([contextLines, oldLines, newLines]) => { + if (oldLines.length && newLines.length && !contextLines.length) { + this.applyRematchMatching(oldLines, newLines, matcher2).map(([oldLines2, newLines2]) => { + const { left, right } = this.processChangedLines(file.isCombined, oldLines2, newLines2); + fileHtml.left += left; + fileHtml.right += right; + }); + } else if (contextLines.length) { + contextLines.forEach((line) => { + const { prefix, content } = deconstructLine(line.content, file.isCombined); + const { left, right } = this.generateLineHtml({ + type: CSSLineClass.CONTEXT, + prefix, + content, + number: line.oldNumber + }, { + type: CSSLineClass.CONTEXT, + prefix, + content, + number: line.newNumber + }); + fileHtml.left += left; + fileHtml.right += right; + }); + } else if (oldLines.length || newLines.length) { + const { left, right } = this.processChangedLines(file.isCombined, oldLines, newLines); + fileHtml.left += left; + fileHtml.right += right; + } else { + console.error("Unknown state reached while processing groups of lines", contextLines, oldLines, newLines); + } + }); + return fileHtml; + }).reduce((accomulated, html2) => { + return { left: accomulated.left + html2.left, right: accomulated.right + html2.right }; + }, { left: "", right: "" }); + } + applyLineGroupping(block) { + const blockLinesGroups = []; + let oldLines = []; + let newLines = []; + for (let i = 0; i < block.lines.length; i++) { + const diffLine = block.lines[i]; + if (diffLine.type !== LineType.INSERT && newLines.length || diffLine.type === LineType.CONTEXT && oldLines.length > 0) { + blockLinesGroups.push([[], oldLines, newLines]); + oldLines = []; + newLines = []; + } + if (diffLine.type === LineType.CONTEXT) { + blockLinesGroups.push([[diffLine], [], []]); + } else if (diffLine.type === LineType.INSERT && oldLines.length === 0) { + blockLinesGroups.push([[], [], [diffLine]]); + } else if (diffLine.type === LineType.INSERT && oldLines.length > 0) { + newLines.push(diffLine); + } else if (diffLine.type === LineType.DELETE) { + oldLines.push(diffLine); + } + } + if (oldLines.length || newLines.length) { + blockLinesGroups.push([[], oldLines, newLines]); + oldLines = []; + newLines = []; + } + return blockLinesGroups; + } + applyRematchMatching(oldLines, newLines, matcher2) { + const comparisons = oldLines.length * newLines.length; + const maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map((elem) => elem.content.length))); + const doMatching = comparisons < this.config.matchingMaxComparisons && maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison && (this.config.matching === "lines" || this.config.matching === "words"); + return doMatching ? matcher2(oldLines, newLines) : [[oldLines, newLines]]; + } + makeHeaderHtml(blockHeader, file) { + return this.hoganUtils.render(genericTemplatesPath2, "block-header", { + CSSLineClass, + blockHeader: (file === null || file === void 0 ? void 0 : file.isTooBig) ? blockHeader : escapeForHtml(blockHeader), + lineClass: "d2h-code-side-linenumber", + contentClass: "d2h-code-side-line" + }); + } + processChangedLines(isCombined, oldLines, newLines) { + const fileHtml = { + right: "", + left: "" + }; + const maxLinesNumber = Math.max(oldLines.length, newLines.length); + for (let i = 0; i < maxLinesNumber; i++) { + const oldLine = oldLines[i]; + const newLine = newLines[i]; + const diff3 = oldLine !== void 0 && newLine !== void 0 ? diffHighlight(oldLine.content, newLine.content, isCombined, this.config) : void 0; + const preparedOldLine = oldLine !== void 0 && oldLine.oldNumber !== void 0 ? Object.assign(Object.assign({}, diff3 !== void 0 ? { + prefix: diff3.oldLine.prefix, + content: diff3.oldLine.content, + type: CSSLineClass.DELETE_CHANGES + } : Object.assign(Object.assign({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) })), { number: oldLine.oldNumber }) : void 0; + const preparedNewLine = newLine !== void 0 && newLine.newNumber !== void 0 ? Object.assign(Object.assign({}, diff3 !== void 0 ? { + prefix: diff3.newLine.prefix, + content: diff3.newLine.content, + type: CSSLineClass.INSERT_CHANGES + } : Object.assign(Object.assign({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) })), { number: newLine.newNumber }) : void 0; + const { left, right } = this.generateLineHtml(preparedOldLine, preparedNewLine); + fileHtml.left += left; + fileHtml.right += right; + } + return fileHtml; + } + generateLineHtml(oldLine, newLine) { + return { + left: this.generateSingleHtml(oldLine), + right: this.generateSingleHtml(newLine) + }; + } + generateSingleHtml(line) { + const lineClass = "d2h-code-side-linenumber"; + const contentClass = "d2h-code-side-line"; + return this.hoganUtils.render(genericTemplatesPath2, "line", { + type: (line === null || line === void 0 ? void 0 : line.type) || `${CSSLineClass.CONTEXT} d2h-emptyplaceholder`, + lineClass: line !== void 0 ? lineClass : `${lineClass} d2h-code-side-emptyplaceholder`, + contentClass: line !== void 0 ? contentClass : `${contentClass} d2h-code-side-emptyplaceholder`, + prefix: (line === null || line === void 0 ? void 0 : line.prefix) === " " ? " " : line === null || line === void 0 ? void 0 : line.prefix, + content: line === null || line === void 0 ? void 0 : line.content, + lineNumber: line === null || line === void 0 ? void 0 : line.number + }); + } +}; + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/hoganjs-utils.js +init_polyfill_buffer(); +var Hogan3 = __toESM(require_hogan()); + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/diff2html-templates.js +init_polyfill_buffer(); +var Hogan2 = __toESM(require_hogan()); +var defaultTemplates = {}; +defaultTemplates["file-summary-line"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('
  • '); + t.b("\n" + i); + t.b(' '); + t.b("\n" + i); + t.b(t.rp("'); + t.b(t.v(t.f("fileName", c, p, 0))); + t.b(""); + t.b("\n" + i); + t.b(' '); + t.b("\n" + i); + t.b(' '); + t.b(t.v(t.f("addedLines", c, p, 0))); + t.b(""); + t.b("\n" + i); + t.b(' '); + t.b(t.v(t.f("deletedLines", c, p, 0))); + t.b(""); + t.b("\n" + i); + t.b(" "); + t.b("\n" + i); + t.b(" "); + t.b("\n" + i); + t.b("
  • "); + return t.fl(); +}, partials: { "'); + t.b("\n" + i); + t.b('
    '); + t.b("\n" + i); + t.b(' Files changed ('); + t.b(t.v(t.f("filesNumber", c, p, 0))); + t.b(")"); + t.b("\n" + i); + t.b(' hide'); + t.b("\n" + i); + t.b(' show'); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b('
      '); + t.b("\n" + i); + t.b(" "); + t.b(t.t(t.f("files", c, p, 0))); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b(""); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["generic-block-header"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b(""); + t.b("\n" + i); + t.b(' '); + t.b("\n" + i); + t.b(' '); + t.b("\n" + i); + t.b('
    '); + if (t.s(t.f("blockHeader", c, p, 1), c, p, 0, 156, 173, "{{ }}")) { + t.rs(c, p, function(c2, p2, t2) { + t2.b(t2.t(t2.f("blockHeader", c2, p2, 0))); + }); + c.pop(); + } + if (!t.s(t.f("blockHeader", c, p, 1), c, p, 1, 0, 0, "")) { + t.b(" "); + } + ; + t.b("
    "); + t.b("\n" + i); + t.b(" "); + t.b("\n" + i); + t.b(""); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["generic-empty-diff"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b(""); + t.b("\n" + i); + t.b(' '); + t.b("\n" + i); + t.b('
    '); + t.b("\n" + i); + t.b(" File without changes"); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b(" "); + t.b("\n" + i); + t.b(""); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["generic-file-path"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b(''); + t.b("\n" + i); + t.b(t.rp("'); + t.b(t.v(t.f("fileDiffName", c, p, 0))); + t.b(""); + t.b("\n" + i); + t.b(t.rp(""); + t.b("\n" + i); + t.b('"); + return t.fl(); +}, partials: { ""); + t.b("\n" + i); + t.b(' '); + t.b("\n" + i); + t.b(" "); + t.b(t.t(t.f("lineNumber", c, p, 0))); + t.b("\n" + i); + t.b(" "); + t.b("\n" + i); + t.b(' '); + t.b("\n" + i); + t.b('
    '); + t.b("\n" + i); + if (t.s(t.f("prefix", c, p, 1), c, p, 0, 162, 238, "{{ }}")) { + t.rs(c, p, function(c2, p2, t2) { + t2.b(' '); + t2.b(t2.t(t2.f("prefix", c2, p2, 0))); + t2.b(""); + t2.b("\n" + i); + }); + c.pop(); + } + if (!t.s(t.f("prefix", c, p, 1), c, p, 1, 0, 0, "")) { + t.b('  '); + t.b("\n" + i); + } + ; + if (t.s(t.f("content", c, p, 1), c, p, 0, 371, 445, "{{ }}")) { + t.rs(c, p, function(c2, p2, t2) { + t2.b(' '); + t2.b(t2.t(t2.f("content", c2, p2, 0))); + t2.b(""); + t2.b("\n" + i); + }); + c.pop(); + } + if (!t.s(t.f("content", c, p, 1), c, p, 1, 0, 0, "")) { + t.b('
    '); + t.b("\n" + i); + } + ; + t.b("
    "); + t.b("\n" + i); + t.b(" "); + t.b("\n" + i); + t.b(""); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["generic-wrapper"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('
    '); + t.b("\n" + i); + t.b(" "); + t.b(t.t(t.f("content", c, p, 0))); + t.b("\n" + i); + t.b("
    "); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["icon-file-added"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('"); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["icon-file-changed"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('"); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["icon-file-deleted"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('"); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["icon-file-renamed"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('"); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["icon-file"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('"); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["line-by-line-file-diff"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('
    '); + t.b("\n" + i); + t.b('
    '); + t.b("\n" + i); + t.b(" "); + t.b(t.t(t.f("filePath", c, p, 0))); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b('
    '); + t.b("\n" + i); + t.b('
    '); + t.b("\n" + i); + t.b(' '); + t.b("\n" + i); + t.b(' '); + t.b("\n" + i); + t.b(" "); + t.b(t.t(t.f("diffs", c, p, 0))); + t.b("\n" + i); + t.b(" "); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b("
    "); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["line-by-line-numbers"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('
    '); + t.b(t.v(t.f("oldNumber", c, p, 0))); + t.b("
    "); + t.b("\n" + i); + t.b('
    '); + t.b(t.v(t.f("newNumber", c, p, 0))); + t.b("
    "); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["side-by-side-file-diff"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('
    '); + t.b("\n" + i); + t.b('
    '); + t.b("\n" + i); + t.b(" "); + t.b(t.t(t.f("filePath", c, p, 0))); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b('
    '); + t.b("\n" + i); + t.b('
    '); + t.b("\n" + i); + t.b('
    '); + t.b("\n" + i); + t.b(' '); + t.b("\n" + i); + t.b(' '); + t.b("\n" + i); + t.b(" "); + t.b(t.t(t.d("diffs.left", c, p, 0))); + t.b("\n" + i); + t.b(" "); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b('
    '); + t.b("\n" + i); + t.b('
    '); + t.b("\n" + i); + t.b(' '); + t.b("\n" + i); + t.b(' '); + t.b("\n" + i); + t.b(" "); + t.b(t.t(t.d("diffs.right", c, p, 0))); + t.b("\n" + i); + t.b(" "); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b("
    "); + t.b("\n" + i); + t.b("
    "); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["tag-file-added"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('ADDED'); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["tag-file-changed"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('CHANGED'); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["tag-file-deleted"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('DELETED'); + return t.fl(); +}, partials: {}, subs: {} }); +defaultTemplates["tag-file-renamed"] = new Hogan2.Template({ code: function(c, p, i) { + var t = this; + t.b(i = i || ""); + t.b('RENAMED'); + return t.fl(); +}, partials: {}, subs: {} }); + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/hoganjs-utils.js +var HoganJsUtils = class { + constructor({ compiledTemplates = {}, rawTemplates = {} }) { + const compiledRawTemplates = Object.entries(rawTemplates).reduce((previousTemplates, [name, templateString]) => { + const compiledTemplate = Hogan3.compile(templateString, { asString: false }); + return Object.assign(Object.assign({}, previousTemplates), { [name]: compiledTemplate }); + }, {}); + this.preCompiledTemplates = Object.assign(Object.assign(Object.assign({}, defaultTemplates), compiledTemplates), compiledRawTemplates); + } + static compile(templateString) { + return Hogan3.compile(templateString, { asString: false }); + } + render(namespace, view, params, partials, indent2) { + const templateKey = this.templateKey(namespace, view); + try { + const template = this.preCompiledTemplates[templateKey]; + return template.render(params, partials, indent2); + } catch (e) { + throw new Error(`Could not find template to render '${templateKey}'`); + } + } + template(namespace, view) { + return this.preCompiledTemplates[this.templateKey(namespace, view)]; + } + templateKey(namespace, view) { + return `${namespace}-${view}`; + } +}; + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/diff2html.js +var defaultDiff2HtmlConfig = Object.assign(Object.assign(Object.assign({}, defaultLineByLineRendererConfig), defaultSideBySideRendererConfig), { outputFormat: OutputFormatType.LINE_BY_LINE, drawFileList: true }); +function html(diffInput, configuration = {}) { + const config = Object.assign(Object.assign({}, defaultDiff2HtmlConfig), configuration); + const diffJson = typeof diffInput === "string" ? parse(diffInput, config) : diffInput; + const hoganUtils = new HoganJsUtils(config); + const { colorScheme } = config; + const fileListRendererConfig = { colorScheme }; + const fileList = config.drawFileList ? new FileListRenderer(hoganUtils, fileListRendererConfig).render(diffJson) : ""; + const diffOutput = config.outputFormat === "side-by-side" ? new SideBySideRenderer(hoganUtils, config).render(diffJson) : new LineByLineRenderer(hoganUtils, config).render(diffJson); + return fileList + diffOutput; +} + +// src/ui/diff/diffView.ts +var import_obsidian17 = require("obsidian"); +var DiffView = class extends import_obsidian17.ItemView { + constructor(leaf, plugin) { + super(leaf); + this.plugin = plugin; + this.gettingDiff = false; + this.gitRefreshBind = this.refresh.bind(this); + this.gitViewRefreshBind = this.refresh.bind(this); + this.parser = new DOMParser(); + this.navigation = true; + addEventListener("git-refresh", this.gitRefreshBind); + addEventListener("git-view-refresh", this.gitViewRefreshBind); + } + getViewType() { + return DIFF_VIEW_CONFIG.type; + } + getDisplayText() { + var _a2; + if (((_a2 = this.state) == null ? void 0 : _a2.file) != null) { + let fileName = this.state.file.split("/").last(); + if (fileName == null ? void 0 : fileName.endsWith(".md")) + fileName = fileName.slice(0, -3); + return DIFF_VIEW_CONFIG.name + ` (${fileName})`; + } + return DIFF_VIEW_CONFIG.name; + } + getIcon() { + return DIFF_VIEW_CONFIG.icon; + } + async setState(state, result) { + this.state = state; + if (import_obsidian17.Platform.isMobile) { + this.leaf.view.titleEl.textContent = this.getDisplayText(); + } + await this.refresh(); + } + getState() { + return this.state; + } + onClose() { + removeEventListener("git-refresh", this.gitRefreshBind); + removeEventListener("git-view-refresh", this.gitViewRefreshBind); + return super.onClose(); + } + onOpen() { + this.refresh(); + return super.onOpen(); + } + async refresh() { + var _a2; + if (((_a2 = this.state) == null ? void 0 : _a2.file) && !this.gettingDiff && this.plugin.gitManager) { + this.gettingDiff = true; + try { + let diff3 = await this.plugin.gitManager.getDiffString( + this.state.file, + this.state.staged, + this.state.hash + ); + this.contentEl.empty(); + if (!diff3) { + if (this.plugin.gitManager instanceof SimpleGit && await this.plugin.gitManager.isTracked( + this.state.file + )) { + diff3 = [ + `--- ${this.state.file}`, + `+++ ${this.state.file}`, + "" + ].join("\n"); + } else { + const content = await this.app.vault.adapter.read( + this.plugin.gitManager.getRelativeVaultPath( + this.state.file + ) + ); + const header = `--- /dev/null ++++ ${this.state.file} +@@ -0,0 +1,${content.split("\n").length} @@`; + diff3 = [ + ...header.split("\n"), + ...content.split("\n").map((line) => `+${line}`) + ].join("\n"); + } + } + const diffEl = this.parser.parseFromString(html(diff3), "text/html").querySelector(".d2h-file-diff"); + this.contentEl.append(diffEl); + } finally { + this.gettingDiff = false; + } + } + } +}; + +// src/ui/history/historyView.ts +init_polyfill_buffer(); +var import_obsidian21 = require("obsidian"); + +// src/ui/history/historyView.svelte +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/index.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/animations.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/utils.js +init_polyfill_buffer(); +function noop() { +} +var identity = (x) => x; +function run(fn) { + return fn(); +} +function blank_object() { + return /* @__PURE__ */ Object.create(null); +} +function run_all(fns) { + fns.forEach(run); +} +function is_function(thing) { + return typeof thing === "function"; +} +function safe_not_equal(a, b) { + return a != a ? b == b : a !== b || a && typeof a === "object" || typeof a === "function"; +} +function is_empty(obj) { + return Object.keys(obj).length === 0; +} + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/environment.js +init_polyfill_buffer(); +var is_client = typeof window !== "undefined"; +var now = is_client ? () => window.performance.now() : () => Date.now(); +var raf = is_client ? (cb) => requestAnimationFrame(cb) : noop; + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/loop.js +init_polyfill_buffer(); +var tasks = /* @__PURE__ */ new Set(); +function run_tasks(now2) { + tasks.forEach((task) => { + if (!task.c(now2)) { + tasks.delete(task); + task.f(); + } + }); + if (tasks.size !== 0) + raf(run_tasks); +} +function loop(callback) { + let task; + if (tasks.size === 0) + raf(run_tasks); + return { + promise: new Promise((fulfill) => { + tasks.add(task = { c: callback, f: fulfill }); + }), + abort() { + tasks.delete(task); + } + }; +} + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/style_manager.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/dom.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/ResizeObserverSingleton.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/globals.js +init_polyfill_buffer(); +var globals = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : ( + // @ts-ignore Node typings have this + global +); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/ResizeObserverSingleton.js +var ResizeObserverSingleton = class _ResizeObserverSingleton { + /** @param {ResizeObserverOptions} options */ + constructor(options) { + /** + * @private + * @readonly + * @type {WeakMap} + */ + __publicField(this, "_listeners", "WeakMap" in globals ? /* @__PURE__ */ new WeakMap() : void 0); + /** + * @private + * @type {ResizeObserver} + */ + __publicField(this, "_observer"); + /** @type {ResizeObserverOptions} */ + __publicField(this, "options"); + this.options = options; + } + /** + * @param {Element} element + * @param {import('./private.js').Listener} listener + * @returns {() => void} + */ + observe(element2, listener) { + this._listeners.set(element2, listener); + this._getObserver().observe(element2, this.options); + return () => { + this._listeners.delete(element2); + this._observer.unobserve(element2); + }; + } + /** + * @private + */ + _getObserver() { + var _a2; + return (_a2 = this._observer) != null ? _a2 : this._observer = new ResizeObserver((entries) => { + var _a3; + for (const entry of entries) { + _ResizeObserverSingleton.entries.set(entry.target, entry); + (_a3 = this._listeners.get(entry.target)) == null ? void 0 : _a3(entry); + } + }); + } +}; +ResizeObserverSingleton.entries = "WeakMap" in globals ? /* @__PURE__ */ new WeakMap() : void 0; + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/dom.js +var is_hydrating = false; +function start_hydrating() { + is_hydrating = true; +} +function end_hydrating() { + is_hydrating = false; +} +function append2(target, node) { + target.appendChild(node); +} +function append_styles(target, style_sheet_id, styles) { + const append_styles_to = get_root_for_style(target); + if (!append_styles_to.getElementById(style_sheet_id)) { + const style = element("style"); + style.id = style_sheet_id; + style.textContent = styles; + append_stylesheet(append_styles_to, style); + } +} +function get_root_for_style(node) { + if (!node) + return document; + const root2 = node.getRootNode ? node.getRootNode() : node.ownerDocument; + if (root2 && /** @type {ShadowRoot} */ + root2.host) { + return ( + /** @type {ShadowRoot} */ + root2 + ); + } + return node.ownerDocument; +} +function append_empty_stylesheet(node) { + const style_element = element("style"); + style_element.textContent = "/* empty */"; + append_stylesheet(get_root_for_style(node), style_element); + return style_element.sheet; +} +function append_stylesheet(node, style) { + append2( + /** @type {Document} */ + node.head || node, + style + ); + return style.sheet; +} +function insert(target, node, anchor) { + target.insertBefore(node, anchor || null); +} +function detach(node) { + if (node.parentNode) { + node.parentNode.removeChild(node); + } +} +function destroy_each(iterations, detaching) { + for (let i = 0; i < iterations.length; i += 1) { + if (iterations[i]) + iterations[i].d(detaching); + } +} +function element(name) { + return document.createElement(name); +} +function text(data) { + return document.createTextNode(data); +} +function space() { + return text(" "); +} +function empty() { + return text(""); +} +function listen(node, event, handler, options) { + node.addEventListener(event, handler, options); + return () => node.removeEventListener(event, handler, options); +} +function stop_propagation(fn) { + return function(event) { + event.stopPropagation(); + return fn.call(this, event); + }; +} +function attr(node, attribute, value) { + if (value == null) + node.removeAttribute(attribute); + else if (node.getAttribute(attribute) !== value) + node.setAttribute(attribute, value); +} +function children(element2) { + return Array.from(element2.childNodes); +} +function set_data(text2, data) { + data = "" + data; + if (text2.data === data) + return; + text2.data = /** @type {string} */ + data; +} +function set_input_value(input, value) { + input.value = value == null ? "" : value; +} +function set_style(node, key2, value, important) { + if (value == null) { + node.style.removeProperty(key2); + } else { + node.style.setProperty(key2, value, important ? "important" : ""); + } +} +function toggle_class(element2, name, toggle) { + element2.classList.toggle(name, !!toggle); +} +function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) { + return new CustomEvent(type, { detail, bubbles, cancelable }); +} +function get_custom_elements_slots(element2) { + const result = {}; + element2.childNodes.forEach( + /** @param {Element} node */ + (node) => { + result[node.slot || "default"] = true; + } + ); + return result; +} + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/style_manager.js +var managed_styles = /* @__PURE__ */ new Map(); +var active = 0; +function hash(str) { + let hash2 = 5381; + let i = str.length; + while (i--) + hash2 = (hash2 << 5) - hash2 ^ str.charCodeAt(i); + return hash2 >>> 0; +} +function create_style_information(doc, node) { + const info = { stylesheet: append_empty_stylesheet(node), rules: {} }; + managed_styles.set(doc, info); + return info; +} +function create_rule(node, a, b, duration, delay2, ease, fn, uid = 0) { + const step = 16.666 / duration; + let keyframes = "{\n"; + for (let p = 0; p <= 1; p += step) { + const t = a + (b - a) * ease(p); + keyframes += p * 100 + `%{${fn(t, 1 - t)}} +`; + } + const rule = keyframes + `100% {${fn(b, 1 - b)}} +}`; + const name = `__svelte_${hash(rule)}_${uid}`; + const doc = get_root_for_style(node); + const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node); + if (!rules[name]) { + rules[name] = true; + stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length); + } + const animation = node.style.animation || ""; + node.style.animation = `${animation ? `${animation}, ` : ""}${name} ${duration}ms linear ${delay2}ms 1 both`; + active += 1; + return name; +} +function delete_rule(node, name) { + const previous = (node.style.animation || "").split(", "); + const next = previous.filter( + name ? (anim) => anim.indexOf(name) < 0 : (anim) => anim.indexOf("__svelte") === -1 + // remove all Svelte animations + ); + const deleted = previous.length - next.length; + if (deleted) { + node.style.animation = next.join(", "); + active -= deleted; + if (!active) + clear_rules(); + } +} +function clear_rules() { + raf(() => { + if (active) + return; + managed_styles.forEach((info) => { + const { ownerNode } = info.stylesheet; + if (ownerNode) + detach(ownerNode); + }); + managed_styles.clear(); + }); +} + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/await_block.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/transitions.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/scheduler.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/lifecycle.js +init_polyfill_buffer(); +var current_component; +function set_current_component(component) { + current_component = component; +} +function get_current_component() { + if (!current_component) + throw new Error("Function called outside component initialization"); + return current_component; +} +function onDestroy(fn) { + get_current_component().$$.on_destroy.push(fn); +} +function bubble(component, event) { + const callbacks = component.$$.callbacks[event.type]; + if (callbacks) { + callbacks.slice().forEach((fn) => fn.call(this, event)); + } +} + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/scheduler.js +var dirty_components = []; +var binding_callbacks = []; +var render_callbacks = []; +var flush_callbacks = []; +var resolved_promise = /* @__PURE__ */ Promise.resolve(); +var update_scheduled = false; +function schedule_update() { + if (!update_scheduled) { + update_scheduled = true; + resolved_promise.then(flush); + } +} +function add_render_callback(fn) { + render_callbacks.push(fn); +} +var seen_callbacks = /* @__PURE__ */ new Set(); +var flushidx = 0; +function flush() { + if (flushidx !== 0) { + return; + } + const saved_component = current_component; + do { + try { + while (flushidx < dirty_components.length) { + const component = dirty_components[flushidx]; + flushidx++; + set_current_component(component); + update(component.$$); + } + } catch (e) { + dirty_components.length = 0; + flushidx = 0; + throw e; + } + set_current_component(null); + dirty_components.length = 0; + flushidx = 0; + while (binding_callbacks.length) + binding_callbacks.pop()(); + for (let i = 0; i < render_callbacks.length; i += 1) { + const callback = render_callbacks[i]; + if (!seen_callbacks.has(callback)) { + seen_callbacks.add(callback); + callback(); + } + } + render_callbacks.length = 0; + } while (dirty_components.length); + while (flush_callbacks.length) { + flush_callbacks.pop()(); + } + update_scheduled = false; + seen_callbacks.clear(); + set_current_component(saved_component); +} +function update($$) { + if ($$.fragment !== null) { + $$.update(); + run_all($$.before_update); + const dirty = $$.dirty; + $$.dirty = [-1]; + $$.fragment && $$.fragment.p($$.ctx, dirty); + $$.after_update.forEach(add_render_callback); + } +} +function flush_render_callbacks(fns) { + const filtered = []; + const targets = []; + render_callbacks.forEach((c) => fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c)); + targets.forEach((c) => c()); + render_callbacks = filtered; +} + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/transitions.js +var promise; +function wait() { + if (!promise) { + promise = Promise.resolve(); + promise.then(() => { + promise = null; + }); + } + return promise; +} +function dispatch(node, direction, kind) { + node.dispatchEvent(custom_event(`${direction ? "intro" : "outro"}${kind}`)); +} +var outroing = /* @__PURE__ */ new Set(); +var outros; +function group_outros() { + outros = { + r: 0, + c: [], + p: outros + // parent group + }; +} +function check_outros() { + if (!outros.r) { + run_all(outros.c); + } + outros = outros.p; +} +function transition_in(block, local) { + if (block && block.i) { + outroing.delete(block); + block.i(local); + } +} +function transition_out(block, local, detach2, callback) { + if (block && block.o) { + if (outroing.has(block)) + return; + outroing.add(block); + outros.c.push(() => { + outroing.delete(block); + if (callback) { + if (detach2) + block.d(1); + callback(); + } + }); + block.o(local); + } else if (callback) { + callback(); + } +} +var null_transition = { duration: 0 }; +function create_bidirectional_transition(node, fn, params, intro) { + const options = { direction: "both" }; + let config = fn(node, params, options); + let t = intro ? 0 : 1; + let running_program = null; + let pending_program = null; + let animation_name = null; + let original_inert_value; + function clear_animation() { + if (animation_name) + delete_rule(node, animation_name); + } + function init3(program, duration) { + const d = ( + /** @type {Program['d']} */ + program.b - t + ); + duration *= Math.abs(d); + return { + a: t, + b: program.b, + d, + duration, + start: program.start, + end: program.start + duration, + group: program.group + }; + } + function go(b) { + const { + delay: delay2 = 0, + duration = 300, + easing = identity, + tick: tick2 = noop, + css + } = config || null_transition; + const program = { + start: now() + delay2, + b + }; + if (!b) { + program.group = outros; + outros.r += 1; + } + if ("inert" in node) { + if (b) { + if (original_inert_value !== void 0) { + node.inert = original_inert_value; + } + } else { + original_inert_value = /** @type {HTMLElement} */ + node.inert; + node.inert = true; + } + } + if (running_program || pending_program) { + pending_program = program; + } else { + if (css) { + clear_animation(); + animation_name = create_rule(node, t, b, duration, delay2, easing, css); + } + if (b) + tick2(0, 1); + running_program = init3(program, duration); + add_render_callback(() => dispatch(node, b, "start")); + loop((now2) => { + if (pending_program && now2 > pending_program.start) { + running_program = init3(pending_program, duration); + pending_program = null; + dispatch(node, running_program.b, "start"); + if (css) { + clear_animation(); + animation_name = create_rule( + node, + t, + running_program.b, + running_program.duration, + 0, + easing, + config.css + ); + } + } + if (running_program) { + if (now2 >= running_program.end) { + tick2(t = running_program.b, 1 - t); + dispatch(node, running_program.b, "end"); + if (!pending_program) { + if (running_program.b) { + clear_animation(); + } else { + if (!--running_program.group.r) + run_all(running_program.group.c); + } + } + running_program = null; + } else if (now2 >= running_program.start) { + const p = now2 - running_program.start; + t = running_program.a + running_program.d * easing(p / running_program.duration); + tick2(t, 1 - t); + } + } + return !!(running_program || pending_program); + }); + } + } + return { + run(b) { + if (is_function(config)) { + wait().then(() => { + const opts = { direction: b ? "in" : "out" }; + config = config(opts); + go(b); + }); + } else { + go(b); + } + }, + end() { + clear_animation(); + running_program = pending_program = null; + } + }; +} + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/each.js +init_polyfill_buffer(); +function ensure_array_like(array_like_or_iterator) { + return (array_like_or_iterator == null ? void 0 : array_like_or_iterator.length) !== void 0 ? array_like_or_iterator : Array.from(array_like_or_iterator); +} + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/spread.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/ssr.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/shared/boolean_attributes.js +init_polyfill_buffer(); +var _boolean_attributes = ( + /** @type {const} */ + [ + "allowfullscreen", + "allowpaymentrequest", + "async", + "autofocus", + "autoplay", + "checked", + "controls", + "default", + "defer", + "disabled", + "formnovalidate", + "hidden", + "inert", + "ismap", + "loop", + "multiple", + "muted", + "nomodule", + "novalidate", + "open", + "playsinline", + "readonly", + "required", + "reversed", + "selected" + ] +); +var boolean_attributes = /* @__PURE__ */ new Set([..._boolean_attributes]); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/shared/utils/names.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/Component.js +init_polyfill_buffer(); +function create_component(block) { + block && block.c(); +} +function mount_component(component, target, anchor) { + const { fragment, after_update } = component.$$; + fragment && fragment.m(target, anchor); + add_render_callback(() => { + const new_on_destroy = component.$$.on_mount.map(run).filter(is_function); + if (component.$$.on_destroy) { + component.$$.on_destroy.push(...new_on_destroy); + } else { + run_all(new_on_destroy); + } + component.$$.on_mount = []; + }); + after_update.forEach(add_render_callback); +} +function destroy_component(component, detaching) { + const $$ = component.$$; + if ($$.fragment !== null) { + flush_render_callbacks($$.after_update); + run_all($$.on_destroy); + $$.fragment && $$.fragment.d(detaching); + $$.on_destroy = $$.fragment = null; + $$.ctx = []; + } +} +function make_dirty(component, i) { + if (component.$$.dirty[0] === -1) { + dirty_components.push(component); + schedule_update(); + component.$$.dirty.fill(0); + } + component.$$.dirty[i / 31 | 0] |= 1 << i % 31; +} +function init2(component, options, instance10, create_fragment10, not_equal, props, append_styles2 = null, dirty = [-1]) { + const parent_component = current_component; + set_current_component(component); + const $$ = component.$$ = { + fragment: null, + ctx: [], + // state + props, + update: noop, + not_equal, + bound: blank_object(), + // lifecycle + on_mount: [], + on_destroy: [], + on_disconnect: [], + before_update: [], + after_update: [], + context: new Map(options.context || (parent_component ? parent_component.$$.context : [])), + // everything else + callbacks: blank_object(), + dirty, + skip_bound: false, + root: options.target || parent_component.$$.root + }; + append_styles2 && append_styles2($$.root); + let ready = false; + $$.ctx = instance10 ? instance10(component, options.props || {}, (i, ret, ...rest) => { + const value = rest.length ? rest[0] : ret; + if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { + if (!$$.skip_bound && $$.bound[i]) + $$.bound[i](value); + if (ready) + make_dirty(component, i); + } + return ret; + }) : []; + $$.update(); + ready = true; + run_all($$.before_update); + $$.fragment = create_fragment10 ? create_fragment10($$.ctx) : false; + if (options.target) { + if (options.hydrate) { + start_hydrating(); + const nodes = children(options.target); + $$.fragment && $$.fragment.l(nodes); + nodes.forEach(detach); + } else { + $$.fragment && $$.fragment.c(); + } + if (options.intro) + transition_in(component.$$.fragment); + mount_component(component, options.target, options.anchor); + end_hydrating(); + flush(); + } + set_current_component(parent_component); +} +var SvelteElement; +if (typeof HTMLElement === "function") { + SvelteElement = class extends HTMLElement { + constructor($$componentCtor, $$slots, use_shadow_dom) { + super(); + /** The Svelte component constructor */ + __publicField(this, "$$ctor"); + /** Slots */ + __publicField(this, "$$s"); + /** The Svelte component instance */ + __publicField(this, "$$c"); + /** Whether or not the custom element is connected */ + __publicField(this, "$$cn", false); + /** Component props data */ + __publicField(this, "$$d", {}); + /** `true` if currently in the process of reflecting component props back to attributes */ + __publicField(this, "$$r", false); + /** @type {Record} Props definition (name, reflected, type etc) */ + __publicField(this, "$$p_d", {}); + /** @type {Record} Event listeners */ + __publicField(this, "$$l", {}); + /** @type {Map} Event listener unsubscribe functions */ + __publicField(this, "$$l_u", /* @__PURE__ */ new Map()); + this.$$ctor = $$componentCtor; + this.$$s = $$slots; + if (use_shadow_dom) { + this.attachShadow({ mode: "open" }); + } + } + addEventListener(type, listener, options) { + this.$$l[type] = this.$$l[type] || []; + this.$$l[type].push(listener); + if (this.$$c) { + const unsub = this.$$c.$on(type, listener); + this.$$l_u.set(listener, unsub); + } + super.addEventListener(type, listener, options); + } + removeEventListener(type, listener, options) { + super.removeEventListener(type, listener, options); + if (this.$$c) { + const unsub = this.$$l_u.get(listener); + if (unsub) { + unsub(); + this.$$l_u.delete(listener); + } + } + } + async connectedCallback() { + this.$$cn = true; + if (!this.$$c) { + let create_slot = function(name) { + return () => { + let node; + const obj = { + c: function create() { + node = element("slot"); + if (name !== "default") { + attr(node, "name", name); + } + }, + /** + * @param {HTMLElement} target + * @param {HTMLElement} [anchor] + */ + m: function mount(target, anchor) { + insert(target, node, anchor); + }, + d: function destroy(detaching) { + if (detaching) { + detach(node); + } + } + }; + return obj; + }; + }; + await Promise.resolve(); + if (!this.$$cn) { + return; + } + const $$slots = {}; + const existing_slots = get_custom_elements_slots(this); + for (const name of this.$$s) { + if (name in existing_slots) { + $$slots[name] = [create_slot(name)]; + } + } + for (const attribute of this.attributes) { + const name = this.$$g_p(attribute.name); + if (!(name in this.$$d)) { + this.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, "toProp"); + } + } + for (const key2 in this.$$p_d) { + if (!(key2 in this.$$d) && this[key2] !== void 0) { + this.$$d[key2] = this[key2]; + delete this[key2]; + } + } + this.$$c = new this.$$ctor({ + target: this.shadowRoot || this, + props: { + ...this.$$d, + $$slots, + $$scope: { + ctx: [] + } + } + }); + const reflect_attributes = () => { + this.$$r = true; + for (const key2 in this.$$p_d) { + this.$$d[key2] = this.$$c.$$.ctx[this.$$c.$$.props[key2]]; + if (this.$$p_d[key2].reflect) { + const attribute_value = get_custom_element_value( + key2, + this.$$d[key2], + this.$$p_d, + "toAttribute" + ); + if (attribute_value == null) { + this.removeAttribute(this.$$p_d[key2].attribute || key2); + } else { + this.setAttribute(this.$$p_d[key2].attribute || key2, attribute_value); + } + } + } + this.$$r = false; + }; + this.$$c.$$.after_update.push(reflect_attributes); + reflect_attributes(); + for (const type in this.$$l) { + for (const listener of this.$$l[type]) { + const unsub = this.$$c.$on(type, listener); + this.$$l_u.set(listener, unsub); + } + } + this.$$l = {}; + } + } + // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte + // and setting attributes through setAttribute etc, this is helpful + attributeChangedCallback(attr2, _oldValue, newValue) { + var _a2; + if (this.$$r) + return; + attr2 = this.$$g_p(attr2); + this.$$d[attr2] = get_custom_element_value(attr2, newValue, this.$$p_d, "toProp"); + (_a2 = this.$$c) == null ? void 0 : _a2.$set({ [attr2]: this.$$d[attr2] }); + } + disconnectedCallback() { + this.$$cn = false; + Promise.resolve().then(() => { + if (!this.$$cn) { + this.$$c.$destroy(); + this.$$c = void 0; + } + }); + } + $$g_p(attribute_name) { + return Object.keys(this.$$p_d).find( + (key2) => this.$$p_d[key2].attribute === attribute_name || !this.$$p_d[key2].attribute && key2.toLowerCase() === attribute_name + ) || attribute_name; + } + }; +} +function get_custom_element_value(prop, value, props_definition, transform) { + var _a2; + const type = (_a2 = props_definition[prop]) == null ? void 0 : _a2.type; + value = type === "Boolean" && typeof value !== "boolean" ? value != null : value; + if (!transform || !props_definition[prop]) { + return value; + } else if (transform === "toAttribute") { + switch (type) { + case "Object": + case "Array": + return value == null ? null : JSON.stringify(value); + case "Boolean": + return value ? "" : null; + case "Number": + return value == null ? null : value; + default: + return value; + } + } else { + switch (type) { + case "Object": + case "Array": + return value && JSON.parse(value); + case "Boolean": + return value; + case "Number": + return value != null ? +value : value; + default: + return value; + } + } +} +var SvelteComponent = class { + constructor() { + /** + * ### PRIVATE API + * + * Do not use, may change at any time + * + * @type {any} + */ + __publicField(this, "$$"); + /** + * ### PRIVATE API + * + * Do not use, may change at any time + * + * @type {any} + */ + __publicField(this, "$$set"); + } + /** @returns {void} */ + $destroy() { + destroy_component(this, 1); + this.$destroy = noop; + } + /** + * @template {Extract} K + * @param {K} type + * @param {((e: Events[K]) => void) | null | undefined} callback + * @returns {() => void} + */ + $on(type, callback) { + if (!is_function(callback)) { + return noop; + } + const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); + callbacks.push(callback); + return () => { + const index2 = callbacks.indexOf(callback); + if (index2 !== -1) + callbacks.splice(index2, 1); + }; + } + /** + * @param {Partial} props + * @returns {void} + */ + $set(props) { + if (this.$$set && !is_empty(props)) { + this.$$.skip_bound = true; + this.$$set(props); + this.$$.skip_bound = false; + } + } +}; + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/dev.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/shared/version.js +init_polyfill_buffer(); +var PUBLIC_VERSION = "4"; + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/internal/disclose-version/index.js +init_polyfill_buffer(); +if (typeof window !== "undefined") + (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(PUBLIC_VERSION); + +// node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs +init_polyfill_buffer(); +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +// src/ui/history/historyView.svelte +var import_obsidian20 = require("obsidian"); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/index.js +init_polyfill_buffer(); + +// src/ui/history/components/logComponent.svelte +init_polyfill_buffer(); +var import_obsidian19 = require("obsidian"); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/transition/index.js +init_polyfill_buffer(); + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/easing/index.js +init_polyfill_buffer(); +function cubicOut(t) { + const f = t - 1; + return f * f * f + 1; +} + +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/transition/index.js +function slide(node, { delay: delay2 = 0, duration = 400, easing = cubicOut, axis = "y" } = {}) { + const style = getComputedStyle(node); + const opacity = +style.opacity; + const primary_property = axis === "y" ? "height" : "width"; + const primary_property_value = parseFloat(style[primary_property]); + const secondary_properties = axis === "y" ? ["top", "bottom"] : ["left", "right"]; + const capitalized_secondary_properties = secondary_properties.map( + (e) => `${e[0].toUpperCase()}${e.slice(1)}` + ); + const padding_start_value = parseFloat(style[`padding${capitalized_secondary_properties[0]}`]); + const padding_end_value = parseFloat(style[`padding${capitalized_secondary_properties[1]}`]); + const margin_start_value = parseFloat(style[`margin${capitalized_secondary_properties[0]}`]); + const margin_end_value = parseFloat(style[`margin${capitalized_secondary_properties[1]}`]); + const border_width_start_value = parseFloat( + style[`border${capitalized_secondary_properties[0]}Width`] + ); + const border_width_end_value = parseFloat( + style[`border${capitalized_secondary_properties[1]}Width`] + ); + return { + delay: delay2, + duration, + easing, + css: (t) => `overflow: hidden;opacity: ${Math.min(t * 20, 1) * opacity};${primary_property}: ${t * primary_property_value}px;padding-${secondary_properties[0]}: ${t * padding_start_value}px;padding-${secondary_properties[1]}: ${t * padding_end_value}px;margin-${secondary_properties[0]}: ${t * margin_start_value}px;margin-${secondary_properties[1]}: ${t * margin_end_value}px;border-${secondary_properties[0]}-width: ${t * border_width_start_value}px;border-${secondary_properties[1]}-width: ${t * border_width_end_value}px;` + }; +} + +// src/ui/history/components/logFileComponent.svelte +init_polyfill_buffer(); +var import_obsidian18 = require("obsidian"); +function add_css(target) { + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); +} +function create_if_block(ctx) { + let div; + let mounted; + let dispose; + return { + c() { + div = element("div"); + attr(div, "data-icon", "go-to-file"); + attr(div, "aria-label", "Open File"); + attr(div, "class", "clickable-icon"); + }, + m(target, anchor) { + insert(target, div, anchor); + ctx[7](div); + if (!mounted) { + dispose = [ + listen(div, "auxclick", stop_propagation( + /*open*/ + ctx[4] + )), + listen(div, "click", stop_propagation( + /*open*/ + ctx[4] + )) + ]; + mounted = true; + } + }, + p: noop, + d(detaching) { + if (detaching) { + detach(div); + } + ctx[7](null); + mounted = false; + run_all(dispose); + } + }; +} +function create_fragment(ctx) { + let main; + let div3; + let div0; + let t0_value = getDisplayPath( + /*diff*/ + ctx[0].vault_path + ) + ""; + let t0; + let t1; + let div2; + let div1; + let show_if = ( + /*view*/ + ctx[1].app.vault.getAbstractFileByPath( + /*diff*/ + ctx[0].vault_path + ) + ); + let t2; + let span; + let t3_value = ( + /*diff*/ + ctx[0].status + "" + ); + let t3; + let span_data_type_value; + let div3_data_path_value; + let div3_aria_label_value; + let mounted; + let dispose; + let if_block = show_if && create_if_block(ctx); + return { + c() { + var _a2, _b; + main = element("main"); + div3 = element("div"); + div0 = element("div"); + t0 = text(t0_value); + t1 = space(); + div2 = element("div"); + div1 = element("div"); + if (if_block) + if_block.c(); + t2 = space(); + span = element("span"); + t3 = text(t3_value); + attr(div0, "class", "tree-item-inner nav-file-title-content"); + attr(div1, "class", "buttons"); + attr(span, "class", "type"); + attr(span, "data-type", span_data_type_value = /*diff*/ + ctx[0].status); + attr(div2, "class", "git-tools"); + attr(div3, "class", "tree-item-self is-clickable nav-file-title svelte-1wbh8tp"); + attr(div3, "data-path", div3_data_path_value = /*diff*/ + ctx[0].vault_path); + attr( + div3, + "data-tooltip-position", + /*side*/ + ctx[3] + ); + attr(div3, "aria-label", div3_aria_label_value = /*diff*/ + ctx[0].vault_path); + toggle_class( + div3, + "is-active", + /*view*/ + ((_a2 = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*diff*/ + ctx[0].vault_path && /*view*/ + ((_b = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) + ); + attr(main, "class", "tree-item nav-file svelte-1wbh8tp"); + }, + m(target, anchor) { + insert(target, main, anchor); + append2(main, div3); + append2(div3, div0); + append2(div0, t0); + append2(div3, t1); + append2(div3, div2); + append2(div2, div1); + if (if_block) + if_block.m(div1, null); + append2(div2, t2); + append2(div2, span); + append2(span, t3); + if (!mounted) { + dispose = [ + listen(main, "click", stop_propagation( + /*showDiff*/ + ctx[5] + )), + listen(main, "auxclick", stop_propagation( + /*showDiff*/ + ctx[5] + )), + listen( + main, + "focus", + /*focus_handler*/ + ctx[6] + ) + ]; + mounted = true; + } + }, + p(ctx2, [dirty]) { + var _a2, _b; + if (dirty & /*diff*/ + 1 && t0_value !== (t0_value = getDisplayPath( + /*diff*/ + ctx2[0].vault_path + ) + "")) + set_data(t0, t0_value); + if (dirty & /*view, diff*/ + 3) + show_if = /*view*/ + ctx2[1].app.vault.getAbstractFileByPath( + /*diff*/ + ctx2[0].vault_path + ); + if (show_if) { + if (if_block) { + if_block.p(ctx2, dirty); + } else { + if_block = create_if_block(ctx2); + if_block.c(); + if_block.m(div1, null); + } + } else if (if_block) { + if_block.d(1); + if_block = null; + } + if (dirty & /*diff*/ + 1 && t3_value !== (t3_value = /*diff*/ + ctx2[0].status + "")) + set_data(t3, t3_value); + if (dirty & /*diff*/ + 1 && span_data_type_value !== (span_data_type_value = /*diff*/ + ctx2[0].status)) { + attr(span, "data-type", span_data_type_value); + } + if (dirty & /*diff*/ + 1 && div3_data_path_value !== (div3_data_path_value = /*diff*/ + ctx2[0].vault_path)) { + attr(div3, "data-path", div3_data_path_value); + } + if (dirty & /*side*/ + 8) { + attr( + div3, + "data-tooltip-position", + /*side*/ + ctx2[3] + ); + } + if (dirty & /*diff*/ + 1 && div3_aria_label_value !== (div3_aria_label_value = /*diff*/ + ctx2[0].vault_path)) { + attr(div3, "aria-label", div3_aria_label_value); + } + if (dirty & /*view, diff*/ + 3) { + toggle_class( + div3, + "is-active", + /*view*/ + ((_a2 = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*diff*/ + ctx2[0].vault_path && /*view*/ + ((_b = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) + ); + } + }, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(main); + } + if (if_block) + if_block.d(); + mounted = false; + run_all(dispose); + } + }; +} +function instance($$self, $$props, $$invalidate) { + let side; + let { diff: diff3 } = $$props; + let { view } = $$props; + let buttons = []; + window.setTimeout(() => buttons.forEach((b) => (0, import_obsidian18.setIcon)(b, b.getAttr("data-icon"))), 0); + function open(event) { + var _a2; + const file = view.app.vault.getAbstractFileByPath(diff3.vault_path); + if (file instanceof import_obsidian18.TFile) { + (_a2 = getNewLeaf(event)) === null || _a2 === void 0 ? void 0 : _a2.openFile(file); + } + } + function showDiff(event) { + var _a2; + (_a2 = getNewLeaf(event)) === null || _a2 === void 0 ? void 0 : _a2.setViewState({ + type: DIFF_VIEW_CONFIG.type, + active: true, + state: { + file: diff3.path, + staged: false, + hash: diff3.hash + } + }); + } + function focus_handler(event) { + bubble.call(this, $$self, event); + } + function div_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[0] = $$value; + $$invalidate(2, buttons); + }); + } + $$self.$$set = ($$props2) => { + if ("diff" in $$props2) + $$invalidate(0, diff3 = $$props2.diff); + if ("view" in $$props2) + $$invalidate(1, view = $$props2.view); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty & /*view*/ + 2) { + $: + $$invalidate(3, side = view.leaf.getRoot().side == "left" ? "right" : "left"); + } + }; + return [diff3, view, buttons, side, open, showDiff, focus_handler, div_binding]; +} +var LogFileComponent = class extends SvelteComponent { + constructor(options) { + super(); + init2(this, options, instance, create_fragment, safe_not_equal, { diff: 0, view: 1 }, add_css); + } +}; +var logFileComponent_default = LogFileComponent; + +// src/ui/history/components/logTreeComponent.svelte +init_polyfill_buffer(); +function add_css2(target) { + append_styles(target, "svelte-1lnl15d", "main.svelte-1lnl15d .nav-folder-title-content.svelte-1lnl15d{display:flex;align-items:center}"); +} +function get_each_context(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[8] = list[i]; + return child_ctx; +} +function create_else_block(ctx) { + let div4; + let div3; + let div0; + let t0; + let div1; + let t1; + let div2; + let t2_value = ( + /*entity*/ + ctx[8].title + "" + ); + let t2; + let div3_aria_label_value; + let t3; + let t4; + let current; + let mounted; + let dispose; + function click_handler() { + return ( + /*click_handler*/ + ctx[7]( + /*entity*/ + ctx[8] + ) + ); + } + let if_block = !/*closed*/ + ctx[4][ + /*entity*/ + ctx[8].title + ] && create_if_block_1(ctx); + return { + c() { + div4 = element("div"); + div3 = element("div"); + div0 = element("div"); + t0 = space(); + div1 = element("div"); + div1.innerHTML = ``; + t1 = space(); + div2 = element("div"); + t2 = text(t2_value); + t3 = space(); + if (if_block) + if_block.c(); + t4 = space(); + attr(div0, "data-icon", "folder"); + set_style(div0, "padding-right", "5px"); + set_style(div0, "display", "flex"); + attr(div1, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + toggle_class( + div1, + "is-collapsed", + /*closed*/ + ctx[4][ + /*entity*/ + ctx[8].title + ] + ); + attr(div2, "class", "tree-item-inner nav-folder-title-content svelte-1lnl15d"); + attr(div3, "class", "tree-item-self is-clickable nav-folder-title"); + attr( + div3, + "data-tooltip-position", + /*side*/ + ctx[5] + ); + attr(div3, "aria-label", div3_aria_label_value = /*entity*/ + ctx[8].vaultPath); + attr(div4, "class", "tree-item nav-folder"); + toggle_class( + div4, + "is-collapsed", + /*closed*/ + ctx[4][ + /*entity*/ + ctx[8].title + ] + ); + }, + m(target, anchor) { + insert(target, div4, anchor); + append2(div4, div3); + append2(div3, div0); + append2(div3, t0); + append2(div3, div1); + append2(div3, t1); + append2(div3, div2); + append2(div2, t2); + append2(div4, t3); + if (if_block) + if_block.m(div4, null); + append2(div4, t4); + current = true; + if (!mounted) { + dispose = listen(div3, "click", click_handler); + mounted = true; + } + }, + p(new_ctx, dirty) { + ctx = new_ctx; + if (!current || dirty & /*closed, hierarchy*/ + 17) { + toggle_class( + div1, + "is-collapsed", + /*closed*/ + ctx[4][ + /*entity*/ + ctx[8].title + ] + ); + } + if ((!current || dirty & /*hierarchy*/ + 1) && t2_value !== (t2_value = /*entity*/ + ctx[8].title + "")) + set_data(t2, t2_value); + if (!current || dirty & /*side*/ + 32) { + attr( + div3, + "data-tooltip-position", + /*side*/ + ctx[5] + ); + } + if (!current || dirty & /*hierarchy*/ + 1 && div3_aria_label_value !== (div3_aria_label_value = /*entity*/ + ctx[8].vaultPath)) { + attr(div3, "aria-label", div3_aria_label_value); + } + if (!/*closed*/ + ctx[4][ + /*entity*/ + ctx[8].title + ]) { + if (if_block) { + if_block.p(ctx, dirty); + if (dirty & /*closed, hierarchy*/ + 17) { + transition_in(if_block, 1); + } + } else { + if_block = create_if_block_1(ctx); + if_block.c(); + transition_in(if_block, 1); + if_block.m(div4, t4); + } + } else if (if_block) { + group_outros(); + transition_out(if_block, 1, 1, () => { + if_block = null; + }); + check_outros(); + } + if (!current || dirty & /*closed, hierarchy*/ + 17) { + toggle_class( + div4, + "is-collapsed", + /*closed*/ + ctx[4][ + /*entity*/ + ctx[8].title + ] + ); + } + }, + i(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(div4); + } + if (if_block) + if_block.d(); + mounted = false; + dispose(); + } + }; +} +function create_if_block2(ctx) { + let div; + let logfilecomponent; + let t; + let current; + logfilecomponent = new logFileComponent_default({ + props: { + diff: ( + /*entity*/ + ctx[8].data + ), + view: ( + /*view*/ + ctx[2] + ) + } + }); + return { + c() { + div = element("div"); + create_component(logfilecomponent.$$.fragment); + t = space(); + }, + m(target, anchor) { + insert(target, div, anchor); + mount_component(logfilecomponent, div, null); + append2(div, t); + current = true; + }, + p(ctx2, dirty) { + const logfilecomponent_changes = {}; + if (dirty & /*hierarchy*/ + 1) + logfilecomponent_changes.diff = /*entity*/ + ctx2[8].data; + if (dirty & /*view*/ + 4) + logfilecomponent_changes.view = /*view*/ + ctx2[2]; + logfilecomponent.$set(logfilecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(logfilecomponent.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(logfilecomponent.$$.fragment, local); + current = false; + }, + d(detaching) { + if (detaching) { + detach(div); + } + destroy_component(logfilecomponent); + } + }; +} +function create_if_block_1(ctx) { + let div; + let logtreecomponent; + let div_transition; + let current; + logtreecomponent = new LogTreeComponent({ + props: { + hierarchy: ( + /*entity*/ + ctx[8] + ), + plugin: ( + /*plugin*/ + ctx[1] + ), + view: ( + /*view*/ + ctx[2] + ) + } + }); + return { + c() { + div = element("div"); + create_component(logtreecomponent.$$.fragment); + attr(div, "class", "tree-item-children nav-folder-children"); + }, + m(target, anchor) { + insert(target, div, anchor); + mount_component(logtreecomponent, div, null); + current = true; + }, + p(ctx2, dirty) { + const logtreecomponent_changes = {}; + if (dirty & /*hierarchy*/ + 1) + logtreecomponent_changes.hierarchy = /*entity*/ + ctx2[8]; + if (dirty & /*plugin*/ + 2) + logtreecomponent_changes.plugin = /*plugin*/ + ctx2[1]; + if (dirty & /*view*/ + 4) + logtreecomponent_changes.view = /*view*/ + ctx2[2]; + logtreecomponent.$set(logtreecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(logtreecomponent.$$.fragment, local); + if (local) { + add_render_callback(() => { + if (!current) + return; + if (!div_transition) + div_transition = create_bidirectional_transition(div, slide, { duration: 150 }, true); + div_transition.run(1); + }); + } + current = true; + }, + o(local) { + transition_out(logtreecomponent.$$.fragment, local); + if (local) { + if (!div_transition) + div_transition = create_bidirectional_transition(div, slide, { duration: 150 }, false); + div_transition.run(0); + } + current = false; + }, + d(detaching) { + if (detaching) { + detach(div); + } + destroy_component(logtreecomponent); + if (detaching && div_transition) + div_transition.end(); + } + }; +} +function create_each_block(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block2, create_else_block]; + const if_blocks = []; + function select_block_type(ctx2, dirty) { + if ( + /*entity*/ + ctx2[8].data + ) + return 0; + return 1; + } + current_block_type_index = select_block_type(ctx, -1); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx2, dirty) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } else { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + if_blocks[current_block_type_index].d(detaching); + } + }; +} +function create_fragment2(ctx) { + let main; + let current; + let each_value = ensure_array_like( + /*hierarchy*/ + ctx[0].children + ); + let each_blocks = []; + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); + } + const out = (i) => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + return { + c() { + main = element("main"); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + attr(main, "class", "svelte-1lnl15d"); + toggle_class( + main, + "topLevel", + /*topLevel*/ + ctx[3] + ); + }, + m(target, anchor) { + insert(target, main, anchor); + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(main, null); + } + } + current = true; + }, + p(ctx2, [dirty]) { + if (dirty & /*hierarchy, view, closed, plugin, side, fold*/ + 119) { + each_value = ensure_array_like( + /*hierarchy*/ + ctx2[0].children + ); + let i; + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context(ctx2, each_value, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(main, null); + } + } + group_outros(); + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros(); + } + if (!current || dirty & /*topLevel*/ + 8) { + toggle_class( + main, + "topLevel", + /*topLevel*/ + ctx2[3] + ); + } + }, + i(local) { + if (current) + return; + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + current = false; + }, + d(detaching) { + if (detaching) { + detach(main); + } + destroy_each(each_blocks, detaching); + } + }; +} +function instance2($$self, $$props, $$invalidate) { + let side; + let { hierarchy } = $$props; + let { plugin } = $$props; + let { view } = $$props; + let { topLevel = false } = $$props; + const closed = {}; + function fold(item) { + $$invalidate(4, closed[item.title] = !closed[item.title], closed); + } + const click_handler = (entity) => fold(entity); + $$self.$$set = ($$props2) => { + if ("hierarchy" in $$props2) + $$invalidate(0, hierarchy = $$props2.hierarchy); + if ("plugin" in $$props2) + $$invalidate(1, plugin = $$props2.plugin); + if ("view" in $$props2) + $$invalidate(2, view = $$props2.view); + if ("topLevel" in $$props2) + $$invalidate(3, topLevel = $$props2.topLevel); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty & /*view*/ + 4) { + $: + $$invalidate(5, side = view.leaf.getRoot().side == "left" ? "right" : "left"); + } + }; + return [hierarchy, plugin, view, topLevel, closed, side, fold, click_handler]; +} +var LogTreeComponent = class extends SvelteComponent { + constructor(options) { + super(); + init2( + this, + options, + instance2, + create_fragment2, + safe_not_equal, + { + hierarchy: 0, + plugin: 1, + view: 2, + topLevel: 3 + }, + add_css2 + ); + } +}; +var logTreeComponent_default = LogTreeComponent; + +// src/ui/history/components/logComponent.svelte +function get_each_context2(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[9] = list[i]; + return child_ctx; +} +function create_if_block_4(ctx) { + let div; + let t_value = ( + /*log*/ + ctx[0].refs.join(", ") + "" + ); + let t; + return { + c() { + div = element("div"); + t = text(t_value); + attr(div, "class", "git-ref"); + }, + m(target, anchor) { + insert(target, div, anchor); + append2(div, t); + }, + p(ctx2, dirty) { + if (dirty & /*log*/ + 1 && t_value !== (t_value = /*log*/ + ctx2[0].refs.join(", ") + "")) + set_data(t, t_value); + }, + d(detaching) { + if (detaching) { + detach(div); + } + } + }; +} +function create_if_block_3(ctx) { + let div; + let t_value = ( + /*authorToString*/ + ctx[7]( + /*log*/ + ctx[0] + ) + "" + ); + let t; + return { + c() { + div = element("div"); + t = text(t_value); + attr(div, "class", "git-author"); + }, + m(target, anchor) { + insert(target, div, anchor); + append2(div, t); + }, + p(ctx2, dirty) { + if (dirty & /*log*/ + 1 && t_value !== (t_value = /*authorToString*/ + ctx2[7]( + /*log*/ + ctx2[0] + ) + "")) + set_data(t, t_value); + }, + d(detaching) { + if (detaching) { + detach(div); + } + } + }; +} +function create_if_block_2(ctx) { + let div; + let t_value = (0, import_obsidian19.moment)( + /*log*/ + ctx[0].date + ).format( + /*plugin*/ + ctx[3].settings.commitDateFormat + ) + ""; + let t; + return { + c() { + div = element("div"); + t = text(t_value); + attr(div, "class", "git-date"); + }, + m(target, anchor) { + insert(target, div, anchor); + append2(div, t); + }, + p(ctx2, dirty) { + if (dirty & /*log, plugin*/ + 9 && t_value !== (t_value = (0, import_obsidian19.moment)( + /*log*/ + ctx2[0].date + ).format( + /*plugin*/ + ctx2[3].settings.commitDateFormat + ) + "")) + set_data(t, t_value); + }, + d(detaching) { + if (detaching) { + detach(div); + } + } + }; +} +function create_if_block3(ctx) { + let div; + let current_block_type_index; + let if_block; + let div_transition; + let current; + const if_block_creators = [create_if_block_12, create_else_block2]; + const if_blocks = []; + function select_block_type(ctx2, dirty) { + if ( + /*showTree*/ + ctx2[2] + ) + return 0; + return 1; + } + current_block_type_index = select_block_type(ctx, -1); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + return { + c() { + div = element("div"); + if_block.c(); + attr(div, "class", "tree-item-children nav-folder-children"); + }, + m(target, anchor) { + insert(target, div, anchor); + if_blocks[current_block_type_index].m(div, null); + current = true; + }, + p(ctx2, dirty) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } else { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(div, null); + } + }, + i(local) { + if (current) + return; + transition_in(if_block); + if (local) { + add_render_callback(() => { + if (!current) + return; + if (!div_transition) + div_transition = create_bidirectional_transition(div, slide, { duration: 150 }, true); + div_transition.run(1); + }); + } + current = true; + }, + o(local) { + transition_out(if_block); + if (local) { + if (!div_transition) + div_transition = create_bidirectional_transition(div, slide, { duration: 150 }, false); + div_transition.run(0); + } + current = false; + }, + d(detaching) { + if (detaching) { + detach(div); + } + if_blocks[current_block_type_index].d(); + if (detaching && div_transition) + div_transition.end(); + } + }; +} +function create_else_block2(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like( + /*log*/ + ctx[0].diff.files + ); + let each_blocks = []; + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block2(get_each_context2(ctx, each_value, i)); + } + const out = (i) => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx2, dirty) { + if (dirty & /*view, log*/ + 3) { + each_value = ensure_array_like( + /*log*/ + ctx2[0].diff.files + ); + let i; + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context2(ctx2, each_value, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block2(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + group_outros(); + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros(); + } + }, + i(local) { + if (current) + return; + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + destroy_each(each_blocks, detaching); + } + }; +} +function create_if_block_12(ctx) { + let logtreecomponent; + let current; + logtreecomponent = new logTreeComponent_default({ + props: { + hierarchy: ( + /*logsHierarchy*/ + ctx[6] + ), + plugin: ( + /*plugin*/ + ctx[3] + ), + view: ( + /*view*/ + ctx[1] + ), + topLevel: true + } + }); + return { + c() { + create_component(logtreecomponent.$$.fragment); + }, + m(target, anchor) { + mount_component(logtreecomponent, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const logtreecomponent_changes = {}; + if (dirty & /*logsHierarchy*/ + 64) + logtreecomponent_changes.hierarchy = /*logsHierarchy*/ + ctx2[6]; + if (dirty & /*plugin*/ + 8) + logtreecomponent_changes.plugin = /*plugin*/ + ctx2[3]; + if (dirty & /*view*/ + 2) + logtreecomponent_changes.view = /*view*/ + ctx2[1]; + logtreecomponent.$set(logtreecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(logtreecomponent.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(logtreecomponent.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(logtreecomponent, detaching); + } + }; +} +function create_each_block2(ctx) { + let logfilecomponent; + let current; + logfilecomponent = new logFileComponent_default({ + props: { + view: ( + /*view*/ + ctx[1] + ), + diff: ( + /*file*/ + ctx[9] + ) + } + }); + return { + c() { + create_component(logfilecomponent.$$.fragment); + }, + m(target, anchor) { + mount_component(logfilecomponent, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const logfilecomponent_changes = {}; + if (dirty & /*view*/ + 2) + logfilecomponent_changes.view = /*view*/ + ctx2[1]; + if (dirty & /*log*/ + 1) + logfilecomponent_changes.diff = /*file*/ + ctx2[9]; + logfilecomponent.$set(logfilecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(logfilecomponent.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(logfilecomponent.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(logfilecomponent, detaching); + } + }; +} +function create_fragment3(ctx) { + var _a2; + let main; + let div4; + let div3; + let div0; + let t0; + let div2; + let t1; + let t2; + let t3; + let div1; + let t4_value = ( + /*log*/ + ctx[0].message + "" + ); + let t4; + let div3_aria_label_value; + let t5; + let current; + let mounted; + let dispose; + let if_block0 = ( + /*log*/ + ctx[0].refs.length > 0 && create_if_block_4(ctx) + ); + let if_block1 = ( + /*plugin*/ + ctx[3].settings.authorInHistoryView != "hide" && /*log*/ + ((_a2 = ctx[0].author) == null ? void 0 : _a2.name) && create_if_block_3(ctx) + ); + let if_block2 = ( + /*plugin*/ + ctx[3].settings.dateInHistoryView && create_if_block_2(ctx) + ); + let if_block3 = !/*isCollapsed*/ + ctx[4] && create_if_block3(ctx); + return { + c() { + var _a3; + main = element("main"); + div4 = element("div"); + div3 = element("div"); + div0 = element("div"); + div0.innerHTML = ``; + t0 = space(); + div2 = element("div"); + if (if_block0) + if_block0.c(); + t1 = space(); + if (if_block1) + if_block1.c(); + t2 = space(); + if (if_block2) + if_block2.c(); + t3 = space(); + div1 = element("div"); + t4 = text(t4_value); + t5 = space(); + if (if_block3) + if_block3.c(); + attr(div0, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + toggle_class( + div0, + "is-collapsed", + /*isCollapsed*/ + ctx[4] + ); + attr(div1, "class", "tree-item-inner nav-folder-title-content"); + attr(div3, "class", "tree-item-self is-clickable nav-folder-title"); + attr(div3, "aria-label", div3_aria_label_value = `${/*log*/ + ctx[0].refs.length > 0 ? ( + /*log*/ + ctx[0].refs.join(", ") + "\n" + ) : ""}${/*log*/ + (_a3 = ctx[0].author) == null ? void 0 : _a3.name} +${(0, import_obsidian19.moment)( + /*log*/ + ctx[0].date + ).format( + /*plugin*/ + ctx[3].settings.commitDateFormat + )} +${/*log*/ + ctx[0].message}`); + attr( + div3, + "data-tooltip-position", + /*side*/ + ctx[5] + ); + attr(div4, "class", "tree-item nav-folder"); + toggle_class( + div4, + "is-collapsed", + /*isCollapsed*/ + ctx[4] + ); + }, + m(target, anchor) { + insert(target, main, anchor); + append2(main, div4); + append2(div4, div3); + append2(div3, div0); + append2(div3, t0); + append2(div3, div2); + if (if_block0) + if_block0.m(div2, null); + append2(div2, t1); + if (if_block1) + if_block1.m(div2, null); + append2(div2, t2); + if (if_block2) + if_block2.m(div2, null); + append2(div2, t3); + append2(div2, div1); + append2(div1, t4); + append2(div4, t5); + if (if_block3) + if_block3.m(div4, null); + current = true; + if (!mounted) { + dispose = listen( + div3, + "click", + /*click_handler*/ + ctx[8] + ); + mounted = true; + } + }, + p(ctx2, [dirty]) { + var _a3, _b; + if (!current || dirty & /*isCollapsed*/ + 16) { + toggle_class( + div0, + "is-collapsed", + /*isCollapsed*/ + ctx2[4] + ); + } + if ( + /*log*/ + ctx2[0].refs.length > 0 + ) { + if (if_block0) { + if_block0.p(ctx2, dirty); + } else { + if_block0 = create_if_block_4(ctx2); + if_block0.c(); + if_block0.m(div2, t1); + } + } else if (if_block0) { + if_block0.d(1); + if_block0 = null; + } + if ( + /*plugin*/ + ctx2[3].settings.authorInHistoryView != "hide" && /*log*/ + ((_a3 = ctx2[0].author) == null ? void 0 : _a3.name) + ) { + if (if_block1) { + if_block1.p(ctx2, dirty); + } else { + if_block1 = create_if_block_3(ctx2); + if_block1.c(); + if_block1.m(div2, t2); + } + } else if (if_block1) { + if_block1.d(1); + if_block1 = null; + } + if ( + /*plugin*/ + ctx2[3].settings.dateInHistoryView + ) { + if (if_block2) { + if_block2.p(ctx2, dirty); + } else { + if_block2 = create_if_block_2(ctx2); + if_block2.c(); + if_block2.m(div2, t3); + } + } else if (if_block2) { + if_block2.d(1); + if_block2 = null; + } + if ((!current || dirty & /*log*/ + 1) && t4_value !== (t4_value = /*log*/ + ctx2[0].message + "")) + set_data(t4, t4_value); + if (!current || dirty & /*log, plugin*/ + 9 && div3_aria_label_value !== (div3_aria_label_value = `${/*log*/ + ctx2[0].refs.length > 0 ? ( + /*log*/ + ctx2[0].refs.join(", ") + "\n" + ) : ""}${/*log*/ + (_b = ctx2[0].author) == null ? void 0 : _b.name} +${(0, import_obsidian19.moment)( + /*log*/ + ctx2[0].date + ).format( + /*plugin*/ + ctx2[3].settings.commitDateFormat + )} +${/*log*/ + ctx2[0].message}`)) { + attr(div3, "aria-label", div3_aria_label_value); + } + if (!current || dirty & /*side*/ + 32) { + attr( + div3, + "data-tooltip-position", + /*side*/ + ctx2[5] + ); + } + if (!/*isCollapsed*/ + ctx2[4]) { + if (if_block3) { + if_block3.p(ctx2, dirty); + if (dirty & /*isCollapsed*/ + 16) { + transition_in(if_block3, 1); + } + } else { + if_block3 = create_if_block3(ctx2); + if_block3.c(); + transition_in(if_block3, 1); + if_block3.m(div4, null); + } + } else if (if_block3) { + group_outros(); + transition_out(if_block3, 1, 1, () => { + if_block3 = null; + }); + check_outros(); + } + if (!current || dirty & /*isCollapsed*/ + 16) { + toggle_class( + div4, + "is-collapsed", + /*isCollapsed*/ + ctx2[4] + ); + } + }, + i(local) { + if (current) + return; + transition_in(if_block3); + current = true; + }, + o(local) { + transition_out(if_block3); + current = false; + }, + d(detaching) { + if (detaching) { + detach(main); + } + if (if_block0) + if_block0.d(); + if (if_block1) + if_block1.d(); + if (if_block2) + if_block2.d(); + if (if_block3) + if_block3.d(); + mounted = false; + dispose(); + } + }; +} +function instance3($$self, $$props, $$invalidate) { + let logsHierarchy; + let side; + let { log: log2 } = $$props; + let { view } = $$props; + let { showTree } = $$props; + let { plugin } = $$props; + let isCollapsed = true; + function authorToString(log3) { + const name = log3.author.name; + if (plugin.settings.authorInHistoryView == "full") { + return name; + } else if (plugin.settings.authorInHistoryView == "initials") { + const words = name.split(" ").filter((word) => word.length > 0); + return words.map((word) => word[0].toUpperCase()).join(""); + } + } + const click_handler = () => $$invalidate(4, isCollapsed = !isCollapsed); + $$self.$$set = ($$props2) => { + if ("log" in $$props2) + $$invalidate(0, log2 = $$props2.log); + if ("view" in $$props2) + $$invalidate(1, view = $$props2.view); + if ("showTree" in $$props2) + $$invalidate(2, showTree = $$props2.showTree); + if ("plugin" in $$props2) + $$invalidate(3, plugin = $$props2.plugin); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty & /*plugin, log*/ + 9) { + $: + $$invalidate(6, logsHierarchy = { + title: "", + path: "", + vaultPath: "", + children: plugin.gitManager.getTreeStructure(log2.diff.files) + }); + } + if ($$self.$$.dirty & /*view*/ + 2) { + $: + $$invalidate(5, side = view.leaf.getRoot().side == "left" ? "right" : "left"); + } + }; + return [ + log2, + view, + showTree, + plugin, + isCollapsed, + side, + logsHierarchy, + authorToString, + click_handler + ]; +} +var LogComponent = class extends SvelteComponent { + constructor(options) { + super(); + init2(this, options, instance3, create_fragment3, safe_not_equal, { log: 0, view: 1, showTree: 2, plugin: 3 }); + } +}; +var logComponent_default = LogComponent; + +// src/ui/history/historyView.svelte +function get_each_context3(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[11] = list[i]; + return child_ctx; +} +function create_if_block4(ctx) { + let div1; + let div0; + let current; + let each_value = ensure_array_like( + /*logs*/ + ctx[6] + ); + let each_blocks = []; + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block3(get_each_context3(ctx, each_value, i)); + } + const out = (i) => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + return { + c() { + div1 = element("div"); + div0 = element("div"); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + attr(div0, "class", "tree-item-children nav-folder-children"); + attr(div1, "class", "tree-item nav-folder mod-root"); + }, + m(target, anchor) { + insert(target, div1, anchor); + append2(div1, div0); + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(div0, null); + } + } + current = true; + }, + p(ctx2, dirty) { + if (dirty & /*view, showTree, logs, plugin*/ + 71) { + each_value = ensure_array_like( + /*logs*/ + ctx2[6] + ); + let i; + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context3(ctx2, each_value, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block3(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(div0, null); + } + } + group_outros(); + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros(); + } + }, + i(local) { + if (current) + return; + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + current = false; + }, + d(detaching) { + if (detaching) { + detach(div1); + } + destroy_each(each_blocks, detaching); + } + }; +} +function create_each_block3(ctx) { + let logcomponent; + let current; + logcomponent = new logComponent_default({ + props: { + view: ( + /*view*/ + ctx[1] + ), + showTree: ( + /*showTree*/ + ctx[2] + ), + log: ( + /*log*/ + ctx[11] + ), + plugin: ( + /*plugin*/ + ctx[0] + ) + } + }); + return { + c() { + create_component(logcomponent.$$.fragment); + }, + m(target, anchor) { + mount_component(logcomponent, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const logcomponent_changes = {}; + if (dirty & /*view*/ + 2) + logcomponent_changes.view = /*view*/ + ctx2[1]; + if (dirty & /*showTree*/ + 4) + logcomponent_changes.showTree = /*showTree*/ + ctx2[2]; + if (dirty & /*logs*/ + 64) + logcomponent_changes.log = /*log*/ + ctx2[11]; + if (dirty & /*plugin*/ + 1) + logcomponent_changes.plugin = /*plugin*/ + ctx2[0]; + logcomponent.$set(logcomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(logcomponent.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(logcomponent.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(logcomponent, detaching); + } + }; +} +function create_fragment4(ctx) { + let main; + let div3; + let div2; + let div0; + let t0; + let div1; + let t1; + let div4; + let current; + let mounted; + let dispose; + let if_block = ( + /*logs*/ + ctx[6] && create_if_block4(ctx) + ); + return { + c() { + main = element("main"); + div3 = element("div"); + div2 = element("div"); + div0 = element("div"); + t0 = space(); + div1 = element("div"); + t1 = space(); + div4 = element("div"); + if (if_block) + if_block.c(); + attr(div0, "id", "layoutChange"); + attr(div0, "class", "clickable-icon nav-action-button"); + attr(div0, "aria-label", "Change Layout"); + attr(div1, "id", "refresh"); + attr(div1, "class", "clickable-icon nav-action-button"); + attr(div1, "data-icon", "refresh-cw"); + attr(div1, "aria-label", "Refresh"); + set_style(div1, "margin", "1px"); + toggle_class( + div1, + "loading", + /*loading*/ + ctx[4] + ); + attr(div2, "class", "nav-buttons-container"); + attr(div3, "class", "nav-header"); + attr(div4, "class", "nav-files-container"); + set_style(div4, "position", "relative"); + }, + m(target, anchor) { + insert(target, main, anchor); + append2(main, div3); + append2(div3, div2); + append2(div2, div0); + ctx[7](div0); + append2(div2, t0); + append2(div2, div1); + ctx[9](div1); + append2(main, t1); + append2(main, div4); + if (if_block) + if_block.m(div4, null); + current = true; + if (!mounted) { + dispose = [ + listen( + div0, + "click", + /*click_handler*/ + ctx[8] + ), + listen(div1, "click", triggerRefresh) + ]; + mounted = true; + } + }, + p(ctx2, [dirty]) { + if (!current || dirty & /*loading*/ + 16) { + toggle_class( + div1, + "loading", + /*loading*/ + ctx2[4] + ); + } + if ( + /*logs*/ + ctx2[6] + ) { + if (if_block) { + if_block.p(ctx2, dirty); + if (dirty & /*logs*/ + 64) { + transition_in(if_block, 1); + } + } else { + if_block = create_if_block4(ctx2); + if_block.c(); + transition_in(if_block, 1); + if_block.m(div4, null); + } + } else if (if_block) { + group_outros(); + transition_out(if_block, 1, 1, () => { + if_block = null; + }); + check_outros(); + } + }, + i(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(main); + } + ctx[7](null); + ctx[9](null); + if (if_block) + if_block.d(); + mounted = false; + run_all(dispose); + } + }; +} +function triggerRefresh() { + dispatchEvent(new CustomEvent("git-refresh")); +} +function instance4($$self, $$props, $$invalidate) { + let { plugin } = $$props; + let { view } = $$props; + let loading; + let buttons = []; + let logs; + let showTree = plugin.settings.treeStructure; + let layoutBtn; + addEventListener("git-view-refresh", refresh); + plugin.app.workspace.onLayoutReady(() => { + window.setTimeout( + () => { + buttons.forEach((btn) => (0, import_obsidian20.setIcon)(btn, btn.getAttr("data-icon"))); + (0, import_obsidian20.setIcon)(layoutBtn, showTree ? "list" : "folder"); + }, + 0 + ); + }); + onDestroy(() => { + removeEventListener("git-view-refresh", refresh); + }); + function refresh() { + return __awaiter(this, void 0, void 0, function* () { + $$invalidate(4, loading = true); + const isSimpleGit = plugin.gitManager instanceof SimpleGit; + $$invalidate(6, logs = yield plugin.gitManager.log(void 0, false, isSimpleGit ? 50 : 10)); + $$invalidate(4, loading = false); + }); + } + function div0_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + layoutBtn = $$value; + $$invalidate(3, layoutBtn); + }); + } + const click_handler = () => { + $$invalidate(2, showTree = !showTree); + $$invalidate(0, plugin.settings.treeStructure = showTree, plugin); + plugin.saveSettings(); + }; + function div1_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[6] = $$value; + $$invalidate(5, buttons); + }); + } + $$self.$$set = ($$props2) => { + if ("plugin" in $$props2) + $$invalidate(0, plugin = $$props2.plugin); + if ("view" in $$props2) + $$invalidate(1, view = $$props2.view); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty & /*layoutBtn, showTree*/ + 12) { + $: { + if (layoutBtn) { + layoutBtn.empty(); + (0, import_obsidian20.setIcon)(layoutBtn, showTree ? "list" : "folder"); + } + } + } + }; + return [ + plugin, + view, + showTree, + layoutBtn, + loading, + buttons, + logs, + div0_binding, + click_handler, + div1_binding + ]; +} +var HistoryView = class extends SvelteComponent { + constructor(options) { + super(); + init2(this, options, instance4, create_fragment4, safe_not_equal, { plugin: 0, view: 1 }); + } +}; +var historyView_default = HistoryView; + +// src/ui/history/historyView.ts +var HistoryView2 = class extends import_obsidian21.ItemView { + constructor(leaf, plugin) { + super(leaf); + this.plugin = plugin; + this.hoverPopover = null; + } + getViewType() { + return HISTORY_VIEW_CONFIG.type; + } + getDisplayText() { + return HISTORY_VIEW_CONFIG.name; + } + getIcon() { + return HISTORY_VIEW_CONFIG.icon; + } + onClose() { + return super.onClose(); + } + onOpen() { + this._view = new historyView_default({ + target: this.contentEl, + props: { + plugin: this.plugin, + view: this + } + }); + return super.onOpen(); + } +}; + +// src/ui/modals/branchModal.ts +init_polyfill_buffer(); +var import_obsidian22 = require("obsidian"); +var BranchModal = class extends import_obsidian22.FuzzySuggestModal { + constructor(branches) { + super(app); + this.branches = branches; + this.setPlaceholder("Select branch to checkout"); + } + getItems() { + return this.branches; + } + getItemText(item) { + return item; + } + onChooseItem(item, evt) { + this.resolve(item); + } + open() { + super.open(); + return new Promise((resolve) => { + this.resolve = resolve; + }); + } + async onClose() { + await new Promise((resolve) => setTimeout(resolve, 10)); + if (this.resolve) + this.resolve(void 0); + } +}; + +// src/ui/modals/ignoreModal.ts +init_polyfill_buffer(); +var import_obsidian23 = require("obsidian"); +var IgnoreModal = class extends import_obsidian23.Modal { + constructor(app2, content) { + super(app2); + this.content = content; + this.resolve = null; + } + open() { + super.open(); + return new Promise((resolve) => { + this.resolve = resolve; + }); + } + onOpen() { + const { contentEl, titleEl } = this; + titleEl.setText("Edit .gitignore"); + const div = contentEl.createDiv(); + const text2 = div.createEl("textarea", { + text: this.content, + cls: ["obsidian-git-textarea"], + attr: { rows: 10, cols: 30, wrap: "off" } + }); + div.createEl("button", { + cls: ["mod-cta", "obsidian-git-center-button"], + text: "Save" + }).addEventListener("click", async () => { + this.resolve(text2.value); + this.close(); + }); + } + onClose() { + const { contentEl } = this; + this.resolve(void 0); + contentEl.empty(); + } +}; + +// src/ui/sourceControl/sourceControl.ts +init_polyfill_buffer(); +var import_obsidian30 = require("obsidian"); + +// src/ui/sourceControl/sourceControl.svelte +init_polyfill_buffer(); +var import_obsidian29 = require("obsidian"); + +// src/ui/modals/discardModal.ts +init_polyfill_buffer(); +var import_obsidian24 = require("obsidian"); +var DiscardModal = class extends import_obsidian24.Modal { + constructor(app2, deletion, filename) { + super(app2); + this.deletion = deletion; + this.filename = filename; + this.resolve = null; + } + myOpen() { + this.open(); + return new Promise((resolve) => { + this.resolve = resolve; + }); + } + onOpen() { + const { contentEl, titleEl } = this; + titleEl.setText(`${this.deletion ? "Delete" : "Discard"} this file?`); + contentEl.createEl("p").setText( + `Do you really want to ${this.deletion ? "delete" : "discard the changes of"} "${this.filename}"` + ); + const div = contentEl.createDiv({ cls: "modal-button-container" }); + const discard = div.createEl("button", { + cls: "mod-warning", + text: this.deletion ? "Delete" : "Discard" + }); + discard.addEventListener("click", async () => { + if (this.resolve) + this.resolve(true); + this.close(); + }); + discard.addEventListener("keypress", async () => { + if (this.resolve) + this.resolve(true); + this.close(); + }); + const close = div.createEl("button", { + text: "Cancel" + }); + close.addEventListener("click", () => { + if (this.resolve) + this.resolve(false); + return this.close(); + }); + close.addEventListener("keypress", () => { + if (this.resolve) + this.resolve(false); + return this.close(); + }); + } + onClose() { + const { contentEl } = this; + contentEl.empty(); + } +}; + +// src/ui/sourceControl/components/fileComponent.svelte +init_polyfill_buffer(); +var import_obsidian26 = require("obsidian"); + +// node_modules/.pnpm/github.com+Vinzent03+obsidian-community-lib@e663de4f95c879b40613090da78ea599ff621d24_@codemir_xyncsguozhhawq25qkwtwp76my/node_modules/obsidian-community-lib/dist/index.js +init_polyfill_buffer(); + +// node_modules/.pnpm/github.com+Vinzent03+obsidian-community-lib@e663de4f95c879b40613090da78ea599ff621d24_@codemir_xyncsguozhhawq25qkwtwp76my/node_modules/obsidian-community-lib/dist/utils.js +init_polyfill_buffer(); +var feather = __toESM(require_feather()); +var import_obsidian25 = require("obsidian"); +function hoverPreview(event, view, to) { + const targetEl = event.target; + app.workspace.trigger("hover-link", { + event, + source: view.getViewType(), + hoverParent: view, + targetEl, + linktext: to + }); +} + +// src/ui/sourceControl/components/fileComponent.svelte +function add_css3(target) { + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); +} +function create_if_block5(ctx) { + let div; + let mounted; + let dispose; + return { + c() { + div = element("div"); + attr(div, "data-icon", "go-to-file"); + attr(div, "aria-label", "Open File"); + attr(div, "class", "clickable-icon"); + }, + m(target, anchor) { + insert(target, div, anchor); + ctx[11](div); + if (!mounted) { + dispose = [ + listen(div, "auxclick", stop_propagation( + /*open*/ + ctx[5] + )), + listen(div, "click", stop_propagation( + /*open*/ + ctx[5] + )) + ]; + mounted = true; + } + }, + p: noop, + d(detaching) { + if (detaching) { + detach(div); + } + ctx[11](null); + mounted = false; + run_all(dispose); + } + }; +} +function create_fragment5(ctx) { + let main; + let div6; + let div0; + let t0_value = getDisplayPath( + /*change*/ + ctx[0].vault_path + ) + ""; + let t0; + let t1; + let div5; + let div3; + let show_if = ( + /*view*/ + ctx[1].app.vault.getAbstractFileByPath( + /*change*/ + ctx[0].vault_path + ) + ); + let t2; + let div1; + let t3; + let div2; + let t4; + let div4; + let t5_value = ( + /*change*/ + ctx[0].working_dir + "" + ); + let t5; + let div4_data_type_value; + let div6_data_path_value; + let div6_aria_label_value; + let mounted; + let dispose; + let if_block = show_if && create_if_block5(ctx); + return { + c() { + var _a2, _b, _c; + main = element("main"); + div6 = element("div"); + div0 = element("div"); + t0 = text(t0_value); + t1 = space(); + div5 = element("div"); + div3 = element("div"); + if (if_block) + if_block.c(); + t2 = space(); + div1 = element("div"); + t3 = space(); + div2 = element("div"); + t4 = space(); + div4 = element("div"); + t5 = text(t5_value); + attr(div0, "class", "tree-item-inner nav-file-title-content"); + attr(div1, "data-icon", "undo"); + attr(div1, "aria-label", "Discard"); + attr(div1, "class", "clickable-icon"); + attr(div2, "data-icon", "plus"); + attr(div2, "aria-label", "Stage"); + attr(div2, "class", "clickable-icon"); + attr(div3, "class", "buttons"); + attr(div4, "class", "type"); + attr(div4, "data-type", div4_data_type_value = /*change*/ + ctx[0].working_dir); + attr(div5, "class", "git-tools"); + attr(div6, "class", "tree-item-self is-clickable nav-file-title svelte-1wbh8tp"); + attr(div6, "data-path", div6_data_path_value = /*change*/ + ctx[0].vault_path); + attr( + div6, + "data-tooltip-position", + /*side*/ + ctx[3] + ); + attr(div6, "aria-label", div6_aria_label_value = /*change*/ + ctx[0].vault_path); + toggle_class( + div6, + "is-active", + /*view*/ + ((_a2 = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*change*/ + ctx[0].vault_path && !/*view*/ + ((_b = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) && !/*view*/ + ((_c = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _c.staged) + ); + attr(main, "class", "tree-item nav-file svelte-1wbh8tp"); + }, + m(target, anchor) { + insert(target, main, anchor); + append2(main, div6); + append2(div6, div0); + append2(div0, t0); + append2(div6, t1); + append2(div6, div5); + append2(div5, div3); + if (if_block) + if_block.m(div3, null); + append2(div3, t2); + append2(div3, div1); + ctx[12](div1); + append2(div3, t3); + append2(div3, div2); + ctx[13](div2); + append2(div5, t4); + append2(div5, div4); + append2(div4, t5); + if (!mounted) { + dispose = [ + listen(div1, "click", stop_propagation( + /*discard*/ + ctx[8] + )), + listen(div2, "click", stop_propagation( + /*stage*/ + ctx[6] + )), + listen( + main, + "mouseover", + /*hover*/ + ctx[4] + ), + listen(main, "click", stop_propagation( + /*showDiff*/ + ctx[7] + )), + listen(main, "auxclick", stop_propagation( + /*showDiff*/ + ctx[7] + )), + listen( + main, + "focus", + /*focus_handler*/ + ctx[10] + ) + ]; + mounted = true; + } + }, + p(ctx2, [dirty]) { + var _a2, _b, _c; + if (dirty & /*change*/ + 1 && t0_value !== (t0_value = getDisplayPath( + /*change*/ + ctx2[0].vault_path + ) + "")) + set_data(t0, t0_value); + if (dirty & /*view, change*/ + 3) + show_if = /*view*/ + ctx2[1].app.vault.getAbstractFileByPath( + /*change*/ + ctx2[0].vault_path + ); + if (show_if) { + if (if_block) { + if_block.p(ctx2, dirty); + } else { + if_block = create_if_block5(ctx2); + if_block.c(); + if_block.m(div3, t2); + } + } else if (if_block) { + if_block.d(1); + if_block = null; + } + if (dirty & /*change*/ + 1 && t5_value !== (t5_value = /*change*/ + ctx2[0].working_dir + "")) + set_data(t5, t5_value); + if (dirty & /*change*/ + 1 && div4_data_type_value !== (div4_data_type_value = /*change*/ + ctx2[0].working_dir)) { + attr(div4, "data-type", div4_data_type_value); + } + if (dirty & /*change*/ + 1 && div6_data_path_value !== (div6_data_path_value = /*change*/ + ctx2[0].vault_path)) { + attr(div6, "data-path", div6_data_path_value); + } + if (dirty & /*side*/ + 8) { + attr( + div6, + "data-tooltip-position", + /*side*/ + ctx2[3] + ); + } + if (dirty & /*change*/ + 1 && div6_aria_label_value !== (div6_aria_label_value = /*change*/ + ctx2[0].vault_path)) { + attr(div6, "aria-label", div6_aria_label_value); + } + if (dirty & /*view, change*/ + 3) { + toggle_class( + div6, + "is-active", + /*view*/ + ((_a2 = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*change*/ + ctx2[0].vault_path && !/*view*/ + ((_b = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) && !/*view*/ + ((_c = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _c.staged) + ); + } + }, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(main); + } + if (if_block) + if_block.d(); + ctx[12](null); + ctx[13](null); + mounted = false; + run_all(dispose); + } + }; +} +function instance5($$self, $$props, $$invalidate) { + let side; + let { change } = $$props; + let { view } = $$props; + let { manager } = $$props; + let buttons = []; + window.setTimeout(() => buttons.forEach((b) => (0, import_obsidian26.setIcon)(b, b.getAttr("data-icon"))), 0); + function hover(event) { + if (app.vault.getAbstractFileByPath(change.vault_path)) { + hoverPreview(event, view, change.vault_path); + } + } + function open(event) { + var _a2; + const file = view.app.vault.getAbstractFileByPath(change.vault_path); + console.log(event); + if (file instanceof import_obsidian26.TFile) { + (_a2 = getNewLeaf(event)) === null || _a2 === void 0 ? void 0 : _a2.openFile(file); + } + } + function stage() { + manager.stage(change.path, false).finally(() => { + dispatchEvent(new CustomEvent("git-refresh")); + }); + } + function showDiff(event) { + var _a2; + (_a2 = getNewLeaf(event)) === null || _a2 === void 0 ? void 0 : _a2.setViewState({ + type: DIFF_VIEW_CONFIG.type, + active: true, + state: { file: change.path, staged: false } + }); + } + function discard() { + const deleteFile = change.working_dir == "U"; + new DiscardModal(view.app, deleteFile, change.vault_path).myOpen().then((shouldDiscard) => { + if (shouldDiscard === true) { + if (deleteFile) { + view.app.vault.adapter.remove(change.vault_path).finally(() => { + dispatchEvent(new CustomEvent("git-refresh")); + }); + } else { + manager.discard(change.path).finally(() => { + dispatchEvent(new CustomEvent("git-refresh")); + }); + } + } + }); + } + function focus_handler(event) { + bubble.call(this, $$self, event); + } + function div_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[1] = $$value; + $$invalidate(2, buttons); + }); + } + function div1_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[0] = $$value; + $$invalidate(2, buttons); + }); + } + function div2_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[2] = $$value; + $$invalidate(2, buttons); + }); + } + $$self.$$set = ($$props2) => { + if ("change" in $$props2) + $$invalidate(0, change = $$props2.change); + if ("view" in $$props2) + $$invalidate(1, view = $$props2.view); + if ("manager" in $$props2) + $$invalidate(9, manager = $$props2.manager); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty & /*view*/ + 2) { + $: + $$invalidate(3, side = view.leaf.getRoot().side == "left" ? "right" : "left"); + } + }; + return [ + change, + view, + buttons, + side, + hover, + open, + stage, + showDiff, + discard, + manager, + focus_handler, + div_binding, + div1_binding, + div2_binding + ]; +} +var FileComponent = class extends SvelteComponent { + constructor(options) { + super(); + init2(this, options, instance5, create_fragment5, safe_not_equal, { change: 0, view: 1, manager: 9 }, add_css3); + } +}; +var fileComponent_default = FileComponent; + +// src/ui/sourceControl/components/pulledFileComponent.svelte +init_polyfill_buffer(); +var import_obsidian27 = require("obsidian"); +function add_css4(target) { + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); +} +function create_fragment6(ctx) { + let main; + let div2; + let div0; + let t0_value = getDisplayPath( + /*change*/ + ctx[0].vault_path + ) + ""; + let t0; + let t1; + let div1; + let span; + let t2_value = ( + /*change*/ + ctx[0].working_dir + "" + ); + let t2; + let span_data_type_value; + let div2_data_path_value; + let div2_aria_label_value; + let mounted; + let dispose; + return { + c() { + main = element("main"); + div2 = element("div"); + div0 = element("div"); + t0 = text(t0_value); + t1 = space(); + div1 = element("div"); + span = element("span"); + t2 = text(t2_value); + attr(div0, "class", "tree-item-inner nav-file-title-content"); + attr(span, "class", "type"); + attr(span, "data-type", span_data_type_value = /*change*/ + ctx[0].working_dir); + attr(div1, "class", "git-tools"); + attr(div2, "class", "tree-item-self is-clickable nav-file-title svelte-1wbh8tp"); + attr(div2, "data-path", div2_data_path_value = /*change*/ + ctx[0].vault_path); + attr( + div2, + "data-tooltip-position", + /*side*/ + ctx[1] + ); + attr(div2, "aria-label", div2_aria_label_value = /*change*/ + ctx[0].vault_path); + attr(main, "class", "tree-item nav-file svelte-1wbh8tp"); + }, + m(target, anchor) { + insert(target, main, anchor); + append2(main, div2); + append2(div2, div0); + append2(div0, t0); + append2(div2, t1); + append2(div2, div1); + append2(div1, span); + append2(span, t2); + if (!mounted) { + dispose = [ + listen( + main, + "mouseover", + /*hover*/ + ctx[2] + ), + listen(main, "click", stop_propagation( + /*open*/ + ctx[3] + )), + listen(main, "auxclick", stop_propagation( + /*open*/ + ctx[3] + )), + listen( + main, + "focus", + /*focus_handler*/ + ctx[5] + ) + ]; + mounted = true; + } + }, + p(ctx2, [dirty]) { + if (dirty & /*change*/ + 1 && t0_value !== (t0_value = getDisplayPath( + /*change*/ + ctx2[0].vault_path + ) + "")) + set_data(t0, t0_value); + if (dirty & /*change*/ + 1 && t2_value !== (t2_value = /*change*/ + ctx2[0].working_dir + "")) + set_data(t2, t2_value); + if (dirty & /*change*/ + 1 && span_data_type_value !== (span_data_type_value = /*change*/ + ctx2[0].working_dir)) { + attr(span, "data-type", span_data_type_value); + } + if (dirty & /*change*/ + 1 && div2_data_path_value !== (div2_data_path_value = /*change*/ + ctx2[0].vault_path)) { + attr(div2, "data-path", div2_data_path_value); + } + if (dirty & /*side*/ + 2) { + attr( + div2, + "data-tooltip-position", + /*side*/ + ctx2[1] + ); + } + if (dirty & /*change*/ + 1 && div2_aria_label_value !== (div2_aria_label_value = /*change*/ + ctx2[0].vault_path)) { + attr(div2, "aria-label", div2_aria_label_value); + } + }, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(main); + } + mounted = false; + run_all(dispose); + } + }; +} +function instance6($$self, $$props, $$invalidate) { + let side; + let { change } = $$props; + let { view } = $$props; + function hover(event) { + if (app.vault.getAbstractFileByPath(change.vault_path)) { + hoverPreview(event, view, change.vault_path); + } + } + function open(event) { + var _a2; + const file = view.app.vault.getAbstractFileByPath(change.vault_path); + if (file instanceof import_obsidian27.TFile) { + (_a2 = getNewLeaf(event)) === null || _a2 === void 0 ? void 0 : _a2.openFile(file); + } + } + function focus_handler(event) { + bubble.call(this, $$self, event); + } + $$self.$$set = ($$props2) => { + if ("change" in $$props2) + $$invalidate(0, change = $$props2.change); + if ("view" in $$props2) + $$invalidate(4, view = $$props2.view); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty & /*view*/ + 16) { + $: + $$invalidate(1, side = view.leaf.getRoot().side == "left" ? "right" : "left"); + } + }; + return [change, side, hover, open, view, focus_handler]; +} +var PulledFileComponent = class extends SvelteComponent { + constructor(options) { + super(); + init2(this, options, instance6, create_fragment6, safe_not_equal, { change: 0, view: 4 }, add_css4); + } +}; +var pulledFileComponent_default = PulledFileComponent; + +// src/ui/sourceControl/components/stagedFileComponent.svelte +init_polyfill_buffer(); +var import_obsidian28 = require("obsidian"); +function add_css5(target) { + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); +} +function create_if_block6(ctx) { + let div; + let mounted; + let dispose; + return { + c() { + div = element("div"); + attr(div, "data-icon", "go-to-file"); + attr(div, "aria-label", "Open File"); + attr(div, "class", "clickable-icon"); + }, + m(target, anchor) { + insert(target, div, anchor); + ctx[10](div); + if (!mounted) { + dispose = listen(div, "click", stop_propagation( + /*open*/ + ctx[5] + )); + mounted = true; + } + }, + p: noop, + d(detaching) { + if (detaching) { + detach(div); + } + ctx[10](null); + mounted = false; + dispose(); + } + }; +} +function create_fragment7(ctx) { + let main; + let div5; + let div0; + let t0_value = getDisplayPath( + /*change*/ + ctx[0].vault_path + ) + ""; + let t0; + let t1; + let div4; + let div2; + let show_if = ( + /*view*/ + ctx[1].app.vault.getAbstractFileByPath( + /*change*/ + ctx[0].vault_path + ) + ); + let t2; + let div1; + let t3; + let div3; + let t4_value = ( + /*change*/ + ctx[0].index + "" + ); + let t4; + let div3_data_type_value; + let div5_data_path_value; + let div5_aria_label_value; + let mounted; + let dispose; + let if_block = show_if && create_if_block6(ctx); + return { + c() { + var _a2, _b, _c; + main = element("main"); + div5 = element("div"); + div0 = element("div"); + t0 = text(t0_value); + t1 = space(); + div4 = element("div"); + div2 = element("div"); + if (if_block) + if_block.c(); + t2 = space(); + div1 = element("div"); + t3 = space(); + div3 = element("div"); + t4 = text(t4_value); + attr(div0, "class", "tree-item-inner nav-file-title-content"); + attr(div1, "data-icon", "minus"); + attr(div1, "aria-label", "Unstage"); + attr(div1, "class", "clickable-icon"); + attr(div2, "class", "buttons"); + attr(div3, "class", "type"); + attr(div3, "data-type", div3_data_type_value = /*change*/ + ctx[0].index); + attr(div4, "class", "git-tools"); + attr(div5, "class", "tree-item-self is-clickable nav-file-title svelte-1wbh8tp"); + attr(div5, "data-path", div5_data_path_value = /*change*/ + ctx[0].vault_path); + attr( + div5, + "data-tooltip-position", + /*side*/ + ctx[3] + ); + attr(div5, "aria-label", div5_aria_label_value = /*change*/ + ctx[0].vault_path); + toggle_class( + div5, + "is-active", + /*view*/ + ((_a2 = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*change*/ + ctx[0].vault_path && !/*view*/ + ((_b = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) && /*view*/ + ((_c = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _c.staged) + ); + attr(main, "class", "tree-item nav-file svelte-1wbh8tp"); + }, + m(target, anchor) { + insert(target, main, anchor); + append2(main, div5); + append2(div5, div0); + append2(div0, t0); + append2(div5, t1); + append2(div5, div4); + append2(div4, div2); + if (if_block) + if_block.m(div2, null); + append2(div2, t2); + append2(div2, div1); + ctx[11](div1); + append2(div4, t3); + append2(div4, div3); + append2(div3, t4); + if (!mounted) { + dispose = [ + listen(div1, "click", stop_propagation( + /*unstage*/ + ctx[7] + )), + listen( + main, + "mouseover", + /*hover*/ + ctx[4] + ), + listen( + main, + "focus", + /*focus_handler*/ + ctx[9] + ), + listen(main, "click", stop_propagation( + /*showDiff*/ + ctx[6] + )), + listen(main, "auxclick", stop_propagation( + /*showDiff*/ + ctx[6] + )) + ]; + mounted = true; + } + }, + p(ctx2, [dirty]) { + var _a2, _b, _c; + if (dirty & /*change*/ + 1 && t0_value !== (t0_value = getDisplayPath( + /*change*/ + ctx2[0].vault_path + ) + "")) + set_data(t0, t0_value); + if (dirty & /*view, change*/ + 3) + show_if = /*view*/ + ctx2[1].app.vault.getAbstractFileByPath( + /*change*/ + ctx2[0].vault_path + ); + if (show_if) { + if (if_block) { + if_block.p(ctx2, dirty); + } else { + if_block = create_if_block6(ctx2); + if_block.c(); + if_block.m(div2, t2); + } + } else if (if_block) { + if_block.d(1); + if_block = null; + } + if (dirty & /*change*/ + 1 && t4_value !== (t4_value = /*change*/ + ctx2[0].index + "")) + set_data(t4, t4_value); + if (dirty & /*change*/ + 1 && div3_data_type_value !== (div3_data_type_value = /*change*/ + ctx2[0].index)) { + attr(div3, "data-type", div3_data_type_value); + } + if (dirty & /*change*/ + 1 && div5_data_path_value !== (div5_data_path_value = /*change*/ + ctx2[0].vault_path)) { + attr(div5, "data-path", div5_data_path_value); + } + if (dirty & /*side*/ + 8) { + attr( + div5, + "data-tooltip-position", + /*side*/ + ctx2[3] + ); + } + if (dirty & /*change*/ + 1 && div5_aria_label_value !== (div5_aria_label_value = /*change*/ + ctx2[0].vault_path)) { + attr(div5, "aria-label", div5_aria_label_value); + } + if (dirty & /*view, change*/ + 3) { + toggle_class( + div5, + "is-active", + /*view*/ + ((_a2 = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*change*/ + ctx2[0].vault_path && !/*view*/ + ((_b = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) && /*view*/ + ((_c = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _c.staged) + ); + } + }, + i: noop, + o: noop, + d(detaching) { + if (detaching) { + detach(main); + } + if (if_block) + if_block.d(); + ctx[11](null); + mounted = false; + run_all(dispose); + } + }; +} +function instance7($$self, $$props, $$invalidate) { + let side; + let { change } = $$props; + let { view } = $$props; + let { manager } = $$props; + let buttons = []; + window.setTimeout(() => buttons.forEach((b) => (0, import_obsidian28.setIcon)(b, b.getAttr("data-icon"))), 0); + function hover(event) { + if (app.vault.getAbstractFileByPath(change.vault_path)) { + hoverPreview(event, view, change.vault_path); + } + } + function open(event) { + var _a2; + const file = view.app.vault.getAbstractFileByPath(change.vault_path); + if (file instanceof import_obsidian28.TFile) { + (_a2 = getNewLeaf(event)) === null || _a2 === void 0 ? void 0 : _a2.openFile(file); + } + } + function showDiff(event) { + var _a2; + (_a2 = getNewLeaf(event)) === null || _a2 === void 0 ? void 0 : _a2.setViewState({ + type: DIFF_VIEW_CONFIG.type, + active: true, + state: { file: change.path, staged: true } + }); + } + function unstage() { + manager.unstage(change.path, false).finally(() => { + dispatchEvent(new CustomEvent("git-refresh")); + }); + } + function focus_handler(event) { + bubble.call(this, $$self, event); + } + function div_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[1] = $$value; + $$invalidate(2, buttons); + }); + } + function div1_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[0] = $$value; + $$invalidate(2, buttons); + }); + } + $$self.$$set = ($$props2) => { + if ("change" in $$props2) + $$invalidate(0, change = $$props2.change); + if ("view" in $$props2) + $$invalidate(1, view = $$props2.view); + if ("manager" in $$props2) + $$invalidate(8, manager = $$props2.manager); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty & /*view*/ + 2) { + $: + $$invalidate(3, side = view.leaf.getRoot().side == "left" ? "right" : "left"); + } + }; + return [ + change, + view, + buttons, + side, + hover, + open, + showDiff, + unstage, + manager, + focus_handler, + div_binding, + div1_binding + ]; +} +var StagedFileComponent = class extends SvelteComponent { + constructor(options) { + super(); + init2(this, options, instance7, create_fragment7, safe_not_equal, { change: 0, view: 1, manager: 8 }, add_css5); + } +}; +var stagedFileComponent_default = StagedFileComponent; + +// src/ui/sourceControl/components/treeComponent.svelte +init_polyfill_buffer(); +function add_css6(target) { + append_styles(target, "svelte-hup5mn", "main.svelte-hup5mn .nav-folder-title.svelte-hup5mn{align-items:center}"); +} +function get_each_context4(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[15] = list[i]; + return child_ctx; +} +function create_else_block3(ctx) { + let div7; + let div6; + let div0; + let t0; + let div1; + let t1; + let div2; + let t2_value = ( + /*entity*/ + ctx[15].title + "" + ); + let t2; + let t3; + let div5; + let div4; + let t4; + let div3; + let div6_aria_label_value; + let t5; + let t6; + let current; + let mounted; + let dispose; + function select_block_type_2(ctx2, dirty) { + if ( + /*fileType*/ + ctx2[3] == 0 /* staged */ + ) + return create_if_block_5; + return create_else_block_1; + } + let current_block_type = select_block_type_2(ctx, -1); + let if_block0 = current_block_type(ctx); + let if_block1 = !/*closed*/ + ctx[5][ + /*entity*/ + ctx[15].title + ] && create_if_block_42(ctx); + function click_handler_3() { + return ( + /*click_handler_3*/ + ctx[14]( + /*entity*/ + ctx[15] + ) + ); + } + return { + c() { + div7 = element("div"); + div6 = element("div"); + div0 = element("div"); + t0 = space(); + div1 = element("div"); + div1.innerHTML = ``; + t1 = space(); + div2 = element("div"); + t2 = text(t2_value); + t3 = space(); + div5 = element("div"); + div4 = element("div"); + if_block0.c(); + t4 = space(); + div3 = element("div"); + t5 = space(); + if (if_block1) + if_block1.c(); + t6 = space(); + attr(div0, "data-icon", "folder"); + set_style(div0, "padding-right", "5px"); + set_style(div0, "display", "flex"); + attr(div1, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + toggle_class( + div1, + "is-collapsed", + /*closed*/ + ctx[5][ + /*entity*/ + ctx[15].title + ] + ); + attr(div2, "class", "tree-item-inner nav-folder-title-content"); + set_style(div3, "width", "11px"); + attr(div4, "class", "buttons"); + attr(div5, "class", "git-tools"); + attr(div6, "class", "tree-item-self is-clickable nav-folder-title svelte-hup5mn"); + attr( + div6, + "data-tooltip-position", + /*side*/ + ctx[6] + ); + attr(div6, "aria-label", div6_aria_label_value = /*entity*/ + ctx[15].vaultPath); + attr(div7, "class", "tree-item nav-folder"); + toggle_class( + div7, + "is-collapsed", + /*closed*/ + ctx[5][ + /*entity*/ + ctx[15].title + ] + ); + }, + m(target, anchor) { + insert(target, div7, anchor); + append2(div7, div6); + append2(div6, div0); + append2(div6, t0); + append2(div6, div1); + append2(div6, t1); + append2(div6, div2); + append2(div2, t2); + append2(div6, t3); + append2(div6, div5); + append2(div5, div4); + if_block0.m(div4, null); + append2(div4, t4); + append2(div4, div3); + append2(div7, t5); + if (if_block1) + if_block1.m(div7, null); + append2(div7, t6); + current = true; + if (!mounted) { + dispose = listen(div7, "click", stop_propagation(click_handler_3)); + mounted = true; + } + }, + p(new_ctx, dirty) { + ctx = new_ctx; + if (!current || dirty & /*closed, hierarchy*/ + 33) { + toggle_class( + div1, + "is-collapsed", + /*closed*/ + ctx[5][ + /*entity*/ + ctx[15].title + ] + ); + } + if ((!current || dirty & /*hierarchy*/ + 1) && t2_value !== (t2_value = /*entity*/ + ctx[15].title + "")) + set_data(t2, t2_value); + if (current_block_type === (current_block_type = select_block_type_2(ctx, dirty)) && if_block0) { + if_block0.p(ctx, dirty); + } else { + if_block0.d(1); + if_block0 = current_block_type(ctx); + if (if_block0) { + if_block0.c(); + if_block0.m(div4, t4); + } + } + if (!current || dirty & /*side*/ + 64) { + attr( + div6, + "data-tooltip-position", + /*side*/ + ctx[6] + ); + } + if (!current || dirty & /*hierarchy*/ + 1 && div6_aria_label_value !== (div6_aria_label_value = /*entity*/ + ctx[15].vaultPath)) { + attr(div6, "aria-label", div6_aria_label_value); + } + if (!/*closed*/ + ctx[5][ + /*entity*/ + ctx[15].title + ]) { + if (if_block1) { + if_block1.p(ctx, dirty); + if (dirty & /*closed, hierarchy*/ + 33) { + transition_in(if_block1, 1); + } + } else { + if_block1 = create_if_block_42(ctx); + if_block1.c(); + transition_in(if_block1, 1); + if_block1.m(div7, t6); + } + } else if (if_block1) { + group_outros(); + transition_out(if_block1, 1, 1, () => { + if_block1 = null; + }); + check_outros(); + } + if (!current || dirty & /*closed, hierarchy*/ + 33) { + toggle_class( + div7, + "is-collapsed", + /*closed*/ + ctx[5][ + /*entity*/ + ctx[15].title + ] + ); + } + }, + i(local) { + if (current) + return; + transition_in(if_block1); + current = true; + }, + o(local) { + transition_out(if_block1); + current = false; + }, + d(detaching) { + if (detaching) { + detach(div7); + } + if_block0.d(); + if (if_block1) + if_block1.d(); + mounted = false; + dispose(); + } + }; +} +function create_if_block7(ctx) { + let div; + let current_block_type_index; + let if_block; + let t; + let current; + const if_block_creators = [create_if_block_13, create_if_block_22, create_if_block_32]; + const if_blocks = []; + function select_block_type_1(ctx2, dirty) { + if ( + /*fileType*/ + ctx2[3] == 0 /* staged */ + ) + return 0; + if ( + /*fileType*/ + ctx2[3] == 1 /* changed */ + ) + return 1; + if ( + /*fileType*/ + ctx2[3] == 2 /* pulled */ + ) + return 2; + return -1; + } + if (~(current_block_type_index = select_block_type_1(ctx, -1))) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + } + return { + c() { + div = element("div"); + if (if_block) + if_block.c(); + t = space(); + }, + m(target, anchor) { + insert(target, div, anchor); + if (~current_block_type_index) { + if_blocks[current_block_type_index].m(div, null); + } + append2(div, t); + current = true; + }, + p(ctx2, dirty) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type_1(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if (~current_block_type_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } + } else { + if (if_block) { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + } + if (~current_block_type_index) { + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(div, t); + } else { + if_block = null; + } + } + }, + i(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(div); + } + if (~current_block_type_index) { + if_blocks[current_block_type_index].d(); + } + } + }; +} +function create_else_block_1(ctx) { + let div0; + let t; + let div1; + let mounted; + let dispose; + function click_handler_1() { + return ( + /*click_handler_1*/ + ctx[12]( + /*entity*/ + ctx[15] + ) + ); + } + function click_handler_2() { + return ( + /*click_handler_2*/ + ctx[13]( + /*entity*/ + ctx[15] + ) + ); + } + return { + c() { + div0 = element("div"); + div0.innerHTML = ``; + t = space(); + div1 = element("div"); + div1.innerHTML = ``; + attr(div0, "data-icon", "undo"); + attr(div0, "aria-label", "Discard"); + attr(div0, "class", "clickable-icon"); + attr(div1, "data-icon", "plus"); + attr(div1, "aria-label", "Stage"); + attr(div1, "class", "clickable-icon"); + }, + m(target, anchor) { + insert(target, div0, anchor); + insert(target, t, anchor); + insert(target, div1, anchor); + if (!mounted) { + dispose = [ + listen(div0, "click", stop_propagation(click_handler_1)), + listen(div1, "click", stop_propagation(click_handler_2)) + ]; + mounted = true; + } + }, + p(new_ctx, dirty) { + ctx = new_ctx; + }, + d(detaching) { + if (detaching) { + detach(div0); + detach(t); + detach(div1); + } + mounted = false; + run_all(dispose); + } + }; +} +function create_if_block_5(ctx) { + let div; + let mounted; + let dispose; + function click_handler() { + return ( + /*click_handler*/ + ctx[11]( + /*entity*/ + ctx[15] + ) + ); + } + return { + c() { + div = element("div"); + div.innerHTML = ``; + attr(div, "data-icon", "minus"); + attr(div, "aria-label", "Unstage"); + attr(div, "class", "clickable-icon"); + }, + m(target, anchor) { + insert(target, div, anchor); + if (!mounted) { + dispose = listen(div, "click", stop_propagation(click_handler)); + mounted = true; + } + }, + p(new_ctx, dirty) { + ctx = new_ctx; + }, + d(detaching) { + if (detaching) { + detach(div); + } + mounted = false; + dispose(); + } + }; +} +function create_if_block_42(ctx) { + let div; + let treecomponent; + let div_transition; + let current; + treecomponent = new TreeComponent({ + props: { + hierarchy: ( + /*entity*/ + ctx[15] + ), + plugin: ( + /*plugin*/ + ctx[1] + ), + view: ( + /*view*/ + ctx[2] + ), + fileType: ( + /*fileType*/ + ctx[3] + ) + } + }); + return { + c() { + div = element("div"); + create_component(treecomponent.$$.fragment); + attr(div, "class", "tree-item-children nav-folder-children"); + }, + m(target, anchor) { + insert(target, div, anchor); + mount_component(treecomponent, div, null); + current = true; + }, + p(ctx2, dirty) { + const treecomponent_changes = {}; + if (dirty & /*hierarchy*/ + 1) + treecomponent_changes.hierarchy = /*entity*/ + ctx2[15]; + if (dirty & /*plugin*/ + 2) + treecomponent_changes.plugin = /*plugin*/ + ctx2[1]; + if (dirty & /*view*/ + 4) + treecomponent_changes.view = /*view*/ + ctx2[2]; + if (dirty & /*fileType*/ + 8) + treecomponent_changes.fileType = /*fileType*/ + ctx2[3]; + treecomponent.$set(treecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(treecomponent.$$.fragment, local); + if (local) { + add_render_callback(() => { + if (!current) + return; + if (!div_transition) + div_transition = create_bidirectional_transition(div, slide, { duration: 150 }, true); + div_transition.run(1); + }); + } + current = true; + }, + o(local) { + transition_out(treecomponent.$$.fragment, local); + if (local) { + if (!div_transition) + div_transition = create_bidirectional_transition(div, slide, { duration: 150 }, false); + div_transition.run(0); + } + current = false; + }, + d(detaching) { + if (detaching) { + detach(div); + } + destroy_component(treecomponent); + if (detaching && div_transition) + div_transition.end(); + } + }; +} +function create_if_block_32(ctx) { + let pulledfilecomponent; + let current; + pulledfilecomponent = new pulledFileComponent_default({ + props: { + change: ( + /*entity*/ + ctx[15].data + ), + view: ( + /*view*/ + ctx[2] + ) + } + }); + return { + c() { + create_component(pulledfilecomponent.$$.fragment); + }, + m(target, anchor) { + mount_component(pulledfilecomponent, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const pulledfilecomponent_changes = {}; + if (dirty & /*hierarchy*/ + 1) + pulledfilecomponent_changes.change = /*entity*/ + ctx2[15].data; + if (dirty & /*view*/ + 4) + pulledfilecomponent_changes.view = /*view*/ + ctx2[2]; + pulledfilecomponent.$set(pulledfilecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(pulledfilecomponent.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(pulledfilecomponent.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(pulledfilecomponent, detaching); + } + }; +} +function create_if_block_22(ctx) { + let filecomponent; + let current; + filecomponent = new fileComponent_default({ + props: { + change: ( + /*entity*/ + ctx[15].data + ), + manager: ( + /*plugin*/ + ctx[1].gitManager + ), + view: ( + /*view*/ + ctx[2] + ) + } + }); + return { + c() { + create_component(filecomponent.$$.fragment); + }, + m(target, anchor) { + mount_component(filecomponent, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const filecomponent_changes = {}; + if (dirty & /*hierarchy*/ + 1) + filecomponent_changes.change = /*entity*/ + ctx2[15].data; + if (dirty & /*plugin*/ + 2) + filecomponent_changes.manager = /*plugin*/ + ctx2[1].gitManager; + if (dirty & /*view*/ + 4) + filecomponent_changes.view = /*view*/ + ctx2[2]; + filecomponent.$set(filecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(filecomponent.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(filecomponent.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(filecomponent, detaching); + } + }; +} +function create_if_block_13(ctx) { + let stagedfilecomponent; + let current; + stagedfilecomponent = new stagedFileComponent_default({ + props: { + change: ( + /*entity*/ + ctx[15].data + ), + manager: ( + /*plugin*/ + ctx[1].gitManager + ), + view: ( + /*view*/ + ctx[2] + ) + } + }); + return { + c() { + create_component(stagedfilecomponent.$$.fragment); + }, + m(target, anchor) { + mount_component(stagedfilecomponent, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const stagedfilecomponent_changes = {}; + if (dirty & /*hierarchy*/ + 1) + stagedfilecomponent_changes.change = /*entity*/ + ctx2[15].data; + if (dirty & /*plugin*/ + 2) + stagedfilecomponent_changes.manager = /*plugin*/ + ctx2[1].gitManager; + if (dirty & /*view*/ + 4) + stagedfilecomponent_changes.view = /*view*/ + ctx2[2]; + stagedfilecomponent.$set(stagedfilecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(stagedfilecomponent.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(stagedfilecomponent.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(stagedfilecomponent, detaching); + } + }; +} +function create_each_block4(ctx) { + let current_block_type_index; + let if_block; + let if_block_anchor; + let current; + const if_block_creators = [create_if_block7, create_else_block3]; + const if_blocks = []; + function select_block_type(ctx2, dirty) { + if ( + /*entity*/ + ctx2[15].data + ) + return 0; + return 1; + } + current_block_type_index = select_block_type(ctx, -1); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + return { + c() { + if_block.c(); + if_block_anchor = empty(); + }, + m(target, anchor) { + if_blocks[current_block_type_index].m(target, anchor); + insert(target, if_block_anchor, anchor); + current = true; + }, + p(ctx2, dirty) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } else { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(if_block_anchor.parentNode, if_block_anchor); + } + }, + i(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(if_block_anchor); + } + if_blocks[current_block_type_index].d(detaching); + } + }; +} +function create_fragment8(ctx) { + let main; + let current; + let each_value = ensure_array_like( + /*hierarchy*/ + ctx[0].children + ); + let each_blocks = []; + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block4(get_each_context4(ctx, each_value, i)); + } + const out = (i) => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + return { + c() { + main = element("main"); + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + attr(main, "class", "svelte-hup5mn"); + toggle_class( + main, + "topLevel", + /*topLevel*/ + ctx[4] + ); + }, + m(target, anchor) { + insert(target, main, anchor); + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(main, null); + } + } + current = true; + }, + p(ctx2, [dirty]) { + if (dirty & /*hierarchy, plugin, view, fileType, closed, fold, side, unstage, stage, discard*/ + 2031) { + each_value = ensure_array_like( + /*hierarchy*/ + ctx2[0].children + ); + let i; + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context4(ctx2, each_value, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block4(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(main, null); + } + } + group_outros(); + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros(); + } + if (!current || dirty & /*topLevel*/ + 16) { + toggle_class( + main, + "topLevel", + /*topLevel*/ + ctx2[4] + ); + } + }, + i(local) { + if (current) + return; + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + current = false; + }, + d(detaching) { + if (detaching) { + detach(main); + } + destroy_each(each_blocks, detaching); + } + }; +} +function instance8($$self, $$props, $$invalidate) { + let side; + let { hierarchy } = $$props; + let { plugin } = $$props; + let { view } = $$props; + let { fileType } = $$props; + let { topLevel = false } = $$props; + const closed = {}; + function stage(path2) { + plugin.gitManager.stageAll({ dir: path2 }).finally(() => { + dispatchEvent(new CustomEvent("git-refresh")); + }); + } + function unstage(path2) { + plugin.gitManager.unstageAll({ dir: path2 }).finally(() => { + dispatchEvent(new CustomEvent("git-refresh")); + }); + } + function discard(item) { + new DiscardModal(view.app, false, item.vaultPath).myOpen().then((shouldDiscard) => { + if (shouldDiscard === true) { + plugin.gitManager.discardAll({ + dir: item.path, + status: plugin.cachedStatus + }).finally(() => { + dispatchEvent(new CustomEvent("git-refresh")); + }); + } + }); + } + function fold(item) { + $$invalidate(5, closed[item.title] = !closed[item.title], closed); + } + const click_handler = (entity) => unstage(entity.path); + const click_handler_1 = (entity) => discard(entity); + const click_handler_2 = (entity) => stage(entity.path); + const click_handler_3 = (entity) => fold(entity); + $$self.$$set = ($$props2) => { + if ("hierarchy" in $$props2) + $$invalidate(0, hierarchy = $$props2.hierarchy); + if ("plugin" in $$props2) + $$invalidate(1, plugin = $$props2.plugin); + if ("view" in $$props2) + $$invalidate(2, view = $$props2.view); + if ("fileType" in $$props2) + $$invalidate(3, fileType = $$props2.fileType); + if ("topLevel" in $$props2) + $$invalidate(4, topLevel = $$props2.topLevel); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty & /*view*/ + 4) { + $: + $$invalidate(6, side = view.leaf.getRoot().side == "left" ? "right" : "left"); + } + }; + return [ + hierarchy, + plugin, + view, + fileType, + topLevel, + closed, + side, + stage, + unstage, + discard, + fold, + click_handler, + click_handler_1, + click_handler_2, + click_handler_3 + ]; +} +var TreeComponent = class extends SvelteComponent { + constructor(options) { + super(); + init2( + this, + options, + instance8, + create_fragment8, + safe_not_equal, + { + hierarchy: 0, + plugin: 1, + view: 2, + fileType: 3, + topLevel: 4 + }, + add_css6 + ); + } +}; +var treeComponent_default = TreeComponent; + +// src/ui/sourceControl/sourceControl.svelte +function add_css7(target) { + append_styles(target, "svelte-11adhly", `.commit-msg-input.svelte-11adhly.svelte-11adhly{width:100%;overflow:hidden;resize:none;padding:7px 5px;background-color:var(--background-modifier-form-field)}.git-commit-msg.svelte-11adhly.svelte-11adhly{position:relative;padding:0;width:calc(100% - var(--size-4-8));margin:4px auto}main.svelte-11adhly .git-tools .files-count.svelte-11adhly{padding-left:var(--size-2-1);width:11px;display:flex;align-items:center;justify-content:center}.nav-folder-title.svelte-11adhly.svelte-11adhly{align-items:center}.git-commit-msg-clear-button.svelte-11adhly.svelte-11adhly{position:absolute;background:transparent;border-radius:50%;color:var(--search-clear-button-color);cursor:var(--cursor);top:-4px;right:2px;bottom:0px;line-height:0;height:var(--input-height);width:28px;margin:auto;padding:0 0;text-align:center;display:flex;justify-content:center;align-items:center;transition:color 0.15s ease-in-out}.git-commit-msg-clear-button.svelte-11adhly.svelte-11adhly:after{content:"";height:var(--search-clear-button-size);width:var(--search-clear-button-size);display:block;background-color:currentColor;mask-image:url("data:image/svg+xml,");mask-repeat:no-repeat;-webkit-mask-image:url("data:image/svg+xml,");-webkit-mask-repeat:no-repeat}`); +} +function get_each_context5(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[40] = list[i]; + return child_ctx; +} +function get_each_context_1(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[40] = list[i]; + return child_ctx; +} +function get_each_context_2(ctx, list, i) { + const child_ctx = ctx.slice(); + child_ctx[45] = list[i]; + return child_ctx; +} +function create_if_block_8(ctx) { + let div; + let div_aria_label_value; + let mounted; + let dispose; + return { + c() { + div = element("div"); + attr(div, "class", "git-commit-msg-clear-button svelte-11adhly"); + attr(div, "aria-label", div_aria_label_value = "Clear"); + }, + m(target, anchor) { + insert(target, div, anchor); + if (!mounted) { + dispose = listen( + div, + "click", + /*click_handler_1*/ + ctx[33] + ); + mounted = true; + } + }, + p: noop, + d(detaching) { + if (detaching) { + detach(div); + } + mounted = false; + dispose(); + } + }; +} +function create_if_block8(ctx) { + let div18; + let div17; + let div7; + let div6; + let div0; + let t0; + let div1; + let t2; + let div5; + let div3; + let div2; + let t3; + let div4; + let t4_value = ( + /*status*/ + ctx[6].staged.length + "" + ); + let t4; + let t5; + let t6; + let div16; + let div15; + let div8; + let t7; + let div9; + let t9; + let div14; + let div12; + let div10; + let t10; + let div11; + let t11; + let div13; + let t12_value = ( + /*status*/ + ctx[6].changed.length + "" + ); + let t12; + let t13; + let t14; + let current; + let mounted; + let dispose; + let if_block0 = ( + /*stagedOpen*/ + ctx[13] && create_if_block_6(ctx) + ); + let if_block1 = ( + /*changesOpen*/ + ctx[12] && create_if_block_43(ctx) + ); + let if_block2 = ( + /*lastPulledFiles*/ + ctx[7].length > 0 && create_if_block_14(ctx) + ); + return { + c() { + div18 = element("div"); + div17 = element("div"); + div7 = element("div"); + div6 = element("div"); + div0 = element("div"); + div0.innerHTML = ``; + t0 = space(); + div1 = element("div"); + div1.textContent = "Staged Changes"; + t2 = space(); + div5 = element("div"); + div3 = element("div"); + div2 = element("div"); + div2.innerHTML = ``; + t3 = space(); + div4 = element("div"); + t4 = text(t4_value); + t5 = space(); + if (if_block0) + if_block0.c(); + t6 = space(); + div16 = element("div"); + div15 = element("div"); + div8 = element("div"); + div8.innerHTML = ``; + t7 = space(); + div9 = element("div"); + div9.textContent = "Changes"; + t9 = space(); + div14 = element("div"); + div12 = element("div"); + div10 = element("div"); + div10.innerHTML = ``; + t10 = space(); + div11 = element("div"); + div11.innerHTML = ``; + t11 = space(); + div13 = element("div"); + t12 = text(t12_value); + t13 = space(); + if (if_block1) + if_block1.c(); + t14 = space(); + if (if_block2) + if_block2.c(); + attr(div0, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + toggle_class(div0, "is-collapsed", !/*stagedOpen*/ + ctx[13]); + attr(div1, "class", "tree-item-inner nav-folder-title-content"); + attr(div2, "data-icon", "minus"); + attr(div2, "aria-label", "Unstage"); + attr(div2, "class", "clickable-icon"); + attr(div3, "class", "buttons"); + attr(div4, "class", "files-count svelte-11adhly"); + attr(div5, "class", "git-tools"); + attr(div6, "class", "tree-item-self is-clickable nav-folder-title svelte-11adhly"); + attr(div7, "class", "staged tree-item nav-folder"); + toggle_class(div7, "is-collapsed", !/*stagedOpen*/ + ctx[13]); + attr(div8, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + toggle_class(div8, "is-collapsed", !/*changesOpen*/ + ctx[12]); + attr(div9, "class", "tree-item-inner nav-folder-title-content"); + attr(div10, "data-icon", "undo"); + attr(div10, "aria-label", "Discard"); + attr(div10, "class", "clickable-icon"); + attr(div11, "data-icon", "plus"); + attr(div11, "aria-label", "Stage"); + attr(div11, "class", "clickable-icon"); + attr(div12, "class", "buttons"); + attr(div13, "class", "files-count svelte-11adhly"); + attr(div14, "class", "git-tools"); + attr(div15, "class", "tree-item-self is-clickable nav-folder-title svelte-11adhly"); + attr(div16, "class", "changes tree-item nav-folder"); + toggle_class(div16, "is-collapsed", !/*changesOpen*/ + ctx[12]); + attr(div17, "class", "tree-item-children nav-folder-children"); + attr(div18, "class", "tree-item nav-folder mod-root"); + }, + m(target, anchor) { + insert(target, div18, anchor); + append2(div18, div17); + append2(div17, div7); + append2(div7, div6); + append2(div6, div0); + append2(div6, t0); + append2(div6, div1); + append2(div6, t2); + append2(div6, div5); + append2(div5, div3); + append2(div3, div2); + ctx[34](div2); + append2(div5, t3); + append2(div5, div4); + append2(div4, t4); + append2(div7, t5); + if (if_block0) + if_block0.m(div7, null); + append2(div17, t6); + append2(div17, div16); + append2(div16, div15); + append2(div15, div8); + append2(div15, t7); + append2(div15, div9); + append2(div15, t9); + append2(div15, div14); + append2(div14, div12); + append2(div12, div10); + append2(div12, t10); + append2(div12, div11); + ctx[36](div11); + append2(div14, t11); + append2(div14, div13); + append2(div13, t12); + append2(div16, t13); + if (if_block1) + if_block1.m(div16, null); + append2(div17, t14); + if (if_block2) + if_block2.m(div17, null); + current = true; + if (!mounted) { + dispose = [ + listen(div2, "click", stop_propagation( + /*unstageAll*/ + ctx[19] + )), + listen( + div6, + "click", + /*click_handler_2*/ + ctx[35] + ), + listen(div10, "click", stop_propagation( + /*discard*/ + ctx[22] + )), + listen(div11, "click", stop_propagation( + /*stageAll*/ + ctx[18] + )), + listen( + div15, + "click", + /*click_handler_3*/ + ctx[37] + ) + ]; + mounted = true; + } + }, + p(ctx2, dirty) { + if (!current || dirty[0] & /*stagedOpen*/ + 8192) { + toggle_class(div0, "is-collapsed", !/*stagedOpen*/ + ctx2[13]); + } + if ((!current || dirty[0] & /*status*/ + 64) && t4_value !== (t4_value = /*status*/ + ctx2[6].staged.length + "")) + set_data(t4, t4_value); + if ( + /*stagedOpen*/ + ctx2[13] + ) { + if (if_block0) { + if_block0.p(ctx2, dirty); + if (dirty[0] & /*stagedOpen*/ + 8192) { + transition_in(if_block0, 1); + } + } else { + if_block0 = create_if_block_6(ctx2); + if_block0.c(); + transition_in(if_block0, 1); + if_block0.m(div7, null); + } + } else if (if_block0) { + group_outros(); + transition_out(if_block0, 1, 1, () => { + if_block0 = null; + }); + check_outros(); + } + if (!current || dirty[0] & /*stagedOpen*/ + 8192) { + toggle_class(div7, "is-collapsed", !/*stagedOpen*/ + ctx2[13]); + } + if (!current || dirty[0] & /*changesOpen*/ + 4096) { + toggle_class(div8, "is-collapsed", !/*changesOpen*/ + ctx2[12]); + } + if ((!current || dirty[0] & /*status*/ + 64) && t12_value !== (t12_value = /*status*/ + ctx2[6].changed.length + "")) + set_data(t12, t12_value); + if ( + /*changesOpen*/ + ctx2[12] + ) { + if (if_block1) { + if_block1.p(ctx2, dirty); + if (dirty[0] & /*changesOpen*/ + 4096) { + transition_in(if_block1, 1); + } + } else { + if_block1 = create_if_block_43(ctx2); + if_block1.c(); + transition_in(if_block1, 1); + if_block1.m(div16, null); + } + } else if (if_block1) { + group_outros(); + transition_out(if_block1, 1, 1, () => { + if_block1 = null; + }); + check_outros(); + } + if (!current || dirty[0] & /*changesOpen*/ + 4096) { + toggle_class(div16, "is-collapsed", !/*changesOpen*/ + ctx2[12]); + } + if ( + /*lastPulledFiles*/ + ctx2[7].length > 0 + ) { + if (if_block2) { + if_block2.p(ctx2, dirty); + if (dirty[0] & /*lastPulledFiles*/ + 128) { + transition_in(if_block2, 1); + } + } else { + if_block2 = create_if_block_14(ctx2); + if_block2.c(); + transition_in(if_block2, 1); + if_block2.m(div17, null); + } + } else if (if_block2) { + group_outros(); + transition_out(if_block2, 1, 1, () => { + if_block2 = null; + }); + check_outros(); + } + }, + i(local) { + if (current) + return; + transition_in(if_block0); + transition_in(if_block1); + transition_in(if_block2); + current = true; + }, + o(local) { + transition_out(if_block0); + transition_out(if_block1); + transition_out(if_block2); + current = false; + }, + d(detaching) { + if (detaching) { + detach(div18); + } + ctx[34](null); + if (if_block0) + if_block0.d(); + ctx[36](null); + if (if_block1) + if_block1.d(); + if (if_block2) + if_block2.d(); + mounted = false; + run_all(dispose); + } + }; +} +function create_if_block_6(ctx) { + let div; + let current_block_type_index; + let if_block; + let div_transition; + let current; + const if_block_creators = [create_if_block_7, create_else_block_2]; + const if_blocks = []; + function select_block_type(ctx2, dirty) { + if ( + /*showTree*/ + ctx2[3] + ) + return 0; + return 1; + } + current_block_type_index = select_block_type(ctx, [-1, -1]); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + return { + c() { + div = element("div"); + if_block.c(); + attr(div, "class", "tree-item-children nav-folder-children"); + }, + m(target, anchor) { + insert(target, div, anchor); + if_blocks[current_block_type_index].m(div, null); + current = true; + }, + p(ctx2, dirty) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } else { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(div, null); + } + }, + i(local) { + if (current) + return; + transition_in(if_block); + if (local) { + add_render_callback(() => { + if (!current) + return; + if (!div_transition) + div_transition = create_bidirectional_transition(div, slide, { duration: 150 }, true); + div_transition.run(1); + }); + } + current = true; + }, + o(local) { + transition_out(if_block); + if (local) { + if (!div_transition) + div_transition = create_bidirectional_transition(div, slide, { duration: 150 }, false); + div_transition.run(0); + } + current = false; + }, + d(detaching) { + if (detaching) { + detach(div); + } + if_blocks[current_block_type_index].d(); + if (detaching && div_transition) + div_transition.end(); + } + }; +} +function create_else_block_2(ctx) { + let each_1_anchor; + let current; + let each_value_2 = ensure_array_like( + /*status*/ + ctx[6].staged + ); + let each_blocks = []; + for (let i = 0; i < each_value_2.length; i += 1) { + each_blocks[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i)); + } + const out = (i) => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx2, dirty) { + if (dirty[0] & /*status, view, plugin*/ + 67) { + each_value_2 = ensure_array_like( + /*status*/ + ctx2[6].staged + ); + let i; + for (i = 0; i < each_value_2.length; i += 1) { + const child_ctx = get_each_context_2(ctx2, each_value_2, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block_2(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + group_outros(); + for (i = each_value_2.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros(); + } + }, + i(local) { + if (current) + return; + for (let i = 0; i < each_value_2.length; i += 1) { + transition_in(each_blocks[i]); + } + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + destroy_each(each_blocks, detaching); + } + }; +} +function create_if_block_7(ctx) { + let treecomponent; + let current; + treecomponent = new treeComponent_default({ + props: { + hierarchy: ( + /*stagedHierarchy*/ + ctx[10] + ), + plugin: ( + /*plugin*/ + ctx[0] + ), + view: ( + /*view*/ + ctx[1] + ), + fileType: 0 /* staged */, + topLevel: true + } + }); + return { + c() { + create_component(treecomponent.$$.fragment); + }, + m(target, anchor) { + mount_component(treecomponent, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const treecomponent_changes = {}; + if (dirty[0] & /*stagedHierarchy*/ + 1024) + treecomponent_changes.hierarchy = /*stagedHierarchy*/ + ctx2[10]; + if (dirty[0] & /*plugin*/ + 1) + treecomponent_changes.plugin = /*plugin*/ + ctx2[0]; + if (dirty[0] & /*view*/ + 2) + treecomponent_changes.view = /*view*/ + ctx2[1]; + treecomponent.$set(treecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(treecomponent.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(treecomponent.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(treecomponent, detaching); + } + }; +} +function create_each_block_2(ctx) { + let stagedfilecomponent; + let current; + stagedfilecomponent = new stagedFileComponent_default({ + props: { + change: ( + /*stagedFile*/ + ctx[45] + ), + view: ( + /*view*/ + ctx[1] + ), + manager: ( + /*plugin*/ + ctx[0].gitManager + ) + } + }); + return { + c() { + create_component(stagedfilecomponent.$$.fragment); + }, + m(target, anchor) { + mount_component(stagedfilecomponent, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const stagedfilecomponent_changes = {}; + if (dirty[0] & /*status*/ + 64) + stagedfilecomponent_changes.change = /*stagedFile*/ + ctx2[45]; + if (dirty[0] & /*view*/ + 2) + stagedfilecomponent_changes.view = /*view*/ + ctx2[1]; + if (dirty[0] & /*plugin*/ + 1) + stagedfilecomponent_changes.manager = /*plugin*/ + ctx2[0].gitManager; + stagedfilecomponent.$set(stagedfilecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(stagedfilecomponent.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(stagedfilecomponent.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(stagedfilecomponent, detaching); + } + }; +} +function create_if_block_43(ctx) { + let div; + let current_block_type_index; + let if_block; + let div_transition; + let current; + const if_block_creators = [create_if_block_52, create_else_block_12]; + const if_blocks = []; + function select_block_type_1(ctx2, dirty) { + if ( + /*showTree*/ + ctx2[3] + ) + return 0; + return 1; + } + current_block_type_index = select_block_type_1(ctx, [-1, -1]); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + return { + c() { + div = element("div"); + if_block.c(); + attr(div, "class", "tree-item-children nav-folder-children"); + }, + m(target, anchor) { + insert(target, div, anchor); + if_blocks[current_block_type_index].m(div, null); + current = true; + }, + p(ctx2, dirty) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type_1(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } else { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(div, null); + } + }, + i(local) { + if (current) + return; + transition_in(if_block); + if (local) { + add_render_callback(() => { + if (!current) + return; + if (!div_transition) + div_transition = create_bidirectional_transition(div, slide, { duration: 150 }, true); + div_transition.run(1); + }); + } + current = true; + }, + o(local) { + transition_out(if_block); + if (local) { + if (!div_transition) + div_transition = create_bidirectional_transition(div, slide, { duration: 150 }, false); + div_transition.run(0); + } + current = false; + }, + d(detaching) { + if (detaching) { + detach(div); + } + if_blocks[current_block_type_index].d(); + if (detaching && div_transition) + div_transition.end(); + } + }; +} +function create_else_block_12(ctx) { + let each_1_anchor; + let current; + let each_value_1 = ensure_array_like( + /*status*/ + ctx[6].changed + ); + let each_blocks = []; + for (let i = 0; i < each_value_1.length; i += 1) { + each_blocks[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i)); + } + const out = (i) => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx2, dirty) { + if (dirty[0] & /*status, view, plugin*/ + 67) { + each_value_1 = ensure_array_like( + /*status*/ + ctx2[6].changed + ); + let i; + for (i = 0; i < each_value_1.length; i += 1) { + const child_ctx = get_each_context_1(ctx2, each_value_1, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block_1(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + group_outros(); + for (i = each_value_1.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros(); + } + }, + i(local) { + if (current) + return; + for (let i = 0; i < each_value_1.length; i += 1) { + transition_in(each_blocks[i]); + } + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + destroy_each(each_blocks, detaching); + } + }; +} +function create_if_block_52(ctx) { + let treecomponent; + let current; + treecomponent = new treeComponent_default({ + props: { + hierarchy: ( + /*changeHierarchy*/ + ctx[9] + ), + plugin: ( + /*plugin*/ + ctx[0] + ), + view: ( + /*view*/ + ctx[1] + ), + fileType: 1 /* changed */, + topLevel: true + } + }); + return { + c() { + create_component(treecomponent.$$.fragment); + }, + m(target, anchor) { + mount_component(treecomponent, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const treecomponent_changes = {}; + if (dirty[0] & /*changeHierarchy*/ + 512) + treecomponent_changes.hierarchy = /*changeHierarchy*/ + ctx2[9]; + if (dirty[0] & /*plugin*/ + 1) + treecomponent_changes.plugin = /*plugin*/ + ctx2[0]; + if (dirty[0] & /*view*/ + 2) + treecomponent_changes.view = /*view*/ + ctx2[1]; + treecomponent.$set(treecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(treecomponent.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(treecomponent.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(treecomponent, detaching); + } + }; +} +function create_each_block_1(ctx) { + let filecomponent; + let current; + filecomponent = new fileComponent_default({ + props: { + change: ( + /*change*/ + ctx[40] + ), + view: ( + /*view*/ + ctx[1] + ), + manager: ( + /*plugin*/ + ctx[0].gitManager + ) + } + }); + filecomponent.$on("git-refresh", triggerRefresh2); + return { + c() { + create_component(filecomponent.$$.fragment); + }, + m(target, anchor) { + mount_component(filecomponent, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const filecomponent_changes = {}; + if (dirty[0] & /*status*/ + 64) + filecomponent_changes.change = /*change*/ + ctx2[40]; + if (dirty[0] & /*view*/ + 2) + filecomponent_changes.view = /*view*/ + ctx2[1]; + if (dirty[0] & /*plugin*/ + 1) + filecomponent_changes.manager = /*plugin*/ + ctx2[0].gitManager; + filecomponent.$set(filecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(filecomponent.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(filecomponent.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(filecomponent, detaching); + } + }; +} +function create_if_block_14(ctx) { + let div3; + let div2; + let div0; + let t0; + let div1; + let t2; + let span; + let t3_value = ( + /*lastPulledFiles*/ + ctx[7].length + "" + ); + let t3; + let t4; + let current; + let mounted; + let dispose; + let if_block = ( + /*lastPulledFilesOpen*/ + ctx[14] && create_if_block_23(ctx) + ); + return { + c() { + div3 = element("div"); + div2 = element("div"); + div0 = element("div"); + div0.innerHTML = ``; + t0 = space(); + div1 = element("div"); + div1.textContent = "Recently Pulled Files"; + t2 = space(); + span = element("span"); + t3 = text(t3_value); + t4 = space(); + if (if_block) + if_block.c(); + attr(div0, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + attr(div1, "class", "tree-item-inner nav-folder-title-content"); + attr(span, "class", "tree-item-flair"); + attr(div2, "class", "tree-item-self is-clickable nav-folder-title svelte-11adhly"); + attr(div3, "class", "pulled nav-folder"); + toggle_class(div3, "is-collapsed", !/*lastPulledFilesOpen*/ + ctx[14]); + }, + m(target, anchor) { + insert(target, div3, anchor); + append2(div3, div2); + append2(div2, div0); + append2(div2, t0); + append2(div2, div1); + append2(div2, t2); + append2(div2, span); + append2(span, t3); + append2(div3, t4); + if (if_block) + if_block.m(div3, null); + current = true; + if (!mounted) { + dispose = listen( + div2, + "click", + /*click_handler_4*/ + ctx[38] + ); + mounted = true; + } + }, + p(ctx2, dirty) { + if ((!current || dirty[0] & /*lastPulledFiles*/ + 128) && t3_value !== (t3_value = /*lastPulledFiles*/ + ctx2[7].length + "")) + set_data(t3, t3_value); + if ( + /*lastPulledFilesOpen*/ + ctx2[14] + ) { + if (if_block) { + if_block.p(ctx2, dirty); + if (dirty[0] & /*lastPulledFilesOpen*/ + 16384) { + transition_in(if_block, 1); + } + } else { + if_block = create_if_block_23(ctx2); + if_block.c(); + transition_in(if_block, 1); + if_block.m(div3, null); + } + } else if (if_block) { + group_outros(); + transition_out(if_block, 1, 1, () => { + if_block = null; + }); + check_outros(); + } + if (!current || dirty[0] & /*lastPulledFilesOpen*/ + 16384) { + toggle_class(div3, "is-collapsed", !/*lastPulledFilesOpen*/ + ctx2[14]); + } + }, + i(local) { + if (current) + return; + transition_in(if_block); + current = true; + }, + o(local) { + transition_out(if_block); + current = false; + }, + d(detaching) { + if (detaching) { + detach(div3); + } + if (if_block) + if_block.d(); + mounted = false; + dispose(); + } + }; +} +function create_if_block_23(ctx) { + let div; + let current_block_type_index; + let if_block; + let div_transition; + let current; + const if_block_creators = [create_if_block_33, create_else_block4]; + const if_blocks = []; + function select_block_type_2(ctx2, dirty) { + if ( + /*showTree*/ + ctx2[3] + ) + return 0; + return 1; + } + current_block_type_index = select_block_type_2(ctx, [-1, -1]); + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); + return { + c() { + div = element("div"); + if_block.c(); + attr(div, "class", "tree-item-children nav-folder-children"); + }, + m(target, anchor) { + insert(target, div, anchor); + if_blocks[current_block_type_index].m(div, null); + current = true; + }, + p(ctx2, dirty) { + let previous_block_index = current_block_type_index; + current_block_type_index = select_block_type_2(ctx2, dirty); + if (current_block_type_index === previous_block_index) { + if_blocks[current_block_type_index].p(ctx2, dirty); + } else { + group_outros(); + transition_out(if_blocks[previous_block_index], 1, 1, () => { + if_blocks[previous_block_index] = null; + }); + check_outros(); + if_block = if_blocks[current_block_type_index]; + if (!if_block) { + if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); + if_block.c(); + } else { + if_block.p(ctx2, dirty); + } + transition_in(if_block, 1); + if_block.m(div, null); + } + }, + i(local) { + if (current) + return; + transition_in(if_block); + if (local) { + add_render_callback(() => { + if (!current) + return; + if (!div_transition) + div_transition = create_bidirectional_transition(div, slide, { duration: 150 }, true); + div_transition.run(1); + }); + } + current = true; + }, + o(local) { + transition_out(if_block); + if (local) { + if (!div_transition) + div_transition = create_bidirectional_transition(div, slide, { duration: 150 }, false); + div_transition.run(0); + } + current = false; + }, + d(detaching) { + if (detaching) { + detach(div); + } + if_blocks[current_block_type_index].d(); + if (detaching && div_transition) + div_transition.end(); + } + }; +} +function create_else_block4(ctx) { + let each_1_anchor; + let current; + let each_value = ensure_array_like( + /*lastPulledFiles*/ + ctx[7] + ); + let each_blocks = []; + for (let i = 0; i < each_value.length; i += 1) { + each_blocks[i] = create_each_block5(get_each_context5(ctx, each_value, i)); + } + const out = (i) => transition_out(each_blocks[i], 1, 1, () => { + each_blocks[i] = null; + }); + return { + c() { + for (let i = 0; i < each_blocks.length; i += 1) { + each_blocks[i].c(); + } + each_1_anchor = empty(); + }, + m(target, anchor) { + for (let i = 0; i < each_blocks.length; i += 1) { + if (each_blocks[i]) { + each_blocks[i].m(target, anchor); + } + } + insert(target, each_1_anchor, anchor); + current = true; + }, + p(ctx2, dirty) { + if (dirty[0] & /*lastPulledFiles, view*/ + 130) { + each_value = ensure_array_like( + /*lastPulledFiles*/ + ctx2[7] + ); + let i; + for (i = 0; i < each_value.length; i += 1) { + const child_ctx = get_each_context5(ctx2, each_value, i); + if (each_blocks[i]) { + each_blocks[i].p(child_ctx, dirty); + transition_in(each_blocks[i], 1); + } else { + each_blocks[i] = create_each_block5(child_ctx); + each_blocks[i].c(); + transition_in(each_blocks[i], 1); + each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); + } + } + group_outros(); + for (i = each_value.length; i < each_blocks.length; i += 1) { + out(i); + } + check_outros(); + } + }, + i(local) { + if (current) + return; + for (let i = 0; i < each_value.length; i += 1) { + transition_in(each_blocks[i]); + } + current = true; + }, + o(local) { + each_blocks = each_blocks.filter(Boolean); + for (let i = 0; i < each_blocks.length; i += 1) { + transition_out(each_blocks[i]); + } + current = false; + }, + d(detaching) { + if (detaching) { + detach(each_1_anchor); + } + destroy_each(each_blocks, detaching); + } + }; +} +function create_if_block_33(ctx) { + let treecomponent; + let current; + treecomponent = new treeComponent_default({ + props: { + hierarchy: ( + /*lastPulledFilesHierarchy*/ + ctx[11] + ), + plugin: ( + /*plugin*/ + ctx[0] + ), + view: ( + /*view*/ + ctx[1] + ), + fileType: 2 /* pulled */, + topLevel: true + } + }); + return { + c() { + create_component(treecomponent.$$.fragment); + }, + m(target, anchor) { + mount_component(treecomponent, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const treecomponent_changes = {}; + if (dirty[0] & /*lastPulledFilesHierarchy*/ + 2048) + treecomponent_changes.hierarchy = /*lastPulledFilesHierarchy*/ + ctx2[11]; + if (dirty[0] & /*plugin*/ + 1) + treecomponent_changes.plugin = /*plugin*/ + ctx2[0]; + if (dirty[0] & /*view*/ + 2) + treecomponent_changes.view = /*view*/ + ctx2[1]; + treecomponent.$set(treecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(treecomponent.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(treecomponent.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(treecomponent, detaching); + } + }; +} +function create_each_block5(ctx) { + let pulledfilecomponent; + let current; + pulledfilecomponent = new pulledFileComponent_default({ + props: { + change: ( + /*change*/ + ctx[40] + ), + view: ( + /*view*/ + ctx[1] + ) + } + }); + pulledfilecomponent.$on("git-refresh", triggerRefresh2); + return { + c() { + create_component(pulledfilecomponent.$$.fragment); + }, + m(target, anchor) { + mount_component(pulledfilecomponent, target, anchor); + current = true; + }, + p(ctx2, dirty) { + const pulledfilecomponent_changes = {}; + if (dirty[0] & /*lastPulledFiles*/ + 128) + pulledfilecomponent_changes.change = /*change*/ + ctx2[40]; + if (dirty[0] & /*view*/ + 2) + pulledfilecomponent_changes.view = /*view*/ + ctx2[1]; + pulledfilecomponent.$set(pulledfilecomponent_changes); + }, + i(local) { + if (current) + return; + transition_in(pulledfilecomponent.$$.fragment, local); + current = true; + }, + o(local) { + transition_out(pulledfilecomponent.$$.fragment, local); + current = false; + }, + d(detaching) { + destroy_component(pulledfilecomponent, detaching); + } + }; +} +function create_fragment9(ctx) { + let main; + let div9; + let div8; + let div0; + let t0; + let div1; + let t1; + let div2; + let t2; + let div3; + let t3; + let div4; + let t4; + let div5; + let t5; + let div6; + let t6; + let div7; + let t7; + let div10; + let textarea; + let t8; + let t9; + let div11; + let main_data_type_value; + let current; + let mounted; + let dispose; + let if_block0 = ( + /*commitMessage*/ + ctx[2] && create_if_block_8(ctx) + ); + let if_block1 = ( + /*status*/ + ctx[6] && /*stagedHierarchy*/ + ctx[10] && /*changeHierarchy*/ + ctx[9] && create_if_block8(ctx) + ); + return { + c() { + main = element("main"); + div9 = element("div"); + div8 = element("div"); + div0 = element("div"); + t0 = space(); + div1 = element("div"); + t1 = space(); + div2 = element("div"); + t2 = space(); + div3 = element("div"); + t3 = space(); + div4 = element("div"); + t4 = space(); + div5 = element("div"); + t5 = space(); + div6 = element("div"); + t6 = space(); + div7 = element("div"); + t7 = space(); + div10 = element("div"); + textarea = element("textarea"); + t8 = space(); + if (if_block0) + if_block0.c(); + t9 = space(); + div11 = element("div"); + if (if_block1) + if_block1.c(); + attr(div0, "id", "backup-btn"); + attr(div0, "data-icon", "arrow-up-circle"); + attr(div0, "class", "clickable-icon nav-action-button"); + attr(div0, "aria-label", "Backup"); + attr(div1, "id", "commit-btn"); + attr(div1, "data-icon", "check"); + attr(div1, "class", "clickable-icon nav-action-button"); + attr(div1, "aria-label", "Commit"); + attr(div2, "id", "stage-all"); + attr(div2, "class", "clickable-icon nav-action-button"); + attr(div2, "data-icon", "plus-circle"); + attr(div2, "aria-label", "Stage all"); + attr(div3, "id", "unstage-all"); + attr(div3, "class", "clickable-icon nav-action-button"); + attr(div3, "data-icon", "minus-circle"); + attr(div3, "aria-label", "Unstage all"); + attr(div4, "id", "push"); + attr(div4, "class", "clickable-icon nav-action-button"); + attr(div4, "data-icon", "upload"); + attr(div4, "aria-label", "Push"); + attr(div5, "id", "pull"); + attr(div5, "class", "clickable-icon nav-action-button"); + attr(div5, "data-icon", "download"); + attr(div5, "aria-label", "Pull"); + attr(div6, "id", "layoutChange"); + attr(div6, "class", "clickable-icon nav-action-button"); + attr(div6, "aria-label", "Change Layout"); + attr(div7, "id", "refresh"); + attr(div7, "class", "clickable-icon nav-action-button"); + attr(div7, "data-icon", "refresh-cw"); + attr(div7, "aria-label", "Refresh"); + set_style(div7, "margin", "1px"); + toggle_class( + div7, + "loading", + /*loading*/ + ctx[5] + ); + attr(div8, "class", "nav-buttons-container"); + attr(div9, "class", "nav-header"); + attr( + textarea, + "rows", + /*rows*/ + ctx[15] + ); + attr(textarea, "class", "commit-msg-input svelte-11adhly"); + attr(textarea, "spellcheck", "true"); + attr(textarea, "placeholder", "Commit Message"); + attr(div10, "class", "git-commit-msg svelte-11adhly"); + attr(div11, "class", "nav-files-container"); + set_style(div11, "position", "relative"); + attr(main, "data-type", main_data_type_value = SOURCE_CONTROL_VIEW_CONFIG.type); + attr(main, "class", "svelte-11adhly"); + }, + m(target, anchor) { + insert(target, main, anchor); + append2(main, div9); + append2(div9, div8); + append2(div8, div0); + ctx[23](div0); + append2(div8, t0); + append2(div8, div1); + ctx[24](div1); + append2(div8, t1); + append2(div8, div2); + ctx[25](div2); + append2(div8, t2); + append2(div8, div3); + ctx[26](div3); + append2(div8, t3); + append2(div8, div4); + ctx[27](div4); + append2(div8, t4); + append2(div8, div5); + ctx[28](div5); + append2(div8, t5); + append2(div8, div6); + ctx[29](div6); + append2(div8, t6); + append2(div8, div7); + ctx[31](div7); + append2(main, t7); + append2(main, div10); + append2(div10, textarea); + set_input_value( + textarea, + /*commitMessage*/ + ctx[2] + ); + append2(div10, t8); + if (if_block0) + if_block0.m(div10, null); + append2(main, t9); + append2(main, div11); + if (if_block1) + if_block1.m(div11, null); + current = true; + if (!mounted) { + dispose = [ + listen( + div0, + "click", + /*backup*/ + ctx[17] + ), + listen( + div1, + "click", + /*commit*/ + ctx[16] + ), + listen( + div2, + "click", + /*stageAll*/ + ctx[18] + ), + listen( + div3, + "click", + /*unstageAll*/ + ctx[19] + ), + listen( + div4, + "click", + /*push*/ + ctx[20] + ), + listen( + div5, + "click", + /*pull*/ + ctx[21] + ), + listen( + div6, + "click", + /*click_handler*/ + ctx[30] + ), + listen(div7, "click", triggerRefresh2), + listen( + textarea, + "input", + /*textarea_input_handler*/ + ctx[32] + ) + ]; + mounted = true; + } + }, + p(ctx2, dirty) { + if (!current || dirty[0] & /*loading*/ + 32) { + toggle_class( + div7, + "loading", + /*loading*/ + ctx2[5] + ); + } + if (!current || dirty[0] & /*rows*/ + 32768) { + attr( + textarea, + "rows", + /*rows*/ + ctx2[15] + ); + } + if (dirty[0] & /*commitMessage*/ + 4) { + set_input_value( + textarea, + /*commitMessage*/ + ctx2[2] + ); + } + if ( + /*commitMessage*/ + ctx2[2] + ) { + if (if_block0) { + if_block0.p(ctx2, dirty); + } else { + if_block0 = create_if_block_8(ctx2); + if_block0.c(); + if_block0.m(div10, null); + } + } else if (if_block0) { + if_block0.d(1); + if_block0 = null; + } + if ( + /*status*/ + ctx2[6] && /*stagedHierarchy*/ + ctx2[10] && /*changeHierarchy*/ + ctx2[9] + ) { + if (if_block1) { + if_block1.p(ctx2, dirty); + if (dirty[0] & /*status, stagedHierarchy, changeHierarchy*/ + 1600) { + transition_in(if_block1, 1); + } + } else { + if_block1 = create_if_block8(ctx2); + if_block1.c(); + transition_in(if_block1, 1); + if_block1.m(div11, null); + } + } else if (if_block1) { + group_outros(); + transition_out(if_block1, 1, 1, () => { + if_block1 = null; + }); + check_outros(); + } + }, + i(local) { + if (current) + return; + transition_in(if_block1); + current = true; + }, + o(local) { + transition_out(if_block1); + current = false; + }, + d(detaching) { + if (detaching) { + detach(main); + } + ctx[23](null); + ctx[24](null); + ctx[25](null); + ctx[26](null); + ctx[27](null); + ctx[28](null); + ctx[29](null); + ctx[31](null); + if (if_block0) + if_block0.d(); + if (if_block1) + if_block1.d(); + mounted = false; + run_all(dispose); + } + }; +} +function triggerRefresh2() { + dispatchEvent(new CustomEvent("git-refresh")); +} +function instance9($$self, $$props, $$invalidate) { + let rows; + let { plugin } = $$props; + let { view } = $$props; + let loading; + let status2; + let lastPulledFiles = []; + let commitMessage = plugin.settings.commitMessage; + let buttons = []; + let changeHierarchy; + let stagedHierarchy; + let lastPulledFilesHierarchy; + let changesOpen = true; + let stagedOpen = true; + let lastPulledFilesOpen = true; + let showTree = plugin.settings.treeStructure; + let layoutBtn; + addEventListener("git-view-refresh", refresh); + plugin.app.workspace.onLayoutReady(() => { + window.setTimeout( + () => { + buttons.forEach((btn) => (0, import_obsidian29.setIcon)(btn, btn.getAttr("data-icon"))); + (0, import_obsidian29.setIcon)(layoutBtn, showTree ? "list" : "folder"); + }, + 0 + ); + }); + onDestroy(() => { + removeEventListener("git-view-refresh", refresh); + }); + function commit2() { + return __awaiter(this, void 0, void 0, function* () { + $$invalidate(5, loading = true); + if (status2) { + if (yield plugin.hasTooBigFiles(status2.staged)) { + plugin.setState(0 /* idle */); + return false; + } + plugin.promiseQueue.addTask(() => plugin.gitManager.commit({ message: commitMessage }).then(() => { + if (commitMessage !== plugin.settings.commitMessage) { + $$invalidate(2, commitMessage = ""); + } + plugin.setUpAutoBackup(); + }).finally(triggerRefresh2)); + } + }); + } + function backup() { + return __awaiter(this, void 0, void 0, function* () { + $$invalidate(5, loading = true); + if (status2) { + plugin.promiseQueue.addTask(() => plugin.createBackup(false, false, commitMessage).then(() => { + if (commitMessage !== plugin.settings.commitMessage) { + $$invalidate(2, commitMessage = ""); + } + }).finally(triggerRefresh2)); + } + }); + } + function refresh() { + return __awaiter(this, void 0, void 0, function* () { + if (!plugin.gitReady) { + $$invalidate(6, status2 = void 0); + return; + } + const unPushedCommits = yield plugin.gitManager.getUnpushedCommits(); + buttons.forEach((btn) => { + var _a2, _b; + if (import_obsidian29.Platform.isMobile) { + btn.removeClass("button-border"); + if (btn.id == "push" && unPushedCommits > 0) { + btn.addClass("button-border"); + } + } else { + (_a2 = btn.firstElementChild) === null || _a2 === void 0 ? void 0 : _a2.removeAttribute("color"); + if (btn.id == "push" && unPushedCommits > 0) { + (_b = btn.firstElementChild) === null || _b === void 0 ? void 0 : _b.setAttr("color", "var(--text-accent)"); + } + } + }); + $$invalidate(6, status2 = plugin.cachedStatus); + if (plugin.lastPulledFiles && plugin.lastPulledFiles != lastPulledFiles) { + $$invalidate(7, lastPulledFiles = plugin.lastPulledFiles); + $$invalidate(11, lastPulledFilesHierarchy = { + title: "", + path: "", + vaultPath: "", + children: plugin.gitManager.getTreeStructure(lastPulledFiles) + }); + } + if (status2) { + const sort = (a, b) => { + return a.vault_path.split("/").last().localeCompare(getDisplayPath(b.vault_path)); + }; + status2.changed.sort(sort); + status2.staged.sort(sort); + if (status2.changed.length + status2.staged.length > 500) { + $$invalidate(6, status2 = void 0); + if (!plugin.loading) { + plugin.displayError("Too many changes to display"); + } + } else { + $$invalidate(9, changeHierarchy = { + title: "", + path: "", + vaultPath: "", + children: plugin.gitManager.getTreeStructure(status2.changed) + }); + $$invalidate(10, stagedHierarchy = { + title: "", + path: "", + vaultPath: "", + children: plugin.gitManager.getTreeStructure(status2.staged) + }); + } + } else { + $$invalidate(9, changeHierarchy = void 0); + $$invalidate(10, stagedHierarchy = void 0); + } + $$invalidate(5, loading = plugin.loading); + }); + } + function stageAll() { + $$invalidate(5, loading = true); + plugin.promiseQueue.addTask(() => plugin.gitManager.stageAll({ status: status2 }).finally(triggerRefresh2)); + } + function unstageAll() { + $$invalidate(5, loading = true); + plugin.promiseQueue.addTask(() => plugin.gitManager.unstageAll({ status: status2 }).finally(triggerRefresh2)); + } + function push2() { + $$invalidate(5, loading = true); + plugin.promiseQueue.addTask(() => plugin.push().finally(triggerRefresh2)); + } + function pull2() { + $$invalidate(5, loading = true); + plugin.promiseQueue.addTask(() => plugin.pullChangesFromRemote().finally(triggerRefresh2)); + } + function discard() { + new DiscardModal(view.app, false, plugin.gitManager.getRelativeVaultPath("/")).myOpen().then((shouldDiscard) => { + if (shouldDiscard === true) { + plugin.promiseQueue.addTask(() => plugin.gitManager.discardAll({ status: plugin.cachedStatus }).finally(() => { + dispatchEvent(new CustomEvent("git-refresh")); + })); + } + }); + } + function div0_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[5] = $$value; + $$invalidate(8, buttons); + }); + } + function div1_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[0] = $$value; + $$invalidate(8, buttons); + }); + } + function div2_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[1] = $$value; + $$invalidate(8, buttons); + }); + } + function div3_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[2] = $$value; + $$invalidate(8, buttons); + }); + } + function div4_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[3] = $$value; + $$invalidate(8, buttons); + }); + } + function div5_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[4] = $$value; + $$invalidate(8, buttons); + }); + } + function div6_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + layoutBtn = $$value; + $$invalidate(4, layoutBtn); + }); + } + const click_handler = () => { + $$invalidate(3, showTree = !showTree); + $$invalidate(0, plugin.settings.treeStructure = showTree, plugin); + plugin.saveSettings(); + }; + function div7_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[6] = $$value; + $$invalidate(8, buttons); + }); + } + function textarea_input_handler() { + commitMessage = this.value; + $$invalidate(2, commitMessage); + } + const click_handler_1 = () => $$invalidate(2, commitMessage = ""); + function div2_binding_1($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[8] = $$value; + $$invalidate(8, buttons); + }); + } + const click_handler_2 = () => $$invalidate(13, stagedOpen = !stagedOpen); + function div11_binding($$value) { + binding_callbacks[$$value ? "unshift" : "push"](() => { + buttons[9] = $$value; + $$invalidate(8, buttons); + }); + } + const click_handler_3 = () => $$invalidate(12, changesOpen = !changesOpen); + const click_handler_4 = () => $$invalidate(14, lastPulledFilesOpen = !lastPulledFilesOpen); + $$self.$$set = ($$props2) => { + if ("plugin" in $$props2) + $$invalidate(0, plugin = $$props2.plugin); + if ("view" in $$props2) + $$invalidate(1, view = $$props2.view); + }; + $$self.$$.update = () => { + if ($$self.$$.dirty[0] & /*layoutBtn, showTree*/ + 24) { + $: { + if (layoutBtn) { + layoutBtn.empty(); + (0, import_obsidian29.setIcon)(layoutBtn, showTree ? "list" : "folder"); + } + } + } + if ($$self.$$.dirty[0] & /*commitMessage*/ + 4) { + $: + $$invalidate(15, rows = (commitMessage.match(/\n/g) || []).length + 1 || 1); + } + }; + return [ + plugin, + view, + commitMessage, + showTree, + layoutBtn, + loading, + status2, + lastPulledFiles, + buttons, + changeHierarchy, + stagedHierarchy, + lastPulledFilesHierarchy, + changesOpen, + stagedOpen, + lastPulledFilesOpen, + rows, + commit2, + backup, + stageAll, + unstageAll, + push2, + pull2, + discard, + div0_binding, + div1_binding, + div2_binding, + div3_binding, + div4_binding, + div5_binding, + div6_binding, + click_handler, + div7_binding, + textarea_input_handler, + click_handler_1, + div2_binding_1, + click_handler_2, + div11_binding, + click_handler_3, + click_handler_4 + ]; +} +var SourceControl = class extends SvelteComponent { + constructor(options) { + super(); + init2(this, options, instance9, create_fragment9, safe_not_equal, { plugin: 0, view: 1 }, add_css7, [-1, -1]); + } +}; +var sourceControl_default = SourceControl; + +// src/ui/sourceControl/sourceControl.ts +var GitView = class extends import_obsidian30.ItemView { + constructor(leaf, plugin) { + super(leaf); + this.plugin = plugin; + this.hoverPopover = null; + } + getViewType() { + return SOURCE_CONTROL_VIEW_CONFIG.type; + } + getDisplayText() { + return SOURCE_CONTROL_VIEW_CONFIG.name; + } + getIcon() { + return SOURCE_CONTROL_VIEW_CONFIG.icon; + } + onClose() { + return super.onClose(); + } + onOpen() { + this._view = new sourceControl_default({ + target: this.contentEl, + props: { + plugin: this.plugin, + view: this + } + }); + return super.onOpen(); + } +}; + +// src/ui/statusBar/branchStatusBar.ts +init_polyfill_buffer(); +var BranchStatusBar = class { + constructor(statusBarEl, plugin) { + this.statusBarEl = statusBarEl; + this.plugin = plugin; + this.statusBarEl.addClass("mod-clickable"); + this.statusBarEl.onClickEvent((e) => { + this.plugin.switchBranch(); + }); + } + async display() { + if (this.plugin.gitReady) { + const branchInfo = await this.plugin.gitManager.branchInfo(); + if (branchInfo.current != void 0) { + this.statusBarEl.setText(branchInfo.current); + } else { + this.statusBarEl.empty(); + } + } else { + this.statusBarEl.empty(); + } + } +}; + +// src/main.ts +var ObsidianGit = class extends import_obsidian31.Plugin { + constructor() { + super(...arguments); + this.gitReady = false; + this.promiseQueue = new PromiseQueue(); + this.conflictOutputFile = "conflict-files-obsidian-git.md"; + this.offlineMode = false; + this.loading = false; + this.lineAuthoringFeature = new LineAuthoringFeature(this); + } + setState(state) { + var _a2; + this.state = state; + (_a2 = this.statusBar) == null ? void 0 : _a2.display(); + } + async updateCachedStatus() { + this.cachedStatus = await this.gitManager.status(); + return this.cachedStatus; + } + async refresh() { + const gitView = this.app.workspace.getLeavesOfType( + SOURCE_CONTROL_VIEW_CONFIG.type + ); + const historyView = this.app.workspace.getLeavesOfType( + HISTORY_VIEW_CONFIG.type + ); + if (this.settings.changedFilesInStatusBar || gitView.length > 0 || historyView.length > 0) { + this.loading = true; + dispatchEvent(new CustomEvent("git-view-refresh")); + await this.updateCachedStatus(); + this.loading = false; + dispatchEvent(new CustomEvent("git-view-refresh")); + } + } + async refreshUpdatedHead() { + this.lineAuthoringFeature.refreshLineAuthorViews(); + } + async onload() { + console.log("loading " + this.manifest.name + " plugin"); + pluginRef.plugin = this; + this.localStorage = new LocalStorageSettings(this); + this.localStorage.migrate(); + await this.loadSettings(); + this.migrateSettings(); + this.settingsTab = new ObsidianGitSettingsTab(this.app, this); + this.addSettingTab(this.settingsTab); + if (!this.localStorage.getPluginDisabled()) { + this.loadPlugin(); + } + } + async loadPlugin() { + addEventListener("git-refresh", this.refresh.bind(this)); + addEventListener("git-head-update", this.refreshUpdatedHead.bind(this)); + this.registerView(SOURCE_CONTROL_VIEW_CONFIG.type, (leaf) => { + return new GitView(leaf, this); + }); + this.registerView(HISTORY_VIEW_CONFIG.type, (leaf) => { + return new HistoryView2(leaf, this); + }); + this.registerView(DIFF_VIEW_CONFIG.type, (leaf) => { + return new DiffView(leaf, this); + }); + this.lineAuthoringFeature.onLoadPlugin(); + this.app.workspace.registerHoverLinkSource( + SOURCE_CONTROL_VIEW_CONFIG.type, + { + display: "Git View", + defaultMod: true + } + ); + this.setRefreshDebouncer(); + this.addCommand({ + id: "edit-gitignore", + name: "Edit .gitignore", + callback: async () => { + const path2 = this.gitManager.getRelativeVaultPath(".gitignore"); + if (!await this.app.vault.adapter.exists(path2)) { + this.app.vault.adapter.write(path2, ""); + } + const content = await this.app.vault.adapter.read(path2); + const modal = new IgnoreModal(this.app, content); + const res = await modal.open(); + if (res !== void 0) { + await this.app.vault.adapter.write(path2, res); + this.refresh(); + } + } + }); + this.addCommand({ + id: "open-git-view", + name: "Open source control view", + callback: async () => { + const leafs = this.app.workspace.getLeavesOfType( + SOURCE_CONTROL_VIEW_CONFIG.type + ); + let leaf; + if (leafs.length === 0) { + leaf = this.app.workspace.getRightLeaf(false); + await leaf.setViewState({ + type: SOURCE_CONTROL_VIEW_CONFIG.type + }); + } else { + leaf = leafs.first(); + } + this.app.workspace.revealLeaf(leaf); + dispatchEvent(new CustomEvent("git-refresh")); + } + }); + this.addCommand({ + id: "open-history-view", + name: "Open history view", + callback: async () => { + const leafs = this.app.workspace.getLeavesOfType( + HISTORY_VIEW_CONFIG.type + ); + let leaf; + if (leafs.length === 0) { + leaf = this.app.workspace.getRightLeaf(false); + await leaf.setViewState({ + type: HISTORY_VIEW_CONFIG.type + }); + } else { + leaf = leafs.first(); + } + this.app.workspace.revealLeaf(leaf); + dispatchEvent(new CustomEvent("git-refresh")); + } + }); + this.addCommand({ + id: "open-diff-view", + name: "Open diff view", + checkCallback: (checking) => { + var _a2; + const file = this.app.workspace.getActiveFile(); + if (checking) { + return file !== null; + } else { + (_a2 = getNewLeaf()) == null ? void 0 : _a2.setViewState({ + type: DIFF_VIEW_CONFIG.type, + active: true, + state: { + staged: false, + file: this.gitManager.getRelativeRepoPath( + file.path, + true + ) + } + }); + } + } + }); + this.addCommand({ + id: "view-file-on-github", + name: "Open file on GitHub", + editorCallback: (editor, { file }) => { + if (file) + return openLineInGitHub(editor, file, this.gitManager); + } + }); + this.addCommand({ + id: "view-history-on-github", + name: "Open file history on GitHub", + editorCallback: (_, { file }) => { + if (file) + return openHistoryInGitHub(file, this.gitManager); + } + }); + this.addCommand({ + id: "pull", + name: "Pull", + callback: () => this.promiseQueue.addTask(() => this.pullChangesFromRemote()) + }); + this.addCommand({ + id: "fetch", + name: "fetch", + callback: () => this.promiseQueue.addTask(() => this.fetch()) + }); + this.addCommand({ + id: "switch-to-remote-branch", + name: "Switch to remote branch", + callback: () => this.promiseQueue.addTask(() => this.switchRemoteBranch()) + }); + this.addCommand({ + id: "add-to-gitignore", + name: "Add file to gitignore", + checkCallback: (checking) => { + const file = this.app.workspace.getActiveFile(); + if (checking) { + return file !== null; + } else { + this.app.vault.adapter.append( + this.gitManager.getRelativeVaultPath(".gitignore"), + "\n" + this.gitManager.getRelativeRepoPath( + file.path, + true + ) + ).then(() => { + this.refresh(); + }); + } + } + }); + this.addCommand({ + id: "push", + name: "Create backup", + callback: () => this.promiseQueue.addTask(() => this.createBackup(false)) + }); + this.addCommand({ + id: "backup-and-close", + name: "Create backup and close", + callback: () => this.promiseQueue.addTask(async () => { + await this.createBackup(false); + window.close(); + }) + }); + this.addCommand({ + id: "commit-push-specified-message", + name: "Create backup with specific message", + callback: () => this.promiseQueue.addTask(() => this.createBackup(false, true)) + }); + this.addCommand({ + id: "commit", + name: "Commit all changes", + callback: () => this.promiseQueue.addTask( + () => this.commit({ fromAutoBackup: false }) + ) + }); + this.addCommand({ + id: "commit-specified-message", + name: "Commit all changes with specific message", + callback: () => this.promiseQueue.addTask( + () => this.commit({ + fromAutoBackup: false, + requestCustomMessage: true + }) + ) + }); + this.addCommand({ + id: "commit-staged", + name: "Commit staged", + callback: () => this.promiseQueue.addTask( + () => this.commit({ + fromAutoBackup: false, + requestCustomMessage: false, + onlyStaged: true + }) + ) + }); + if (import_obsidian31.Platform.isDesktopApp) { + this.addCommand({ + id: "commit-amend-staged-specified-message", + name: "Commit Amend", + callback: () => this.promiseQueue.addTask( + () => this.commit({ + fromAutoBackup: false, + requestCustomMessage: true, + onlyStaged: true, + amend: true + }) + ) + }); + } + this.addCommand({ + id: "commit-staged-specified-message", + name: "Commit staged with specific message", + callback: () => this.promiseQueue.addTask( + () => this.commit({ + fromAutoBackup: false, + requestCustomMessage: true, + onlyStaged: true + }) + ) + }); + this.addCommand({ + id: "push2", + name: "Push", + callback: () => this.promiseQueue.addTask(() => this.push()) + }); + this.addCommand({ + id: "stage-current-file", + name: "Stage current file", + checkCallback: (checking) => { + const file = this.app.workspace.getActiveFile(); + if (checking) { + return file !== null; + } else { + this.promiseQueue.addTask(() => this.stageFile(file)); + } + } + }); + this.addCommand({ + id: "unstage-current-file", + name: "Unstage current file", + checkCallback: (checking) => { + const file = this.app.workspace.getActiveFile(); + if (checking) { + return file !== null; + } else { + this.promiseQueue.addTask(() => this.unstageFile(file)); + } + } + }); + this.addCommand({ + id: "edit-remotes", + name: "Edit remotes", + callback: async () => this.editRemotes() + }); + this.addCommand({ + id: "remove-remote", + name: "Remove remote", + callback: async () => this.removeRemote() + }); + this.addCommand({ + id: "set-upstream-branch", + name: "Set upstream branch", + callback: async () => this.setUpsreamBranch() + }); + this.addCommand({ + id: "delete-repo", + name: "CAUTION: Delete repository", + callback: async () => { + const repoExists = await this.app.vault.adapter.exists( + `${this.settings.basePath}/.git` + ); + if (repoExists) { + const modal = new GeneralModal({ + options: ["NO", "YES"], + placeholder: "Do you really want to delete the repository (.git directory)? This action cannot be undone.", + onlySelection: true + }); + const shouldDelete = await modal.open() === "YES"; + if (shouldDelete) { + await this.app.vault.adapter.rmdir( + `${this.settings.basePath}/.git`, + true + ); + new import_obsidian31.Notice( + "Successfully deleted repository. Reloading plugin..." + ); + this.unloadPlugin(); + this.init(); + } + } else { + new import_obsidian31.Notice("No repository found"); + } + } + }); + this.addCommand({ + id: "init-repo", + name: "Initialize a new repo", + callback: async () => this.createNewRepo() + }); + this.addCommand({ + id: "clone-repo", + name: "Clone an existing remote repo", + callback: async () => this.cloneNewRepo() + }); + this.addCommand({ + id: "list-changed-files", + name: "List changed files", + callback: async () => { + if (!await this.isAllInitialized()) + return; + const status2 = await this.gitManager.status(); + console.log(status2); + this.setState(0 /* idle */); + if (status2.changed.length + status2.staged.length > 500) { + this.displayError("Too many changes to display"); + return; + } + new ChangedFilesModal(this, status2.all).open(); + } + }); + this.addCommand({ + id: "switch-branch", + name: "Switch branch", + callback: () => { + this.switchBranch(); + } + }); + this.addCommand({ + id: "create-branch", + name: "Create new branch", + callback: () => { + this.createBranch(); + } + }); + this.addCommand({ + id: "delete-branch", + name: "Delete branch", + callback: () => { + this.deleteBranch(); + } + }); + this.addCommand({ + id: "discard-all", + name: "CAUTION: Discard all changes", + callback: async () => { + if (!await this.isAllInitialized()) + return false; + const modal = new GeneralModal({ + options: ["NO", "YES"], + placeholder: "Do you want to discard all changes to tracked files? This action cannot be undone.", + onlySelection: true + }); + const shouldDiscardAll = await modal.open() === "YES"; + if (shouldDiscardAll) { + this.promiseQueue.addTask(() => this.discardAll()); + } + } + }); + this.addCommand({ + id: "toggle-line-author-info", + name: "Toggle line author information", + callback: () => { + var _a2; + return (_a2 = this.settingsTab) == null ? void 0 : _a2.configureLineAuthorShowStatus( + !this.settings.lineAuthor.show + ); + } + }); + this.registerEvent( + this.app.workspace.on("file-menu", (menu, file, source) => { + this.handleFileMenu(menu, file, source); + }) + ); + if (this.settings.showStatusBar) { + const statusBarEl = this.addStatusBarItem(); + this.statusBar = new StatusBar(statusBarEl, this); + this.registerInterval( + window.setInterval(() => { + var _a2; + return (_a2 = this.statusBar) == null ? void 0 : _a2.display(); + }, 1e3) + ); + } + if (import_obsidian31.Platform.isDesktop && this.settings.showBranchStatusBar) { + const branchStatusBarEl = this.addStatusBarItem(); + this.branchBar = new BranchStatusBar(branchStatusBarEl, this); + this.registerInterval( + window.setInterval(() => { + var _a2; + return (_a2 = this.branchBar) == null ? void 0 : _a2.display(); + }, 6e4) + ); + } + this.app.workspace.onLayoutReady(() => this.init()); + } + setRefreshDebouncer() { + var _a2; + (_a2 = this.debRefresh) == null ? void 0 : _a2.cancel(); + this.debRefresh = (0, import_obsidian31.debounce)( + () => { + if (this.settings.refreshSourceControl) { + this.refresh(); + } + }, + this.settings.refreshSourceControlTimer, + true + ); + } + async showNotices() { + const length = 1e4; + if (this.manifest.id === "obsidian-git" && import_obsidian31.Platform.isDesktopApp && !this.settings.showedMobileNotice) { + new import_obsidian31.Notice( + "Git is now available on mobile! Please read the plugin's README for more information.", + length + ); + this.settings.showedMobileNotice = true; + await this.saveSettings(); + } + if (this.manifest.id === "obsidian-git-isomorphic") { + new import_obsidian31.Notice( + "Git Mobile is now deprecated. Please uninstall it and install Git instead.", + length + ); + } + } + handleFileMenu(menu, file, source) { + if (!this.settings.showFileMenu) + return; + if (source !== "file-explorer-context-menu") { + return; + } + if (!file) { + return; + } + if (!this.gitReady) + return; + menu.addItem((item) => { + item.setTitle(`Git: Stage`).setIcon("plus-circle").setSection("action").onClick((_) => { + this.promiseQueue.addTask(async () => { + if (file instanceof import_obsidian31.TFile) { + await this.gitManager.stage(file.path, true); + } else { + await this.gitManager.stageAll({ + dir: this.gitManager.getRelativeRepoPath( + file.path, + true + ) + }); + } + this.displayMessage(`Staged ${file.path}`); + }); + }); + }); + menu.addItem((item) => { + item.setTitle(`Git: Unstage`).setIcon("minus-circle").setSection("action").onClick((_) => { + this.promiseQueue.addTask(async () => { + if (file instanceof import_obsidian31.TFile) { + await this.gitManager.unstage(file.path, true); + } else { + await this.gitManager.unstageAll({ + dir: this.gitManager.getRelativeRepoPath( + file.path, + true + ) + }); + } + this.displayMessage(`Unstaged ${file.path}`); + }); + }); + }); + } + async migrateSettings() { + if (this.settings.mergeOnPull != void 0) { + this.settings.syncMethod = this.settings.mergeOnPull ? "merge" : "rebase"; + this.settings.mergeOnPull = void 0; + await this.saveSettings(); + } + if (this.settings.autoCommitMessage === void 0) { + this.settings.autoCommitMessage = this.settings.commitMessage; + await this.saveSettings(); + } + if (this.settings.gitPath != void 0) { + this.localStorage.setGitPath(this.settings.gitPath); + this.settings.gitPath = void 0; + await this.saveSettings(); + } + if (this.settings.username != void 0) { + this.localStorage.setPassword(this.settings.username); + this.settings.username = void 0; + await this.saveSettings(); + } + } + unloadPlugin() { + this.gitReady = false; + dispatchEvent(new CustomEvent("git-refresh")); + this.lineAuthoringFeature.deactivateFeature(); + this.clearAutoPull(); + this.clearAutoPush(); + this.clearAutoBackup(); + removeEventListener("git-refresh", this.refresh.bind(this)); + removeEventListener( + "git-head-update", + this.refreshUpdatedHead.bind(this) + ); + this.app.workspace.offref(this.openEvent); + this.app.metadataCache.offref(this.modifyEvent); + this.app.metadataCache.offref(this.deleteEvent); + this.app.metadataCache.offref(this.createEvent); + this.app.metadataCache.offref(this.renameEvent); + this.debRefresh.cancel(); + } + async onunload() { + this.app.workspace.unregisterHoverLinkSource( + SOURCE_CONTROL_VIEW_CONFIG.type + ); + this.unloadPlugin(); + console.log("unloading " + this.manifest.name + " plugin"); + } + async loadSettings() { + let data = await this.loadData(); + if (data == void 0) { + data = { showedMobileNotice: true }; + } + this.settings = mergeSettingsByPriority(DEFAULT_SETTINGS, data); + } + async saveSettings() { + var _a2; + (_a2 = this.settingsTab) == null ? void 0 : _a2.beforeSaveSettings(); + await this.saveData(this.settings); + } + saveLastAuto(date, mode) { + if (mode === "backup") { + this.localStorage.setLastAutoBackup(date.toString()); + } else if (mode === "pull") { + this.localStorage.setLastAutoPull(date.toString()); + } else if (mode === "push") { + this.localStorage.setLastAutoPush(date.toString()); + } + } + loadLastAuto() { + var _a2, _b, _c; + return { + backup: new Date((_a2 = this.localStorage.getLastAutoBackup()) != null ? _a2 : ""), + pull: new Date((_b = this.localStorage.getLastAutoPull()) != null ? _b : ""), + push: new Date((_c = this.localStorage.getLastAutoPush()) != null ? _c : "") + }; + } + get useSimpleGit() { + return import_obsidian31.Platform.isDesktopApp; + } + async init() { + var _a2; + this.showNotices(); + try { + if (this.useSimpleGit) { + this.gitManager = new SimpleGit(this); + await this.gitManager.setGitInstance(); + } else { + this.gitManager = new IsomorphicGit(this); + } + const result = await this.gitManager.checkRequirements(); + switch (result) { + case "missing-git": + this.displayError("Cannot run git command"); + break; + case "missing-repo": + new import_obsidian31.Notice( + "Can't find a valid git repository. Please create one via the given command or clone an existing repo.", + 1e4 + ); + break; + case "valid": + this.gitReady = true; + this.setState(0 /* idle */); + this.openEvent = this.app.workspace.on( + "active-leaf-change", + (leaf) => this.handleViewActiveState(leaf) + ); + this.modifyEvent = this.app.vault.on("modify", () => { + this.debRefresh(); + }); + this.deleteEvent = this.app.vault.on("delete", () => { + this.debRefresh(); + }); + this.createEvent = this.app.vault.on("create", () => { + this.debRefresh(); + }); + this.renameEvent = this.app.vault.on("rename", () => { + this.debRefresh(); + }); + this.registerEvent(this.modifyEvent); + this.registerEvent(this.deleteEvent); + this.registerEvent(this.createEvent); + this.registerEvent(this.renameEvent); + (_a2 = this.branchBar) == null ? void 0 : _a2.display(); + this.lineAuthoringFeature.conditionallyActivateBySettings(); + dispatchEvent(new CustomEvent("git-refresh")); + if (this.settings.autoPullOnBoot) { + this.promiseQueue.addTask( + () => this.pullChangesFromRemote() + ); + } + this.setUpAutos(); + break; + default: + console.log( + "Something weird happened. The 'checkRequirements' result is " + result + ); + } + } catch (error) { + this.displayError(error); + console.error(error); + } + } + async createNewRepo() { + await this.gitManager.init(); + new import_obsidian31.Notice("Initialized new repo"); + await this.init(); + } + async cloneNewRepo() { + const modal = new GeneralModal({ placeholder: "Enter remote URL" }); + const url = await modal.open(); + if (url) { + const confirmOption = "Vault Root"; + let dir = await new GeneralModal({ + options: this.gitManager instanceof IsomorphicGit ? [confirmOption] : [], + placeholder: "Enter directory for clone. It needs to be empty or not existent.", + allowEmpty: this.gitManager instanceof IsomorphicGit + }).open(); + if (dir !== void 0) { + if (dir === confirmOption) { + dir = "."; + } + dir = (0, import_obsidian31.normalizePath)(dir); + if (dir === "/") { + dir = "."; + } + if (dir === ".") { + const modal2 = new GeneralModal({ + options: ["NO", "YES"], + placeholder: `Does your remote repo contain a ${app.vault.configDir} directory at the root?`, + onlySelection: true + }); + const containsConflictDir = await modal2.open(); + if (containsConflictDir === void 0) { + new import_obsidian31.Notice("Aborted clone"); + return; + } else if (containsConflictDir === "YES") { + const confirmOption2 = "DELETE ALL YOUR LOCAL CONFIG AND PLUGINS"; + const modal3 = new GeneralModal({ + options: ["Abort clone", confirmOption2], + placeholder: `To avoid conflicts, the local ${app.vault.configDir} directory needs to be deleted.`, + onlySelection: true + }); + const shouldDelete = await modal3.open() === confirmOption2; + if (shouldDelete) { + await this.app.vault.adapter.rmdir( + app.vault.configDir, + true + ); + } else { + new import_obsidian31.Notice("Aborted clone"); + return; + } + } + } + const depth = await new GeneralModal({ + placeholder: "Specify depth of clone. Leave empty for full clone.", + allowEmpty: true + }).open(); + let depthInt = void 0; + if (depth !== "") { + depthInt = parseInt(depth); + if (isNaN(depthInt)) { + new import_obsidian31.Notice("Invalid depth. Aborting clone."); + return; + } + } + new import_obsidian31.Notice(`Cloning new repo into "${dir}"`); + const oldBase = this.settings.basePath; + const customDir = dir && dir !== "."; + if (customDir) { + this.settings.basePath = dir; + } + try { + await this.gitManager.clone(url, dir, depthInt); + } catch (error) { + this.settings.basePath = oldBase; + this.saveSettings(); + throw error; + } + new import_obsidian31.Notice("Cloned new repo."); + new import_obsidian31.Notice("Please restart Obsidian"); + if (customDir) { + this.saveSettings(); + } + } + } + } + /** + * Retries to call `this.init()` if necessary, otherwise returns directly + * @returns true if `this.gitManager` is ready to be used, false if not. + */ + async isAllInitialized() { + if (!this.gitReady) { + await this.init(); + } + return this.gitReady; + } + ///Used for command + async pullChangesFromRemote() { + if (!await this.isAllInitialized()) + return; + const filesUpdated = await this.pull(); + this.setUpAutoBackup(); + if (filesUpdated === false) { + return; + } + if (!filesUpdated) { + this.displayMessage("Everything is up-to-date"); + } + if (this.gitManager instanceof SimpleGit) { + const status2 = await this.gitManager.status(); + if (status2.conflicted.length > 0) { + this.displayError( + `You have conflicts in ${status2.conflicted.length} ${status2.conflicted.length == 1 ? "file" : "files"}` + ); + this.handleConflict(status2.conflicted); + } + } + dispatchEvent(new CustomEvent("git-refresh")); + this.setState(0 /* idle */); + } + async createBackup(fromAutoBackup, requestCustomMessage = false, commitMessage) { + if (!await this.isAllInitialized()) + return; + if (this.settings.syncMethod == "reset" && this.settings.pullBeforePush) { + await this.pull(); + } + if (!await this.commit({ + fromAutoBackup, + requestCustomMessage, + commitMessage + })) + return; + if (!this.settings.disablePush) { + if (await this.gitManager.canPush()) { + if (this.settings.syncMethod != "reset" && this.settings.pullBeforePush) { + await this.pull(); + } + await this.push(); + } else { + this.displayMessage("No changes to push"); + } + } + this.setState(0 /* idle */); + } + // Returns true if commit was successfully + async commit({ + fromAutoBackup, + requestCustomMessage = false, + onlyStaged = false, + commitMessage, + amend = false + }) { + if (!await this.isAllInitialized()) + return false; + let hadConflict = this.localStorage.getConflict(); + let changedFiles; + let status2; + let unstagedFiles; + if (this.gitManager instanceof SimpleGit) { + this.mayDeleteConflictFile(); + status2 = await this.updateCachedStatus(); + if (status2.conflicted.length == 0) { + this.localStorage.setConflict(false); + hadConflict = false; + } + if (fromAutoBackup && status2.conflicted.length > 0) { + this.displayError( + `Did not commit, because you have conflicts in ${status2.conflicted.length} ${status2.conflicted.length == 1 ? "file" : "files"}. Please resolve them and commit per command.` + ); + this.handleConflict(status2.conflicted); + return false; + } + changedFiles = [...status2.changed, ...status2.staged]; + } else if (fromAutoBackup && hadConflict) { + this.setState(6 /* conflicted */); + this.displayError( + `Did not commit, because you have conflicts. Please resolve them and commit per command.` + ); + return false; + } else if (hadConflict) { + await this.mayDeleteConflictFile(); + status2 = await this.updateCachedStatus(); + changedFiles = [...status2.changed, ...status2.staged]; + } else { + if (onlyStaged) { + changedFiles = await this.gitManager.getStagedFiles(); + } else { + unstagedFiles = await this.gitManager.getUnstagedFiles(); + changedFiles = unstagedFiles.map(({ filepath }) => ({ + vault_path: this.gitManager.getRelativeVaultPath(filepath) + })); + } + } + if (await this.hasTooBigFiles(changedFiles)) { + this.setState(0 /* idle */); + return false; + } + if (changedFiles.length !== 0 || hadConflict) { + let cmtMessage = commitMessage != null ? commitMessage : commitMessage = fromAutoBackup ? this.settings.autoCommitMessage : this.settings.commitMessage; + if (fromAutoBackup && this.settings.customMessageOnAutoBackup || requestCustomMessage) { + if (!this.settings.disablePopups && fromAutoBackup) { + new import_obsidian31.Notice( + "Auto backup: Please enter a custom commit message. Leave empty to abort" + ); + } + const tempMessage = await new CustomMessageModal( + this, + true + ).open(); + if (tempMessage != void 0 && tempMessage != "" && tempMessage != "...") { + cmtMessage = tempMessage; + } else { + this.setState(0 /* idle */); + return false; + } + } + let committedFiles; + if (onlyStaged) { + committedFiles = await this.gitManager.commit({ + message: cmtMessage, + amend + }); + } else { + committedFiles = await this.gitManager.commitAll({ + message: cmtMessage, + status: status2, + unstagedFiles, + amend + }); + } + if (this.gitManager instanceof SimpleGit) { + if ((await this.updateCachedStatus()).conflicted.length == 0) { + this.localStorage.setConflict(false); + } + } + let roughly = false; + if (committedFiles === void 0) { + roughly = true; + committedFiles = changedFiles.length; + } + this.setUpAutoBackup(); + this.displayMessage( + `Committed${roughly ? " approx." : ""} ${committedFiles} ${committedFiles == 1 ? "file" : "files"}` + ); + } else { + this.displayMessage("No changes to commit"); + } + dispatchEvent(new CustomEvent("git-refresh")); + this.setState(0 /* idle */); + return true; + } + async hasTooBigFiles(files) { + const branchInfo = await this.gitManager.branchInfo(); + const remote = branchInfo.tracking ? splitRemoteBranch(branchInfo.tracking)[0] : null; + if (remote) { + const remoteUrl = await this.gitManager.getRemoteUrl(remote); + if (remoteUrl == null ? void 0 : remoteUrl.includes("github.com")) { + const tooBigFiles = files.filter((f) => { + const file = this.app.vault.getAbstractFileByPath( + f.vault_path + ); + if (file instanceof import_obsidian31.TFile) { + return file.stat.size >= 1e8; + } + return false; + }); + if (tooBigFiles.length > 0) { + this.displayError( + `Did not commit, because following files are too big: ${tooBigFiles.map( + (e) => e.vault_path + )}. Please remove them.` + ); + return true; + } + } + } + return false; + } + async push() { + if (!await this.isAllInitialized()) + return false; + if (!await this.remotesAreSet()) { + return false; + } + const hadConflict = this.localStorage.getConflict(); + if (this.gitManager instanceof SimpleGit) + await this.mayDeleteConflictFile(); + let status2; + if (this.gitManager instanceof SimpleGit && (status2 = await this.updateCachedStatus()).conflicted.length > 0) { + this.displayError( + `Cannot push. You have conflicts in ${status2.conflicted.length} ${status2.conflicted.length == 1 ? "file" : "files"}` + ); + this.handleConflict(status2.conflicted); + return false; + } else if (this.gitManager instanceof IsomorphicGit && hadConflict) { + this.displayError(`Cannot push. You have conflicts`); + this.setState(6 /* conflicted */); + return false; + } + console.log("Pushing...."); + const pushedFiles = await this.gitManager.push(); + if (pushedFiles !== void 0) { + console.log("Pushed!", pushedFiles); + if (pushedFiles > 0) { + this.displayMessage( + `Pushed ${pushedFiles} ${pushedFiles == 1 ? "file" : "files"} to remote` + ); + } else { + this.displayMessage(`No changes to push`); + } + } + this.offlineMode = false; + this.setState(0 /* idle */); + dispatchEvent(new CustomEvent("git-refresh")); + return true; + } + /** Used for internals + Returns whether the pull added a commit or not. + + See {@link pullChangesFromRemote} for the command version. */ + async pull() { + if (!await this.remotesAreSet()) { + return false; + } + const pulledFiles = await this.gitManager.pull() || []; + this.offlineMode = false; + if (pulledFiles.length > 0) { + this.displayMessage( + `Pulled ${pulledFiles.length} ${pulledFiles.length == 1 ? "file" : "files"} from remote` + ); + this.lastPulledFiles = pulledFiles; + } + return pulledFiles.length; + } + async fetch() { + if (!await this.remotesAreSet()) { + return; + } + await this.gitManager.fetch(); + this.displayMessage(`Fetched from remote`); + this.offlineMode = false; + dispatchEvent(new CustomEvent("git-refresh")); + } + async mayDeleteConflictFile() { + const file = this.app.vault.getAbstractFileByPath( + this.conflictOutputFile + ); + if (file) { + this.app.workspace.iterateAllLeaves((leaf) => { + var _a2; + if (leaf.view instanceof import_obsidian31.MarkdownView && ((_a2 = leaf.view.file) == null ? void 0 : _a2.path) == file.path) { + leaf.detach(); + } + }); + await this.app.vault.delete(file); + } + } + async stageFile(file) { + if (!await this.isAllInitialized()) + return false; + await this.gitManager.stage(file.path, true); + this.displayMessage(`Staged ${file.path}`); + dispatchEvent(new CustomEvent("git-refresh")); + this.setState(0 /* idle */); + return true; + } + async unstageFile(file) { + if (!await this.isAllInitialized()) + return false; + await this.gitManager.unstage(file.path, true); + this.displayMessage(`Unstaged ${file.path}`); + dispatchEvent(new CustomEvent("git-refresh")); + this.setState(0 /* idle */); + return true; + } + async switchBranch() { + var _a2; + if (!await this.isAllInitialized()) + return; + const branchInfo = await this.gitManager.branchInfo(); + const selectedBranch = await new BranchModal( + branchInfo.branches + ).open(); + if (selectedBranch != void 0) { + await this.gitManager.checkout(selectedBranch); + this.displayMessage(`Switched to ${selectedBranch}`); + (_a2 = this.branchBar) == null ? void 0 : _a2.display(); + return selectedBranch; + } + } + async switchRemoteBranch() { + var _a2; + if (!await this.isAllInitialized()) + return; + const selectedBranch = await this.selectRemoteBranch() || ""; + const [remote, branch2] = splitRemoteBranch(selectedBranch); + if (branch2 != void 0 && remote != void 0) { + await this.gitManager.checkout(branch2, remote); + this.displayMessage(`Switched to ${selectedBranch}`); + (_a2 = this.branchBar) == null ? void 0 : _a2.display(); + return selectedBranch; + } + } + async createBranch() { + var _a2; + if (!await this.isAllInitialized()) + return; + const newBranch = await new GeneralModal({ + placeholder: "Create new branch" + }).open(); + if (newBranch != void 0) { + await this.gitManager.createBranch(newBranch); + this.displayMessage(`Created new branch ${newBranch}`); + (_a2 = this.branchBar) == null ? void 0 : _a2.display(); + return newBranch; + } + } + async deleteBranch() { + var _a2; + if (!await this.isAllInitialized()) + return; + const branchInfo = await this.gitManager.branchInfo(); + if (branchInfo.current) + branchInfo.branches.remove(branchInfo.current); + const branch2 = await new GeneralModal({ + options: branchInfo.branches, + placeholder: "Delete branch", + onlySelection: true + }).open(); + if (branch2 != void 0) { + let force = false; + const merged = await this.gitManager.branchIsMerged(branch2); + if (!merged) { + const forceAnswer = await new GeneralModal({ + options: ["YES", "NO"], + placeholder: "This branch isn't merged into HEAD. Force delete?", + onlySelection: true + }).open(); + if (forceAnswer !== "YES") { + return; + } + force = forceAnswer === "YES"; + } + await this.gitManager.deleteBranch(branch2, force); + this.displayMessage(`Deleted branch ${branch2}`); + (_a2 = this.branchBar) == null ? void 0 : _a2.display(); + return branch2; + } + } + // Ensures that the upstream branch is set. + // If not, it will prompt the user to set it. + // + // An exception is when the user has submodules enabled. + // In this case, the upstream branch is not required, + // to allow pulling/pushing only the submodules and not the outer repo. + async remotesAreSet() { + if (this.settings.updateSubmodules) { + return true; + } + if (!(await this.gitManager.branchInfo()).tracking) { + new import_obsidian31.Notice("No upstream branch is set. Please select one."); + return await this.setUpsreamBranch(); + } + return true; + } + async setUpsreamBranch() { + const remoteBranch = await this.selectRemoteBranch(); + if (remoteBranch == void 0) { + this.displayError("Aborted. No upstream-branch is set!", 1e4); + this.setState(0 /* idle */); + return false; + } else { + await this.gitManager.updateUpstreamBranch(remoteBranch); + this.displayMessage(`Set upstream branch to ${remoteBranch}`); + this.setState(0 /* idle */); + return true; + } + } + async setUpAutoBackup() { + if (this.settings.setLastSaveToLastCommit) { + this.clearAutoBackup(); + const lastCommitDate = await this.gitManager.getLastCommitTime(); + if (lastCommitDate) { + this.localStorage.setLastAutoBackup(lastCommitDate.toString()); + } + } + if (!this.timeoutIDBackup && !this.onFileModifyEventRef) { + const lastAutos = this.loadLastAuto(); + if (this.settings.autoSaveInterval > 0) { + const now2 = /* @__PURE__ */ new Date(); + const diff3 = this.settings.autoSaveInterval - Math.round( + (now2.getTime() - lastAutos.backup.getTime()) / 1e3 / 60 + ); + this.startAutoBackup(diff3 <= 0 ? 0 : diff3); + } + } + } + async setUpAutos() { + this.setUpAutoBackup(); + const lastAutos = this.loadLastAuto(); + if (this.settings.differentIntervalCommitAndPush && this.settings.autoPushInterval > 0) { + const now2 = /* @__PURE__ */ new Date(); + const diff3 = this.settings.autoPushInterval - Math.round( + (now2.getTime() - lastAutos.push.getTime()) / 1e3 / 60 + ); + this.startAutoPush(diff3 <= 0 ? 0 : diff3); + } + if (this.settings.autoPullInterval > 0) { + const now2 = /* @__PURE__ */ new Date(); + const diff3 = this.settings.autoPullInterval - Math.round( + (now2.getTime() - lastAutos.pull.getTime()) / 1e3 / 60 + ); + this.startAutoPull(diff3 <= 0 ? 0 : diff3); + } + } + async discardAll() { + await this.gitManager.discardAll({ + status: this.cachedStatus + }); + new import_obsidian31.Notice( + "All local changes have been discarded. New files remain untouched." + ); + } + clearAutos() { + this.clearAutoBackup(); + this.clearAutoPush(); + this.clearAutoPull(); + } + startAutoBackup(minutes) { + let time = (minutes != null ? minutes : this.settings.autoSaveInterval) * 6e4; + if (this.settings.autoBackupAfterFileChange) { + if (minutes === 0) { + this.doAutoBackup(); + } else { + this.onFileModifyEventRef = this.app.vault.on( + "modify", + () => this.autoBackupDebouncer() + ); + this.autoBackupDebouncer = (0, import_obsidian31.debounce)( + () => this.doAutoBackup(), + time, + true + ); + } + } else { + if (time > 2147483647) + time = 2147483647; + this.timeoutIDBackup = window.setTimeout( + () => this.doAutoBackup(), + time + ); + } + } + // This is used for both auto backup and commit + doAutoBackup() { + this.promiseQueue.addTask(() => { + if (this.settings.differentIntervalCommitAndPush) { + return this.commit({ fromAutoBackup: true }); + } else { + return this.createBackup(true); + } + }); + this.saveLastAuto(/* @__PURE__ */ new Date(), "backup"); + this.saveSettings(); + this.startAutoBackup(); + } + startAutoPull(minutes) { + let time = (minutes != null ? minutes : this.settings.autoPullInterval) * 6e4; + if (time > 2147483647) + time = 2147483647; + this.timeoutIDPull = window.setTimeout(() => { + this.promiseQueue.addTask(() => this.pullChangesFromRemote()); + this.saveLastAuto(/* @__PURE__ */ new Date(), "pull"); + this.saveSettings(); + this.startAutoPull(); + }, time); + } + startAutoPush(minutes) { + let time = (minutes != null ? minutes : this.settings.autoPushInterval) * 6e4; + if (time > 2147483647) + time = 2147483647; + this.timeoutIDPush = window.setTimeout(() => { + this.promiseQueue.addTask(() => this.push()); + this.saveLastAuto(/* @__PURE__ */ new Date(), "push"); + this.saveSettings(); + this.startAutoPush(); + }, time); + } + clearAutoBackup() { + var _a2; + let wasActive = false; + if (this.timeoutIDBackup) { + window.clearTimeout(this.timeoutIDBackup); + this.timeoutIDBackup = void 0; + wasActive = true; + } + if (this.onFileModifyEventRef) { + (_a2 = this.autoBackupDebouncer) == null ? void 0 : _a2.cancel(); + this.app.vault.offref(this.onFileModifyEventRef); + this.onFileModifyEventRef = void 0; + wasActive = true; + } + return wasActive; + } + clearAutoPull() { + if (this.timeoutIDPull) { + window.clearTimeout(this.timeoutIDPull); + this.timeoutIDPull = void 0; + return true; + } + return false; + } + clearAutoPush() { + if (this.timeoutIDPush) { + window.clearTimeout(this.timeoutIDPush); + this.timeoutIDPush = void 0; + return true; + } + return false; + } + async handleConflict(conflicted) { + this.setState(6 /* conflicted */); + this.localStorage.setConflict(true); + let lines; + if (conflicted !== void 0) { + lines = [ + "# Conflicts", + "Please resolve them and commit them using the commands `Git: Commit all changes` followed by `Git: Push`", + "(This file will automatically be deleted before commit)", + "[[#Additional Instructions]] available below file list", + "", + ...conflicted.map((e) => { + const file = this.app.vault.getAbstractFileByPath(e); + if (file instanceof import_obsidian31.TFile) { + const link = this.app.metadataCache.fileToLinktext( + file, + "/" + ); + return `- [[${link}]]`; + } else { + return `- Not a file: ${e}`; + } + }), + ` +# Additional Instructions +I strongly recommend to use "Source mode" for viewing the conflicted files. For simple conflicts, in each file listed above replace every occurrence of the following text blocks with the desired text. + +\`\`\`diff +<<<<<<< HEAD + File changes in local repository +======= + File changes in remote repository +>>>>>>> origin/main +\`\`\`` + ]; + } + this.writeAndOpenFile(lines == null ? void 0 : lines.join("\n")); + } + async editRemotes() { + if (!await this.isAllInitialized()) + return; + const remotes = await this.gitManager.getRemotes(); + const nameModal = new GeneralModal({ + options: remotes, + placeholder: "Select or create a new remote by typing its name and selecting it" + }); + const remoteName = await nameModal.open(); + if (remoteName) { + const oldUrl = await this.gitManager.getRemoteUrl(remoteName); + const urlModal = new GeneralModal({ initialValue: oldUrl }); + const remoteURL = await urlModal.open(); + if (remoteURL) { + await this.gitManager.setRemote(remoteName, remoteURL); + return remoteName; + } + } + } + async selectRemoteBranch() { + let remotes = await this.gitManager.getRemotes(); + let selectedRemote; + if (remotes.length === 0) { + selectedRemote = await this.editRemotes(); + if (selectedRemote == void 0) { + remotes = await this.gitManager.getRemotes(); + } + } + const nameModal = new GeneralModal({ + options: remotes, + placeholder: "Select or create a new remote by typing its name and selecting it" + }); + const remoteName = selectedRemote != null ? selectedRemote : await nameModal.open(); + if (remoteName) { + this.displayMessage("Fetching remote branches"); + await this.gitManager.fetch(remoteName); + const branches = await this.gitManager.getRemoteBranches(remoteName); + const branchModal = new GeneralModal({ + options: branches, + placeholder: "Select or create a new remote branch by typing its name and selecting it" + }); + return await branchModal.open(); + } + } + async removeRemote() { + if (!await this.isAllInitialized()) + return; + const remotes = await this.gitManager.getRemotes(); + const nameModal = new GeneralModal({ + options: remotes, + placeholder: "Select a remote" + }); + const remoteName = await nameModal.open(); + if (remoteName) { + this.gitManager.removeRemote(remoteName); + } + } + async writeAndOpenFile(text2) { + if (text2 !== void 0) { + await this.app.vault.adapter.write(this.conflictOutputFile, text2); + } + let fileIsAlreadyOpened = false; + this.app.workspace.iterateAllLeaves((leaf) => { + if (leaf.getDisplayText() != "" && this.conflictOutputFile.startsWith(leaf.getDisplayText())) { + fileIsAlreadyOpened = true; + } + }); + if (!fileIsAlreadyOpened) { + this.app.workspace.openLinkText(this.conflictOutputFile, "/", true); + } + } + handleViewActiveState(leaf) { + var _a2, _b; + if (!(leaf == null ? void 0 : leaf.view.getState().file)) + return; + const sourceControlLeaf = this.app.workspace.getLeavesOfType(SOURCE_CONTROL_VIEW_CONFIG.type).first(); + const historyLeaf = this.app.workspace.getLeavesOfType(HISTORY_VIEW_CONFIG.type).first(); + (_a2 = sourceControlLeaf == null ? void 0 : sourceControlLeaf.view.containerEl.querySelector(`div.nav-file-title.is-active`)) == null ? void 0 : _a2.removeClass("is-active"); + (_b = historyLeaf == null ? void 0 : historyLeaf.view.containerEl.querySelector(`div.nav-file-title.is-active`)) == null ? void 0 : _b.removeClass("is-active"); + if ((leaf == null ? void 0 : leaf.view) instanceof DiffView) { + const path2 = leaf.view.state.file; + this.lastDiffViewState = leaf.view.getState(); + let el; + if (sourceControlLeaf && leaf.view.state.staged) { + el = sourceControlLeaf.view.containerEl.querySelector( + `div.staged div.nav-file-title[data-path='${path2}']` + ); + } else if (sourceControlLeaf && leaf.view.state.staged === false && !leaf.view.state.hash) { + el = sourceControlLeaf.view.containerEl.querySelector( + `div.changes div.nav-file-title[data-path='${path2}']` + ); + } else if (historyLeaf && leaf.view.state.hash) { + el = historyLeaf.view.containerEl.querySelector( + `div.nav-file-title[data-path='${path2}']` + ); + } + el == null ? void 0 : el.addClass("is-active"); + } else { + this.lastDiffViewState = void 0; + } + } + // region: displaying / formatting messages + displayMessage(message, timeout = 4 * 1e3) { + var _a2; + (_a2 = this.statusBar) == null ? void 0 : _a2.displayMessage(message.toLowerCase(), timeout); + if (!this.settings.disablePopups) { + if (!this.settings.disablePopupsForNoChanges || !message.startsWith("No changes")) { + new import_obsidian31.Notice(message, 5 * 1e3); + } + } + this.log(message); + } + displayError(message, timeout = 10 * 1e3) { + var _a2; + if (message instanceof Errors.UserCanceledError) { + new import_obsidian31.Notice("Aborted"); + return; + } + message = message.toString(); + new import_obsidian31.Notice(message, timeout); + console.log(`git obsidian error: ${message}`); + (_a2 = this.statusBar) == null ? void 0 : _a2.displayMessage(message.toLowerCase(), timeout); + } + log(message) { + console.log(`${this.manifest.id}: ` + message); + } +}; +/*! Bundled license information: + +ieee754/index.js: + (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) + +buffer/index.js: + (*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + *) + +safe-buffer/index.js: + (*! safe-buffer. MIT License. Feross Aboukhadijeh *) + +crc-32/crc32.js: + (*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *) + +js-sha256/src/sha256.js: + (** + * [js-sha256]{@link https://github.com/emn178/js-sha256} + * + * @version 0.9.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2014-2017 + * @license MIT + *) + +feather-icons/dist/feather.js: + (*! + Copyright (c) 2016 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames + *) +*/ diff --git a/.obsidian/plugins/obsidian-git/manifest.json b/.obsidian/plugins/obsidian-git/manifest.json new file mode 100644 index 00000000..79dc19c1 --- /dev/null +++ b/.obsidian/plugins/obsidian-git/manifest.json @@ -0,0 +1,9 @@ +{ + "id": "obsidian-git", + "name": "Git", + "description": "Backup your vault with Git.", + "isDesktopOnly": false, + "fundingUrl": "https://ko-fi.com/vinzent", + "js": "main.js", + "version": "2.24.1" +} diff --git a/.obsidian/plugins/obsidian-git/styles.css b/.obsidian/plugins/obsidian-git/styles.css new file mode 100644 index 00000000..226dbe9c --- /dev/null +++ b/.obsidian/plugins/obsidian-git/styles.css @@ -0,0 +1,551 @@ +@keyframes loading { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} + +.workspace-leaf-content[data-type="git-view"] .button-border { + border: 2px solid var(--interactive-accent); + border-radius: var(--radius-s); +} + +.workspace-leaf-content[data-type="git-view"] .view-content { + padding: 0; +} + +.workspace-leaf-content[data-type="git-history-view"] .view-content { + padding: 0; +} + +.loading > svg { + animation: 2s linear infinite loading; + transform-origin: 50% 50%; + display: inline-block; +} + +.obsidian-git-center { + margin: auto; + text-align: center; + width: 50%; +} + +.obsidian-git-textarea { + display: block; + margin-left: auto; + margin-right: auto; +} + +.obsidian-git-center-button { + display: block; + margin: 20px auto; +} + +.tooltip.mod-left { + overflow-wrap: break-word; +} + +.tooltip.mod-right { + overflow-wrap: break-word; +} +.git-tools { + display: flex; + margin-left: auto; +} +.git-tools .type { + padding-left: var(--size-2-1); + display: flex; + align-items: center; + justify-content: center; + width: 11px; +} + +.git-tools .type[data-type="M"] { + color: orange; +} +.git-tools .type[data-type="D"] { + color: red; +} +.git-tools .buttons { + display: flex; +} +.git-tools .buttons > * { + padding: 0 0; + height: auto; +} + +.git-author { + color: var(--text-accent); +} + +.git-date { + color: var(--text-accent); +} + +.git-ref { + color: var(--text-accent); +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-d-none { + display: none; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-wrapper { + text-align: left; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-header { + background-color: var(--background-primary); + border-bottom: 1px solid var(--interactive-accent); + font-family: var(--font-monospace); + height: 35px; + padding: 5px 10px; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-header, +.workspace-leaf-content[data-type="diff-view"] .d2h-file-stats { + display: -webkit-box; + display: -ms-flexbox; + display: flex; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-stats { + font-size: 14px; + margin-left: auto; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-lines-added { + border: 1px solid #b4e2b4; + border-radius: 5px 0 0 5px; + color: #399839; + padding: 2px; + text-align: right; + vertical-align: middle; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-lines-deleted { + border: 1px solid #e9aeae; + border-radius: 0 5px 5px 0; + color: #c33; + margin-left: 1px; + padding: 2px; + text-align: left; + vertical-align: middle; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-name-wrapper { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + font-size: 15px; + width: 100%; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-name { + overflow-x: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-wrapper { + border: 1px solid var(--background-modifier-border); + border-radius: 3px; + margin-bottom: 1em; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse { + -webkit-box-pack: end; + -ms-flex-pack: end; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + border: 1px solid var(--background-modifier-border); + border-radius: 3px; + cursor: pointer; + display: none; + font-size: 12px; + justify-content: flex-end; + padding: 4px 8px; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse.d2h-selected { + background-color: #c8e1ff; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-collapse-input { + margin: 0 4px 0 0; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-diff-table { + border-collapse: collapse; + font-family: Menlo, Consolas, monospace; + font-size: 13px; + width: 100%; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-files-diff { + width: 100%; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-diff { + overflow-y: hidden; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-side-diff { + display: inline-block; + margin-bottom: -8px; + margin-right: -4px; + overflow-x: scroll; + overflow-y: hidden; + width: 50%; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-code-line { + padding: 0 8em; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-code-line, +.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line { + display: inline-block; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + white-space: nowrap; + width: 100%; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line { + padding: 0 4.5em; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-code-line-ctn { + word-wrap: normal; + background: none; + display: inline-block; + padding: 0; + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; + vertical-align: middle; + white-space: pre; + width: 100%; +} + +.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del, +.theme-light + .workspace-leaf-content[data-type="diff-view"] + .d2h-code-side-line + del { + background-color: #ffb6ba; +} + +.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del, +.theme-dark + .workspace-leaf-content[data-type="diff-view"] + .d2h-code-side-line + del { + background-color: #8d232881; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-code-line del, +.workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins, +.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line del, +.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line ins { + border-radius: 0.2em; + display: inline-block; + margin-top: -1px; + text-decoration: none; + vertical-align: middle; +} + +.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins, +.theme-light + .workspace-leaf-content[data-type="diff-view"] + .d2h-code-side-line + ins { + background-color: #97f295; + text-align: left; +} + +.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins, +.theme-dark + .workspace-leaf-content[data-type="diff-view"] + .d2h-code-side-line + ins { + background-color: #1d921996; + text-align: left; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-code-line-prefix { + word-wrap: normal; + background: none; + display: inline; + padding: 0; + white-space: pre; +} + +.workspace-leaf-content[data-type="diff-view"] .line-num1 { + float: left; +} + +.workspace-leaf-content[data-type="diff-view"] .line-num1, +.workspace-leaf-content[data-type="diff-view"] .line-num2 { + -webkit-box-sizing: border-box; + box-sizing: border-box; + overflow: hidden; + padding: 0 0.5em; + text-overflow: ellipsis; + width: 3.5em; +} + +.workspace-leaf-content[data-type="diff-view"] .line-num2 { + float: right; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber { + background-color: var(--background-primary); + border: solid var(--background-modifier-border); + border-width: 0 1px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: var(--text-muted); + cursor: pointer; + display: inline-block; + position: absolute; + text-align: right; + width: 7.5em; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber:after { + content: "\200b"; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber { + background-color: var(--background-primary); + border: solid var(--background-modifier-border); + border-width: 0 1px; + -webkit-box-sizing: border-box; + box-sizing: border-box; + color: var(--text-muted); + cursor: pointer; + display: inline-block; + overflow: hidden; + padding: 0 0.5em; + position: absolute; + text-align: right; + text-overflow: ellipsis; + width: 4em; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-diff-tbody tr { + position: relative; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber:after { + content: "\200b"; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-emptyplaceholder, +.workspace-leaf-content[data-type="diff-view"] .d2h-emptyplaceholder { + background-color: var(--background-primary); + border-color: var(--background-modifier-border); +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-code-line-prefix, +.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber, +.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber, +.workspace-leaf-content[data-type="diff-view"] .d2h-emptyplaceholder { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-code-linenumber, +.workspace-leaf-content[data-type="diff-view"] .d2h-code-side-linenumber { + direction: rtl; +} + +.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-del { + background-color: #fee8e9; + border-color: #e9aeae; +} + +.theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-ins { + background-color: #dfd; + border-color: #b4e2b4; +} + +.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-del { + background-color: #521b1d83; + border-color: #691d1d73; +} + +.theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-ins { + background-color: rgba(30, 71, 30, 0.5); + border-color: #13501381; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-info { + background-color: var(--background-primary); + border-color: var(--background-modifier-border); + color: var(--text-normal); +} + +.theme-light + .workspace-leaf-content[data-type="diff-view"] + .d2h-file-diff + .d2h-del.d2h-change { + background-color: #fdf2d0; +} + +.theme-dark + .workspace-leaf-content[data-type="diff-view"] + .d2h-file-diff + .d2h-del.d2h-change { + background-color: #55492480; +} + +.theme-light + .workspace-leaf-content[data-type="diff-view"] + .d2h-file-diff + .d2h-ins.d2h-change { + background-color: #ded; +} + +.theme-dark + .workspace-leaf-content[data-type="diff-view"] + .d2h-file-diff + .d2h-ins.d2h-change { + background-color: rgba(37, 78, 37, 0.418); +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper { + margin-bottom: 10px; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper a { + color: #3572b0; + text-decoration: none; +} + +.workspace-leaf-content[data-type="diff-view"] + .d2h-file-list-wrapper + a:visited { + color: #3572b0; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-header { + text-align: left; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-title { + font-weight: 700; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-list-line { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + text-align: left; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-list { + display: block; + list-style: none; + margin: 0; + padding: 0; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-list > li { + border-bottom: 1px solid var(--background-modifier-border); + margin: 0; + padding: 5px 10px; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-list > li:last-child { + border-bottom: none; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-file-switch { + cursor: pointer; + display: none; + font-size: 10px; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-icon { + fill: currentColor; + margin-right: 10px; + vertical-align: middle; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-deleted { + color: #c33; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-added { + color: #399839; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-changed { + color: #d0b44c; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-moved { + color: #3572b0; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-tag { + background-color: var(--background-primary); + display: -webkit-box; + display: -ms-flexbox; + display: flex; + font-size: 10px; + margin-left: 5px; + padding: 0 2px; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-deleted-tag { + border: 2px solid #c33; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-added-tag { + border: 1px solid #399839; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-changed-tag { + border: 1px solid #d0b44c; +} + +.workspace-leaf-content[data-type="diff-view"] .d2h-moved-tag { + border: 1px solid #3572b0; +} + +/* ====================== Line Authoring Information ====================== */ + +.cm-gutterElement.obs-git-blame-gutter { + /* Add background color to spacing inbetween and around the gutter for better aesthetics */ + border-width: 0px 2px 0.2px 2px; + border-style: solid; + border-color: var(--background-secondary); + background-color: var(--background-secondary); +} + +.cm-gutterElement.obs-git-blame-gutter > div, +.line-author-settings-preview { + /* delegate text color to settings */ + color: var(--obs-git-gutter-text); + font-family: monospace; + height: 100%; /* ensure, that age-based background color occupies entire parent */ + text-align: right; + padding: 0px 6px 0px 6px; + white-space: pre; /* Keep spaces and do not collapse them. */ +} diff --git a/.obsidian/plugins/obsidian-minimal-settings/data.json b/.obsidian/plugins/obsidian-minimal-settings/data.json new file mode 100644 index 00000000..8fd05a02 --- /dev/null +++ b/.obsidian/plugins/obsidian-minimal-settings/data.json @@ -0,0 +1,36 @@ +{ + "lightStyle": "minimal-light", + "darkStyle": "minimal-dark", + "lightScheme": "minimal-default-light", + "darkScheme": "minimal-default-dark", + "editorFont": "", + "lineHeight": 1.7, + "lineWidth": 50, + "lineWidthWide": 60, + "maxWidth": 88, + "textNormal": 17, + "textSmall": 13, + "imgGrid": false, + "imgWidth": "img-default-width", + "tableWidth": "table-default-width", + "iframeWidth": "iframe-default-width", + "mapWidth": "map-default-width", + "chartWidth": "chart-default-width", + "colorfulHeadings": false, + "colorfulFrame": false, + "colorfulActiveStates": false, + "trimNames": true, + "labeledNav": false, + "fullWidthMedia": true, + "bordersToggle": true, + "minimalStatus": true, + "focusMode": false, + "underlineInternal": true, + "underlineExternal": true, + "folding": true, + "lineNumbers": false, + "readableLineLength": true, + "devBlockWidth": false, + "theme": "moonstone", + "useSystemTheme": false +} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-minimal-settings/main.js b/.obsidian/plugins/obsidian-minimal-settings/main.js new file mode 100644 index 00000000..48690b90 --- /dev/null +++ b/.obsidian/plugins/obsidian-minimal-settings/main.js @@ -0,0 +1,961 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); +var __export = (target, all) => { + __markAsModule(target); + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __reExport = (target, module2, desc) => { + if (module2 && typeof module2 === "object" || typeof module2 === "function") { + for (let key of __getOwnPropNames(module2)) + if (!__hasOwnProp.call(target, key) && key !== "default") + __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); + } + return target; +}; +var __toModule = (module2) => { + return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); +}; +var __async = (__this, __arguments, generator) => { + return new Promise((resolve, reject) => { + var fulfilled = (value) => { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + }; + var rejected = (value) => { + try { + step(generator.throw(value)); + } catch (e) { + reject(e); + } + }; + var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); + step((generator = generator.apply(__this, __arguments)).next()); + }); +}; + +// main.ts +__export(exports, { + default: () => MinimalTheme +}); +var import_obsidian = __toModule(require("obsidian")); +var MinimalTheme = class extends import_obsidian.Plugin { + onload() { + return __async(this, null, function* () { + yield this.loadSettings(); + this.addSettingTab(new MinimalSettingTab(this.app, this)); + this.addStyle(); + let settingsUpdate = () => { + const fontSize = this.app.vault.getConfig("baseFontSize"); + this.settings.textNormal = fontSize; + if (this.app.vault.getConfig("foldHeading")) { + this.settings.folding = true; + this.saveData(this.settings); + console.log("Folding is on"); + } else { + this.settings.folding = false; + this.saveData(this.settings); + console.log("Folding is off"); + } + document.body.classList.toggle("minimal-folding", this.settings.folding); + if (this.app.vault.getConfig("showLineNumber")) { + this.settings.lineNumbers = true; + this.saveData(this.settings); + console.log("Line numbers are on"); + } else { + this.settings.lineNumbers = false; + this.saveData(this.settings); + console.log("Line numbers are off"); + } + document.body.classList.toggle("minimal-line-nums", this.settings.lineNumbers); + if (this.app.vault.getConfig("readableLineLength")) { + this.settings.readableLineLength = true; + this.saveData(this.settings); + console.log("Readable line length is on"); + } else { + this.settings.readableLineLength = false; + this.saveData(this.settings); + console.log("Readable line length is off"); + } + document.body.classList.toggle("minimal-readable", this.settings.readableLineLength); + document.body.classList.toggle("minimal-readable-off", !this.settings.readableLineLength); + }; + let sidebarUpdate = () => { + const sidebarEl = document.getElementsByClassName("mod-left-split")[0]; + const ribbonEl = document.getElementsByClassName("side-dock-ribbon")[0]; + if (sidebarEl && ribbonEl && document.body.classList.contains("theme-light") && this.settings.lightStyle == "minimal-light-contrast") { + sidebarEl.addClass("theme-dark"); + ribbonEl.addClass("theme-dark"); + } else if (sidebarEl && ribbonEl) { + sidebarEl.removeClass("theme-dark"); + ribbonEl.removeClass("theme-dark"); + } + }; + this.registerEvent(app.vault.on("config-changed", settingsUpdate)); + this.registerEvent(app.workspace.on("css-change", sidebarUpdate)); + settingsUpdate(); + app.workspace.onLayoutReady(() => { + sidebarUpdate(); + }); + const lightStyles = ["minimal-light", "minimal-light-tonal", "minimal-light-contrast", "minimal-light-white"]; + const darkStyles = ["minimal-dark", "minimal-dark-tonal", "minimal-dark-black"]; + const imgGridStyles = ["img-grid", "img-grid-ratio", "img-nogrid"]; + const tableWidthStyles = ["table-100", "table-default-width", "table-wide", "table-max"]; + const iframeWidthStyles = ["iframe-100", "iframe-default-width", "iframe-wide", "iframe-max"]; + const imgWidthStyles = ["img-100", "img-default-width", "img-wide", "img-max"]; + const mapWidthStyles = ["map-100", "map-default-width", "map-wide", "map-max"]; + const chartWidthStyles = ["chart-100", "chart-default-width", "chart-wide", "chart-max"]; + this.addCommand({ + id: "increase-body-font-size", + name: "Increase body font size", + callback: () => { + this.settings.textNormal = this.settings.textNormal + 0.5; + this.saveData(this.settings); + this.setFontSize(); + } + }); + this.addCommand({ + id: "decrease-body-font-size", + name: "Decrease body font size", + callback: () => { + this.settings.textNormal = this.settings.textNormal - 0.5; + this.saveData(this.settings); + this.setFontSize(); + } + }); + this.addCommand({ + id: "toggle-minimal-dark-cycle", + name: "Cycle between dark mode styles", + callback: () => { + this.settings.darkStyle = darkStyles[(darkStyles.indexOf(this.settings.darkStyle) + 1) % darkStyles.length]; + this.saveData(this.settings); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-light-cycle", + name: "Cycle between light mode styles", + callback: () => { + this.settings.lightStyle = lightStyles[(lightStyles.indexOf(this.settings.lightStyle) + 1) % lightStyles.length]; + this.saveData(this.settings); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-hidden-borders", + name: "Toggle sidebar borders", + callback: () => { + this.settings.bordersToggle = !this.settings.bordersToggle; + this.saveData(this.settings); + this.refresh(); + } + }); + this.addCommand({ + id: "toggle-colorful-headings", + name: "Toggle colorful headings", + callback: () => { + this.settings.colorfulHeadings = !this.settings.colorfulHeadings; + this.saveData(this.settings); + this.refresh(); + } + }); + this.addCommand({ + id: "toggle-minimal-focus-mode", + name: "Toggle focus mode", + callback: () => { + this.settings.focusMode = !this.settings.focusMode; + this.saveData(this.settings); + this.refresh(); + } + }); + this.addCommand({ + id: "toggle-minimal-colorful-frame", + name: "Toggle colorful window frame", + callback: () => { + this.settings.colorfulFrame = !this.settings.colorfulFrame; + this.saveData(this.settings); + this.refresh(); + } + }); + this.addCommand({ + id: "cycle-minimal-table-width", + name: "Cycle between table width options", + callback: () => { + this.settings.tableWidth = tableWidthStyles[(tableWidthStyles.indexOf(this.settings.tableWidth) + 1) % tableWidthStyles.length]; + this.saveData(this.settings); + this.refresh(); + } + }); + this.addCommand({ + id: "cycle-minimal-image-width", + name: "Cycle between image width options", + callback: () => { + this.settings.imgWidth = imgWidthStyles[(imgWidthStyles.indexOf(this.settings.imgWidth) + 1) % imgWidthStyles.length]; + this.saveData(this.settings); + this.refresh(); + } + }); + this.addCommand({ + id: "cycle-minimal-iframe-width", + name: "Cycle between iframe width options", + callback: () => { + this.settings.iframeWidth = iframeWidthStyles[(iframeWidthStyles.indexOf(this.settings.iframeWidth) + 1) % iframeWidthStyles.length]; + this.saveData(this.settings); + this.refresh(); + } + }); + this.addCommand({ + id: "cycle-minimal-chart-width", + name: "Cycle between chart width options", + callback: () => { + this.settings.chartWidth = chartWidthStyles[(chartWidthStyles.indexOf(this.settings.chartWidth) + 1) % chartWidthStyles.length]; + this.saveData(this.settings); + this.refresh(); + } + }); + this.addCommand({ + id: "cycle-minimal-map-width", + name: "Cycle between map width options", + callback: () => { + this.settings.mapWidth = mapWidthStyles[(mapWidthStyles.indexOf(this.settings.mapWidth) + 1) % mapWidthStyles.length]; + this.saveData(this.settings); + this.refresh(); + } + }); + this.addCommand({ + id: "toggle-minimal-img-grid", + name: "Toggle image grids", + callback: () => { + this.settings.imgGrid = !this.settings.imgGrid; + this.saveData(this.settings); + this.refresh(); + } + }); + this.addCommand({ + id: "toggle-minimal-switch", + name: "Switch between light and dark mode", + callback: () => { + this.updateTheme(); + } + }); + this.addCommand({ + id: "toggle-minimal-light-default", + name: "Use light mode (default)", + callback: () => { + this.settings.lightStyle = "minimal-light"; + this.saveData(this.settings); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-light-white", + name: "Use light mode (all white)", + callback: () => { + this.settings.lightStyle = "minimal-light-white"; + this.saveData(this.settings); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-light-tonal", + name: "Use light mode (low contrast)", + callback: () => { + this.settings.lightStyle = "minimal-light-tonal"; + this.saveData(this.settings); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-light-contrast", + name: "Use light mode (high contrast)", + callback: () => { + this.settings.lightStyle = "minimal-light-contrast"; + this.saveData(this.settings); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-dark-default", + name: "Use dark mode (default)", + callback: () => { + this.settings.darkStyle = "minimal-dark"; + this.saveData(this.settings); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-dark-tonal", + name: "Use dark mode (low contrast)", + callback: () => { + this.settings.darkStyle = "minimal-dark-tonal"; + this.saveData(this.settings); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-dark-black", + name: "Use dark mode (true black)", + callback: () => { + this.settings.darkStyle = "minimal-dark-black"; + this.saveData(this.settings); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-atom-light", + name: "Switch light color scheme to Atom (light)", + callback: () => { + this.settings.lightScheme = "minimal-atom-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-ayu-light", + name: "Switch light color scheme to Ayu (light)", + callback: () => { + this.settings.lightScheme = "minimal-ayu-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-catppuccin-light", + name: "Switch light color scheme to Catppuccin (light)", + callback: () => { + this.settings.lightScheme = "minimal-catppuccin-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-default-light", + name: "Switch light color scheme to default (light)", + callback: () => { + this.settings.lightScheme = "minimal-default-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-gruvbox-light", + name: "Switch light color scheme to Gruvbox (light)", + callback: () => { + this.settings.lightScheme = "minimal-gruvbox-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-eink-light", + name: "Switch light color scheme to E-ink (light)", + callback: () => { + this.settings.lightScheme = "minimal-eink-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-everforest-light", + name: "Switch light color scheme to Everforest (light)", + callback: () => { + this.settings.lightScheme = "minimal-everforest-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-flexoki-light", + name: "Switch light color scheme to Flexoki (light)", + callback: () => { + this.settings.lightScheme = "minimal-flexoki-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-macos-light", + name: "Switch light color scheme to macOS (light)", + callback: () => { + this.settings.lightScheme = "minimal-macos-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-notion-light", + name: "Switch light color scheme to Sky (light)", + callback: () => { + this.settings.lightScheme = "minimal-notion-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-nord-light", + name: "Switch light color scheme to Nord (light)", + callback: () => { + this.settings.lightScheme = "minimal-nord-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-rose-pine-light", + name: "Switch light color scheme to Ros\xE9 Pine (light)", + callback: () => { + this.settings.lightScheme = "minimal-rose-pine-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-solarized-light", + name: "Switch light color scheme to Solarized (light)", + callback: () => { + this.settings.lightScheme = "minimal-solarized-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-things-light", + name: "Switch light color scheme to Things (light)", + callback: () => { + this.settings.lightScheme = "minimal-things-light"; + this.saveData(this.settings); + this.updateLightScheme(); + this.updateLightStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-atom-dark", + name: "Switch dark color scheme to Atom (dark)", + callback: () => { + this.settings.darkScheme = "minimal-atom-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-ayu-dark", + name: "Switch dark color scheme to Ayu (dark)", + callback: () => { + this.settings.darkScheme = "minimal-ayu-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-catppuccin-dark", + name: "Switch dark color scheme to Catppuccin (dark)", + callback: () => { + this.settings.darkScheme = "minimal-catppuccin-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-dracula-dark", + name: "Switch dark color scheme to Dracula (dark)", + callback: () => { + this.settings.darkScheme = "minimal-dracula-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-default-dark", + name: "Switch dark color scheme to default (dark)", + callback: () => { + this.settings.darkScheme = "minimal-default-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-eink-dark", + name: "Switch dark color scheme to E-ink (dark)", + callback: () => { + this.settings.darkScheme = "minimal-eink-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-everforest-dark", + name: "Switch dark color scheme to Everforest (dark)", + callback: () => { + this.settings.darkScheme = "minimal-everforest-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-flexoki-dark", + name: "Switch dark color scheme to Flexoki (dark)", + callback: () => { + this.settings.darkScheme = "minimal-flexoki-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-gruvbox-dark", + name: "Switch dark color scheme to Gruvbox (dark)", + callback: () => { + this.settings.darkScheme = "minimal-gruvbox-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-macos-dark", + name: "Switch dark color scheme to macOS (dark)", + callback: () => { + this.settings.darkScheme = "minimal-macos-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-nord-dark", + name: "Switch dark color scheme to Nord (dark)", + callback: () => { + this.settings.darkScheme = "minimal-nord-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-notion-dark", + name: "Switch dark color scheme to Sky (dark)", + callback: () => { + this.settings.darkScheme = "minimal-notion-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-rose-pine-dark", + name: "Switch dark color scheme to Ros\xE9 Pine (dark)", + callback: () => { + this.settings.darkScheme = "minimal-rose-pine-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-solarized-dark", + name: "Switch dark color scheme to Solarized (dark)", + callback: () => { + this.settings.darkScheme = "minimal-solarized-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-things-dark", + name: "Switch dark color scheme to Things (dark)", + callback: () => { + this.settings.darkScheme = "minimal-things-dark"; + this.saveData(this.settings); + this.updateDarkScheme(); + this.updateDarkStyle(); + } + }); + this.addCommand({ + id: "toggle-minimal-dev-block-width", + name: "Dev \u2014 Show block widths", + callback: () => { + this.settings.devBlockWidth = !this.settings.devBlockWidth; + this.saveData(this.settings); + this.refresh(); + } + }); + this.refresh(); + }); + } + onunload() { + console.log("Unloading Minimal Theme Settings plugin"); + } + loadSettings() { + return __async(this, null, function* () { + this.settings = Object.assign(DEFAULT_SETTINGS, yield this.loadData()); + }); + } + saveSettings() { + return __async(this, null, function* () { + yield this.saveData(this.settings); + }); + } + refresh() { + this.updateStyle(); + } + addStyle() { + const css = document.createElement("style"); + css.id = "minimal-theme"; + document.getElementsByTagName("head")[0].appendChild(css); + document.body.classList.add("minimal-theme"); + this.updateStyle(); + } + setFontSize() { + this.app.vault.setConfig("baseFontSize", this.settings.textNormal); + this.app.updateFontSize(); + } + updateStyle() { + this.removeStyle(); + document.body.addClass(this.settings.darkScheme); + document.body.addClass(this.settings.lightScheme); + document.body.classList.toggle("borders-none", !this.settings.bordersToggle); + document.body.classList.toggle("colorful-headings", this.settings.colorfulHeadings); + document.body.classList.toggle("colorful-frame", this.settings.colorfulFrame); + document.body.classList.toggle("colorful-active", this.settings.colorfulActiveStates); + document.body.classList.toggle("minimal-focus-mode", this.settings.focusMode); + document.body.classList.toggle("links-int-on", this.settings.underlineInternal); + document.body.classList.toggle("links-ext-on", this.settings.underlineExternal); + document.body.classList.toggle("full-width-media", this.settings.fullWidthMedia); + document.body.classList.toggle("img-grid", this.settings.imgGrid); + document.body.classList.toggle("minimal-dev-block-width", this.settings.devBlockWidth); + document.body.classList.toggle("minimal-status-off", !this.settings.minimalStatus); + document.body.classList.toggle("full-file-names", !this.settings.trimNames); + document.body.classList.toggle("labeled-nav", this.settings.labeledNav); + document.body.classList.toggle("minimal-folding", this.settings.folding); + document.body.removeClass("table-wide", "table-max", "table-100", "table-default-width", "iframe-wide", "iframe-max", "iframe-100", "iframe-default-width", "img-wide", "img-max", "img-100", "img-default-width", "chart-wide", "chart-max", "chart-100", "chart-default-width", "map-wide", "map-max", "map-100", "map-default-width"); + document.body.addClass(this.settings.chartWidth); + document.body.addClass(this.settings.tableWidth); + document.body.addClass(this.settings.imgWidth); + document.body.addClass(this.settings.iframeWidth); + document.body.addClass(this.settings.mapWidth); + const el = document.getElementById("minimal-theme"); + if (!el) + throw "minimal-theme element not found!"; + else { + el.innerText = "body.minimal-theme{--font-ui-small:" + this.settings.textSmall + "px;--line-height:" + this.settings.lineHeight + ";--line-width:" + this.settings.lineWidth + "rem;--line-width-wide:" + this.settings.lineWidthWide + "rem;--max-width:" + this.settings.maxWidth + "%;--font-editor-override:" + this.settings.editorFont + ";"; + } + } + updateDarkStyle() { + document.body.removeClass("theme-light", "minimal-dark", "minimal-dark-tonal", "minimal-dark-black"); + document.body.addClass("theme-dark", this.settings.darkStyle); + if (this.app.vault.getConfig("theme") !== "system") { + this.app.setTheme("obsidian"); + this.app.vault.setConfig("theme", "obsidian"); + } + this.app.workspace.trigger("css-change"); + } + updateLightStyle() { + document.body.removeClass("theme-dark", "minimal-light", "minimal-light-tonal", "minimal-light-contrast", "minimal-light-white"); + document.body.addClass("theme-light", this.settings.lightStyle); + if (this.app.vault.getConfig("theme") !== "system") { + this.app.setTheme("moonstone"); + this.app.vault.setConfig("theme", "moonstone"); + } + this.app.workspace.trigger("css-change"); + } + updateDarkScheme() { + document.body.removeClass("minimal-atom-dark", "minimal-ayu-dark", "minimal-catppuccin-dark", "minimal-default-dark", "minimal-dracula-dark", "minimal-eink-dark", "minimal-everforest-dark", "minimal-flexoki-dark", "minimal-gruvbox-dark", "minimal-macos-dark", "minimal-nord-dark", "minimal-notion-dark", "minimal-rose-pine-dark", "minimal-solarized-dark", "minimal-things-dark"); + document.body.addClass(this.settings.darkScheme); + } + updateLightScheme() { + document.body.removeClass("minimal-atom-light", "minimal-ayu-light", "minimal-catppuccin-light", "minimal-default-light", "minimal-eink-light", "minimal-everforest-light", "minimal-flexoki-light", "minimal-gruvbox-light", "minimal-macos-light", "minimal-nord-light", "minimal-notion-light", "minimal-rose-pine-light", "minimal-solarized-light", "minimal-things-light"); + document.body.addClass(this.settings.lightScheme); + } + updateTheme() { + if (this.app.vault.getConfig("theme") === "system") { + if (document.body.classList.contains("theme-light")) { + document.body.removeClass("theme-light"); + document.body.addClass("theme-dark"); + } else { + document.body.removeClass("theme-dark"); + document.body.addClass("theme-light"); + } + } else { + if (document.body.classList.contains("theme-light")) { + document.body.removeClass("theme-light"); + document.body.addClass("theme-dark"); + } else { + document.body.removeClass("theme-dark"); + document.body.addClass("theme-light"); + } + const currentTheme = this.app.vault.getConfig("theme"); + const newTheme = currentTheme === "moonstone" ? "obsidian" : "moonstone"; + this.app.setTheme(newTheme); + this.app.vault.setConfig("theme", newTheme); + } + this.app.workspace.trigger("css-change"); + } + removeStyle() { + document.body.removeClass("minimal-light", "minimal-light-tonal", "minimal-light-contrast", "minimal-light-white", "minimal-dark", "minimal-dark-tonal", "minimal-dark-black"); + document.body.addClass(this.settings.lightStyle, this.settings.darkStyle); + } +}; +var DEFAULT_SETTINGS = { + lightStyle: "minimal-light", + darkStyle: "minimal-dark", + lightScheme: "minimal-default-light", + darkScheme: "minimal-default-dark", + editorFont: "", + lineHeight: 1.5, + lineWidth: 40, + lineWidthWide: 50, + maxWidth: 88, + textNormal: 16, + textSmall: 13, + imgGrid: false, + imgWidth: "img-default-width", + tableWidth: "table-default-width", + iframeWidth: "iframe-default-width", + mapWidth: "map-default-width", + chartWidth: "chart-default-width", + colorfulHeadings: false, + colorfulFrame: false, + colorfulActiveStates: false, + trimNames: true, + labeledNav: false, + fullWidthMedia: true, + bordersToggle: true, + minimalStatus: true, + focusMode: false, + underlineInternal: true, + underlineExternal: true, + folding: true, + lineNumbers: false, + readableLineLength: false, + devBlockWidth: false +}; +var MinimalSettingTab = class extends import_obsidian.PluginSettingTab { + constructor(app2, plugin) { + super(app2, plugin); + this.plugin = plugin; + } + display() { + let { containerEl } = this; + containerEl.empty(); + const colorSection = containerEl.createEl("div", { cls: "setting-item setting-item-heading" }); + const colorSectionInfo = colorSection.createEl("div", { cls: "setting-item-info" }); + colorSectionInfo.createEl("div", { text: "Color scheme", cls: "setting-item-name" }); + const colorDesc = colorSectionInfo.createEl("div", { cls: "setting-item-description" }); + colorDesc.appendChild(createEl("span", { + text: "To create a custom color scheme use the " + })); + colorDesc.appendChild(createEl("a", { + text: "Style Settings", + href: "obsidian://show-plugin?id=obsidian-style-settings" + })); + colorDesc.appendText(" plugin. See "); + colorDesc.appendChild(createEl("a", { + text: "documentation", + href: "https://minimal.guide/features/color-schemes" + })); + colorDesc.appendText(" for details."); + new import_obsidian.Setting(containerEl).setName("Light mode color scheme").setDesc("Preset color options for light mode.").addDropdown((dropdown) => dropdown.addOption("minimal-default-light", "Default").addOption("minimal-atom-light", "Atom").addOption("minimal-ayu-light", "Ayu").addOption("minimal-catppuccin-light", "Catppuccin").addOption("minimal-eink-light", "E-ink (beta)").addOption("minimal-everforest-light", "Everforest").addOption("minimal-flexoki-light", "Flexoki").addOption("minimal-gruvbox-light", "Gruvbox").addOption("minimal-macos-light", "macOS").addOption("minimal-nord-light", "Nord").addOption("minimal-rose-pine-light", "Ros\xE9 Pine").addOption("minimal-notion-light", "Sky").addOption("minimal-solarized-light", "Solarized").addOption("minimal-things-light", "Things").setValue(this.plugin.settings.lightScheme).onChange((value) => { + this.plugin.settings.lightScheme = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.updateLightScheme(); + })); + new import_obsidian.Setting(containerEl).setName("Light mode background contrast").setDesc("Level of contrast between sidebar and main content.").addDropdown((dropdown) => dropdown.addOption("minimal-light", "Default").addOption("minimal-light-white", "All white").addOption("minimal-light-tonal", "Low contrast").addOption("minimal-light-contrast", "High contrast").setValue(this.plugin.settings.lightStyle).onChange((value) => { + this.plugin.settings.lightStyle = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.updateLightStyle(); + })); + new import_obsidian.Setting(containerEl).setName("Dark mode color scheme").setDesc("Preset colors options for dark mode.").addDropdown((dropdown) => dropdown.addOption("minimal-default-dark", "Default").addOption("minimal-atom-dark", "Atom").addOption("minimal-ayu-dark", "Ayu").addOption("minimal-catppuccin-dark", "Catppuccin").addOption("minimal-dracula-dark", "Dracula").addOption("minimal-eink-dark", "E-ink (beta)").addOption("minimal-everforest-dark", "Everforest").addOption("minimal-flexoki-dark", "Flexoki").addOption("minimal-gruvbox-dark", "Gruvbox").addOption("minimal-macos-dark", "macOS").addOption("minimal-nord-dark", "Nord").addOption("minimal-rose-pine-dark", "Ros\xE9 Pine").addOption("minimal-notion-dark", "Sky").addOption("minimal-solarized-dark", "Solarized").addOption("minimal-things-dark", "Things").setValue(this.plugin.settings.darkScheme).onChange((value) => { + this.plugin.settings.darkScheme = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.updateDarkScheme(); + })); + new import_obsidian.Setting(containerEl).setName("Dark mode background contrast").setDesc("Level of contrast between sidebar and main content.").addDropdown((dropdown) => dropdown.addOption("minimal-dark", "Default").addOption("minimal-dark-tonal", "Low contrast").addOption("minimal-dark-black", "True black").setValue(this.plugin.settings.darkStyle).onChange((value) => { + this.plugin.settings.darkStyle = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.updateDarkStyle(); + })); + containerEl.createEl("br"); + const featuresSection = containerEl.createEl("div", { cls: "setting-item setting-item-heading" }); + const featuresSectionInfo = featuresSection.createEl("div", { cls: "setting-item-info" }); + featuresSectionInfo.createEl("div", { text: "Features", cls: "setting-item-name" }); + const featuresSectionDesc = featuresSectionInfo.createEl("div", { cls: "setting-item-description" }); + featuresSectionDesc.appendChild(createEl("span", { + text: "See " + })); + featuresSectionDesc.appendChild(createEl("a", { + text: "documentation", + href: "https://minimal.guide" + })); + featuresSectionDesc.appendText(" for details."); + new import_obsidian.Setting(containerEl).setName("Text labels for primary navigation").setDesc("Navigation items in the left sidebar uses text labels.").addToggle((toggle) => toggle.setValue(this.plugin.settings.labeledNav).onChange((value) => { + this.plugin.settings.labeledNav = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Colorful window frame").setDesc("The top area of the app uses your accent color.").addToggle((toggle) => toggle.setValue(this.plugin.settings.colorfulFrame).onChange((value) => { + this.plugin.settings.colorfulFrame = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Colorful active states").setDesc("Active file and menu items use your accent color.").addToggle((toggle) => toggle.setValue(this.plugin.settings.colorfulActiveStates).onChange((value) => { + this.plugin.settings.colorfulActiveStates = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Colorful headings").setDesc("Headings use a different color for each size.").addToggle((toggle) => toggle.setValue(this.plugin.settings.colorfulHeadings).onChange((value) => { + this.plugin.settings.colorfulHeadings = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Minimal status bar").setDesc("Turn off to use full-width status bar.").addToggle((toggle) => toggle.setValue(this.plugin.settings.minimalStatus).onChange((value) => { + this.plugin.settings.minimalStatus = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Trim file names in sidebars").setDesc("Use ellipses to fit file names on a single line.").addToggle((toggle) => toggle.setValue(this.plugin.settings.trimNames).onChange((value) => { + this.plugin.settings.trimNames = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Workspace borders").setDesc("Display divider lines between workspace elements.").addToggle((toggle) => toggle.setValue(this.plugin.settings.bordersToggle).onChange((value) => { + this.plugin.settings.bordersToggle = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Focus mode").setDesc("Hide tab bar and status bar, hover to display. Can be toggled via hotkey.").addToggle((toggle) => toggle.setValue(this.plugin.settings.focusMode).onChange((value) => { + this.plugin.settings.focusMode = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Underline internal links").setDesc("Show underlines on internal links.").addToggle((toggle) => toggle.setValue(this.plugin.settings.underlineInternal).onChange((value) => { + this.plugin.settings.underlineInternal = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Underline external links").setDesc("Show underlines on external links.").addToggle((toggle) => toggle.setValue(this.plugin.settings.underlineExternal).onChange((value) => { + this.plugin.settings.underlineExternal = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Maximize media").setDesc("Images and videos fill the width of the line.").addToggle((toggle) => toggle.setValue(this.plugin.settings.fullWidthMedia).onChange((value) => { + this.plugin.settings.fullWidthMedia = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + containerEl.createEl("br"); + const layoutSection = containerEl.createEl("div", { cls: "setting-item setting-item-heading" }); + const layoutSectionInfo = layoutSection.createEl("div", { cls: "setting-item-info" }); + layoutSectionInfo.createEl("div", { text: "Layout", cls: "setting-item-name" }); + const layoutSectionDesc = layoutSectionInfo.createEl("div", { cls: "setting-item-description" }); + layoutSectionDesc.appendChild(createEl("span", { + text: "These options can also be defined on a per-file basis, see " + })); + layoutSectionDesc.appendChild(createEl("a", { + text: "documentation", + href: "https://minimal.guide/features/block-width" + })); + layoutSectionDesc.appendText(" for details."); + new import_obsidian.Setting(containerEl).setName("Image grids").setDesc("Turn consecutive images into columns \u2014 to make a new row, add an extra line break between images.").addToggle((toggle) => toggle.setValue(this.plugin.settings.imgGrid).onChange((value) => { + this.plugin.settings.imgGrid = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Chart width").setDesc("Default width for chart blocks.").addDropdown((dropdown) => dropdown.addOption("chart-default-width", "Default").addOption("chart-wide", "Wide line width").addOption("chart-max", "Maximum line width").addOption("chart-100", "100% pane width").setValue(this.plugin.settings.chartWidth).onChange((value) => { + this.plugin.settings.chartWidth = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Iframe width").setDesc("Default width for iframe blocks.").addDropdown((dropdown) => dropdown.addOption("iframe-default-width", "Default").addOption("iframe-wide", "Wide line width").addOption("iframe-max", "Maximum line width").addOption("iframe-100", "100% pane width").setValue(this.plugin.settings.iframeWidth).onChange((value) => { + this.plugin.settings.iframeWidth = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Image width").setDesc("Default width for image blocks.").addDropdown((dropdown) => dropdown.addOption("img-default-width", "Default").addOption("img-wide", "Wide line width").addOption("img-max", "Maximum line width").addOption("img-100", "100% pane width").setValue(this.plugin.settings.imgWidth).onChange((value) => { + this.plugin.settings.imgWidth = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Map width").setDesc("Default width for map blocks.").addDropdown((dropdown) => dropdown.addOption("map-default-width", "Default").addOption("map-wide", "Wide line width").addOption("map-max", "Maximum line width").addOption("map-100", "100% pane width").setValue(this.plugin.settings.mapWidth).onChange((value) => { + this.plugin.settings.mapWidth = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Table width").setDesc("Default width for table and Dataview blocks.").addDropdown((dropdown) => dropdown.addOption("table-default-width", "Default").addOption("table-wide", "Wide line width").addOption("table-max", "Maximum line width").addOption("table-100", "100% pane width").setValue(this.plugin.settings.tableWidth).onChange((value) => { + this.plugin.settings.tableWidth = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + containerEl.createEl("br"); + containerEl.createEl("div", { text: "Typography", cls: "setting-item setting-item-heading" }); + new import_obsidian.Setting(containerEl).setName("Text font size").setDesc("Used for the main text (default 16).").addText((text) => text.setPlaceholder("16").setValue((this.plugin.settings.textNormal || "") + "").onChange((value) => { + this.plugin.settings.textNormal = parseFloat(value); + this.plugin.saveData(this.plugin.settings); + this.plugin.setFontSize(); + })); + new import_obsidian.Setting(containerEl).setName("Small font size").setDesc("Used for text in the sidebars and tabs (default 13).").addText((text) => text.setPlaceholder("13").setValue((this.plugin.settings.textSmall || "") + "").onChange((value) => { + this.plugin.settings.textSmall = parseFloat(value); + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Line height").setDesc("Line height of text (default 1.5).").addText((text) => text.setPlaceholder("1.5").setValue((this.plugin.settings.lineHeight || "") + "").onChange((value) => { + this.plugin.settings.lineHeight = parseFloat(value); + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Normal line width").setDesc("Number of characters per line (default 40).").addText((text) => text.setPlaceholder("40").setValue((this.plugin.settings.lineWidth || "") + "").onChange((value) => { + this.plugin.settings.lineWidth = parseInt(value.trim()); + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Wide line width").setDesc("Number of characters per line for wide elements (default 50).").addText((text) => text.setPlaceholder("50").setValue((this.plugin.settings.lineWidthWide || "") + "").onChange((value) => { + this.plugin.settings.lineWidthWide = parseInt(value.trim()); + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Maximum line width %").setDesc("Percentage of space inside a pane that a line can fill (default 88).").addText((text) => text.setPlaceholder("88").setValue((this.plugin.settings.maxWidth || "") + "").onChange((value) => { + this.plugin.settings.maxWidth = parseInt(value.trim()); + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + new import_obsidian.Setting(containerEl).setName("Editor font").setDesc("Overrides the text font defined in Obsidian Appearance settings when in edit mode.").addText((text) => text.setPlaceholder("").setValue((this.plugin.settings.editorFont || "") + "").onChange((value) => { + this.plugin.settings.editorFont = value; + this.plugin.saveData(this.plugin.settings); + this.plugin.refresh(); + })); + } +}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsibWFpbi50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiaW1wb3J0IHsgQXBwLCBXb3Jrc3BhY2UsIE1vZGFsLCBOb3RpY2UsIFBsdWdpbiwgUGx1Z2luU2V0dGluZ1RhYiwgU2V0dGluZyB9IGZyb20gJ29ic2lkaWFuJztcclxuXHJcbmV4cG9ydCBkZWZhdWx0IGNsYXNzIE1pbmltYWxUaGVtZSBleHRlbmRzIFBsdWdpbiB7XHJcblxyXG4gIHNldHRpbmdzOiBNaW5pbWFsU2V0dGluZ3M7XHJcblxyXG4gIGFzeW5jIG9ubG9hZCgpIHtcclxuXHJcbiAgICBhd2FpdCB0aGlzLmxvYWRTZXR0aW5ncygpO1xyXG5cclxuICAgIHRoaXMuYWRkU2V0dGluZ1RhYihuZXcgTWluaW1hbFNldHRpbmdUYWIodGhpcy5hcHAsIHRoaXMpKTtcclxuXHJcbiAgICB0aGlzLmFkZFN0eWxlKCk7XHJcblxyXG4gICAgLy8gQ2hlY2sgc3RhdGUgb2YgT2JzaWRpYW4gU2V0dGluZ3NcclxuICAgIGxldCBzZXR0aW5nc1VwZGF0ZSA9ICgpID0+IHtcclxuICAgICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgICBjb25zdCBmb250U2l6ZSA9IHRoaXMuYXBwLnZhdWx0LmdldENvbmZpZygnYmFzZUZvbnRTaXplJyk7XHJcbiAgICAgIHRoaXMuc2V0dGluZ3MudGV4dE5vcm1hbCA9IGZvbnRTaXplO1xyXG5cclxuICAgICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgICBpZiAodGhpcy5hcHAudmF1bHQuZ2V0Q29uZmlnKCdmb2xkSGVhZGluZycpKSB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5mb2xkaW5nID0gdHJ1ZTtcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIGNvbnNvbGUubG9nKCdGb2xkaW5nIGlzIG9uJyk7XHJcbiAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5mb2xkaW5nID0gZmFsc2U7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICBjb25zb2xlLmxvZygnRm9sZGluZyBpcyBvZmYnKTtcclxuICAgICAgfVxyXG4gICAgICBkb2N1bWVudC5ib2R5LmNsYXNzTGlzdC50b2dnbGUoJ21pbmltYWwtZm9sZGluZycsIHRoaXMuc2V0dGluZ3MuZm9sZGluZyk7XHJcbiAgICAgIC8vIEB0cy1pZ25vcmVcclxuICAgICAgaWYgKHRoaXMuYXBwLnZhdWx0LmdldENvbmZpZygnc2hvd0xpbmVOdW1iZXInKSkge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MubGluZU51bWJlcnMgPSB0cnVlO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgY29uc29sZS5sb2coJ0xpbmUgbnVtYmVycyBhcmUgb24nKTtcclxuICAgICAgfSBlbHNlIHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLmxpbmVOdW1iZXJzID0gZmFsc2U7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICBjb25zb2xlLmxvZygnTGluZSBudW1iZXJzIGFyZSBvZmYnKTtcclxuICAgICAgfVxyXG4gICAgICBkb2N1bWVudC5ib2R5LmNsYXNzTGlzdC50b2dnbGUoJ21pbmltYWwtbGluZS1udW1zJywgdGhpcy5zZXR0aW5ncy5saW5lTnVtYmVycyk7XHJcbiAgICAgIC8vIEB0cy1pZ25vcmVcclxuICAgICAgaWYgKHRoaXMuYXBwLnZhdWx0LmdldENvbmZpZygncmVhZGFibGVMaW5lTGVuZ3RoJykpIHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLnJlYWRhYmxlTGluZUxlbmd0aCA9IHRydWU7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICBjb25zb2xlLmxvZygnUmVhZGFibGUgbGluZSBsZW5ndGggaXMgb24nKTtcclxuICAgICAgfSBlbHNlIHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLnJlYWRhYmxlTGluZUxlbmd0aCA9IGZhbHNlO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgY29uc29sZS5sb2coJ1JlYWRhYmxlIGxpbmUgbGVuZ3RoIGlzIG9mZicpO1xyXG4gICAgICB9XHJcblxyXG4gICAgICBkb2N1bWVudC5ib2R5LmNsYXNzTGlzdC50b2dnbGUoJ21pbmltYWwtcmVhZGFibGUnLCB0aGlzLnNldHRpbmdzLnJlYWRhYmxlTGluZUxlbmd0aCk7XHJcbiAgICAgIGRvY3VtZW50LmJvZHkuY2xhc3NMaXN0LnRvZ2dsZSgnbWluaW1hbC1yZWFkYWJsZS1vZmYnLCAhdGhpcy5zZXR0aW5ncy5yZWFkYWJsZUxpbmVMZW5ndGgpO1xyXG4gIFxyXG4gICAgfVxyXG4gIFxyXG4gICAgbGV0IHNpZGViYXJVcGRhdGUgPSAoKSA9PiB7XHJcbiAgICAgIGNvbnN0IHNpZGViYXJFbCA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ21vZC1sZWZ0LXNwbGl0JylbMF07XHJcbiAgICAgIGNvbnN0IHJpYmJvbkVsID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZSgnc2lkZS1kb2NrLXJpYmJvbicpWzBdO1xyXG4gICAgICBpZiAoc2lkZWJhckVsICYmIHJpYmJvbkVsICYmIGRvY3VtZW50LmJvZHkuY2xhc3NMaXN0LmNvbnRhaW5zKCd0aGVtZS1saWdodCcpICYmIHRoaXMuc2V0dGluZ3MubGlnaHRTdHlsZSA9PSAnbWluaW1hbC1saWdodC1jb250cmFzdCcpIHtcclxuICAgICAgICBzaWRlYmFyRWwuYWRkQ2xhc3MoJ3RoZW1lLWRhcmsnKTtcclxuICAgICAgICByaWJib25FbC5hZGRDbGFzcygndGhlbWUtZGFyaycpO1xyXG4gICAgICB9IGVsc2UgaWYgKHNpZGViYXJFbCAmJiByaWJib25FbCkge1xyXG4gICAgICAgIHNpZGViYXJFbC5yZW1vdmVDbGFzcygndGhlbWUtZGFyaycpOyBcclxuICAgICAgICByaWJib25FbC5yZW1vdmVDbGFzcygndGhlbWUtZGFyaycpO1xyXG4gICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgdGhpcy5yZWdpc3RlckV2ZW50KGFwcC52YXVsdC5vbignY29uZmlnLWNoYW5nZWQnLCBzZXR0aW5nc1VwZGF0ZSkpO1xyXG4gICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgdGhpcy5yZWdpc3RlckV2ZW50KGFwcC53b3Jrc3BhY2Uub24oJ2Nzcy1jaGFuZ2UnLCBzaWRlYmFyVXBkYXRlKSk7XHJcblxyXG4gICAgc2V0dGluZ3NVcGRhdGUoKTtcclxuICAgIFxyXG4gICAgYXBwLndvcmtzcGFjZS5vbkxheW91dFJlYWR5KCgpID0+IHtcclxuICAgICAgc2lkZWJhclVwZGF0ZSgpO1xyXG4gICAgfSk7XHJcblxyXG4gICAgY29uc3QgbGlnaHRTdHlsZXMgPSBbJ21pbmltYWwtbGlnaHQnLCAnbWluaW1hbC1saWdodC10b25hbCcsICdtaW5pbWFsLWxpZ2h0LWNvbnRyYXN0JywgJ21pbmltYWwtbGlnaHQtd2hpdGUnXTtcclxuICAgIGNvbnN0IGRhcmtTdHlsZXMgPSBbJ21pbmltYWwtZGFyaycsICdtaW5pbWFsLWRhcmstdG9uYWwnLCAnbWluaW1hbC1kYXJrLWJsYWNrJ107XHJcbiAgICBjb25zdCBpbWdHcmlkU3R5bGVzID0gWydpbWctZ3JpZCcsJ2ltZy1ncmlkLXJhdGlvJywnaW1nLW5vZ3JpZCddO1xyXG4gICAgY29uc3QgdGFibGVXaWR0aFN0eWxlcyA9IFsndGFibGUtMTAwJywndGFibGUtZGVmYXVsdC13aWR0aCcsJ3RhYmxlLXdpZGUnLCd0YWJsZS1tYXgnXTtcclxuICAgIGNvbnN0IGlmcmFtZVdpZHRoU3R5bGVzID0gWydpZnJhbWUtMTAwJywnaWZyYW1lLWRlZmF1bHQtd2lkdGgnLCdpZnJhbWUtd2lkZScsJ2lmcmFtZS1tYXgnXTtcclxuICAgIGNvbnN0IGltZ1dpZHRoU3R5bGVzID0gWydpbWctMTAwJywnaW1nLWRlZmF1bHQtd2lkdGgnLCdpbWctd2lkZScsJ2ltZy1tYXgnXTtcclxuICAgIGNvbnN0IG1hcFdpZHRoU3R5bGVzID0gWydtYXAtMTAwJywnbWFwLWRlZmF1bHQtd2lkdGgnLCdtYXAtd2lkZScsJ21hcC1tYXgnXTtcclxuICAgIGNvbnN0IGNoYXJ0V2lkdGhTdHlsZXMgPSBbJ2NoYXJ0LTEwMCcsJ2NoYXJ0LWRlZmF1bHQtd2lkdGgnLCdjaGFydC13aWRlJywnY2hhcnQtbWF4J107XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICdpbmNyZWFzZS1ib2R5LWZvbnQtc2l6ZScsXHJcbiAgICAgIG5hbWU6ICdJbmNyZWFzZSBib2R5IGZvbnQgc2l6ZScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy50ZXh0Tm9ybWFsID0gdGhpcy5zZXR0aW5ncy50ZXh0Tm9ybWFsICsgMC41O1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgdGhpcy5zZXRGb250U2l6ZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ2RlY3JlYXNlLWJvZHktZm9udC1zaXplJyxcclxuICAgICAgbmFtZTogJ0RlY3JlYXNlIGJvZHkgZm9udCBzaXplJyxcclxuICAgICAgY2FsbGJhY2s6ICgpID0+IHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLnRleHROb3JtYWwgPSB0aGlzLnNldHRpbmdzLnRleHROb3JtYWwgLSAwLjU7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnNldEZvbnRTaXplKCk7XHJcbiAgICAgIH1cclxuICAgIH0pOyBcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLWRhcmstY3ljbGUnLFxyXG4gICAgICBuYW1lOiAnQ3ljbGUgYmV0d2VlbiBkYXJrIG1vZGUgc3R5bGVzJyxcclxuICAgICAgY2FsbGJhY2s6ICgpID0+IHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLmRhcmtTdHlsZSA9IGRhcmtTdHlsZXNbKGRhcmtTdHlsZXMuaW5kZXhPZih0aGlzLnNldHRpbmdzLmRhcmtTdHlsZSkgKyAxKSAlIGRhcmtTdHlsZXMubGVuZ3RoXTtcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1N0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pOyAgXHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICd0b2dnbGUtbWluaW1hbC1saWdodC1jeWNsZScsXHJcbiAgICAgIG5hbWU6ICdDeWNsZSBiZXR3ZWVuIGxpZ2h0IG1vZGUgc3R5bGVzJyxcclxuICAgICAgY2FsbGJhY2s6ICgpID0+IHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLmxpZ2h0U3R5bGUgPSBsaWdodFN0eWxlc1sobGlnaHRTdHlsZXMuaW5kZXhPZih0aGlzLnNldHRpbmdzLmxpZ2h0U3R5bGUpICsgMSkgJSBsaWdodFN0eWxlcy5sZW5ndGhdO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgdGhpcy51cGRhdGVMaWdodFN0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLWhpZGRlbi1ib3JkZXJzJyxcclxuICAgICAgbmFtZTogJ1RvZ2dsZSBzaWRlYmFyIGJvcmRlcnMnLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuYm9yZGVyc1RvZ2dsZSA9ICF0aGlzLnNldHRpbmdzLmJvcmRlcnNUb2dnbGU7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnJlZnJlc2goKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICd0b2dnbGUtY29sb3JmdWwtaGVhZGluZ3MnLFxyXG4gICAgICBuYW1lOiAnVG9nZ2xlIGNvbG9yZnVsIGhlYWRpbmdzJyxcclxuICAgICAgY2FsbGJhY2s6ICgpID0+IHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLmNvbG9yZnVsSGVhZGluZ3MgPSAhdGhpcy5zZXR0aW5ncy5jb2xvcmZ1bEhlYWRpbmdzO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgdGhpcy5yZWZyZXNoKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtZm9jdXMtbW9kZScsXHJcbiAgICAgIG5hbWU6ICdUb2dnbGUgZm9jdXMgbW9kZScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5mb2N1c01vZGUgPSAhdGhpcy5zZXR0aW5ncy5mb2N1c01vZGU7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnJlZnJlc2goKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICd0b2dnbGUtbWluaW1hbC1jb2xvcmZ1bC1mcmFtZScsXHJcbiAgICAgIG5hbWU6ICdUb2dnbGUgY29sb3JmdWwgd2luZG93IGZyYW1lJyxcclxuICAgICAgY2FsbGJhY2s6ICgpID0+IHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLmNvbG9yZnVsRnJhbWUgPSAhdGhpcy5zZXR0aW5ncy5jb2xvcmZ1bEZyYW1lO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgdGhpcy5yZWZyZXNoKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAnY3ljbGUtbWluaW1hbC10YWJsZS13aWR0aCcsXHJcbiAgICAgIG5hbWU6ICdDeWNsZSBiZXR3ZWVuIHRhYmxlIHdpZHRoIG9wdGlvbnMnLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MudGFibGVXaWR0aCA9IHRhYmxlV2lkdGhTdHlsZXNbKHRhYmxlV2lkdGhTdHlsZXMuaW5kZXhPZih0aGlzLnNldHRpbmdzLnRhYmxlV2lkdGgpICsgMSkgJSB0YWJsZVdpZHRoU3R5bGVzLmxlbmd0aF07XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnJlZnJlc2goKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICdjeWNsZS1taW5pbWFsLWltYWdlLXdpZHRoJyxcclxuICAgICAgbmFtZTogJ0N5Y2xlIGJldHdlZW4gaW1hZ2Ugd2lkdGggb3B0aW9ucycsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5pbWdXaWR0aCA9IGltZ1dpZHRoU3R5bGVzWyhpbWdXaWR0aFN0eWxlcy5pbmRleE9mKHRoaXMuc2V0dGluZ3MuaW1nV2lkdGgpICsgMSkgJSBpbWdXaWR0aFN0eWxlcy5sZW5ndGhdO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgdGhpcy5yZWZyZXNoKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAnY3ljbGUtbWluaW1hbC1pZnJhbWUtd2lkdGgnLFxyXG4gICAgICBuYW1lOiAnQ3ljbGUgYmV0d2VlbiBpZnJhbWUgd2lkdGggb3B0aW9ucycsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5pZnJhbWVXaWR0aCA9IGlmcmFtZVdpZHRoU3R5bGVzWyhpZnJhbWVXaWR0aFN0eWxlcy5pbmRleE9mKHRoaXMuc2V0dGluZ3MuaWZyYW1lV2lkdGgpICsgMSkgJSBpZnJhbWVXaWR0aFN0eWxlcy5sZW5ndGhdO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgdGhpcy5yZWZyZXNoKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAnY3ljbGUtbWluaW1hbC1jaGFydC13aWR0aCcsXHJcbiAgICAgIG5hbWU6ICdDeWNsZSBiZXR3ZWVuIGNoYXJ0IHdpZHRoIG9wdGlvbnMnLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuY2hhcnRXaWR0aCA9IGNoYXJ0V2lkdGhTdHlsZXNbKGNoYXJ0V2lkdGhTdHlsZXMuaW5kZXhPZih0aGlzLnNldHRpbmdzLmNoYXJ0V2lkdGgpICsgMSkgJSBjaGFydFdpZHRoU3R5bGVzLmxlbmd0aF07XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnJlZnJlc2goKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICdjeWNsZS1taW5pbWFsLW1hcC13aWR0aCcsXHJcbiAgICAgIG5hbWU6ICdDeWNsZSBiZXR3ZWVuIG1hcCB3aWR0aCBvcHRpb25zJyxcclxuICAgICAgY2FsbGJhY2s6ICgpID0+IHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLm1hcFdpZHRoID0gbWFwV2lkdGhTdHlsZXNbKG1hcFdpZHRoU3R5bGVzLmluZGV4T2YodGhpcy5zZXR0aW5ncy5tYXBXaWR0aCkgKyAxKSAlIG1hcFdpZHRoU3R5bGVzLmxlbmd0aF07XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnJlZnJlc2goKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICd0b2dnbGUtbWluaW1hbC1pbWctZ3JpZCcsXHJcbiAgICAgIG5hbWU6ICdUb2dnbGUgaW1hZ2UgZ3JpZHMnLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuaW1nR3JpZCA9ICF0aGlzLnNldHRpbmdzLmltZ0dyaWQ7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnJlZnJlc2goKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICd0b2dnbGUtbWluaW1hbC1zd2l0Y2gnLFxyXG4gICAgICBuYW1lOiAnU3dpdGNoIGJldHdlZW4gbGlnaHQgYW5kIGRhcmsgbW9kZScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy51cGRhdGVUaGVtZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLWxpZ2h0LWRlZmF1bHQnLFxyXG4gICAgICBuYW1lOiAnVXNlIGxpZ2h0IG1vZGUgKGRlZmF1bHQpJyxcclxuICAgICAgY2FsbGJhY2s6ICgpID0+IHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLmxpZ2h0U3R5bGUgPSAnbWluaW1hbC1saWdodCc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZUxpZ2h0U3R5bGUoKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICd0b2dnbGUtbWluaW1hbC1saWdodC13aGl0ZScsXHJcbiAgICAgIG5hbWU6ICdVc2UgbGlnaHQgbW9kZSAoYWxsIHdoaXRlKScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5saWdodFN0eWxlID0gJ21pbmltYWwtbGlnaHQtd2hpdGUnO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgdGhpcy51cGRhdGVMaWdodFN0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtbGlnaHQtdG9uYWwnLFxyXG4gICAgICBuYW1lOiAnVXNlIGxpZ2h0IG1vZGUgKGxvdyBjb250cmFzdCknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MubGlnaHRTdHlsZSA9ICdtaW5pbWFsLWxpZ2h0LXRvbmFsJztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlTGlnaHRTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLWxpZ2h0LWNvbnRyYXN0JyxcclxuICAgICAgbmFtZTogJ1VzZSBsaWdodCBtb2RlIChoaWdoIGNvbnRyYXN0KScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5saWdodFN0eWxlID0gJ21pbmltYWwtbGlnaHQtY29udHJhc3QnO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgdGhpcy51cGRhdGVMaWdodFN0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtZGFyay1kZWZhdWx0JyxcclxuICAgICAgbmFtZTogJ1VzZSBkYXJrIG1vZGUgKGRlZmF1bHQpJyxcclxuICAgICAgY2FsbGJhY2s6ICgpID0+IHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLmRhcmtTdHlsZSA9ICdtaW5pbWFsLWRhcmsnO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgdGhpcy51cGRhdGVEYXJrU3R5bGUoKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICd0b2dnbGUtbWluaW1hbC1kYXJrLXRvbmFsJyxcclxuICAgICAgbmFtZTogJ1VzZSBkYXJrIG1vZGUgKGxvdyBjb250cmFzdCknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuZGFya1N0eWxlID0gJ21pbmltYWwtZGFyay10b25hbCc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLWRhcmstYmxhY2snLFxyXG4gICAgICBuYW1lOiAnVXNlIGRhcmsgbW9kZSAodHJ1ZSBibGFjayknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuZGFya1N0eWxlID0gJ21pbmltYWwtZGFyay1ibGFjayc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLWF0b20tbGlnaHQnLFxyXG4gICAgICBuYW1lOiAnU3dpdGNoIGxpZ2h0IGNvbG9yIHNjaGVtZSB0byBBdG9tIChsaWdodCknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MubGlnaHRTY2hlbWUgPSAnbWluaW1hbC1hdG9tLWxpZ2h0JztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlTGlnaHRTY2hlbWUoKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZUxpZ2h0U3R5bGUoKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICd0b2dnbGUtbWluaW1hbC1heXUtbGlnaHQnLFxyXG4gICAgICBuYW1lOiAnU3dpdGNoIGxpZ2h0IGNvbG9yIHNjaGVtZSB0byBBeXUgKGxpZ2h0KScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5saWdodFNjaGVtZSA9ICdtaW5pbWFsLWF5dS1saWdodCc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZUxpZ2h0U2NoZW1lKCk7XHJcbiAgICAgICAgdGhpcy51cGRhdGVMaWdodFN0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtY2F0cHB1Y2Npbi1saWdodCcsXHJcbiAgICAgIG5hbWU6ICdTd2l0Y2ggbGlnaHQgY29sb3Igc2NoZW1lIHRvIENhdHBwdWNjaW4gKGxpZ2h0KScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5saWdodFNjaGVtZSA9ICdtaW5pbWFsLWNhdHBwdWNjaW4tbGlnaHQnO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgdGhpcy51cGRhdGVMaWdodFNjaGVtZSgpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlTGlnaHRTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLWRlZmF1bHQtbGlnaHQnLFxyXG4gICAgICBuYW1lOiAnU3dpdGNoIGxpZ2h0IGNvbG9yIHNjaGVtZSB0byBkZWZhdWx0IChsaWdodCknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MubGlnaHRTY2hlbWUgPSAnbWluaW1hbC1kZWZhdWx0LWxpZ2h0JztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlTGlnaHRTY2hlbWUoKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZUxpZ2h0U3R5bGUoKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICd0b2dnbGUtbWluaW1hbC1ncnV2Ym94LWxpZ2h0JyxcclxuICAgICAgbmFtZTogJ1N3aXRjaCBsaWdodCBjb2xvciBzY2hlbWUgdG8gR3J1dmJveCAobGlnaHQpJyxcclxuICAgICAgY2FsbGJhY2s6ICgpID0+IHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLmxpZ2h0U2NoZW1lID0gJ21pbmltYWwtZ3J1dmJveC1saWdodCc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZUxpZ2h0U2NoZW1lKCk7XHJcbiAgICAgICAgdGhpcy51cGRhdGVMaWdodFN0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtZWluay1saWdodCcsXHJcbiAgICAgIG5hbWU6ICdTd2l0Y2ggbGlnaHQgY29sb3Igc2NoZW1lIHRvIEUtaW5rIChsaWdodCknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MubGlnaHRTY2hlbWUgPSAnbWluaW1hbC1laW5rLWxpZ2h0JztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlTGlnaHRTY2hlbWUoKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZUxpZ2h0U3R5bGUoKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICd0b2dnbGUtbWluaW1hbC1ldmVyZm9yZXN0LWxpZ2h0JyxcclxuICAgICAgbmFtZTogJ1N3aXRjaCBsaWdodCBjb2xvciBzY2hlbWUgdG8gRXZlcmZvcmVzdCAobGlnaHQpJyxcclxuICAgICAgY2FsbGJhY2s6ICgpID0+IHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLmxpZ2h0U2NoZW1lID0gJ21pbmltYWwtZXZlcmZvcmVzdC1saWdodCc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZUxpZ2h0U2NoZW1lKCk7XHJcbiAgICAgICAgdGhpcy51cGRhdGVMaWdodFN0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtZmxleG9raS1saWdodCcsXHJcbiAgICAgIG5hbWU6ICdTd2l0Y2ggbGlnaHQgY29sb3Igc2NoZW1lIHRvIEZsZXhva2kgKGxpZ2h0KScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5saWdodFNjaGVtZSA9ICdtaW5pbWFsLWZsZXhva2ktbGlnaHQnO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgdGhpcy51cGRhdGVMaWdodFNjaGVtZSgpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlTGlnaHRTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLW1hY29zLWxpZ2h0JyxcclxuICAgICAgbmFtZTogJ1N3aXRjaCBsaWdodCBjb2xvciBzY2hlbWUgdG8gbWFjT1MgKGxpZ2h0KScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5saWdodFNjaGVtZSA9ICdtaW5pbWFsLW1hY29zLWxpZ2h0JztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlTGlnaHRTY2hlbWUoKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZUxpZ2h0U3R5bGUoKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICd0b2dnbGUtbWluaW1hbC1ub3Rpb24tbGlnaHQnLFxyXG4gICAgICBuYW1lOiAnU3dpdGNoIGxpZ2h0IGNvbG9yIHNjaGVtZSB0byBTa3kgKGxpZ2h0KScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5saWdodFNjaGVtZSA9ICdtaW5pbWFsLW5vdGlvbi1saWdodCc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZUxpZ2h0U2NoZW1lKCk7XHJcbiAgICAgICAgdGhpcy51cGRhdGVMaWdodFN0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtbm9yZC1saWdodCcsXHJcbiAgICAgIG5hbWU6ICdTd2l0Y2ggbGlnaHQgY29sb3Igc2NoZW1lIHRvIE5vcmQgKGxpZ2h0KScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5saWdodFNjaGVtZSA9ICdtaW5pbWFsLW5vcmQtbGlnaHQnO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgdGhpcy51cGRhdGVMaWdodFNjaGVtZSgpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlTGlnaHRTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLXJvc2UtcGluZS1saWdodCcsXHJcbiAgICAgIG5hbWU6ICdTd2l0Y2ggbGlnaHQgY29sb3Igc2NoZW1lIHRvIFJvc1x1MDBFOSBQaW5lIChsaWdodCknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MubGlnaHRTY2hlbWUgPSAnbWluaW1hbC1yb3NlLXBpbmUtbGlnaHQnO1xyXG4gICAgICAgIHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgICAgICAgdGhpcy51cGRhdGVMaWdodFNjaGVtZSgpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlTGlnaHRTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLXNvbGFyaXplZC1saWdodCcsXHJcbiAgICAgIG5hbWU6ICdTd2l0Y2ggbGlnaHQgY29sb3Igc2NoZW1lIHRvIFNvbGFyaXplZCAobGlnaHQpJyxcclxuICAgICAgY2FsbGJhY2s6ICgpID0+IHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLmxpZ2h0U2NoZW1lID0gJ21pbmltYWwtc29sYXJpemVkLWxpZ2h0JztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlTGlnaHRTY2hlbWUoKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZUxpZ2h0U3R5bGUoKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5hZGRDb21tYW5kKHtcclxuICAgICAgaWQ6ICd0b2dnbGUtbWluaW1hbC10aGluZ3MtbGlnaHQnLFxyXG4gICAgICBuYW1lOiAnU3dpdGNoIGxpZ2h0IGNvbG9yIHNjaGVtZSB0byBUaGluZ3MgKGxpZ2h0KScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5saWdodFNjaGVtZSA9ICdtaW5pbWFsLXRoaW5ncy1saWdodCc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZUxpZ2h0U2NoZW1lKCk7XHJcbiAgICAgICAgdGhpcy51cGRhdGVMaWdodFN0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtYXRvbS1kYXJrJyxcclxuICAgICAgbmFtZTogJ1N3aXRjaCBkYXJrIGNvbG9yIHNjaGVtZSB0byBBdG9tIChkYXJrKScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5kYXJrU2NoZW1lID0gJ21pbmltYWwtYXRvbS1kYXJrJztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1NjaGVtZSgpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1N0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtYXl1LWRhcmsnLFxyXG4gICAgICBuYW1lOiAnU3dpdGNoIGRhcmsgY29sb3Igc2NoZW1lIHRvIEF5dSAoZGFyayknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuZGFya1NjaGVtZSA9ICdtaW5pbWFsLWF5dS1kYXJrJztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1NjaGVtZSgpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1N0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtY2F0cHB1Y2Npbi1kYXJrJyxcclxuICAgICAgbmFtZTogJ1N3aXRjaCBkYXJrIGNvbG9yIHNjaGVtZSB0byBDYXRwcHVjY2luIChkYXJrKScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5kYXJrU2NoZW1lID0gJ21pbmltYWwtY2F0cHB1Y2Npbi1kYXJrJztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1NjaGVtZSgpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1N0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtZHJhY3VsYS1kYXJrJyxcclxuICAgICAgbmFtZTogJ1N3aXRjaCBkYXJrIGNvbG9yIHNjaGVtZSB0byBEcmFjdWxhIChkYXJrKScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5kYXJrU2NoZW1lID0gJ21pbmltYWwtZHJhY3VsYS1kYXJrJztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1NjaGVtZSgpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1N0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtZGVmYXVsdC1kYXJrJyxcclxuICAgICAgbmFtZTogJ1N3aXRjaCBkYXJrIGNvbG9yIHNjaGVtZSB0byBkZWZhdWx0IChkYXJrKScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5kYXJrU2NoZW1lID0gJ21pbmltYWwtZGVmYXVsdC1kYXJrJztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1NjaGVtZSgpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1N0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtZWluay1kYXJrJyxcclxuICAgICAgbmFtZTogJ1N3aXRjaCBkYXJrIGNvbG9yIHNjaGVtZSB0byBFLWluayAoZGFyayknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuZGFya1NjaGVtZSA9ICdtaW5pbWFsLWVpbmstZGFyayc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTY2hlbWUoKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLWV2ZXJmb3Jlc3QtZGFyaycsXHJcbiAgICAgIG5hbWU6ICdTd2l0Y2ggZGFyayBjb2xvciBzY2hlbWUgdG8gRXZlcmZvcmVzdCAoZGFyayknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuZGFya1NjaGVtZSA9ICdtaW5pbWFsLWV2ZXJmb3Jlc3QtZGFyayc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTY2hlbWUoKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLWZsZXhva2ktZGFyaycsXHJcbiAgICAgIG5hbWU6ICdTd2l0Y2ggZGFyayBjb2xvciBzY2hlbWUgdG8gRmxleG9raSAoZGFyayknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuZGFya1NjaGVtZSA9ICdtaW5pbWFsLWZsZXhva2ktZGFyayc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTY2hlbWUoKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLWdydXZib3gtZGFyaycsXHJcbiAgICAgIG5hbWU6ICdTd2l0Y2ggZGFyayBjb2xvciBzY2hlbWUgdG8gR3J1dmJveCAoZGFyayknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuZGFya1NjaGVtZSA9ICdtaW5pbWFsLWdydXZib3gtZGFyayc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTY2hlbWUoKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLW1hY29zLWRhcmsnLFxyXG4gICAgICBuYW1lOiAnU3dpdGNoIGRhcmsgY29sb3Igc2NoZW1lIHRvIG1hY09TIChkYXJrKScsXHJcbiAgICAgIGNhbGxiYWNrOiAoKSA9PiB7XHJcbiAgICAgICAgdGhpcy5zZXR0aW5ncy5kYXJrU2NoZW1lID0gJ21pbmltYWwtbWFjb3MtZGFyayc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTY2hlbWUoKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLW5vcmQtZGFyaycsXHJcbiAgICAgIG5hbWU6ICdTd2l0Y2ggZGFyayBjb2xvciBzY2hlbWUgdG8gTm9yZCAoZGFyayknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuZGFya1NjaGVtZSA9ICdtaW5pbWFsLW5vcmQtZGFyayc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTY2hlbWUoKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLW5vdGlvbi1kYXJrJyxcclxuICAgICAgbmFtZTogJ1N3aXRjaCBkYXJrIGNvbG9yIHNjaGVtZSB0byBTa3kgKGRhcmspJyxcclxuICAgICAgY2FsbGJhY2s6ICgpID0+IHtcclxuICAgICAgICB0aGlzLnNldHRpbmdzLmRhcmtTY2hlbWUgPSAnbWluaW1hbC1ub3Rpb24tZGFyayc7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTY2hlbWUoKTtcclxuICAgICAgICB0aGlzLnVwZGF0ZURhcmtTdHlsZSgpO1xyXG4gICAgICB9XHJcbiAgICB9KTtcclxuXHJcbiAgICB0aGlzLmFkZENvbW1hbmQoe1xyXG4gICAgICBpZDogJ3RvZ2dsZS1taW5pbWFsLXJvc2UtcGluZS1kYXJrJyxcclxuICAgICAgbmFtZTogJ1N3aXRjaCBkYXJrIGNvbG9yIHNjaGVtZSB0byBSb3NcdTAwRTkgUGluZSAoZGFyayknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuZGFya1NjaGVtZSA9ICdtaW5pbWFsLXJvc2UtcGluZS1kYXJrJztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1NjaGVtZSgpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1N0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtc29sYXJpemVkLWRhcmsnLFxyXG4gICAgICBuYW1lOiAnU3dpdGNoIGRhcmsgY29sb3Igc2NoZW1lIHRvIFNvbGFyaXplZCAoZGFyayknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuZGFya1NjaGVtZSA9ICdtaW5pbWFsLXNvbGFyaXplZC1kYXJrJztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1NjaGVtZSgpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1N0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtdGhpbmdzLWRhcmsnLFxyXG4gICAgICBuYW1lOiAnU3dpdGNoIGRhcmsgY29sb3Igc2NoZW1lIHRvIFRoaW5ncyAoZGFyayknLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuZGFya1NjaGVtZSA9ICdtaW5pbWFsLXRoaW5ncy1kYXJrJztcclxuICAgICAgICB0aGlzLnNhdmVEYXRhKHRoaXMuc2V0dGluZ3MpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1NjaGVtZSgpO1xyXG4gICAgICAgIHRoaXMudXBkYXRlRGFya1N0eWxlKCk7XHJcbiAgICAgIH1cclxuICAgIH0pO1xyXG5cclxuICAgIHRoaXMuYWRkQ29tbWFuZCh7XHJcbiAgICAgIGlkOiAndG9nZ2xlLW1pbmltYWwtZGV2LWJsb2NrLXdpZHRoJyxcclxuICAgICAgbmFtZTogJ0RldiBcdTIwMTQgU2hvdyBibG9jayB3aWR0aHMnLFxyXG4gICAgICBjYWxsYmFjazogKCkgPT4ge1xyXG4gICAgICAgIHRoaXMuc2V0dGluZ3MuZGV2QmxvY2tXaWR0aCA9ICF0aGlzLnNldHRpbmdzLmRldkJsb2NrV2lkdGg7XHJcbiAgICAgICAgdGhpcy5zYXZlRGF0YSh0aGlzLnNldHRpbmdzKTtcclxuICAgICAgICB0aGlzLnJlZnJlc2goKTtcclxuICAgICAgfVxyXG4gICAgfSk7XHJcblxyXG4gICAgdGhpcy5yZWZyZXNoKClcclxuICB9XHJcblxyXG4gIG9udW5sb2FkKCkge1xyXG4gICAgY29uc29sZS5sb2coJ1VubG9hZGluZyBNaW5pbWFsIFRoZW1lIFNldHRpbmdzIHBsdWdpbicpO1xyXG4gIH1cclxuXHJcbiAgYXN5bmMgbG9hZFNldHRpbmdzKCkge1xyXG4gICAgdGhpcy5zZXR0aW5ncyA9IE9iamVjdC5hc3NpZ24oREVGQVVMVF9TRVRUSU5HUywgYXdhaXQgdGhpcy5sb2FkRGF0YSgpKTtcclxuICB9XHJcblxyXG4gIGFzeW5jIHNhdmVTZXR0aW5ncygpIHtcclxuICAgIGF3YWl0IHRoaXMuc2F2ZURhdGEodGhpcy5zZXR0aW5ncyk7XHJcbiAgfVxyXG5cclxuICAvLyByZWZyZXNoIGZ1bmN0aW9uIGZvciB3aGVuIHdlIGNoYW5nZSBzZXR0aW5nc1xyXG4gIHJlZnJlc2goKSB7XHJcbiAgICAvLyByZS1sb2FkIHRoZSBzdHlsZVxyXG4gICAgdGhpcy51cGRhdGVTdHlsZSgpXHJcbiAgfVxyXG5cclxuICAvLyBhZGQgdGhlIHN0eWxpbmcgZWxlbWVudHMgd2UgbmVlZFxyXG4gIGFkZFN0eWxlKCkge1xyXG4gICAgLy8gYWRkIGEgY3NzIGJsb2NrIGZvciBvdXIgc2V0dGluZ3MtZGVwZW5kZW50IHN0eWxlc1xyXG4gICAgY29uc3QgY3NzID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnc3R5bGUnKTtcclxuICAgIGNzcy5pZCA9ICdtaW5pbWFsLXRoZW1lJztcclxuICAgIGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKFwiaGVhZFwiKVswXS5hcHBlbmRDaGlsZChjc3MpO1xyXG5cclxuICAgIC8vIGFkZCB0aGUgbWFpbiBjbGFzc1xyXG4gICAgZG9jdW1lbnQuYm9keS5jbGFzc0xpc3QuYWRkKCdtaW5pbWFsLXRoZW1lJyk7XHJcblxyXG4gICAgLy8gdXBkYXRlIHRoZSBzdHlsZSB3aXRoIHRoZSBzZXR0aW5ncy1kZXBlbmRlbnQgc3R5bGVzXHJcbiAgICB0aGlzLnVwZGF0ZVN0eWxlKCk7XHJcbiAgfVxyXG5cclxuICBzZXRGb250U2l6ZSgpIHtcclxuICAgIC8vIEB0cy1pZ25vcmVcclxuICAgIHRoaXMuYXBwLnZhdWx0LnNldENvbmZpZygnYmFzZUZvbnRTaXplJywgdGhpcy5zZXR0aW5ncy50ZXh0Tm9ybWFsKTtcclxuICAgIC8vIEB0cy1pZ25vcmVcclxuICAgIHRoaXMuYXBwLnVwZGF0ZUZvbnRTaXplKCk7XHJcbiAgfVxyXG5cclxuICAvLyB1cGRhdGUgdGhlIHN0eWxlcyAoYXQgdGhlIHN0YXJ0LCBvciBhcyB0aGUgcmVzdWx0IG9mIGEgc2V0dGluZ3MgY2hhbmdlKVxyXG4gIHVwZGF0ZVN0eWxlKCkge1xyXG4gICAgdGhpcy5yZW1vdmVTdHlsZSgpO1xyXG5cclxuICAgIGRvY3VtZW50LmJvZHkuYWRkQ2xhc3ModGhpcy5zZXR0aW5ncy5kYXJrU2NoZW1lKTtcclxuICAgIGRvY3VtZW50LmJvZHkuYWRkQ2xhc3ModGhpcy5zZXR0aW5ncy5saWdodFNjaGVtZSk7XHJcblxyXG4gICAgZG9jdW1lbnQuYm9keS5jbGFzc0xpc3QudG9nZ2xlKCdib3JkZXJzLW5vbmUnLCAhdGhpcy5zZXR0aW5ncy5ib3JkZXJzVG9nZ2xlKTtcclxuICAgIGRvY3VtZW50LmJvZHkuY2xhc3NMaXN0LnRvZ2dsZSgnY29sb3JmdWwtaGVhZGluZ3MnLCB0aGlzLnNldHRpbmdzLmNvbG9yZnVsSGVhZGluZ3MpO1xyXG4gICAgZG9jdW1lbnQuYm9keS5jbGFzc0xpc3QudG9nZ2xlKCdjb2xvcmZ1bC1mcmFtZScsIHRoaXMuc2V0dGluZ3MuY29sb3JmdWxGcmFtZSk7XHJcbiAgICBkb2N1bWVudC5ib2R5LmNsYXNzTGlzdC50b2dnbGUoJ2NvbG9yZnVsLWFjdGl2ZScsIHRoaXMuc2V0dGluZ3MuY29sb3JmdWxBY3RpdmVTdGF0ZXMpO1xyXG4gICAgZG9jdW1lbnQuYm9keS5jbGFzc0xpc3QudG9nZ2xlKCdtaW5pbWFsLWZvY3VzLW1vZGUnLCB0aGlzLnNldHRpbmdzLmZvY3VzTW9kZSk7XHJcbiAgICBkb2N1bWVudC5ib2R5LmNsYXNzTGlzdC50b2dnbGUoJ2xpbmtzLWludC1vbicsIHRoaXMuc2V0dGluZ3MudW5kZXJsaW5lSW50ZXJuYWwpO1xyXG4gICAgZG9jdW1lbnQuYm9keS5jbGFzc0xpc3QudG9nZ2xlKCdsaW5rcy1leHQtb24nLCB0aGlzLnNldHRpbmdzLnVuZGVybGluZUV4dGVybmFsKTtcclxuICAgIGRvY3VtZW50LmJvZHkuY2xhc3NMaXN0LnRvZ2dsZSgnZnVsbC13aWR0aC1tZWRpYScsIHRoaXMuc2V0dGluZ3MuZnVsbFdpZHRoTWVkaWEpO1xyXG4gICAgZG9jdW1lbnQuYm9keS5jbGFzc0xpc3QudG9nZ2xlKCdpbWctZ3JpZCcsIHRoaXMuc2V0dGluZ3MuaW1nR3JpZCk7XHJcbiAgICBkb2N1bWVudC5ib2R5LmNsYXNzTGlzdC50b2dnbGUoJ21pbmltYWwtZGV2LWJsb2NrLXdpZHRoJywgdGhpcy5zZXR0aW5ncy5kZXZCbG9ja1dpZHRoKTtcclxuICAgIGRvY3VtZW50LmJvZHkuY2xhc3NMaXN0LnRvZ2dsZSgnbWluaW1hbC1zdGF0dXMtb2ZmJywgIXRoaXMuc2V0dGluZ3MubWluaW1hbFN0YXR1cyk7XHJcbiAgICBkb2N1bWVudC5ib2R5LmNsYXNzTGlzdC50b2dnbGUoJ2Z1bGwtZmlsZS1uYW1lcycsICF0aGlzLnNldHRpbmdzLnRyaW1OYW1lcyk7XHJcbiAgICBkb2N1bWVudC5ib2R5LmNsYXNzTGlzdC50b2dnbGUoJ2xhYmVsZWQtbmF2JywgdGhpcy5zZXR0aW5ncy5sYWJlbGVkTmF2KTtcclxuICAgIGRvY3VtZW50LmJvZHkuY2xhc3NMaXN0LnRvZ2dsZSgnbWluaW1hbC1mb2xkaW5nJywgdGhpcy5zZXR0aW5ncy5mb2xkaW5nKTtcclxuXHJcbiAgICBkb2N1bWVudC5ib2R5LnJlbW92ZUNsYXNzKCd0YWJsZS13aWRlJywndGFibGUtbWF4JywndGFibGUtMTAwJywndGFibGUtZGVmYXVsdC13aWR0aCcsXHJcbiAgICAgICdpZnJhbWUtd2lkZScsJ2lmcmFtZS1tYXgnLCdpZnJhbWUtMTAwJywnaWZyYW1lLWRlZmF1bHQtd2lkdGgnLFxyXG4gICAgICAnaW1nLXdpZGUnLCdpbWctbWF4JywnaW1nLTEwMCcsJ2ltZy1kZWZhdWx0LXdpZHRoJyxcclxuICAgICAgJ2NoYXJ0LXdpZGUnLCdjaGFydC1tYXgnLCdjaGFydC0xMDAnLCdjaGFydC1kZWZhdWx0LXdpZHRoJyxcclxuICAgICAgJ21hcC13aWRlJywnbWFwLW1heCcsJ21hcC0xMDAnLCdtYXAtZGVmYXVsdC13aWR0aCcpO1xyXG4gICAgZG9jdW1lbnQuYm9keS5hZGRDbGFzcyh0aGlzLnNldHRpbmdzLmNoYXJ0V2lkdGgpO1xyXG4gICAgZG9jdW1lbnQuYm9keS5hZGRDbGFzcyh0aGlzLnNldHRpbmdzLnRhYmxlV2lkdGgpO1xyXG4gICAgZG9jdW1lbnQuYm9keS5hZGRDbGFzcyh0aGlzLnNldHRpbmdzLmltZ1dpZHRoKTtcclxuICAgIGRvY3VtZW50LmJvZHkuYWRkQ2xhc3ModGhpcy5zZXR0aW5ncy5pZnJhbWVXaWR0aCk7XHJcbiAgICBkb2N1bWVudC5ib2R5LmFkZENsYXNzKHRoaXMuc2V0dGluZ3MubWFwV2lkdGgpO1xyXG5cclxuICAgIC8vIGdldCB0aGUgY3VzdG9tIGNzcyBlbGVtZW50XHJcbiAgICBjb25zdCBlbCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdtaW5pbWFsLXRoZW1lJyk7XHJcbiAgICBpZiAoIWVsKSB0aHJvdyBcIm1pbmltYWwtdGhlbWUgZWxlbWVudCBub3QgZm91bmQhXCI7XHJcbiAgICBlbHNlIHtcclxuICAgICAgLy8gc2V0IHRoZSBzZXR0aW5ncy1kZXBlbmRlbnQgY3NzXHJcbiAgICAgIGVsLmlubmVyVGV4dCA9IFxyXG4gICAgICAgICdib2R5Lm1pbmltYWwtdGhlbWV7J1xyXG4gICAgICAgICsgJy0tZm9udC11aS1zbWFsbDonICsgdGhpcy5zZXR0aW5ncy50ZXh0U21hbGwgKyAncHg7J1xyXG4gICAgICAgICsgJy0tbGluZS1oZWlnaHQ6JyArIHRoaXMuc2V0dGluZ3MubGluZUhlaWdodCArICc7J1xyXG4gICAgICAgICsgJy0tbGluZS13aWR0aDonICsgdGhpcy5zZXR0aW5ncy5saW5lV2lkdGggKyAncmVtOydcclxuICAgICAgICArICctLWxpbmUtd2lkdGgtd2lkZTonICsgdGhpcy5zZXR0aW5ncy5saW5lV2lkdGhXaWRlICsgJ3JlbTsnXHJcbiAgICAgICAgKyAnLS1tYXgtd2lkdGg6JyArIHRoaXMuc2V0dGluZ3MubWF4V2lkdGggKyAnJTsnXHJcbiAgICAgICAgKyAnLS1mb250LWVkaXRvci1vdmVycmlkZTonICsgdGhpcy5zZXR0aW5ncy5lZGl0b3JGb250ICsgJzsnO1xyXG4gICAgfVxyXG5cclxuICB9XHJcblxyXG4gIHVwZGF0ZURhcmtTdHlsZSgpIHtcclxuICAgIGRvY3VtZW50LmJvZHkucmVtb3ZlQ2xhc3MoXHJcbiAgICAgICd0aGVtZS1saWdodCcsXHJcbiAgICAgICdtaW5pbWFsLWRhcmsnLFxyXG4gICAgICAnbWluaW1hbC1kYXJrLXRvbmFsJyxcclxuICAgICAgJ21pbmltYWwtZGFyay1ibGFjaydcclxuICAgICk7XHJcbiAgICBkb2N1bWVudC5ib2R5LmFkZENsYXNzKFxyXG4gICAgICAndGhlbWUtZGFyaycsXHJcbiAgICAgIHRoaXMuc2V0dGluZ3MuZGFya1N0eWxlXHJcbiAgICApO1xyXG4gICAgaWYgKHRoaXMuYXBwLnZhdWx0LmdldENvbmZpZygndGhlbWUnKSAhPT0gJ3N5c3RlbScpIHtcclxuICAgICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgICB0aGlzLmFwcC5zZXRUaGVtZSgnb2JzaWRpYW4nKTtcclxuICAgICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgICB0aGlzLmFwcC52YXVsdC5zZXRDb25maWcoJ3RoZW1lJywgJ29ic2lkaWFuJyk7XHJcbiAgICB9XHJcbiAgICB0aGlzLmFwcC53b3Jrc3BhY2UudHJpZ2dlcignY3NzLWNoYW5nZScpO1xyXG4gIH1cclxuXHJcbiAgdXBkYXRlTGlnaHRTdHlsZSgpIHtcclxuICAgIGRvY3VtZW50LmJvZHkucmVtb3ZlQ2xhc3MoXHJcbiAgICAgICd0aGVtZS1kYXJrJyxcclxuICAgICAgJ21pbmltYWwtbGlnaHQnLFxyXG4gICAgICAnbWluaW1hbC1saWdodC10b25hbCcsXHJcbiAgICAgICdtaW5pbWFsLWxpZ2h0LWNvbnRyYXN0JyxcclxuICAgICAgJ21pbmltYWwtbGlnaHQtd2hpdGUnXHJcbiAgICApO1xyXG4gICAgZG9jdW1lbnQuYm9keS5hZGRDbGFzcyhcclxuICAgICAgJ3RoZW1lLWxpZ2h0JyxcclxuICAgICAgdGhpcy5zZXR0aW5ncy5saWdodFN0eWxlXHJcbiAgICApO1xyXG4gICAgaWYgKHRoaXMuYXBwLnZhdWx0LmdldENvbmZpZygndGhlbWUnKSAhPT0gJ3N5c3RlbScpIHtcclxuICAgICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgICB0aGlzLmFwcC5zZXRUaGVtZSgnbW9vbnN0b25lJyk7XHJcbiAgICAgIC8vIEB0cy1pZ25vcmVcclxuICAgICAgdGhpcy5hcHAudmF1bHQuc2V0Q29uZmlnKCd0aGVtZScsICdtb29uc3RvbmUnKTtcclxuICAgIH1cclxuICAgIHRoaXMuYXBwLndvcmtzcGFjZS50cmlnZ2VyKCdjc3MtY2hhbmdlJyk7XHJcbiAgfVxyXG5cclxuICB1cGRhdGVEYXJrU2NoZW1lKCkge1xyXG4gICAgZG9jdW1lbnQuYm9keS5yZW1vdmVDbGFzcyhcclxuICAgICAgJ21pbmltYWwtYXRvbS1kYXJrJyxcclxuICAgICAgJ21pbmltYWwtYXl1LWRhcmsnLFxyXG4gICAgICAnbWluaW1hbC1jYXRwcHVjY2luLWRhcmsnLFxyXG4gICAgICAnbWluaW1hbC1kZWZhdWx0LWRhcmsnLFxyXG4gICAgICAnbWluaW1hbC1kcmFjdWxhLWRhcmsnLFxyXG4gICAgICAnbWluaW1hbC1laW5rLWRhcmsnLFxyXG4gICAgICAnbWluaW1hbC1ldmVyZm9yZXN0LWRhcmsnLFxyXG4gICAgICAnbWluaW1hbC1mbGV4b2tpLWRhcmsnLFxyXG4gICAgICAnbWluaW1hbC1ncnV2Ym94LWRhcmsnLFxyXG4gICAgICAnbWluaW1hbC1tYWNvcy1kYXJrJyxcclxuICAgICAgJ21pbmltYWwtbm9yZC1kYXJrJyxcclxuICAgICAgJ21pbmltYWwtbm90aW9uLWRhcmsnLFxyXG4gICAgICAnbWluaW1hbC1yb3NlLXBpbmUtZGFyaycsXHJcbiAgICAgICdtaW5pbWFsLXNvbGFyaXplZC1kYXJrJyxcclxuICAgICAgJ21pbmltYWwtdGhpbmdzLWRhcmsnXHJcbiAgICApO1xyXG4gICAgZG9jdW1lbnQuYm9keS5hZGRDbGFzcyh0aGlzLnNldHRpbmdzLmRhcmtTY2hlbWUpO1xyXG4gIH1cclxuXHJcbiAgdXBkYXRlTGlnaHRTY2hlbWUoKSB7XHJcbiAgICBkb2N1bWVudC5ib2R5LnJlbW92ZUNsYXNzKFxyXG4gICAgICAnbWluaW1hbC1hdG9tLWxpZ2h0JyxcclxuICAgICAgJ21pbmltYWwtYXl1LWxpZ2h0JyxcclxuICAgICAgJ21pbmltYWwtY2F0cHB1Y2Npbi1saWdodCcsXHJcbiAgICAgICdtaW5pbWFsLWRlZmF1bHQtbGlnaHQnLFxyXG4gICAgICAnbWluaW1hbC1laW5rLWxpZ2h0JyxcclxuICAgICAgJ21pbmltYWwtZXZlcmZvcmVzdC1saWdodCcsXHJcbiAgICAgICdtaW5pbWFsLWZsZXhva2ktbGlnaHQnLFxyXG4gICAgICAnbWluaW1hbC1ncnV2Ym94LWxpZ2h0JyxcclxuICAgICAgJ21pbmltYWwtbWFjb3MtbGlnaHQnLFxyXG4gICAgICAnbWluaW1hbC1ub3JkLWxpZ2h0JyxcclxuICAgICAgJ21pbmltYWwtbm90aW9uLWxpZ2h0JyxcclxuICAgICAgJ21pbmltYWwtcm9zZS1waW5lLWxpZ2h0JyxcclxuICAgICAgJ21pbmltYWwtc29sYXJpemVkLWxpZ2h0JyxcclxuICAgICAgJ21pbmltYWwtdGhpbmdzLWxpZ2h0J1xyXG4gICAgKTtcclxuICAgIGRvY3VtZW50LmJvZHkuYWRkQ2xhc3ModGhpcy5zZXR0aW5ncy5saWdodFNjaGVtZSk7XHJcbiAgfVxyXG5cclxuICB1cGRhdGVUaGVtZSgpIHtcclxuICAgIGlmICh0aGlzLmFwcC52YXVsdC5nZXRDb25maWcoJ3RoZW1lJykgPT09ICdzeXN0ZW0nKSB7XHJcbiAgICAgICAgaWYgKGRvY3VtZW50LmJvZHkuY2xhc3NMaXN0LmNvbnRhaW5zKCd0aGVtZS1saWdodCcpKSB7XHJcbiAgICAgICAgICBkb2N1bWVudC5ib2R5LnJlbW92ZUNsYXNzKCd0aGVtZS1saWdodCcpO1xyXG4gICAgICAgICAgZG9jdW1lbnQuYm9keS5hZGRDbGFzcygndGhlbWUtZGFyaycpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICBkb2N1bWVudC5ib2R5LnJlbW92ZUNsYXNzKCd0aGVtZS1kYXJrJyk7XHJcbiAgICAgICAgICBkb2N1bWVudC5ib2R5LmFkZENsYXNzKCd0aGVtZS1saWdodCcpO1xyXG4gICAgICAgIH1cclxuICAgIH0gZWxzZSB7XHJcbiAgICAgICAgaWYgKGRvY3VtZW50LmJvZHkuY2xhc3NMaXN0LmNvbnRhaW5zKCd0aGVtZS1saWdodCcpKSB7XHJcbiAgICAgICAgICBkb2N1bWVudC5ib2R5LnJlbW92ZUNsYXNzKCd0aGVtZS1saWdodCcpO1xyXG4gICAgICAgICAgZG9jdW1lbnQuYm9keS5hZGRDbGFzcygndGhlbWUtZGFyaycpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICBkb2N1bWVudC5ib2R5LnJlbW92ZUNsYXNzKCd0aGVtZS1kYXJrJyk7XHJcbiAgICAgICAgICBkb2N1bWVudC5ib2R5LmFkZENsYXNzKCd0aGVtZS1saWdodCcpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgIGNvbnN0IGN1cnJlbnRUaGVtZSA9IHRoaXMuYXBwLnZhdWx0LmdldENvbmZpZygndGhlbWUnKTtcclxuICAgICAgY29uc3QgbmV3VGhlbWUgPSBjdXJyZW50VGhlbWUgPT09ICdtb29uc3RvbmUnID8gJ29ic2lkaWFuJyA6ICdtb29uc3RvbmUnO1xyXG5cclxuICAgICAgLy8gQHRzLWlnbm9yZVxyXG4gICAgICB0aGlzLmFwcC5zZXRUaGVtZShuZXdUaGVtZSk7XHJcbiAgICAgIC8vIEB0cy1pZ25vcmVcclxuICAgICAgdGhpcy5hcHAudmF1bHQuc2V0Q29uZmlnKCd0aGVtZScsIG5ld1RoZW1lKTtcclxuICAgIH1cclxuICAgIHRoaXMuYXBwLndvcmtzcGFjZS50cmlnZ2VyKCdjc3MtY2hhbmdlJyk7XHJcbiAgfVxyXG5cclxuICByZW1vdmVTdHlsZSgpIHtcclxuICAgIGRvY3VtZW50LmJvZHkucmVtb3ZlQ2xhc3MoJ21pbmltYWwtbGlnaHQnLCdtaW5pbWFsLWxpZ2h0LXRvbmFsJywnbWluaW1hbC1saWdodC1jb250cmFzdCcsJ21pbmltYWwtbGlnaHQtd2hpdGUnLCdtaW5pbWFsLWRhcmsnLCdtaW5pbWFsLWRhcmstdG9uYWwnLCdtaW5pbWFsLWRhcmstYmxhY2snKTtcclxuICAgIGRvY3VtZW50LmJvZHkuYWRkQ2xhc3ModGhpcy5zZXR0aW5ncy5saWdodFN0eWxlLHRoaXMuc2V0dGluZ3MuZGFya1N0eWxlKTtcclxuICB9XHJcblxyXG59XHJcblxyXG5pbnRlcmZhY2UgTWluaW1hbFNldHRpbmdzIHtcclxuICBsaWdodFN0eWxlOiBzdHJpbmc7XHJcbiAgZGFya1N0eWxlOiBzdHJpbmc7XHJcbiAgbGlnaHRTY2hlbWU6IHN0cmluZztcclxuICBkYXJrU2NoZW1lOiBzdHJpbmc7XHJcbiAgZWRpdG9yRm9udDogc3RyaW5nO1xyXG4gIGNvbG9yZnVsSGVhZGluZ3M6IGJvb2xlYW47XHJcbiAgY29sb3JmdWxGcmFtZTogYm9vbGVhbjtcclxuICBjb2xvcmZ1bEFjdGl2ZVN0YXRlczogYm9vbGVhbixcclxuICB0cmltTmFtZXM6IGJvb2xlYW47XHJcbiAgbGFiZWxlZE5hdjogYm9vbGVhbjtcclxuICBib3JkZXJzVG9nZ2xlOiBib29sZWFuO1xyXG4gIGZvY3VzTW9kZTogYm9vbGVhbjtcclxuICBsaW5lSGVpZ2h0OiBudW1iZXI7XHJcbiAgbGluZVdpZHRoOiBudW1iZXI7XHJcbiAgbGluZVdpZHRoV2lkZTogbnVtYmVyO1xyXG4gIG1heFdpZHRoOiBudW1iZXI7XHJcbiAgaW1nR3JpZDogYm9vbGVhbjtcclxuICBkZXZCbG9ja1dpZHRoOiBib29sZWFuO1xyXG4gIHRhYmxlV2lkdGg6IHN0cmluZztcclxuICBpZnJhbWVXaWR0aDogc3RyaW5nO1xyXG4gIGltZ1dpZHRoOiBzdHJpbmc7XHJcbiAgY2hhcnRXaWR0aDogc3RyaW5nO1xyXG4gIG1hcFdpZHRoOiBzdHJpbmc7XHJcbiAgZnVsbFdpZHRoTWVkaWE6IGJvb2xlYW4sXHJcbiAgbWluaW1hbFN0YXR1czogYm9vbGVhbixcclxuICB0ZXh0Tm9ybWFsOiBudW1iZXI7XHJcbiAgdGV4dFNtYWxsOiBudW1iZXI7XHJcbiAgdW5kZXJsaW5lSW50ZXJuYWw6IGJvb2xlYW47XHJcbiAgdW5kZXJsaW5lRXh0ZXJuYWw6IGJvb2xlYW47XHJcbiAgZm9sZGluZzogYm9vbGVhbjtcclxuICBsaW5lTnVtYmVyczogYm9vbGVhbjtcclxuICByZWFkYWJsZUxpbmVMZW5ndGg6IGJvb2xlYW47XHJcbn1cclxuXHJcbmNvbnN0IERFRkFVTFRfU0VUVElOR1M6IE1pbmltYWxTZXR0aW5ncyA9IHtcclxuICBsaWdodFN0eWxlOiAnbWluaW1hbC1saWdodCcsXHJcbiAgZGFya1N0eWxlOiAnbWluaW1hbC1kYXJrJyxcclxuICBsaWdodFNjaGVtZTogJ21pbmltYWwtZGVmYXVsdC1saWdodCcsXHJcbiAgZGFya1NjaGVtZTogJ21pbmltYWwtZGVmYXVsdC1kYXJrJyxcclxuICBlZGl0b3JGb250OiAnJyxcclxuICBsaW5lSGVpZ2h0OiAxLjUsXHJcbiAgbGluZVdpZHRoOiA0MCxcclxuICBsaW5lV2lkdGhXaWRlOiA1MCxcclxuICBtYXhXaWR0aDogODgsXHJcbiAgdGV4dE5vcm1hbDogMTYsXHJcbiAgdGV4dFNtYWxsOiAxMyxcclxuICBpbWdHcmlkOiBmYWxzZSxcclxuICBpbWdXaWR0aDogJ2ltZy1kZWZhdWx0LXdpZHRoJyxcclxuICB0YWJsZVdpZHRoOiAndGFibGUtZGVmYXVsdC13aWR0aCcsXHJcbiAgaWZyYW1lV2lkdGg6ICdpZnJhbWUtZGVmYXVsdC13aWR0aCcsXHJcbiAgbWFwV2lkdGg6ICdtYXAtZGVmYXVsdC13aWR0aCcsXHJcbiAgY2hhcnRXaWR0aDogJ2NoYXJ0LWRlZmF1bHQtd2lkdGgnLFxyXG4gIGNvbG9yZnVsSGVhZGluZ3M6IGZhbHNlLFxyXG4gIGNvbG9yZnVsRnJhbWU6IGZhbHNlLFxyXG4gIGNvbG9yZnVsQWN0aXZlU3RhdGVzOiBmYWxzZSxcclxuICB0cmltTmFtZXM6IHRydWUsXHJcbiAgbGFiZWxlZE5hdjogZmFsc2UsXHJcbiAgZnVsbFdpZHRoTWVkaWE6IHRydWUsXHJcbiAgYm9yZGVyc1RvZ2dsZTogdHJ1ZSxcclxuICBtaW5pbWFsU3RhdHVzOiB0cnVlLFxyXG4gIGZvY3VzTW9kZTogZmFsc2UsXHJcbiAgdW5kZXJsaW5lSW50ZXJuYWw6IHRydWUsXHJcbiAgdW5kZXJsaW5lRXh0ZXJuYWw6IHRydWUsXHJcbiAgZm9sZGluZzogdHJ1ZSxcclxuICBsaW5lTnVtYmVyczogZmFsc2UsXHJcbiAgcmVhZGFibGVMaW5lTGVuZ3RoOiBmYWxzZSxcclxuICBkZXZCbG9ja1dpZHRoOiBmYWxzZSxcclxufVxyXG5cclxuY2xhc3MgTWluaW1hbFNldHRpbmdUYWIgZXh0ZW5kcyBQbHVnaW5TZXR0aW5nVGFiIHtcclxuXHJcblxyXG4gIHBsdWdpbjogTWluaW1hbFRoZW1lO1xyXG4gIGNvbnN0cnVjdG9yKGFwcDogQXBwLCBwbHVnaW46IE1pbmltYWxUaGVtZSkge1xyXG4gICAgc3VwZXIoYXBwLCBwbHVnaW4pO1xyXG4gICAgdGhpcy5wbHVnaW4gPSBwbHVnaW47XHJcbiAgfVxyXG5cclxuICBkaXNwbGF5KCk6IHZvaWQge1xyXG4gICAgbGV0IHtjb250YWluZXJFbH0gPSB0aGlzO1xyXG5cclxuICAgIGNvbnRhaW5lckVsLmVtcHR5KCk7XHJcblxyXG4gICAgY29uc3QgY29sb3JTZWN0aW9uID0gY29udGFpbmVyRWwuY3JlYXRlRWwoJ2RpdicsIHtjbHM6ICdzZXR0aW5nLWl0ZW0gc2V0dGluZy1pdGVtLWhlYWRpbmcnfSk7XHJcblxyXG4gICAgY29uc3QgY29sb3JTZWN0aW9uSW5mbyA9ICBjb2xvclNlY3Rpb24uY3JlYXRlRWwoJ2RpdicsIHtjbHM6ICdzZXR0aW5nLWl0ZW0taW5mbyd9KTtcclxuXHJcbiAgICBjb2xvclNlY3Rpb25JbmZvLmNyZWF0ZUVsKCdkaXYnLCB7dGV4dDogJ0NvbG9yIHNjaGVtZScsIGNsczogJ3NldHRpbmctaXRlbS1uYW1lJ30pO1xyXG5cclxuICAgIGNvbnN0IGNvbG9yRGVzYyA9IGNvbG9yU2VjdGlvbkluZm8uY3JlYXRlRWwoJ2RpdicsIHtjbHM6ICdzZXR0aW5nLWl0ZW0tZGVzY3JpcHRpb24nfSk7XHJcblxyXG4gICAgICBjb2xvckRlc2MuYXBwZW5kQ2hpbGQoXHJcbiAgICAgICAgY3JlYXRlRWwoJ3NwYW4nLCB7XHJcbiAgICAgICAgICB0ZXh0OiAnVG8gY3JlYXRlIGEgY3VzdG9tIGNvbG9yIHNjaGVtZSB1c2UgdGhlICdcclxuICAgICAgICAgIH0pXHJcbiAgICAgICAgKTtcclxuICAgICAgY29sb3JEZXNjLmFwcGVuZENoaWxkKFxyXG4gICAgICAgIGNyZWF0ZUVsKCdhJywge1xyXG4gICAgICAgICAgdGV4dDogXCJTdHlsZSBTZXR0aW5nc1wiLFxyXG4gICAgICAgICAgaHJlZjogXCJvYnNpZGlhbjovL3Nob3ctcGx1Z2luP2lkPW9ic2lkaWFuLXN0eWxlLXNldHRpbmdzXCIsXHJcbiAgICAgICAgfSlcclxuICAgICAgKTtcclxuICAgICAgY29sb3JEZXNjLmFwcGVuZFRleHQoJyBwbHVnaW4uIFNlZSAnKTtcclxuXHJcbiAgICAgIGNvbG9yRGVzYy5hcHBlbmRDaGlsZChcclxuICAgICAgICBjcmVhdGVFbCgnYScsIHtcclxuICAgICAgICAgIHRleHQ6IFwiZG9jdW1lbnRhdGlvblwiLFxyXG4gICAgICAgICAgaHJlZjogXCJodHRwczovL21pbmltYWwuZ3VpZGUvZmVhdHVyZXMvY29sb3Itc2NoZW1lc1wiLFxyXG4gICAgICAgIH0pXHJcbiAgICAgICk7XHJcbiAgICAgIGNvbG9yRGVzYy5hcHBlbmRUZXh0KCcgZm9yIGRldGFpbHMuJyk7XHJcblxyXG4gICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcclxuICAgICAgICAuc2V0TmFtZSgnTGlnaHQgbW9kZSBjb2xvciBzY2hlbWUnKVxyXG4gICAgICAgIC5zZXREZXNjKCdQcmVzZXQgY29sb3Igb3B0aW9ucyBmb3IgbGlnaHQgbW9kZS4nKVxyXG4gICAgICAgIC5hZGREcm9wZG93bihkcm9wZG93biA9PiBkcm9wZG93blxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC1kZWZhdWx0LWxpZ2h0JywnRGVmYXVsdCcpXHJcbiAgICAgICAgICAuYWRkT3B0aW9uKCdtaW5pbWFsLWF0b20tbGlnaHQnLCdBdG9tJylcclxuICAgICAgICAgIC5hZGRPcHRpb24oJ21pbmltYWwtYXl1LWxpZ2h0JywnQXl1JylcclxuICAgICAgICAgIC5hZGRPcHRpb24oJ21pbmltYWwtY2F0cHB1Y2Npbi1saWdodCcsJ0NhdHBwdWNjaW4nKVxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC1laW5rLWxpZ2h0JywnRS1pbmsgKGJldGEpJylcclxuICAgICAgICAgIC5hZGRPcHRpb24oJ21pbmltYWwtZXZlcmZvcmVzdC1saWdodCcsJ0V2ZXJmb3Jlc3QnKVxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC1mbGV4b2tpLWxpZ2h0JywnRmxleG9raScpXHJcbiAgICAgICAgICAuYWRkT3B0aW9uKCdtaW5pbWFsLWdydXZib3gtbGlnaHQnLCdHcnV2Ym94JylcclxuICAgICAgICAgIC5hZGRPcHRpb24oJ21pbmltYWwtbWFjb3MtbGlnaHQnLCdtYWNPUycpXHJcbiAgICAgICAgICAuYWRkT3B0aW9uKCdtaW5pbWFsLW5vcmQtbGlnaHQnLCdOb3JkJylcclxuICAgICAgICAgIC5hZGRPcHRpb24oJ21pbmltYWwtcm9zZS1waW5lLWxpZ2h0JywnUm9zXHUwMEU5IFBpbmUnKVxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC1ub3Rpb24tbGlnaHQnLCdTa3knKVxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC1zb2xhcml6ZWQtbGlnaHQnLCdTb2xhcml6ZWQnKVxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC10aGluZ3MtbGlnaHQnLCdUaGluZ3MnKVxyXG4gICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmxpZ2h0U2NoZW1lKVxyXG4gICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcclxuICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmxpZ2h0U2NoZW1lID0gdmFsdWU7XHJcbiAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlRGF0YSh0aGlzLnBsdWdpbi5zZXR0aW5ncyk7XHJcbiAgICAgICAgICB0aGlzLnBsdWdpbi51cGRhdGVMaWdodFNjaGVtZSgpO1xyXG4gICAgICAgIH0pKTtcclxuXHJcbiAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxyXG4gICAgICAgIC5zZXROYW1lKCdMaWdodCBtb2RlIGJhY2tncm91bmQgY29udHJhc3QnKVxyXG4gICAgICAgIC5zZXREZXNjKCdMZXZlbCBvZiBjb250cmFzdCBiZXR3ZWVuIHNpZGViYXIgYW5kIG1haW4gY29udGVudC4nKVxyXG4gICAgICAgIC5hZGREcm9wZG93bihkcm9wZG93biA9PiBkcm9wZG93blxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC1saWdodCcsJ0RlZmF1bHQnKVxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC1saWdodC13aGl0ZScsJ0FsbCB3aGl0ZScpXHJcbiAgICAgICAgICAuYWRkT3B0aW9uKCdtaW5pbWFsLWxpZ2h0LXRvbmFsJywnTG93IGNvbnRyYXN0JylcclxuICAgICAgICAgIC5hZGRPcHRpb24oJ21pbmltYWwtbGlnaHQtY29udHJhc3QnLCdIaWdoIGNvbnRyYXN0JylcclxuICAgICAgICAgIC5zZXRWYWx1ZSh0aGlzLnBsdWdpbi5zZXR0aW5ncy5saWdodFN0eWxlKVxyXG4gICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcclxuICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmxpZ2h0U3R5bGUgPSB2YWx1ZTtcclxuICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVEYXRhKHRoaXMucGx1Z2luLnNldHRpbmdzKTtcclxuICAgICAgICAgIHRoaXMucGx1Z2luLnVwZGF0ZUxpZ2h0U3R5bGUoKTtcclxuICAgICAgICB9KSk7XHJcblxyXG4gICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcclxuICAgICAgICAuc2V0TmFtZSgnRGFyayBtb2RlIGNvbG9yIHNjaGVtZScpXHJcbiAgICAgICAgLnNldERlc2MoJ1ByZXNldCBjb2xvcnMgb3B0aW9ucyBmb3IgZGFyayBtb2RlLicpXHJcbiAgICAgICAgLmFkZERyb3Bkb3duKGRyb3Bkb3duID0+IGRyb3Bkb3duXHJcbiAgICAgICAgICAuYWRkT3B0aW9uKCdtaW5pbWFsLWRlZmF1bHQtZGFyaycsJ0RlZmF1bHQnKVxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC1hdG9tLWRhcmsnLCdBdG9tJylcclxuICAgICAgICAgIC5hZGRPcHRpb24oJ21pbmltYWwtYXl1LWRhcmsnLCdBeXUnKVxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC1jYXRwcHVjY2luLWRhcmsnLCdDYXRwcHVjY2luJylcclxuICAgICAgICAgIC5hZGRPcHRpb24oJ21pbmltYWwtZHJhY3VsYS1kYXJrJywnRHJhY3VsYScpXHJcbiAgICAgICAgICAuYWRkT3B0aW9uKCdtaW5pbWFsLWVpbmstZGFyaycsJ0UtaW5rIChiZXRhKScpXHJcbiAgICAgICAgICAuYWRkT3B0aW9uKCdtaW5pbWFsLWV2ZXJmb3Jlc3QtZGFyaycsJ0V2ZXJmb3Jlc3QnKVxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC1mbGV4b2tpLWRhcmsnLCdGbGV4b2tpJylcclxuICAgICAgICAgIC5hZGRPcHRpb24oJ21pbmltYWwtZ3J1dmJveC1kYXJrJywnR3J1dmJveCcpXHJcbiAgICAgICAgICAuYWRkT3B0aW9uKCdtaW5pbWFsLW1hY29zLWRhcmsnLCdtYWNPUycpXHJcbiAgICAgICAgICAuYWRkT3B0aW9uKCdtaW5pbWFsLW5vcmQtZGFyaycsJ05vcmQnKVxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC1yb3NlLXBpbmUtZGFyaycsJ1Jvc1x1MDBFOSBQaW5lJylcclxuICAgICAgICAgIC5hZGRPcHRpb24oJ21pbmltYWwtbm90aW9uLWRhcmsnLCdTa3knKVxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC1zb2xhcml6ZWQtZGFyaycsJ1NvbGFyaXplZCcpXHJcbiAgICAgICAgICAuYWRkT3B0aW9uKCdtaW5pbWFsLXRoaW5ncy1kYXJrJywnVGhpbmdzJylcclxuICAgICAgICAgIC5zZXRWYWx1ZSh0aGlzLnBsdWdpbi5zZXR0aW5ncy5kYXJrU2NoZW1lKVxyXG4gICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5kYXJrU2NoZW1lID0gdmFsdWU7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVEYXRhKHRoaXMucGx1Z2luLnNldHRpbmdzKTtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4udXBkYXRlRGFya1NjaGVtZSgpO1xyXG4gICAgICAgICAgfSkpO1xyXG5cclxuICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXHJcbiAgICAgICAgLnNldE5hbWUoJ0RhcmsgbW9kZSBiYWNrZ3JvdW5kIGNvbnRyYXN0JylcclxuICAgICAgICAuc2V0RGVzYygnTGV2ZWwgb2YgY29udHJhc3QgYmV0d2VlbiBzaWRlYmFyIGFuZCBtYWluIGNvbnRlbnQuJylcclxuICAgICAgICAuYWRkRHJvcGRvd24oZHJvcGRvd24gPT4gZHJvcGRvd25cclxuICAgICAgICAgIC5hZGRPcHRpb24oJ21pbmltYWwtZGFyaycsJ0RlZmF1bHQnKVxyXG4gICAgICAgICAgLmFkZE9wdGlvbignbWluaW1hbC1kYXJrLXRvbmFsJywnTG93IGNvbnRyYXN0JylcclxuICAgICAgICAgIC5hZGRPcHRpb24oJ21pbmltYWwtZGFyay1ibGFjaycsJ1RydWUgYmxhY2snKVxyXG4gICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmRhcmtTdHlsZSlcclxuICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuZGFya1N0eWxlID0gdmFsdWU7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVEYXRhKHRoaXMucGx1Z2luLnNldHRpbmdzKTtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4udXBkYXRlRGFya1N0eWxlKCk7XHJcbiAgICAgICAgICB9KSk7XHJcblxyXG4gICAgY29udGFpbmVyRWwuY3JlYXRlRWwoJ2JyJyk7XHJcblxyXG4gICAgY29uc3QgZmVhdHVyZXNTZWN0aW9uID0gY29udGFpbmVyRWwuY3JlYXRlRWwoJ2RpdicsIHtjbHM6ICdzZXR0aW5nLWl0ZW0gc2V0dGluZy1pdGVtLWhlYWRpbmcnfSk7XHJcblxyXG4gICAgY29uc3QgZmVhdHVyZXNTZWN0aW9uSW5mbyA9ICBmZWF0dXJlc1NlY3Rpb24uY3JlYXRlRWwoJ2RpdicsIHtjbHM6ICdzZXR0aW5nLWl0ZW0taW5mbyd9KTtcclxuXHJcbiAgICBmZWF0dXJlc1NlY3Rpb25JbmZvLmNyZWF0ZUVsKCdkaXYnLCB7dGV4dDogJ0ZlYXR1cmVzJywgY2xzOiAnc2V0dGluZy1pdGVtLW5hbWUnfSk7XHJcblxyXG4gICAgY29uc3QgZmVhdHVyZXNTZWN0aW9uRGVzYyA9IGZlYXR1cmVzU2VjdGlvbkluZm8uY3JlYXRlRWwoJ2RpdicsIHtjbHM6ICdzZXR0aW5nLWl0ZW0tZGVzY3JpcHRpb24nfSk7XHJcblxyXG4gICAgICBmZWF0dXJlc1NlY3Rpb25EZXNjLmFwcGVuZENoaWxkKFxyXG4gICAgICAgIGNyZWF0ZUVsKCdzcGFuJywge1xyXG4gICAgICAgICAgdGV4dDogJ1NlZSAnXHJcbiAgICAgICAgICB9KVxyXG4gICAgICAgICk7XHJcblxyXG4gICAgICBmZWF0dXJlc1NlY3Rpb25EZXNjLmFwcGVuZENoaWxkKFxyXG4gICAgICAgIGNyZWF0ZUVsKCdhJywge1xyXG4gICAgICAgICAgdGV4dDogXCJkb2N1bWVudGF0aW9uXCIsXHJcbiAgICAgICAgICBocmVmOiBcImh0dHBzOi8vbWluaW1hbC5ndWlkZVwiLFxyXG4gICAgICAgIH0pXHJcbiAgICAgICk7XHJcbiAgICAgIGZlYXR1cmVzU2VjdGlvbkRlc2MuYXBwZW5kVGV4dCgnIGZvciBkZXRhaWxzLicpO1xyXG5cclxuICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxyXG4gICAgICAuc2V0TmFtZSgnVGV4dCBsYWJlbHMgZm9yIHByaW1hcnkgbmF2aWdhdGlvbicpXHJcbiAgICAgIC5zZXREZXNjKCdOYXZpZ2F0aW9uIGl0ZW1zIGluIHRoZSBsZWZ0IHNpZGViYXIgdXNlcyB0ZXh0IGxhYmVscy4nKVxyXG4gICAgICAuYWRkVG9nZ2xlKHRvZ2dsZSA9PiB0b2dnbGUuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MubGFiZWxlZE5hdilcclxuICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MubGFiZWxlZE5hdiA9IHZhbHVlO1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlRGF0YSh0aGlzLnBsdWdpbi5zZXR0aW5ncyk7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnJlZnJlc2goKTtcclxuICAgICAgICAgIH0pKTtcclxuXHJcbiAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcclxuICAgICAgLnNldE5hbWUoJ0NvbG9yZnVsIHdpbmRvdyBmcmFtZScpXHJcbiAgICAgIC5zZXREZXNjKCdUaGUgdG9wIGFyZWEgb2YgdGhlIGFwcCB1c2VzIHlvdXIgYWNjZW50IGNvbG9yLicpXHJcbiAgICAgIC5hZGRUb2dnbGUodG9nZ2xlID0+IHRvZ2dsZS5zZXRWYWx1ZSh0aGlzLnBsdWdpbi5zZXR0aW5ncy5jb2xvcmZ1bEZyYW1lKVxyXG4gICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5jb2xvcmZ1bEZyYW1lID0gdmFsdWU7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVEYXRhKHRoaXMucGx1Z2luLnNldHRpbmdzKTtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4ucmVmcmVzaCgpO1xyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICAgKTtcclxuXHJcbiAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcclxuICAgICAgLnNldE5hbWUoJ0NvbG9yZnVsIGFjdGl2ZSBzdGF0ZXMnKVxyXG4gICAgICAuc2V0RGVzYygnQWN0aXZlIGZpbGUgYW5kIG1lbnUgaXRlbXMgdXNlIHlvdXIgYWNjZW50IGNvbG9yLicpXHJcbiAgICAgIC5hZGRUb2dnbGUodG9nZ2xlID0+IHRvZ2dsZS5zZXRWYWx1ZSh0aGlzLnBsdWdpbi5zZXR0aW5ncy5jb2xvcmZ1bEFjdGl2ZVN0YXRlcylcclxuICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuY29sb3JmdWxBY3RpdmVTdGF0ZXMgPSB2YWx1ZTtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZURhdGEodGhpcy5wbHVnaW4uc2V0dGluZ3MpO1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5yZWZyZXNoKCk7XHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICApO1xyXG5cclxuICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxyXG4gICAgICAuc2V0TmFtZSgnQ29sb3JmdWwgaGVhZGluZ3MnKVxyXG4gICAgICAuc2V0RGVzYygnSGVhZGluZ3MgdXNlIGEgZGlmZmVyZW50IGNvbG9yIGZvciBlYWNoIHNpemUuJylcclxuICAgICAgLmFkZFRvZ2dsZSh0b2dnbGUgPT4gdG9nZ2xlLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmNvbG9yZnVsSGVhZGluZ3MpXHJcbiAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmNvbG9yZnVsSGVhZGluZ3MgPSB2YWx1ZTtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZURhdGEodGhpcy5wbHVnaW4uc2V0dGluZ3MpO1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5yZWZyZXNoKCk7XHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICApO1xyXG5cclxuICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxyXG4gICAgICAuc2V0TmFtZSgnTWluaW1hbCBzdGF0dXMgYmFyJylcclxuICAgICAgLnNldERlc2MoJ1R1cm4gb2ZmIHRvIHVzZSBmdWxsLXdpZHRoIHN0YXR1cyBiYXIuJylcclxuICAgICAgLmFkZFRvZ2dsZSh0b2dnbGUgPT4gdG9nZ2xlLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLm1pbmltYWxTdGF0dXMpXHJcbiAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLm1pbmltYWxTdGF0dXMgPSB2YWx1ZTtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZURhdGEodGhpcy5wbHVnaW4uc2V0dGluZ3MpO1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5yZWZyZXNoKCk7XHJcbiAgICAgICAgICB9KSk7XHJcblxyXG4gICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXHJcbiAgICAgIC5zZXROYW1lKCdUcmltIGZpbGUgbmFtZXMgaW4gc2lkZWJhcnMnKVxyXG4gICAgICAuc2V0RGVzYygnVXNlIGVsbGlwc2VzIHRvIGZpdCBmaWxlIG5hbWVzIG9uIGEgc2luZ2xlIGxpbmUuJylcclxuICAgICAgLmFkZFRvZ2dsZSh0b2dnbGUgPT4gdG9nZ2xlLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLnRyaW1OYW1lcylcclxuICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudHJpbU5hbWVzID0gdmFsdWU7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVEYXRhKHRoaXMucGx1Z2luLnNldHRpbmdzKTtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4ucmVmcmVzaCgpO1xyXG4gICAgICAgICAgfSkpO1xyXG5cclxuICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXHJcbiAgICAgICAgLnNldE5hbWUoJ1dvcmtzcGFjZSBib3JkZXJzJylcclxuICAgICAgICAuc2V0RGVzYygnRGlzcGxheSBkaXZpZGVyIGxpbmVzIGJldHdlZW4gd29ya3NwYWNlIGVsZW1lbnRzLicpXHJcbiAgICAgICAgLmFkZFRvZ2dsZSh0b2dnbGUgPT4gdG9nZ2xlLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmJvcmRlcnNUb2dnbGUpXHJcbiAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmJvcmRlcnNUb2dnbGUgPSB2YWx1ZTtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZURhdGEodGhpcy5wbHVnaW4uc2V0dGluZ3MpO1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5yZWZyZXNoKCk7XHJcbiAgICAgICAgICB9KSk7XHJcblxyXG4gICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXHJcbiAgICAgIC5zZXROYW1lKCdGb2N1cyBtb2RlJylcclxuICAgICAgLnNldERlc2MoJ0hpZGUgdGFiIGJhciBhbmQgc3RhdHVzIGJhciwgaG92ZXIgdG8gZGlzcGxheS4gQ2FuIGJlIHRvZ2dsZWQgdmlhIGhvdGtleS4nKVxyXG4gICAgICAuYWRkVG9nZ2xlKHRvZ2dsZSA9PiB0b2dnbGUuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MuZm9jdXNNb2RlKVxyXG4gICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5mb2N1c01vZGUgPSB2YWx1ZTtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZURhdGEodGhpcy5wbHVnaW4uc2V0dGluZ3MpO1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5yZWZyZXNoKCk7XHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICApO1xyXG5cclxuICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxyXG4gICAgICAuc2V0TmFtZSgnVW5kZXJsaW5lIGludGVybmFsIGxpbmtzJylcclxuICAgICAgLnNldERlc2MoJ1Nob3cgdW5kZXJsaW5lcyBvbiBpbnRlcm5hbCBsaW5rcy4nKVxyXG4gICAgICAuYWRkVG9nZ2xlKHRvZ2dsZSA9PiB0b2dnbGUuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MudW5kZXJsaW5lSW50ZXJuYWwpXHJcbiAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLnVuZGVybGluZUludGVybmFsID0gdmFsdWU7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVEYXRhKHRoaXMucGx1Z2luLnNldHRpbmdzKTtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4ucmVmcmVzaCgpO1xyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICAgKTtcclxuXHJcbiAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcclxuICAgICAgLnNldE5hbWUoJ1VuZGVybGluZSBleHRlcm5hbCBsaW5rcycpXHJcbiAgICAgIC5zZXREZXNjKCdTaG93IHVuZGVybGluZXMgb24gZXh0ZXJuYWwgbGlua3MuJylcclxuICAgICAgLmFkZFRvZ2dsZSh0b2dnbGUgPT4gdG9nZ2xlLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLnVuZGVybGluZUV4dGVybmFsKVxyXG4gICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy51bmRlcmxpbmVFeHRlcm5hbCA9IHZhbHVlO1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlRGF0YSh0aGlzLnBsdWdpbi5zZXR0aW5ncyk7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnJlZnJlc2goKTtcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICAgICk7XHJcblxyXG4gICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXHJcbiAgICAgIC5zZXROYW1lKCdNYXhpbWl6ZSBtZWRpYScpXHJcbiAgICAgIC5zZXREZXNjKCdJbWFnZXMgYW5kIHZpZGVvcyBmaWxsIHRoZSB3aWR0aCBvZiB0aGUgbGluZS4nKVxyXG4gICAgICAuYWRkVG9nZ2xlKHRvZ2dsZSA9PiB0b2dnbGUuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MuZnVsbFdpZHRoTWVkaWEpXHJcbiAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmZ1bGxXaWR0aE1lZGlhID0gdmFsdWU7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVEYXRhKHRoaXMucGx1Z2luLnNldHRpbmdzKTtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4ucmVmcmVzaCgpO1xyXG4gICAgICAgICAgfSkpO1xyXG5cclxuICAgIGNvbnRhaW5lckVsLmNyZWF0ZUVsKCdicicpO1xyXG5cclxuICAgIGNvbnN0IGxheW91dFNlY3Rpb24gPSBjb250YWluZXJFbC5jcmVhdGVFbCgnZGl2Jywge2NsczogJ3NldHRpbmctaXRlbSBzZXR0aW5nLWl0ZW0taGVhZGluZyd9KTtcclxuXHJcbiAgICBjb25zdCBsYXlvdXRTZWN0aW9uSW5mbyA9ICBsYXlvdXRTZWN0aW9uLmNyZWF0ZUVsKCdkaXYnLCB7Y2xzOiAnc2V0dGluZy1pdGVtLWluZm8nfSk7XHJcblxyXG4gICAgbGF5b3V0U2VjdGlvbkluZm8uY3JlYXRlRWwoJ2RpdicsIHt0ZXh0OiAnTGF5b3V0JywgY2xzOiAnc2V0dGluZy1pdGVtLW5hbWUnfSk7XHJcblxyXG4gICAgY29uc3QgbGF5b3V0U2VjdGlvbkRlc2MgPSBsYXlvdXRTZWN0aW9uSW5mby5jcmVhdGVFbCgnZGl2Jywge2NsczogJ3NldHRpbmctaXRlbS1kZXNjcmlwdGlvbid9KTtcclxuXHJcbiAgICAgIGxheW91dFNlY3Rpb25EZXNjLmFwcGVuZENoaWxkKFxyXG4gICAgICAgIGNyZWF0ZUVsKCdzcGFuJywge1xyXG4gICAgICAgICAgdGV4dDogJ1RoZXNlIG9wdGlvbnMgY2FuIGFsc28gYmUgZGVmaW5lZCBvbiBhIHBlci1maWxlIGJhc2lzLCBzZWUgJ1xyXG4gICAgICAgICAgfSlcclxuICAgICAgICApO1xyXG4gICAgICBsYXlvdXRTZWN0aW9uRGVzYy5hcHBlbmRDaGlsZChcclxuICAgICAgICBjcmVhdGVFbCgnYScsIHtcclxuICAgICAgICAgIHRleHQ6IFwiZG9jdW1lbnRhdGlvblwiLFxyXG4gICAgICAgICAgaHJlZjogXCJodHRwczovL21pbmltYWwuZ3VpZGUvZmVhdHVyZXMvYmxvY2std2lkdGhcIixcclxuICAgICAgICB9KVxyXG4gICAgICApO1xyXG4gICAgICBsYXlvdXRTZWN0aW9uRGVzYy5hcHBlbmRUZXh0KCcgZm9yIGRldGFpbHMuJyk7XHJcblxyXG4gICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXHJcbiAgICAgIC5zZXROYW1lKCdJbWFnZSBncmlkcycpXHJcbiAgICAgIC5zZXREZXNjKCdUdXJuIGNvbnNlY3V0aXZlIGltYWdlcyBpbnRvIGNvbHVtbnMgXHUyMDE0IHRvIG1ha2UgYSBuZXcgcm93LCBhZGQgYW4gZXh0cmEgbGluZSBicmVhayBiZXR3ZWVuIGltYWdlcy4nKVxyXG4gICAgICAuYWRkVG9nZ2xlKHRvZ2dsZSA9PiB0b2dnbGUuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MuaW1nR3JpZClcclxuICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuaW1nR3JpZCA9IHZhbHVlO1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlRGF0YSh0aGlzLnBsdWdpbi5zZXR0aW5ncyk7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnJlZnJlc2goKTtcclxuICAgICAgICAgIH0pKTtcclxuXHJcbiAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcclxuICAgICAgLnNldE5hbWUoJ0NoYXJ0IHdpZHRoJylcclxuICAgICAgLnNldERlc2MoJ0RlZmF1bHQgd2lkdGggZm9yIGNoYXJ0IGJsb2Nrcy4nKVxyXG4gICAgICAuYWRkRHJvcGRvd24oZHJvcGRvd24gPT4gZHJvcGRvd25cclxuICAgICAgICAuYWRkT3B0aW9uKCdjaGFydC1kZWZhdWx0LXdpZHRoJywnRGVmYXVsdCcpXHJcbiAgICAgICAgLmFkZE9wdGlvbignY2hhcnQtd2lkZScsJ1dpZGUgbGluZSB3aWR0aCcpXHJcbiAgICAgICAgLmFkZE9wdGlvbignY2hhcnQtbWF4JywnTWF4aW11bSBsaW5lIHdpZHRoJylcclxuICAgICAgICAuYWRkT3B0aW9uKCdjaGFydC0xMDAnLCcxMDAlIHBhbmUgd2lkdGgnKVxyXG4gICAgICAgIC5zZXRWYWx1ZSh0aGlzLnBsdWdpbi5zZXR0aW5ncy5jaGFydFdpZHRoKVxyXG4gICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5jaGFydFdpZHRoID0gdmFsdWU7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVEYXRhKHRoaXMucGx1Z2luLnNldHRpbmdzKTtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4ucmVmcmVzaCgpO1xyXG4gICAgICAgICAgfSlcclxuICAgICAgICApO1xyXG5cclxuICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxyXG4gICAgICAuc2V0TmFtZSgnSWZyYW1lIHdpZHRoJylcclxuICAgICAgLnNldERlc2MoJ0RlZmF1bHQgd2lkdGggZm9yIGlmcmFtZSBibG9ja3MuJylcclxuICAgICAgLmFkZERyb3Bkb3duKGRyb3Bkb3duID0+IGRyb3Bkb3duXHJcbiAgICAgICAgLmFkZE9wdGlvbignaWZyYW1lLWRlZmF1bHQtd2lkdGgnLCdEZWZhdWx0JylcclxuICAgICAgICAuYWRkT3B0aW9uKCdpZnJhbWUtd2lkZScsJ1dpZGUgbGluZSB3aWR0aCcpXHJcbiAgICAgICAgLmFkZE9wdGlvbignaWZyYW1lLW1heCcsJ01heGltdW0gbGluZSB3aWR0aCcpXHJcbiAgICAgICAgLmFkZE9wdGlvbignaWZyYW1lLTEwMCcsJzEwMCUgcGFuZSB3aWR0aCcpXHJcbiAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmlmcmFtZVdpZHRoKVxyXG4gICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5pZnJhbWVXaWR0aCA9IHZhbHVlO1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlRGF0YSh0aGlzLnBsdWdpbi5zZXR0aW5ncyk7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnJlZnJlc2goKTtcclxuICAgICAgICAgIH0pXHJcbiAgICAgICAgKTtcclxuXHJcbiAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcclxuICAgICAgLnNldE5hbWUoJ0ltYWdlIHdpZHRoJylcclxuICAgICAgLnNldERlc2MoJ0RlZmF1bHQgd2lkdGggZm9yIGltYWdlIGJsb2Nrcy4nKVxyXG4gICAgICAuYWRkRHJvcGRvd24oZHJvcGRvd24gPT4gZHJvcGRvd25cclxuICAgICAgICAuYWRkT3B0aW9uKCdpbWctZGVmYXVsdC13aWR0aCcsJ0RlZmF1bHQnKVxyXG4gICAgICAgIC5hZGRPcHRpb24oJ2ltZy13aWRlJywnV2lkZSBsaW5lIHdpZHRoJylcclxuICAgICAgICAuYWRkT3B0aW9uKCdpbWctbWF4JywnTWF4aW11bSBsaW5lIHdpZHRoJylcclxuICAgICAgICAuYWRkT3B0aW9uKCdpbWctMTAwJywnMTAwJSBwYW5lIHdpZHRoJylcclxuICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MuaW1nV2lkdGgpXHJcbiAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmltZ1dpZHRoID0gdmFsdWU7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVEYXRhKHRoaXMucGx1Z2luLnNldHRpbmdzKTtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4ucmVmcmVzaCgpO1xyXG4gICAgICAgICAgfSlcclxuICAgICAgICApO1xyXG5cclxuICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxyXG4gICAgICAuc2V0TmFtZSgnTWFwIHdpZHRoJylcclxuICAgICAgLnNldERlc2MoJ0RlZmF1bHQgd2lkdGggZm9yIG1hcCBibG9ja3MuJylcclxuICAgICAgLmFkZERyb3Bkb3duKGRyb3Bkb3duID0+IGRyb3Bkb3duXHJcbiAgICAgICAgLmFkZE9wdGlvbignbWFwLWRlZmF1bHQtd2lkdGgnLCdEZWZhdWx0JylcclxuICAgICAgICAuYWRkT3B0aW9uKCdtYXAtd2lkZScsJ1dpZGUgbGluZSB3aWR0aCcpXHJcbiAgICAgICAgLmFkZE9wdGlvbignbWFwLW1heCcsJ01heGltdW0gbGluZSB3aWR0aCcpXHJcbiAgICAgICAgLmFkZE9wdGlvbignbWFwLTEwMCcsJzEwMCUgcGFuZSB3aWR0aCcpXHJcbiAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLm1hcFdpZHRoKVxyXG4gICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5tYXBXaWR0aCA9IHZhbHVlO1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlRGF0YSh0aGlzLnBsdWdpbi5zZXR0aW5ncyk7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnJlZnJlc2goKTtcclxuICAgICAgICAgIH0pXHJcbiAgICAgICAgKTtcclxuXHJcbiAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcclxuICAgICAgLnNldE5hbWUoJ1RhYmxlIHdpZHRoJylcclxuICAgICAgLnNldERlc2MoJ0RlZmF1bHQgd2lkdGggZm9yIHRhYmxlIGFuZCBEYXRhdmlldyBibG9ja3MuJylcclxuICAgICAgLmFkZERyb3Bkb3duKGRyb3Bkb3duID0+IGRyb3Bkb3duXHJcbiAgICAgICAgLmFkZE9wdGlvbigndGFibGUtZGVmYXVsdC13aWR0aCcsJ0RlZmF1bHQnKVxyXG4gICAgICAgIC5hZGRPcHRpb24oJ3RhYmxlLXdpZGUnLCdXaWRlIGxpbmUgd2lkdGgnKVxyXG4gICAgICAgIC5hZGRPcHRpb24oJ3RhYmxlLW1heCcsJ01heGltdW0gbGluZSB3aWR0aCcpXHJcbiAgICAgICAgLmFkZE9wdGlvbigndGFibGUtMTAwJywnMTAwJSBwYW5lIHdpZHRoJylcclxuICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MudGFibGVXaWR0aClcclxuICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudGFibGVXaWR0aCA9IHZhbHVlO1xyXG4gICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlRGF0YSh0aGlzLnBsdWdpbi5zZXR0aW5ncyk7XHJcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLnJlZnJlc2goKTtcclxuICAgICAgICAgIH0pXHJcbiAgICAgICAgKTtcclxuXHJcbiAgICBjb250YWluZXJFbC5jcmVhdGVFbCgnYnInKTtcclxuICAgIGNvbnRhaW5lckVsLmNyZWF0ZUVsKCdkaXYnLCB7dGV4dDogJ1R5cG9ncmFwaHknLCBjbHM6ICdzZXR0aW5nLWl0ZW0gc2V0dGluZy1pdGVtLWhlYWRpbmcnfSk7XHJcblxyXG4gICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXHJcbiAgICAgIC5zZXROYW1lKCdUZXh0IGZvbnQgc2l6ZScpXHJcbiAgICAgIC5zZXREZXNjKCdVc2VkIGZvciB0aGUgbWFpbiB0ZXh0IChkZWZhdWx0IDE2KS4nKVxyXG4gICAgICAuYWRkVGV4dCh0ZXh0ID0+IHRleHQuc2V0UGxhY2Vob2xkZXIoJzE2JylcclxuICAgICAgICAuc2V0VmFsdWUoKHRoaXMucGx1Z2luLnNldHRpbmdzLnRleHROb3JtYWwgfHwgJycpICsgJycpXHJcbiAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudGV4dE5vcm1hbCA9IHBhcnNlRmxvYXQodmFsdWUpO1xyXG4gICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZURhdGEodGhpcy5wbHVnaW4uc2V0dGluZ3MpO1xyXG4gICAgICAgICAgdGhpcy5wbHVnaW4uc2V0Rm9udFNpemUoKTtcclxuICAgICAgICB9KSk7XHJcblxyXG4gICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXHJcbiAgICAgIC5zZXROYW1lKCdTbWFsbCBmb250IHNpemUnKVxyXG4gICAgICAuc2V0RGVzYygnVXNlZCBmb3IgdGV4dCBpbiB0aGUgc2lkZWJhcnMgYW5kIHRhYnMgKGRlZmF1bHQgMTMpLicpXHJcbiAgICAgIC5hZGRUZXh0KHRleHQgPT4gdGV4dC5zZXRQbGFjZWhvbGRlcignMTMnKVxyXG4gICAgICAgIC5zZXRWYWx1ZSgodGhpcy5wbHVnaW4uc2V0dGluZ3MudGV4dFNtYWxsIHx8ICcnKSArICcnKVxyXG4gICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcclxuICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLnRleHRTbWFsbCA9IHBhcnNlRmxvYXQodmFsdWUpO1xyXG4gICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZURhdGEodGhpcy5wbHVnaW4uc2V0dGluZ3MpO1xyXG4gICAgICAgICAgdGhpcy5wbHVnaW4ucmVmcmVzaCgpO1xyXG4gICAgICAgIH0pKTtcclxuXHJcbiAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcclxuICAgICAgLnNldE5hbWUoJ0xpbmUgaGVpZ2h0JylcclxuICAgICAgLnNldERlc2MoJ0xpbmUgaGVpZ2h0IG9mIHRleHQgKGRlZmF1bHQgMS41KS4nKVxyXG4gICAgICAuYWRkVGV4dCh0ZXh0ID0+IHRleHQuc2V0UGxhY2Vob2xkZXIoJzEuNScpXHJcbiAgICAgICAgLnNldFZhbHVlKCh0aGlzLnBsdWdpbi5zZXR0aW5ncy5saW5lSGVpZ2h0IHx8ICcnKSArICcnKVxyXG4gICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcclxuICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmxpbmVIZWlnaHQgPSBwYXJzZUZsb2F0KHZhbHVlKTtcclxuICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVEYXRhKHRoaXMucGx1Z2luLnNldHRpbmdzKTtcclxuICAgICAgICAgIHRoaXMucGx1Z2luLnJlZnJlc2goKTtcclxuICAgICAgICB9KSk7XHJcblxyXG4gICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXHJcbiAgICAgIC5zZXROYW1lKCdOb3JtYWwgbGluZSB3aWR0aCcpXHJcbiAgICAgIC5zZXREZXNjKCdOdW1iZXIgb2YgY2hhcmFjdGVycyBwZXIgbGluZSAoZGVmYXVsdCA0MCkuJylcclxuICAgICAgLmFkZFRleHQodGV4dCA9PiB0ZXh0LnNldFBsYWNlaG9sZGVyKCc0MCcpXHJcbiAgICAgICAgLnNldFZhbHVlKCh0aGlzLnBsdWdpbi5zZXR0aW5ncy5saW5lV2lkdGggfHwgJycpICsgJycpXHJcbiAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MubGluZVdpZHRoID0gcGFyc2VJbnQodmFsdWUudHJpbSgpKTtcclxuICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVEYXRhKHRoaXMucGx1Z2luLnNldHRpbmdzKTtcclxuICAgICAgICAgIHRoaXMucGx1Z2luLnJlZnJlc2goKTtcclxuICAgICAgICB9KSk7XHJcblxyXG4gICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXHJcbiAgICAgIC5zZXROYW1lKCdXaWRlIGxpbmUgd2lkdGgnKVxyXG4gICAgICAuc2V0RGVzYygnTnVtYmVyIG9mIGNoYXJhY3RlcnMgcGVyIGxpbmUgZm9yIHdpZGUgZWxlbWVudHMgKGRlZmF1bHQgNTApLicpXHJcbiAgICAgIC5hZGRUZXh0KHRleHQgPT4gdGV4dC5zZXRQbGFjZWhvbGRlcignNTAnKVxyXG4gICAgICAgIC5zZXRWYWx1ZSgodGhpcy5wbHVnaW4uc2V0dGluZ3MubGluZVdpZHRoV2lkZSB8fCAnJykgKyAnJylcclxuICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XHJcbiAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5saW5lV2lkdGhXaWRlID0gcGFyc2VJbnQodmFsdWUudHJpbSgpKTtcclxuICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVEYXRhKHRoaXMucGx1Z2luLnNldHRpbmdzKTtcclxuICAgICAgICAgIHRoaXMucGx1Z2luLnJlZnJlc2goKTtcclxuICAgICAgICB9KSk7XHJcblxyXG4gICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXHJcbiAgICAgIC5zZXROYW1lKCdNYXhpbXVtIGxpbmUgd2lkdGggJScpXHJcbiAgICAgIC5zZXREZXNjKCdQZXJjZW50YWdlIG9mIHNwYWNlIGluc2lkZSBhIHBhbmUgdGhhdCBhIGxpbmUgY2FuIGZpbGwgKGRlZmF1bHQgODgpLicpXHJcbiAgICAgIC5hZGRUZXh0KHRleHQgPT4gdGV4dC5zZXRQbGFjZWhvbGRlcignODgnKVxyXG4gICAgICAgIC5zZXRWYWx1ZSgodGhpcy5wbHVnaW4uc2V0dGluZ3MubWF4V2lkdGggfHwgJycpICsgJycpXHJcbiAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MubWF4V2lkdGggPSBwYXJzZUludCh2YWx1ZS50cmltKCkpO1xyXG4gICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZURhdGEodGhpcy5wbHVnaW4uc2V0dGluZ3MpO1xyXG4gICAgICAgICAgdGhpcy5wbHVnaW4ucmVmcmVzaCgpO1xyXG4gICAgICAgIH0pKTtcclxuICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxyXG4gICAgICAuc2V0TmFtZSgnRWRpdG9yIGZvbnQnKVxyXG4gICAgICAuc2V0RGVzYygnT3ZlcnJpZGVzIHRoZSB0ZXh0IGZvbnQgZGVmaW5lZCBpbiBPYnNpZGlhbiBBcHBlYXJhbmNlIHNldHRpbmdzIHdoZW4gaW4gZWRpdCBtb2RlLicpXHJcbiAgICAgIC5hZGRUZXh0KHRleHQgPT4gdGV4dC5zZXRQbGFjZWhvbGRlcignJylcclxuICAgICAgICAuc2V0VmFsdWUoKHRoaXMucGx1Z2luLnNldHRpbmdzLmVkaXRvckZvbnQgfHwgJycpICsgJycpXHJcbiAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xyXG4gICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuZWRpdG9yRm9udCA9IHZhbHVlO1xyXG4gICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZURhdGEodGhpcy5wbHVnaW4uc2V0dGluZ3MpO1xyXG4gICAgICAgICAgdGhpcy5wbHVnaW4ucmVmcmVzaCgpO1xyXG4gICAgICAgIH0pKTtcclxuXHJcbiAgfVxyXG59XHJcbiJdLAogICJtYXBwaW5ncyI6ICI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUEsc0JBQWlGO0FBRWpGLGlDQUEwQyx1QkFBTztBQUFBLEVBSXpDLFNBQVM7QUFBQTtBQUViLFlBQU0sS0FBSztBQUVYLFdBQUssY0FBYyxJQUFJLGtCQUFrQixLQUFLLEtBQUs7QUFFbkQsV0FBSztBQUdMLFVBQUksaUJBQWlCLE1BQU07QUFFekIsY0FBTSxXQUFXLEtBQUssSUFBSSxNQUFNLFVBQVU7QUFDMUMsYUFBSyxTQUFTLGFBQWE7QUFHM0IsWUFBSSxLQUFLLElBQUksTUFBTSxVQUFVLGdCQUFnQjtBQUMzQyxlQUFLLFNBQVMsVUFBVTtBQUN4QixlQUFLLFNBQVMsS0FBSztBQUNuQixrQkFBUSxJQUFJO0FBQUEsZUFDUDtBQUNMLGVBQUssU0FBUyxVQUFVO0FBQ3hCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGtCQUFRLElBQUk7QUFBQTtBQUVkLGlCQUFTLEtBQUssVUFBVSxPQUFPLG1CQUFtQixLQUFLLFNBQVM7QUFFaEUsWUFBSSxLQUFLLElBQUksTUFBTSxVQUFVLG1CQUFtQjtBQUM5QyxlQUFLLFNBQVMsY0FBYztBQUM1QixlQUFLLFNBQVMsS0FBSztBQUNuQixrQkFBUSxJQUFJO0FBQUEsZUFDUDtBQUNMLGVBQUssU0FBUyxjQUFjO0FBQzVCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGtCQUFRLElBQUk7QUFBQTtBQUVkLGlCQUFTLEtBQUssVUFBVSxPQUFPLHFCQUFxQixLQUFLLFNBQVM7QUFFbEUsWUFBSSxLQUFLLElBQUksTUFBTSxVQUFVLHVCQUF1QjtBQUNsRCxlQUFLLFNBQVMscUJBQXFCO0FBQ25DLGVBQUssU0FBUyxLQUFLO0FBQ25CLGtCQUFRLElBQUk7QUFBQSxlQUNQO0FBQ0wsZUFBSyxTQUFTLHFCQUFxQjtBQUNuQyxlQUFLLFNBQVMsS0FBSztBQUNuQixrQkFBUSxJQUFJO0FBQUE7QUFHZCxpQkFBUyxLQUFLLFVBQVUsT0FBTyxvQkFBb0IsS0FBSyxTQUFTO0FBQ2pFLGlCQUFTLEtBQUssVUFBVSxPQUFPLHdCQUF3QixDQUFDLEtBQUssU0FBUztBQUFBO0FBSXhFLFVBQUksZ0JBQWdCLE1BQU07QUFDeEIsY0FBTSxZQUFZLFNBQVMsdUJBQXVCLGtCQUFrQjtBQUNwRSxjQUFNLFdBQVcsU0FBUyx1QkFBdUIsb0JBQW9CO0FBQ3JFLFlBQUksYUFBYSxZQUFZLFNBQVMsS0FBSyxVQUFVLFNBQVMsa0JBQWtCLEtBQUssU0FBUyxjQUFjLDBCQUEwQjtBQUNwSSxvQkFBVSxTQUFTO0FBQ25CLG1CQUFTLFNBQVM7QUFBQSxtQkFDVCxhQUFhLFVBQVU7QUFDaEMsb0JBQVUsWUFBWTtBQUN0QixtQkFBUyxZQUFZO0FBQUE7QUFBQTtBQUt6QixXQUFLLGNBQWMsSUFBSSxNQUFNLEdBQUcsa0JBQWtCO0FBRWxELFdBQUssY0FBYyxJQUFJLFVBQVUsR0FBRyxjQUFjO0FBRWxEO0FBRUEsVUFBSSxVQUFVLGNBQWMsTUFBTTtBQUNoQztBQUFBO0FBR0YsWUFBTSxjQUFjLENBQUMsaUJBQWlCLHVCQUF1QiwwQkFBMEI7QUFDdkYsWUFBTSxhQUFhLENBQUMsZ0JBQWdCLHNCQUFzQjtBQUMxRCxZQUFNLGdCQUFnQixDQUFDLFlBQVcsa0JBQWlCO0FBQ25ELFlBQU0sbUJBQW1CLENBQUMsYUFBWSx1QkFBc0IsY0FBYTtBQUN6RSxZQUFNLG9CQUFvQixDQUFDLGNBQWEsd0JBQXVCLGVBQWM7QUFDN0UsWUFBTSxpQkFBaUIsQ0FBQyxXQUFVLHFCQUFvQixZQUFXO0FBQ2pFLFlBQU0saUJBQWlCLENBQUMsV0FBVSxxQkFBb0IsWUFBVztBQUNqRSxZQUFNLG1CQUFtQixDQUFDLGFBQVksdUJBQXNCLGNBQWE7QUFFekUsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsYUFBYSxLQUFLLFNBQVMsYUFBYTtBQUN0RCxlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGFBQWEsS0FBSyxTQUFTLGFBQWE7QUFDdEQsZUFBSyxTQUFTLEtBQUs7QUFDbkIsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxZQUFZLFdBQVksWUFBVyxRQUFRLEtBQUssU0FBUyxhQUFhLEtBQUssV0FBVztBQUNwRyxlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGFBQWEsWUFBYSxhQUFZLFFBQVEsS0FBSyxTQUFTLGNBQWMsS0FBSyxZQUFZO0FBQ3pHLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsZ0JBQWdCLENBQUMsS0FBSyxTQUFTO0FBQzdDLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsbUJBQW1CLENBQUMsS0FBSyxTQUFTO0FBQ2hELGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsWUFBWSxDQUFDLEtBQUssU0FBUztBQUN6QyxlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGdCQUFnQixDQUFDLEtBQUssU0FBUztBQUM3QyxlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGFBQWEsaUJBQWtCLGtCQUFpQixRQUFRLEtBQUssU0FBUyxjQUFjLEtBQUssaUJBQWlCO0FBQ3hILGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsV0FBVyxlQUFnQixnQkFBZSxRQUFRLEtBQUssU0FBUyxZQUFZLEtBQUssZUFBZTtBQUM5RyxlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGNBQWMsa0JBQW1CLG1CQUFrQixRQUFRLEtBQUssU0FBUyxlQUFlLEtBQUssa0JBQWtCO0FBQzdILGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsYUFBYSxpQkFBa0Isa0JBQWlCLFFBQVEsS0FBSyxTQUFTLGNBQWMsS0FBSyxpQkFBaUI7QUFDeEgsZUFBSyxTQUFTLEtBQUs7QUFDbkIsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxXQUFXLGVBQWdCLGdCQUFlLFFBQVEsS0FBSyxTQUFTLFlBQVksS0FBSyxlQUFlO0FBQzlHLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsVUFBVSxDQUFDLEtBQUssU0FBUztBQUN2QyxlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxhQUFhO0FBQzNCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsYUFBYTtBQUMzQixlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGFBQWE7QUFDM0IsZUFBSyxTQUFTLEtBQUs7QUFDbkIsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxhQUFhO0FBQzNCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsWUFBWTtBQUMxQixlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLFlBQVk7QUFDMUIsZUFBSyxTQUFTLEtBQUs7QUFDbkIsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxZQUFZO0FBQzFCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsY0FBYztBQUM1QixlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQ0wsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxjQUFjO0FBQzVCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFDTCxlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGNBQWM7QUFDNUIsZUFBSyxTQUFTLEtBQUs7QUFDbkIsZUFBSztBQUNMLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsY0FBYztBQUM1QixlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQ0wsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxjQUFjO0FBQzVCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFDTCxlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGNBQWM7QUFDNUIsZUFBSyxTQUFTLEtBQUs7QUFDbkIsZUFBSztBQUNMLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsY0FBYztBQUM1QixlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQ0wsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxjQUFjO0FBQzVCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFDTCxlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGNBQWM7QUFDNUIsZUFBSyxTQUFTLEtBQUs7QUFDbkIsZUFBSztBQUNMLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsY0FBYztBQUM1QixlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQ0wsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxjQUFjO0FBQzVCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFDTCxlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGNBQWM7QUFDNUIsZUFBSyxTQUFTLEtBQUs7QUFDbkIsZUFBSztBQUNMLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsY0FBYztBQUM1QixlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQ0wsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxjQUFjO0FBQzVCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFDTCxlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGFBQWE7QUFDM0IsZUFBSyxTQUFTLEtBQUs7QUFDbkIsZUFBSztBQUNMLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsYUFBYTtBQUMzQixlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQ0wsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxhQUFhO0FBQzNCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFDTCxlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGFBQWE7QUFDM0IsZUFBSyxTQUFTLEtBQUs7QUFDbkIsZUFBSztBQUNMLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsYUFBYTtBQUMzQixlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQ0wsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxhQUFhO0FBQzNCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFDTCxlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGFBQWE7QUFDM0IsZUFBSyxTQUFTLEtBQUs7QUFDbkIsZUFBSztBQUNMLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsYUFBYTtBQUMzQixlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQ0wsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxhQUFhO0FBQzNCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFDTCxlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGFBQWE7QUFDM0IsZUFBSyxTQUFTLEtBQUs7QUFDbkIsZUFBSztBQUNMLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsYUFBYTtBQUMzQixlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQ0wsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxhQUFhO0FBQzNCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFDTCxlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGFBQWE7QUFDM0IsZUFBSyxTQUFTLEtBQUs7QUFDbkIsZUFBSztBQUNMLGVBQUs7QUFBQTtBQUFBO0FBSVQsV0FBSyxXQUFXO0FBQUEsUUFDZCxJQUFJO0FBQUEsUUFDSixNQUFNO0FBQUEsUUFDTixVQUFVLE1BQU07QUFDZCxlQUFLLFNBQVMsYUFBYTtBQUMzQixlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQ0wsZUFBSztBQUFBO0FBQUE7QUFJVCxXQUFLLFdBQVc7QUFBQSxRQUNkLElBQUk7QUFBQSxRQUNKLE1BQU07QUFBQSxRQUNOLFVBQVUsTUFBTTtBQUNkLGVBQUssU0FBUyxhQUFhO0FBQzNCLGVBQUssU0FBUyxLQUFLO0FBQ25CLGVBQUs7QUFDTCxlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUssV0FBVztBQUFBLFFBQ2QsSUFBSTtBQUFBLFFBQ0osTUFBTTtBQUFBLFFBQ04sVUFBVSxNQUFNO0FBQ2QsZUFBSyxTQUFTLGdCQUFnQixDQUFDLEtBQUssU0FBUztBQUM3QyxlQUFLLFNBQVMsS0FBSztBQUNuQixlQUFLO0FBQUE7QUFBQTtBQUlULFdBQUs7QUFBQTtBQUFBO0FBQUEsRUFHUCxXQUFXO0FBQ1QsWUFBUSxJQUFJO0FBQUE7QUFBQSxFQUdSLGVBQWU7QUFBQTtBQUNuQixXQUFLLFdBQVcsT0FBTyxPQUFPLGtCQUFrQixNQUFNLEtBQUs7QUFBQTtBQUFBO0FBQUEsRUFHdkQsZUFBZTtBQUFBO0FBQ25CLFlBQU0sS0FBSyxTQUFTLEtBQUs7QUFBQTtBQUFBO0FBQUEsRUFJM0IsVUFBVTtBQUVSLFNBQUs7QUFBQTtBQUFBLEVBSVAsV0FBVztBQUVULFVBQU0sTUFBTSxTQUFTLGNBQWM7QUFDbkMsUUFBSSxLQUFLO0FBQ1QsYUFBUyxxQkFBcUIsUUFBUSxHQUFHLFlBQVk7QUFHckQsYUFBUyxLQUFLLFVBQVUsSUFBSTtBQUc1QixTQUFLO0FBQUE7QUFBQSxFQUdQLGNBQWM7QUFFWixTQUFLLElBQUksTUFBTSxVQUFVLGdCQUFnQixLQUFLLFNBQVM7QUFFdkQsU0FBSyxJQUFJO0FBQUE7QUFBQSxFQUlYLGNBQWM7QUFDWixTQUFLO0FBRUwsYUFBUyxLQUFLLFNBQVMsS0FBSyxTQUFTO0FBQ3JDLGFBQVMsS0FBSyxTQUFTLEtBQUssU0FBUztBQUVyQyxhQUFTLEtBQUssVUFBVSxPQUFPLGdCQUFnQixDQUFDLEtBQUssU0FBUztBQUM5RCxhQUFTLEtBQUssVUFBVSxPQUFPLHFCQUFxQixLQUFLLFNBQVM7QUFDbEUsYUFBUyxLQUFLLFVBQVUsT0FBTyxrQkFBa0IsS0FBSyxTQUFTO0FBQy9ELGFBQVMsS0FBSyxVQUFVLE9BQU8sbUJBQW1CLEtBQUssU0FBUztBQUNoRSxhQUFTLEtBQUssVUFBVSxPQUFPLHNCQUFzQixLQUFLLFNBQVM7QUFDbkUsYUFBUyxLQUFLLFVBQVUsT0FBTyxnQkFBZ0IsS0FBSyxTQUFTO0FBQzdELGFBQVMsS0FBSyxVQUFVLE9BQU8sZ0JBQWdCLEtBQUssU0FBUztBQUM3RCxhQUFTLEtBQUssVUFBVSxPQUFPLG9CQUFvQixLQUFLLFNBQVM7QUFDakUsYUFBUyxLQUFLLFVBQVUsT0FBTyxZQUFZLEtBQUssU0FBUztBQUN6RCxhQUFTLEtBQUssVUFBVSxPQUFPLDJCQUEyQixLQUFLLFNBQVM7QUFDeEUsYUFBUyxLQUFLLFVBQVUsT0FBTyxzQkFBc0IsQ0FBQyxLQUFLLFNBQVM7QUFDcEUsYUFBUyxLQUFLLFVBQVUsT0FBTyxtQkFBbUIsQ0FBQyxLQUFLLFNBQVM7QUFDakUsYUFBUyxLQUFLLFVBQVUsT0FBTyxlQUFlLEtBQUssU0FBUztBQUM1RCxhQUFTLEtBQUssVUFBVSxPQUFPLG1CQUFtQixLQUFLLFNBQVM7QUFFaEUsYUFBUyxLQUFLLFlBQVksY0FBYSxhQUFZLGFBQVksdUJBQzdELGVBQWMsY0FBYSxjQUFhLHdCQUN4QyxZQUFXLFdBQVUsV0FBVSxxQkFDL0IsY0FBYSxhQUFZLGFBQVksdUJBQ3JDLFlBQVcsV0FBVSxXQUFVO0FBQ2pDLGFBQVMsS0FBSyxTQUFTLEtBQUssU0FBUztBQUNyQyxhQUFTLEtBQUssU0FBUyxLQUFLLFNBQVM7QUFDckMsYUFBUyxLQUFLLFNBQVMsS0FBSyxTQUFTO0FBQ3JDLGFBQVMsS0FBSyxTQUFTLEtBQUssU0FBUztBQUNyQyxhQUFTLEtBQUssU0FBUyxLQUFLLFNBQVM7QUFHckMsVUFBTSxLQUFLLFNBQVMsZUFBZTtBQUNuQyxRQUFJLENBQUM7QUFBSSxZQUFNO0FBQUEsU0FDVjtBQUVILFNBQUcsWUFDRCx3Q0FDdUIsS0FBSyxTQUFTLFlBQVksc0JBQzVCLEtBQUssU0FBUyxhQUFhLG1CQUM1QixLQUFLLFNBQVMsWUFBWSwyQkFDckIsS0FBSyxTQUFTLGdCQUFnQixxQkFDcEMsS0FBSyxTQUFTLFdBQVcsOEJBQ2QsS0FBSyxTQUFTLGFBQWE7QUFBQTtBQUFBO0FBQUEsRUFLL0Qsa0JBQWtCO0FBQ2hCLGFBQVMsS0FBSyxZQUNaLGVBQ0EsZ0JBQ0Esc0JBQ0E7QUFFRixhQUFTLEtBQUssU0FDWixjQUNBLEtBQUssU0FBUztBQUVoQixRQUFJLEtBQUssSUFBSSxNQUFNLFVBQVUsYUFBYSxVQUFVO0FBRWxELFdBQUssSUFBSSxTQUFTO0FBRWxCLFdBQUssSUFBSSxNQUFNLFVBQVUsU0FBUztBQUFBO0FBRXBDLFNBQUssSUFBSSxVQUFVLFFBQVE7QUFBQTtBQUFBLEVBRzdCLG1CQUFtQjtBQUNqQixhQUFTLEtBQUssWUFDWixjQUNBLGlCQUNBLHVCQUNBLDBCQUNBO0FBRUYsYUFBUyxLQUFLLFNBQ1osZUFDQSxLQUFLLFNBQVM7QUFFaEIsUUFBSSxLQUFLLElBQUksTUFBTSxVQUFVLGFBQWEsVUFBVTtBQUVsRCxXQUFLLElBQUksU0FBUztBQUVsQixXQUFLLElBQUksTUFBTSxVQUFVLFNBQVM7QUFBQTtBQUVwQyxTQUFLLElBQUksVUFBVSxRQUFRO0FBQUE7QUFBQSxFQUc3QixtQkFBbUI7QUFDakIsYUFBUyxLQUFLLFlBQ1oscUJBQ0Esb0JBQ0EsMkJBQ0Esd0JBQ0Esd0JBQ0EscUJBQ0EsMkJBQ0Esd0JBQ0Esd0JBQ0Esc0JBQ0EscUJBQ0EsdUJBQ0EsMEJBQ0EsMEJBQ0E7QUFFRixhQUFTLEtBQUssU0FBUyxLQUFLLFNBQVM7QUFBQTtBQUFBLEVBR3ZDLG9CQUFvQjtBQUNsQixhQUFTLEtBQUssWUFDWixzQkFDQSxxQkFDQSw0QkFDQSx5QkFDQSxzQkFDQSw0QkFDQSx5QkFDQSx5QkFDQSx1QkFDQSxzQkFDQSx3QkFDQSwyQkFDQSwyQkFDQTtBQUVGLGFBQVMsS0FBSyxTQUFTLEtBQUssU0FBUztBQUFBO0FBQUEsRUFHdkMsY0FBYztBQUNaLFFBQUksS0FBSyxJQUFJLE1BQU0sVUFBVSxhQUFhLFVBQVU7QUFDaEQsVUFBSSxTQUFTLEtBQUssVUFBVSxTQUFTLGdCQUFnQjtBQUNuRCxpQkFBUyxLQUFLLFlBQVk7QUFDMUIsaUJBQVMsS0FBSyxTQUFTO0FBQUEsYUFDbEI7QUFDTCxpQkFBUyxLQUFLLFlBQVk7QUFDMUIsaUJBQVMsS0FBSyxTQUFTO0FBQUE7QUFBQSxXQUV0QjtBQUNILFVBQUksU0FBUyxLQUFLLFVBQVUsU0FBUyxnQkFBZ0I7QUFDbkQsaUJBQVMsS0FBSyxZQUFZO0FBQzFCLGlCQUFTLEtBQUssU0FBUztBQUFBLGFBQ2xCO0FBQ0wsaUJBQVMsS0FBSyxZQUFZO0FBQzFCLGlCQUFTLEtBQUssU0FBUztBQUFBO0FBRzNCLFlBQU0sZUFBZSxLQUFLLElBQUksTUFBTSxVQUFVO0FBQzlDLFlBQU0sV0FBVyxpQkFBaUIsY0FBYyxhQUFhO0FBRzdELFdBQUssSUFBSSxTQUFTO0FBRWxCLFdBQUssSUFBSSxNQUFNLFVBQVUsU0FBUztBQUFBO0FBRXBDLFNBQUssSUFBSSxVQUFVLFFBQVE7QUFBQTtBQUFBLEVBRzdCLGNBQWM7QUFDWixhQUFTLEtBQUssWUFBWSxpQkFBZ0IsdUJBQXNCLDBCQUF5Qix1QkFBc0IsZ0JBQWUsc0JBQXFCO0FBQ25KLGFBQVMsS0FBSyxTQUFTLEtBQUssU0FBUyxZQUFXLEtBQUssU0FBUztBQUFBO0FBQUE7QUF3Q2xFLElBQU0sbUJBQW9DO0FBQUEsRUFDeEMsWUFBWTtBQUFBLEVBQ1osV0FBVztBQUFBLEVBQ1gsYUFBYTtBQUFBLEVBQ2IsWUFBWTtBQUFBLEVBQ1osWUFBWTtBQUFBLEVBQ1osWUFBWTtBQUFBLEVBQ1osV0FBVztBQUFBLEVBQ1gsZUFBZTtBQUFBLEVBQ2YsVUFBVTtBQUFBLEVBQ1YsWUFBWTtBQUFBLEVBQ1osV0FBVztBQUFBLEVBQ1gsU0FBUztBQUFBLEVBQ1QsVUFBVTtBQUFBLEVBQ1YsWUFBWTtBQUFBLEVBQ1osYUFBYTtBQUFBLEVBQ2IsVUFBVTtBQUFBLEVBQ1YsWUFBWTtBQUFBLEVBQ1osa0JBQWtCO0FBQUEsRUFDbEIsZUFBZTtBQUFBLEVBQ2Ysc0JBQXNCO0FBQUEsRUFDdEIsV0FBVztBQUFBLEVBQ1gsWUFBWTtBQUFBLEVBQ1osZ0JBQWdCO0FBQUEsRUFDaEIsZUFBZTtBQUFBLEVBQ2YsZUFBZTtBQUFBLEVBQ2YsV0FBVztBQUFBLEVBQ1gsbUJBQW1CO0FBQUEsRUFDbkIsbUJBQW1CO0FBQUEsRUFDbkIsU0FBUztBQUFBLEVBQ1QsYUFBYTtBQUFBLEVBQ2Isb0JBQW9CO0FBQUEsRUFDcEIsZUFBZTtBQUFBO0FBR2pCLHNDQUFnQyxpQ0FBaUI7QUFBQSxFQUkvQyxZQUFZLE1BQVUsUUFBc0I7QUFDMUMsVUFBTSxNQUFLO0FBQ1gsU0FBSyxTQUFTO0FBQUE7QUFBQSxFQUdoQixVQUFnQjtBQUNkLFFBQUksRUFBQyxnQkFBZTtBQUVwQixnQkFBWTtBQUVaLFVBQU0sZUFBZSxZQUFZLFNBQVMsT0FBTyxFQUFDLEtBQUs7QUFFdkQsVUFBTSxtQkFBb0IsYUFBYSxTQUFTLE9BQU8sRUFBQyxLQUFLO0FBRTdELHFCQUFpQixTQUFTLE9BQU8sRUFBQyxNQUFNLGdCQUFnQixLQUFLO0FBRTdELFVBQU0sWUFBWSxpQkFBaUIsU0FBUyxPQUFPLEVBQUMsS0FBSztBQUV2RCxjQUFVLFlBQ1IsU0FBUyxRQUFRO0FBQUEsTUFDZixNQUFNO0FBQUE7QUFHVixjQUFVLFlBQ1IsU0FBUyxLQUFLO0FBQUEsTUFDWixNQUFNO0FBQUEsTUFDTixNQUFNO0FBQUE7QUFHVixjQUFVLFdBQVc7QUFFckIsY0FBVSxZQUNSLFNBQVMsS0FBSztBQUFBLE1BQ1osTUFBTTtBQUFBLE1BQ04sTUFBTTtBQUFBO0FBR1YsY0FBVSxXQUFXO0FBRXJCLFFBQUksd0JBQVEsYUFDVCxRQUFRLDJCQUNSLFFBQVEsd0NBQ1IsWUFBWSxjQUFZLFNBQ3RCLFVBQVUseUJBQXdCLFdBQ2xDLFVBQVUsc0JBQXFCLFFBQy9CLFVBQVUscUJBQW9CLE9BQzlCLFVBQVUsNEJBQTJCLGNBQ3JDLFVBQVUsc0JBQXFCLGdCQUMvQixVQUFVLDRCQUEyQixjQUNyQyxVQUFVLHlCQUF3QixXQUNsQyxVQUFVLHlCQUF3QixXQUNsQyxVQUFVLHVCQUFzQixTQUNoQyxVQUFVLHNCQUFxQixRQUMvQixVQUFVLDJCQUEwQixnQkFDcEMsVUFBVSx3QkFBdUIsT0FDakMsVUFBVSwyQkFBMEIsYUFDcEMsVUFBVSx3QkFBdUIsVUFDakMsU0FBUyxLQUFLLE9BQU8sU0FBUyxhQUNoQyxTQUFTLENBQUMsVUFBVTtBQUNuQixXQUFLLE9BQU8sU0FBUyxjQUFjO0FBQ25DLFdBQUssT0FBTyxTQUFTLEtBQUssT0FBTztBQUNqQyxXQUFLLE9BQU87QUFBQTtBQUdoQixRQUFJLHdCQUFRLGFBQ1QsUUFBUSxrQ0FDUixRQUFRLHVEQUNSLFlBQVksY0FBWSxTQUN0QixVQUFVLGlCQUFnQixXQUMxQixVQUFVLHVCQUFzQixhQUNoQyxVQUFVLHVCQUFzQixnQkFDaEMsVUFBVSwwQkFBeUIsaUJBQ25DLFNBQVMsS0FBSyxPQUFPLFNBQVMsWUFDaEMsU0FBUyxDQUFDLFVBQVU7QUFDbkIsV0FBSyxPQUFPLFNBQVMsYUFBYTtBQUNsQyxXQUFLLE9BQU8sU0FBUyxLQUFLLE9BQU87QUFDakMsV0FBSyxPQUFPO0FBQUE7QUFHaEIsUUFBSSx3QkFBUSxhQUNULFFBQVEsMEJBQ1IsUUFBUSx3Q0FDUixZQUFZLGNBQVksU0FDdEIsVUFBVSx3QkFBdUIsV0FDakMsVUFBVSxxQkFBb0IsUUFDOUIsVUFBVSxvQkFBbUIsT0FDN0IsVUFBVSwyQkFBMEIsY0FDcEMsVUFBVSx3QkFBdUIsV0FDakMsVUFBVSxxQkFBb0IsZ0JBQzlCLFVBQVUsMkJBQTBCLGNBQ3BDLFVBQVUsd0JBQXVCLFdBQ2pDLFVBQVUsd0JBQXVCLFdBQ2pDLFVBQVUsc0JBQXFCLFNBQy9CLFVBQVUscUJBQW9CLFFBQzlCLFVBQVUsMEJBQXlCLGdCQUNuQyxVQUFVLHVCQUFzQixPQUNoQyxVQUFVLDBCQUF5QixhQUNuQyxVQUFVLHVCQUFzQixVQUNoQyxTQUFTLEtBQUssT0FBTyxTQUFTLFlBQzlCLFNBQVMsQ0FBQyxVQUFVO0FBQ25CLFdBQUssT0FBTyxTQUFTLGFBQWE7QUFDbEMsV0FBSyxPQUFPLFNBQVMsS0FBSyxPQUFPO0FBQ2pDLFdBQUssT0FBTztBQUFBO0FBR2xCLFFBQUksd0JBQVEsYUFDVCxRQUFRLGlDQUNSLFFBQVEsdURBQ1IsWUFBWSxjQUFZLFNBQ3RCLFVBQVUsZ0JBQWUsV0FDekIsVUFBVSxzQkFBcUIsZ0JBQy9CLFVBQVUsc0JBQXFCLGNBQy9CLFNBQVMsS0FBSyxPQUFPLFNBQVMsV0FDOUIsU0FBUyxDQUFDLFVBQVU7QUFDbkIsV0FBSyxPQUFPLFNBQVMsWUFBWTtBQUNqQyxXQUFLLE9BQU8sU0FBUyxLQUFLLE9BQU87QUFDakMsV0FBSyxPQUFPO0FBQUE7QUFHcEIsZ0JBQVksU0FBUztBQUVyQixVQUFNLGtCQUFrQixZQUFZLFNBQVMsT0FBTyxFQUFDLEtBQUs7QUFFMUQsVUFBTSxzQkFBdUIsZ0JBQWdCLFNBQVMsT0FBTyxFQUFDLEtBQUs7QUFFbkUsd0JBQW9CLFNBQVMsT0FBTyxFQUFDLE1BQU0sWUFBWSxLQUFLO0FBRTVELFVBQU0sc0JBQXNCLG9CQUFvQixTQUFTLE9BQU8sRUFBQyxLQUFLO0FBRXBFLHdCQUFvQixZQUNsQixTQUFTLFFBQVE7QUFBQSxNQUNmLE1BQU07QUFBQTtBQUlWLHdCQUFvQixZQUNsQixTQUFTLEtBQUs7QUFBQSxNQUNaLE1BQU07QUFBQSxNQUNOLE1BQU07QUFBQTtBQUdWLHdCQUFvQixXQUFXO0FBRWpDLFFBQUksd0JBQVEsYUFDVCxRQUFRLHNDQUNSLFFBQVEsMERBQ1IsVUFBVSxZQUFVLE9BQU8sU0FBUyxLQUFLLE9BQU8sU0FBUyxZQUNyRCxTQUFTLENBQUMsVUFBVTtBQUNuQixXQUFLLE9BQU8sU0FBUyxhQUFhO0FBQ2xDLFdBQUssT0FBTyxTQUFTLEtBQUssT0FBTztBQUNqQyxXQUFLLE9BQU87QUFBQTtBQUdwQixRQUFJLHdCQUFRLGFBQ1QsUUFBUSx5QkFDUixRQUFRLG1EQUNSLFVBQVUsWUFBVSxPQUFPLFNBQVMsS0FBSyxPQUFPLFNBQVMsZUFDckQsU0FBUyxDQUFDLFVBQVU7QUFDbkIsV0FBSyxPQUFPLFNBQVMsZ0JBQWdCO0FBQ3JDLFdBQUssT0FBTyxTQUFTLEtBQUssT0FBTztBQUNqQyxXQUFLLE9BQU87QUFBQTtBQUlwQixRQUFJLHdCQUFRLGFBQ1QsUUFBUSwwQkFDUixRQUFRLHFEQUNSLFVBQVUsWUFBVSxPQUFPLFNBQVMsS0FBSyxPQUFPLFNBQVMsc0JBQ3JELFNBQVMsQ0FBQyxVQUFVO0FBQ25CLFdBQUssT0FBTyxTQUFTLHVCQUF1QjtBQUM1QyxXQUFLLE9BQU8sU0FBUyxLQUFLLE9BQU87QUFDakMsV0FBSyxPQUFPO0FBQUE7QUFJcEIsUUFBSSx3QkFBUSxhQUNULFFBQVEscUJBQ1IsUUFBUSxpREFDUixVQUFVLFlBQVUsT0FBTyxTQUFTLEtBQUssT0FBTyxTQUFTLGtCQUNyRCxTQUFTLENBQUMsVUFBVTtBQUNuQixXQUFLLE9BQU8sU0FBUyxtQkFBbUI7QUFDeEMsV0FBSyxPQUFPLFNBQVMsS0FBSyxPQUFPO0FBQ2pDLFdBQUssT0FBTztBQUFBO0FBSXBCLFFBQUksd0JBQVEsYUFDVCxRQUFRLHNCQUNSLFFBQVEsMENBQ1IsVUFBVSxZQUFVLE9BQU8sU0FBUyxLQUFLLE9BQU8sU0FBUyxlQUNyRCxTQUFTLENBQUMsVUFBVTtBQUNuQixXQUFLLE9BQU8sU0FBUyxnQkFBZ0I7QUFDckMsV0FBSyxPQUFPLFNBQVMsS0FBSyxPQUFPO0FBQ2pDLFdBQUssT0FBTztBQUFBO0FBR3BCLFFBQUksd0JBQVEsYUFDVCxRQUFRLCtCQUNSLFFBQVEsb0RBQ1IsVUFBVSxZQUFVLE9BQU8sU0FBUyxLQUFLLE9BQU8sU0FBUyxXQUNyRCxTQUFTLENBQUMsVUFBVTtBQUNuQixXQUFLLE9BQU8sU0FBUyxZQUFZO0FBQ2pDLFdBQUssT0FBTyxTQUFTLEtBQUssT0FBTztBQUNqQyxXQUFLLE9BQU87QUFBQTtBQUdsQixRQUFJLHdCQUFRLGFBQ1QsUUFBUSxxQkFDUixRQUFRLHFEQUNSLFVBQVUsWUFBVSxPQUFPLFNBQVMsS0FBSyxPQUFPLFNBQVMsZUFDdkQsU0FBUyxDQUFDLFVBQVU7QUFDbkIsV0FBSyxPQUFPLFNBQVMsZ0JBQWdCO0FBQ3JDLFdBQUssT0FBTyxTQUFTLEtBQUssT0FBTztBQUNqQyxXQUFLLE9BQU87QUFBQTtBQUdwQixRQUFJLHdCQUFRLGFBQ1QsUUFBUSxjQUNSLFFBQVEsNkVBQ1IsVUFBVSxZQUFVLE9BQU8sU0FBUyxLQUFLLE9BQU8sU0FBUyxXQUNyRCxTQUFTLENBQUMsVUFBVTtBQUNuQixXQUFLLE9BQU8sU0FBUyxZQUFZO0FBQ2pDLFdBQUssT0FBTyxTQUFTLEtBQUssT0FBTztBQUNqQyxXQUFLLE9BQU87QUFBQTtBQUlwQixRQUFJLHdCQUFRLGFBQ1QsUUFBUSw0QkFDUixRQUFRLHNDQUNSLFVBQVUsWUFBVSxPQUFPLFNBQVMsS0FBSyxPQUFPLFNBQVMsbUJBQ3JELFNBQVMsQ0FBQyxVQUFVO0FBQ25CLFdBQUssT0FBTyxTQUFTLG9CQUFvQjtBQUN6QyxXQUFLLE9BQU8sU0FBUyxLQUFLLE9BQU87QUFDakMsV0FBSyxPQUFPO0FBQUE7QUFJcEIsUUFBSSx3QkFBUSxhQUNULFFBQVEsNEJBQ1IsUUFBUSxzQ0FDUixVQUFVLFlBQVUsT0FBTyxTQUFTLEtBQUssT0FBTyxTQUFTLG1CQUNyRCxTQUFTLENBQUMsVUFBVTtBQUNuQixXQUFLLE9BQU8sU0FBUyxvQkFBb0I7QUFDekMsV0FBSyxPQUFPLFNBQVMsS0FBSyxPQUFPO0FBQ2pDLFdBQUssT0FBTztBQUFBO0FBSXBCLFFBQUksd0JBQVEsYUFDVCxRQUFRLGtCQUNSLFFBQVEsaURBQ1IsVUFBVSxZQUFVLE9BQU8sU0FBUyxLQUFLLE9BQU8sU0FBUyxnQkFDckQsU0FBUyxDQUFDLFVBQVU7QUFDbkIsV0FBSyxPQUFPLFNBQVMsaUJBQWlCO0FBQ3RDLFdBQUssT0FBTyxTQUFTLEtBQUssT0FBTztBQUNqQyxXQUFLLE9BQU87QUFBQTtBQUdwQixnQkFBWSxTQUFTO0FBRXJCLFVBQU0sZ0JBQWdCLFlBQVksU0FBUyxPQUFPLEVBQUMsS0FBSztBQUV4RCxVQUFNLG9CQUFxQixjQUFjLFNBQVMsT0FBTyxFQUFDLEtBQUs7QUFFL0Qsc0JBQWtCLFNBQVMsT0FBTyxFQUFDLE1BQU0sVUFBVSxLQUFLO0FBRXhELFVBQU0sb0JBQW9CLGtCQUFrQixTQUFTLE9BQU8sRUFBQyxLQUFLO0FBRWhFLHNCQUFrQixZQUNoQixTQUFTLFFBQVE7QUFBQSxNQUNmLE1BQU07QUFBQTtBQUdWLHNCQUFrQixZQUNoQixTQUFTLEtBQUs7QUFBQSxNQUNaLE1BQU07QUFBQSxNQUNOLE1BQU07QUFBQTtBQUdWLHNCQUFrQixXQUFXO0FBRS9CLFFBQUksd0JBQVEsYUFDVCxRQUFRLGVBQ1IsUUFBUSwwR0FDUixVQUFVLFlBQVUsT0FBTyxTQUFTLEtBQUssT0FBTyxTQUFTLFNBQ3JELFNBQVMsQ0FBQyxVQUFVO0FBQ25CLFdBQUssT0FBTyxTQUFTLFVBQVU7QUFDL0IsV0FBSyxPQUFPLFNBQVMsS0FBSyxPQUFPO0FBQ2pDLFdBQUssT0FBTztBQUFBO0FBR3BCLFFBQUksd0JBQVEsYUFDVCxRQUFRLGVBQ1IsUUFBUSxtQ0FDUixZQUFZLGNBQVksU0FDdEIsVUFBVSx1QkFBc0IsV0FDaEMsVUFBVSxjQUFhLG1CQUN2QixVQUFVLGFBQVksc0JBQ3RCLFVBQVUsYUFBWSxtQkFDdEIsU0FBUyxLQUFLLE9BQU8sU0FBUyxZQUM1QixTQUFTLENBQUMsVUFBVTtBQUNuQixXQUFLLE9BQU8sU0FBUyxhQUFhO0FBQ2xDLFdBQUssT0FBTyxTQUFTLEtBQUssT0FBTztBQUNqQyxXQUFLLE9BQU87QUFBQTtBQUlwQixRQUFJLHdCQUFRLGFBQ1QsUUFBUSxnQkFDUixRQUFRLG9DQUNSLFlBQVksY0FBWSxTQUN0QixVQUFVLHdCQUF1QixXQUNqQyxVQUFVLGVBQWMsbUJBQ3hCLFVBQVUsY0FBYSxzQkFDdkIsVUFBVSxjQUFhLG1CQUN2QixTQUFTLEtBQUssT0FBTyxTQUFTLGFBQzVCLFNBQVMsQ0FBQyxVQUFVO0FBQ25CLFdBQUssT0FBTyxTQUFTLGNBQWM7QUFDbkMsV0FBSyxPQUFPLFNBQVMsS0FBSyxPQUFPO0FBQ2pDLFdBQUssT0FBTztBQUFBO0FBSXBCLFFBQUksd0JBQVEsYUFDVCxRQUFRLGVBQ1IsUUFBUSxtQ0FDUixZQUFZLGNBQVksU0FDdEIsVUFBVSxxQkFBb0IsV0FDOUIsVUFBVSxZQUFXLG1CQUNyQixVQUFVLFdBQVUsc0JBQ3BCLFVBQVUsV0FBVSxtQkFDcEIsU0FBUyxLQUFLLE9BQU8sU0FBUyxVQUM1QixTQUFTLENBQUMsVUFBVTtBQUNuQixXQUFLLE9BQU8sU0FBUyxXQUFXO0FBQ2hDLFdBQUssT0FBTyxTQUFTLEtBQUssT0FBTztBQUNqQyxXQUFLLE9BQU87QUFBQTtBQUlwQixRQUFJLHdCQUFRLGFBQ1QsUUFBUSxhQUNSLFFBQVEsaUNBQ1IsWUFBWSxjQUFZLFNBQ3RCLFVBQVUscUJBQW9CLFdBQzlCLFVBQVUsWUFBVyxtQkFDckIsVUFBVSxXQUFVLHNCQUNwQixVQUFVLFdBQVUsbUJBQ3BCLFNBQVMsS0FBSyxPQUFPLFNBQVMsVUFDNUIsU0FBUyxDQUFDLFVBQVU7QUFDbkIsV0FBSyxPQUFPLFNBQVMsV0FBVztBQUNoQyxXQUFLLE9BQU8sU0FBUyxLQUFLLE9BQU87QUFDakMsV0FBSyxPQUFPO0FBQUE7QUFJcEIsUUFBSSx3QkFBUSxhQUNULFFBQVEsZUFDUixRQUFRLGdEQUNSLFlBQVksY0FBWSxTQUN0QixVQUFVLHVCQUFzQixXQUNoQyxVQUFVLGNBQWEsbUJBQ3ZCLFVBQVUsYUFBWSxzQkFDdEIsVUFBVSxhQUFZLG1CQUN0QixTQUFTLEtBQUssT0FBTyxTQUFTLFlBQzVCLFNBQVMsQ0FBQyxVQUFVO0FBQ25CLFdBQUssT0FBTyxTQUFTLGFBQWE7QUFDbEMsV0FBSyxPQUFPLFNBQVMsS0FBSyxPQUFPO0FBQ2pDLFdBQUssT0FBTztBQUFBO0FBSXBCLGdCQUFZLFNBQVM7QUFDckIsZ0JBQVksU0FBUyxPQUFPLEVBQUMsTUFBTSxjQUFjLEtBQUs7QUFFdEQsUUFBSSx3QkFBUSxhQUNULFFBQVEsa0JBQ1IsUUFBUSx3Q0FDUixRQUFRLFVBQVEsS0FBSyxlQUFlLE1BQ2xDLFNBQVUsTUFBSyxPQUFPLFNBQVMsY0FBYyxNQUFNLElBQ25ELFNBQVMsQ0FBQyxVQUFVO0FBQ25CLFdBQUssT0FBTyxTQUFTLGFBQWEsV0FBVztBQUM3QyxXQUFLLE9BQU8sU0FBUyxLQUFLLE9BQU87QUFDakMsV0FBSyxPQUFPO0FBQUE7QUFHbEIsUUFBSSx3QkFBUSxhQUNULFFBQVEsbUJBQ1IsUUFBUSx3REFDUixRQUFRLFVBQVEsS0FBSyxlQUFlLE1BQ2xDLFNBQVUsTUFBSyxPQUFPLFNBQVMsYUFBYSxNQUFNLElBQ2xELFNBQVMsQ0FBQyxVQUFVO0FBQ25CLFdBQUssT0FBTyxTQUFTLFlBQVksV0FBVztBQUM1QyxXQUFLLE9BQU8sU0FBUyxLQUFLLE9BQU87QUFDakMsV0FBSyxPQUFPO0FBQUE7QUFHbEIsUUFBSSx3QkFBUSxhQUNULFFBQVEsZUFDUixRQUFRLHNDQUNSLFFBQVEsVUFBUSxLQUFLLGVBQWUsT0FDbEMsU0FBVSxNQUFLLE9BQU8sU0FBUyxjQUFjLE1BQU0sSUFDbkQsU0FBUyxDQUFDLFVBQVU7QUFDbkIsV0FBSyxPQUFPLFNBQVMsYUFBYSxXQUFXO0FBQzdDLFdBQUssT0FBTyxTQUFTLEtBQUssT0FBTztBQUNqQyxXQUFLLE9BQU87QUFBQTtBQUdsQixRQUFJLHdCQUFRLGFBQ1QsUUFBUSxxQkFDUixRQUFRLCtDQUNSLFFBQVEsVUFBUSxLQUFLLGVBQWUsTUFDbEMsU0FBVSxNQUFLLE9BQU8sU0FBUyxhQUFhLE1BQU0sSUFDbEQsU0FBUyxDQUFDLFVBQVU7QUFDbkIsV0FBSyxPQUFPLFNBQVMsWUFBWSxTQUFTLE1BQU07QUFDaEQsV0FBSyxPQUFPLFNBQVMsS0FBSyxPQUFPO0FBQ2pDLFdBQUssT0FBTztBQUFBO0FBR2xCLFFBQUksd0JBQVEsYUFDVCxRQUFRLG1CQUNSLFFBQVEsaUVBQ1IsUUFBUSxVQUFRLEtBQUssZUFBZSxNQUNsQyxTQUFVLE1BQUssT0FBTyxTQUFTLGlCQUFpQixNQUFNLElBQ3RELFNBQVMsQ0FBQyxVQUFVO0FBQ25CLFdBQUssT0FBTyxTQUFTLGdCQUFnQixTQUFTLE1BQU07QUFDcEQsV0FBSyxPQUFPLFNBQVMsS0FBSyxPQUFPO0FBQ2pDLFdBQUssT0FBTztBQUFBO0FBR2xCLFFBQUksd0JBQVEsYUFDVCxRQUFRLHdCQUNSLFFBQVEsd0VBQ1IsUUFBUSxVQUFRLEtBQUssZUFBZSxNQUNsQyxTQUFVLE1BQUssT0FBTyxTQUFTLFlBQVksTUFBTSxJQUNqRCxTQUFTLENBQUMsVUFBVTtBQUNuQixXQUFLLE9BQU8sU0FBUyxXQUFXLFNBQVMsTUFBTTtBQUMvQyxXQUFLLE9BQU8sU0FBUyxLQUFLLE9BQU87QUFDakMsV0FBSyxPQUFPO0FBQUE7QUFFbEIsUUFBSSx3QkFBUSxhQUNULFFBQVEsZUFDUixRQUFRLHNGQUNSLFFBQVEsVUFBUSxLQUFLLGVBQWUsSUFDbEMsU0FBVSxNQUFLLE9BQU8sU0FBUyxjQUFjLE1BQU0sSUFDbkQsU0FBUyxDQUFDLFVBQVU7QUFDbkIsV0FBSyxPQUFPLFNBQVMsYUFBYTtBQUNsQyxXQUFLLE9BQU8sU0FBUyxLQUFLLE9BQU87QUFDakMsV0FBSyxPQUFPO0FBQUE7QUFBQTtBQUFBOyIsCiAgIm5hbWVzIjogW10KfQo= diff --git a/.obsidian/plugins/obsidian-minimal-settings/manifest.json b/.obsidian/plugins/obsidian-minimal-settings/manifest.json new file mode 100644 index 00000000..b049b662 --- /dev/null +++ b/.obsidian/plugins/obsidian-minimal-settings/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "obsidian-minimal-settings", + "name": "Minimal Theme Settings", + "version": "7.5.0", + "minAppVersion": "1.1.9", + "description": "Change the colors, fonts and features of Minimal Theme.", + "author": "@kepano", + "authorUrl": "https://www.twitter.com/kepano", + "fundingUrl": "https://www.buymeacoffee.com/kepano", + "isDesktopOnly": false +} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-minimal-settings/styles.css b/.obsidian/plugins/obsidian-minimal-settings/styles.css new file mode 100644 index 00000000..c94e3736 --- /dev/null +++ b/.obsidian/plugins/obsidian-minimal-settings/styles.css @@ -0,0 +1 @@ +/* Empty */ \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-smart-typography/main.js b/.obsidian/plugins/obsidian-smart-typography/main.js new file mode 100644 index 00000000..0f14400e --- /dev/null +++ b/.obsidian/plugins/obsidian-smart-typography/main.js @@ -0,0 +1,1060 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ROLLUP +if you want to view the source visit the plugins github repository +*/ + +'use strict'; + +var obsidian = require('obsidian'); +var state = require('@codemirror/state'); +var language = require('@codemirror/language'); + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +// Dashes +const dashRules = [ + // en dash + { + trigger: "-", + from: "--", + to: "–", + contextMatch: /-$/, + }, + // em dash + { + trigger: "-", + from: "–-", + to: "—", + contextMatch: /–$/, + }, + // tripple dash + { + trigger: "-", + from: "—-", + to: "---", + contextMatch: /—$/, + }, +]; +const dashRulesSansEnDash = [ + // em dash + { + trigger: "-", + from: "--", + to: "—", + contextMatch: /-$/, + }, + // tripple dash + { + trigger: "-", + from: "—-", + to: "---", + contextMatch: /—$/, + }, +]; +// Ellipsis +const ellipsisRules = [ + { + trigger: ".", + from: "...", + to: "…", + contextMatch: /\.\.$/, + }, +]; +// Quotes +const smartQuoteRules = [ + // Open double + { + trigger: '"', + from: '"', + to: (settings) => settings.openDouble, + contextMatch: /[\s\{\[\(\<'"\u2018\u201C]$/, + }, + // Close double + { + trigger: '"', + from: '"', + to: (settings) => settings.closeDouble, + contextMatch: /.*$/, + }, + // Paired double + { + trigger: '""', + from: '""', + to: (settings) => settings.openDouble + settings.closeDouble, + contextMatch: /.*$/, + }, + // Open single + { + trigger: "'", + from: "'", + to: (settings) => settings.openSingle, + contextMatch: /[\s\{\[\(\<'"\u2018\u201C]$/, + }, + // Close single + { + trigger: "'", + from: "'", + to: (settings) => settings.closeSingle, + contextMatch: /.*$/, + }, + // Paired single + { + trigger: "''", + from: "''", + to: (settings) => settings.openSingle + settings.closeSingle, + contextMatch: /.*$/, + }, +]; +// Arrows +const arrowRules = [ + { + trigger: "-", + from: "<-", + to: (settings) => settings.leftArrow, + contextMatch: /<$/, + }, + { + trigger: ">", + from: "->", + to: (settings) => settings.rightArrow, + contextMatch: /-$/, + }, +]; +// Guillemet +const guillemetRules = [ + { + trigger: "<", + from: "<<", + to: (settings) => settings.openGuillemet, + contextMatch: /<$/, + }, + { + trigger: ">", + from: ">>", + to: (settings) => settings.closeGuillemet, + contextMatch: />$/, + }, +]; +// Comparisons +const comparisonRules = [ + { + trigger: "=", + from: ">=", + to: "≥", + contextMatch: />$/, + }, + { + trigger: "=", + from: "<=", + to: "≤", + contextMatch: /<$/, + }, + { + trigger: "=", + from: "/=", + to: "≠", + contextMatch: /\/$/, + }, +]; +// Fractions +const fractionRules = [ + { + trigger: "2", + from: "1/2", + to: "½", + contextMatch: /(?:^|\s)1\/$/, + }, + { + trigger: "3", + from: "1/3", + to: "⅓", + contextMatch: /(?:^|\s)1\/$/, + }, + { + trigger: "3", + from: "2/3", + to: "⅔", + contextMatch: /(?:^|\s)2\/$/, + }, + { + trigger: "4", + from: "1/4", + to: "¼", + contextMatch: /(?:^|\s)1\/$/, + }, + { + trigger: "4", + from: "3/4", + to: "¾", + contextMatch: /(?:^|\s)3\/$/, + }, + { + trigger: "5", + from: "1/5", + to: "⅕", + contextMatch: /(?:^|\s)1\/$/, + }, + { + trigger: "5", + from: "2/5", + to: "⅖", + contextMatch: /(?:^|\s)2\/$/, + }, + { + trigger: "5", + from: "3/5", + to: "⅗", + contextMatch: /(?:^|\s)3\/$/, + }, + { + trigger: "5", + from: "4/5", + to: "⅘", + contextMatch: /(?:^|\s)4\/$/, + }, + { + trigger: "6", + from: "1/6", + to: "⅙", + contextMatch: /(?:^|\s)1\/$/, + }, + { + trigger: "6", + from: "5/6", + to: "⅚", + contextMatch: /(?:^|\s)5\/$/, + }, + { + trigger: "7", + from: "1/7", + to: "⅐", + contextMatch: /(?:^|\s)1\/$/, + }, + { + trigger: "8", + from: "1/8", + to: "⅛", + contextMatch: /(?:^|\s)1\/$/, + }, + { + trigger: "8", + from: "3/8", + to: "⅜", + contextMatch: /(?:^|\s)3\/$/, + }, + { + trigger: "8", + from: "5/8", + to: "⅝", + contextMatch: /(?:^|\s)5\/$/, + }, + { + trigger: "8", + from: "7/8", + to: "⅞", + contextMatch: /(?:^|\s)7\/$/, + }, + { + trigger: "9", + from: "1/9", + to: "⅑", + contextMatch: /(?:^|\s)1\/$/, + }, + { + trigger: "0", + from: "1/10", + to: "⅒", + contextMatch: /(?:^|\s)1\/1$/, + }, +]; + +const dashChar = "-"; +const enDashChar = "–"; +const emDashChar = "—"; +const enDash = { + matchTrigger: dashChar, + matchRegExp: /--$/, + performUpdate: (instance, delta, settings) => { + delta.update({ line: delta.from.line, ch: delta.from.ch - 1 }, delta.to, [ + enDashChar, + ]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === enDashChar) { + delta.update(delta.from, delta.to, [dashChar + dashChar]); + } + }, +}; +const emDash = { + matchTrigger: dashChar, + matchRegExp: /–-$/, + performUpdate: (instance, delta, settings) => { + delta.update({ line: delta.from.line, ch: delta.from.ch - 1 }, delta.to, [ + emDashChar, + ]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === emDashChar) { + delta.update(delta.from, delta.to, [enDashChar + dashChar]); + } + }, +}; +const trippleDash = { + matchTrigger: dashChar, + matchRegExp: /—-$/, + performUpdate: (instance, delta, settings) => { + delta.update({ line: delta.from.line, ch: delta.from.ch - 1 }, delta.to, [ + dashChar + dashChar + dashChar, + ]); + }, + performRevert: (instance, delta, settings) => { }, +}; +const ellipsis = { + matchTrigger: ".", + matchRegExp: /\.\.\.$/, + performUpdate: (instance, delta, settings) => { + delta.update({ line: delta.from.line, ch: delta.from.ch - 2 }, delta.to, [ + "…", + ]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === "…") { + delta.update(delta.from, delta.to, ["..."]); + } + }, +}; +const openDoubleQuote = { + matchTrigger: '"', + matchRegExp: /(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/, + performUpdate: (instance, delta, settings) => { + delta.update(delta.from, delta.to, [settings.openDouble]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === settings.openDouble) { + delta.update(delta.from, delta.to, ['"']); + } + }, +}; +const closeDoubleQuote = { + matchTrigger: '"', + matchRegExp: /"$/, + performUpdate: (instance, delta, settings) => { + delta.update(delta.from, delta.to, [settings.closeDouble]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === settings.closeDouble) { + delta.update(delta.from, delta.to, ['"']); + } + }, +}; +const pairedDoubleQuote = { + matchTrigger: '""', + matchRegExp: /""$/, + performUpdate: (instance, delta, settings) => { + delta.update(delta.from, delta.to, [ + settings.openDouble + settings.closeDouble, + ]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === settings.openDouble) { + delta.update(delta.from, Object.assign(Object.assign({}, delta.to), { ch: delta.to.ch + 1 }), ['""']); + setTimeout(() => instance.setCursor(Object.assign(Object.assign({}, delta.from), { ch: delta.from.ch + 1 }))); + } + }, +}; +const wrappedDoubleQuote = { + matchTrigger: /^".*"$/, + matchRegExp: false, + performUpdate: (instance, delta, settings) => { + delta.update(delta.from, delta.to, [ + settings.openDouble + delta.text[0].slice(1, -1) + settings.closeDouble, + ]); + }, + performRevert: false, +}; +const openSingleQuote = { + matchTrigger: "'", + matchRegExp: /(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/, + performUpdate: (instance, delta, settings) => { + delta.update(delta.from, delta.to, [settings.openSingle]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === settings.openSingle) { + delta.update(delta.from, delta.to, ["'"]); + } + }, +}; +const closeSingleQuote = { + matchTrigger: "'", + matchRegExp: /'$/, + performUpdate: (instance, delta, settings) => { + delta.update(delta.from, delta.to, [settings.closeSingle]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === settings.closeSingle) { + delta.update(delta.from, delta.to, ["'"]); + } + }, +}; +const pairedSingleQuote = { + matchTrigger: "''", + matchRegExp: /''$/, + performUpdate: (instance, delta, settings) => { + delta.update(delta.from, delta.to, [ + settings.openSingle + settings.closeSingle, + ]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === settings.openSingle) { + delta.update(delta.from, Object.assign(Object.assign({}, delta.to), { ch: delta.to.ch + 1 }), ["''"]); + setTimeout(() => instance.setCursor(Object.assign(Object.assign({}, delta.from), { ch: delta.from.ch + 1 }))); + } + }, +}; +const wrappedSingleQuote = { + matchTrigger: /^'.*'$/, + matchRegExp: false, + performUpdate: (instance, delta, settings) => { + delta.update(delta.from, delta.to, [ + settings.openSingle + delta.text[0].slice(1, -1) + settings.closeSingle, + ]); + }, + performRevert: false, +}; +const rightArrow = { + matchTrigger: ">", + matchRegExp: /->$/, + performUpdate: (instance, delta, settings) => { + delta.update({ line: delta.from.line, ch: delta.from.ch - 1 }, delta.to, [ + settings.rightArrow, + ]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === settings.rightArrow) { + delta.update(delta.from, delta.to, ["->"]); + } + }, +}; +const leftArrow = { + matchTrigger: "-", + matchRegExp: /<-$/, + performUpdate: (instance, delta, settings) => { + delta.update({ line: delta.from.line, ch: delta.from.ch - 1 }, delta.to, [ + settings.leftArrow, + ]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === settings.leftArrow) { + delta.update(delta.from, delta.to, ["<-"]); + } + }, +}; +const greaterThanOrEqualTo = { + matchTrigger: "=", + matchRegExp: />=$/, + performUpdate: (instance, delta, settings) => { + delta.update({ line: delta.from.line, ch: delta.from.ch - 1 }, delta.to, [ + "≥", + ]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === "≥") { + delta.update(delta.from, delta.to, [">="]); + } + }, +}; +const lessThanOrEqualTo = { + matchTrigger: "=", + matchRegExp: /<=$/, + performUpdate: (instance, delta, settings) => { + delta.update({ line: delta.from.line, ch: delta.from.ch - 1 }, delta.to, [ + "≤", + ]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === "≤") { + delta.update(delta.from, delta.to, ["<="]); + } + }, +}; +const notEqualTo = { + matchTrigger: "=", + matchRegExp: /\/=$/, + performUpdate: (instance, delta, settings) => { + delta.update({ line: delta.from.line, ch: delta.from.ch - 1 }, delta.to, [ + "≠", + ]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === "≠") { + delta.update(delta.from, delta.to, ["/="]); + } + }, +}; +const rightGuillemet = { + matchTrigger: ">", + matchRegExp: />>$/, + performUpdate: (instance, delta, settings) => { + delta.update({ line: delta.from.line, ch: delta.from.ch - 1 }, delta.to, [ + "»", + ]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === "»") { + delta.update(delta.from, delta.to, [">>"]); + } + }, +}; +const leftGuillemet = { + matchTrigger: "<", + matchRegExp: /<<$/, + performUpdate: (instance, delta, settings) => { + delta.update({ line: delta.from.line, ch: delta.from.ch - 1 }, delta.to, [ + "«", + ]); + }, + performRevert: (instance, delta, settings) => { + if (instance.getRange(delta.from, delta.to) === "«") { + delta.update(delta.from, delta.to, ["<<"]); + } + }, +}; +const legacyDashRules = [enDash, emDash, trippleDash]; +const legacyEllipsisRules = [ellipsis]; +const legacySmartQuoteRules = [ + openDoubleQuote, + closeDoubleQuote, + pairedDoubleQuote, + wrappedDoubleQuote, + openSingleQuote, + closeSingleQuote, + pairedSingleQuote, + wrappedSingleQuote, +]; +const legacyComparisonRules = [ + lessThanOrEqualTo, + greaterThanOrEqualTo, + notEqualTo, +]; +const legacyArrowRules = [leftArrow, rightArrow]; +const legacyGuillemetRules = [leftGuillemet, rightGuillemet]; + +const DEFAULT_SETTINGS = { + curlyQuotes: true, + emDash: true, + ellipsis: true, + arrows: true, + comparisons: true, + fractions: false, + guillemets: false, + skipEnDash: false, + openSingle: "‘", + closeSingle: "’", + openDouble: "“", + closeDouble: "”", + openGuillemet: "«", + closeGuillemet: "»", + leftArrow: "←", + rightArrow: "→", +}; +class SmartTypography extends obsidian.Plugin { + constructor() { + super(...arguments); + this.beforeChangeHandler = (instance, delta) => { + if (this.legacyLastUpdate.has(instance) && delta.origin === "+delete") { + const revert = this.legacyLastUpdate.get(instance).performRevert; + if (revert) { + revert(instance, delta, this.settings); + this.legacyLastUpdate.delete(instance); + } + return; + } + if (delta.origin === undefined && delta.text.length === 1) { + const input = delta.text[0]; + for (let rule of this.legacyInputRules) { + if (!(rule.matchTrigger instanceof RegExp)) { + continue; + } + if (rule.matchTrigger.test(input)) { + rule.performUpdate(instance, delta, this.settings); + return; + } + } + return; + } + if (delta.origin === "+input" && delta.text.length === 1) { + const input = delta.text[0]; + const rules = this.legacyInputRules.filter((r) => { + return typeof r.matchTrigger === "string" && r.matchTrigger === input; + }); + if (rules.length === 0) { + if (this.legacyLastUpdate.has(instance)) { + this.legacyLastUpdate.delete(instance); + } + return; + } + let str = input; + if (delta.to.ch > 0) { + str = `${instance.getRange({ line: delta.to.line, ch: 0 }, delta.to)}${str}`; + } + for (let rule of rules) { + if (rule.matchRegExp && rule.matchRegExp.test(str)) { + if (shouldCheckTextAtPos(instance, delta.from) && + shouldCheckTextAtPos(instance, delta.to)) { + this.legacyLastUpdate.set(instance, rule); + rule.performUpdate(instance, delta, this.settings); + } + return; + } + } + } + if (this.legacyLastUpdate.has(instance)) { + this.legacyLastUpdate.delete(instance); + } + }; + } + buildInputRules() { + this.legacyInputRules = []; + this.inputRules = []; + this.inputRuleMap = {}; + if (this.settings.emDash) { + if (this.settings.skipEnDash) { + this.inputRules.push(...dashRulesSansEnDash); + } + else { + this.inputRules.push(...dashRules); + } + this.legacyInputRules.push(...legacyDashRules); + } + if (this.settings.ellipsis) { + this.inputRules.push(...ellipsisRules); + this.legacyInputRules.push(...legacyEllipsisRules); + } + if (this.settings.curlyQuotes) { + this.inputRules.push(...smartQuoteRules); + this.legacyInputRules.push(...legacySmartQuoteRules); + } + if (this.settings.arrows) { + this.inputRules.push(...arrowRules); + this.legacyInputRules.push(...legacyArrowRules); + } + if (this.settings.guillemets) { + this.inputRules.push(...guillemetRules); + this.legacyInputRules.push(...legacyGuillemetRules); + } + if (this.settings.comparisons) { + this.inputRules.push(...comparisonRules); + this.legacyInputRules.push(...legacyComparisonRules); + } + if (this.settings.fractions) { + this.inputRules.push(...fractionRules); + } + this.inputRules.forEach((rule) => { + if (this.inputRuleMap[rule.trigger] === undefined) { + this.inputRuleMap[rule.trigger] = []; + } + this.inputRuleMap[rule.trigger].push(rule); + }); + } + onload() { + return __awaiter(this, void 0, void 0, function* () { + yield this.loadSettings(); + this.addSettingTab(new SmartTypographySettingTab(this.app, this)); + // Codemirror 6 + // + // When smart typography overrides changes, we want to keep a record + // so we can undo them when the user presses backspace + const storeTransaction = state.StateEffect.define(); + const prevTransactionState = state.StateField.define({ + create() { + return null; + }, + update(oldVal, tr) { + for (let e of tr.effects) { + if (e.is(storeTransaction)) { + return e.value; + } + } + if (!oldVal || + tr.isUserEvent("input") || + tr.isUserEvent("delete.forward") || + tr.isUserEvent("delete.cut") || + tr.isUserEvent("move") || + tr.isUserEvent("select") || + tr.isUserEvent("undo")) { + return null; + } + return oldVal; + }, + }); + this.registerEditorExtension([ + prevTransactionState, + state.EditorState.transactionFilter.of((tr) => { + // Revert any stored changes on delete + if (tr.isUserEvent("delete.backward") || + tr.isUserEvent("delete.selection")) { + return tr.startState.field(prevTransactionState, false) || tr; + } + // If the user hasn't typed, or the doc hasn't changed, return early + if (!tr.isUserEvent("input.type") || !tr.docChanged) { + return tr; + } + // Cache the syntax tree if we end up accessing it + let tree = null; + // Memoize any positions we check so we can avoid some work + const seenPositions = {}; + const canPerformReplacement = (pos) => { + if (seenPositions[pos] !== undefined) { + return seenPositions[pos]; + } + if (!tree) + tree = language.syntaxTree(tr.state); + const nodeProps = tree + .resolveInner(pos, 1) + .type.prop(language.tokenClassNodeProp); + if (nodeProps && ignoreListRegEx.test(nodeProps)) { + seenPositions[pos] = false; + } + else { + seenPositions[pos] = true; + } + return seenPositions[pos]; + }; + // Store a list of changes and specs to revert these changes + const changes = []; + const reverts = []; + const registerChange = (change, revert) => { + changes.push(change); + reverts.push(revert); + }; + const contextCache = {}; + let newSelection = tr.selection; + tr.changes.iterChanges((fromA, toA, fromB, toB, inserted) => { + const insertedText = inserted.sliceString(0, 0 + inserted.length); + const matchedRules = this.inputRuleMap[insertedText]; + if (!matchedRules) { + return; + } + for (let rule of matchedRules) { + // If we're in a codeblock, etc, return early, no need to continue checking + if (!canPerformReplacement(fromA)) + return; + // Grab and cache three chars before the one being inserted + if (contextCache[fromA] === undefined) { + contextCache[fromA] = tr.newDoc.sliceString(fromB - 3, fromB); + } + const context = contextCache[fromA]; + if (!rule.contextMatch.test(context)) { + continue; + } + const insert = typeof rule.to === "string" ? rule.to : rule.to(this.settings); + const replacementLength = rule.from.length - rule.trigger.length; + const insertionPoint = fromA - replacementLength; + const reversionPoint = fromB - replacementLength; + registerChange({ + from: insertionPoint, + to: insertionPoint + replacementLength, + insert, + }, { + from: reversionPoint, + to: reversionPoint + insert.length, + insert: rule.from, + }); + const selectionAdjustment = rule.from.length - insert.length; + newSelection = state.EditorSelection.create(newSelection.ranges.map((r) => state.EditorSelection.range(r.anchor - selectionAdjustment, r.head - selectionAdjustment))); + return; + } + }, false); + // If we have any changes, construct a transaction spec + if (changes.length) { + return [ + { + effects: storeTransaction.of({ + effects: storeTransaction.of(null), + selection: tr.selection, + scrollIntoView: tr.scrollIntoView, + changes: reverts, + }), + selection: newSelection, + scrollIntoView: tr.scrollIntoView, + changes, + }, + ]; + } + return tr; + }), + ]); + // Codemirror 5 + this.legacyLastUpdate = new WeakMap(); + this.registerCodeMirror((cm) => { + cm.on("beforeChange", this.beforeChangeHandler); + }); + }); + } + onunload() { + this.legacyLastUpdate = null; + this.app.workspace.iterateCodeMirrors((cm) => { + cm.off("beforeChange", this.beforeChangeHandler); + }); + } + loadSettings() { + return __awaiter(this, void 0, void 0, function* () { + this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData()); + this.buildInputRules(); + }); + } + saveSettings() { + return __awaiter(this, void 0, void 0, function* () { + this.buildInputRules(); + yield this.saveData(this.settings); + }); + } +} +class SmartTypographySettingTab extends obsidian.PluginSettingTab { + constructor(app, plugin) { + super(app, plugin); + this.plugin = plugin; + } + display() { + let { containerEl } = this; + containerEl.empty(); + new obsidian.Setting(containerEl) + .setName("Curly Quotes") + .setDesc("Double and single quotes will be converted to curly quotes (“” & ‘’)") + .addToggle((toggle) => { + toggle + .setValue(this.plugin.settings.curlyQuotes) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.curlyQuotes = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Open double quote character") + .addText((text) => { + text + .setValue(this.plugin.settings.openDouble) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + if (!value) + return; + if (value.length > 1) { + text.setValue(value[0]); + return; + } + this.plugin.settings.openDouble = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Close double quote character") + .addText((text) => { + text + .setValue(this.plugin.settings.closeDouble) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + if (!value) + return; + if (value.length > 1) { + text.setValue(value[0]); + return; + } + this.plugin.settings.closeDouble = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Open single quote character") + .addText((text) => { + text + .setValue(this.plugin.settings.openSingle) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + if (!value) + return; + if (value.length > 1) { + text.setValue(value[0]); + return; + } + this.plugin.settings.openSingle = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Close single quote character") + .addText((text) => { + text + .setValue(this.plugin.settings.closeSingle) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + if (!value) + return; + if (value.length > 1) { + text.setValue(value[0]); + return; + } + this.plugin.settings.closeSingle = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Dashes") + .setDesc("Two dashes (--) will be converted to an en-dash (–). And en-dash followed by a dash will be converted to and em-dash (—). An em-dash followed by a dash will be converted into three dashes (---)") + .addToggle((toggle) => { + toggle.setValue(this.plugin.settings.emDash).onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.emDash = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Skip en-dash") + .setDesc("When enabled, two dashes will be converted to an em-dash rather than an en-dash.") + .addToggle((toggle) => { + toggle + .setValue(this.plugin.settings.skipEnDash) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.skipEnDash = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Ellipsis") + .setDesc("Three periods (...) will be converted to an ellipses (…)") + .addToggle((toggle) => { + toggle + .setValue(this.plugin.settings.ellipsis) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.ellipsis = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Guillemets") + .setDesc("<< | >> will be converted to « | »") + .addToggle((toggle) => { + toggle + .setValue(this.plugin.settings.guillemets) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.guillemets = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl).setName("Open guillemet").addText((text) => { + text + .setValue(this.plugin.settings.openGuillemet) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + if (!value) + return; + this.plugin.settings.openGuillemet = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl).setName("Close guillemet").addText((text) => { + text + .setValue(this.plugin.settings.closeGuillemet) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + if (!value) + return; + this.plugin.settings.closeGuillemet = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Arrows") + .setDesc("<- | -> will be converted to ← | →") + .addToggle((toggle) => { + toggle.setValue(this.plugin.settings.arrows).onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.arrows = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl).setName("Left arrow character").addText((text) => { + text.setValue(this.plugin.settings.leftArrow).onChange((value) => __awaiter(this, void 0, void 0, function* () { + if (!value) + return; + if (value.length > 1) { + text.setValue(value[0]); + return; + } + this.plugin.settings.leftArrow = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Right arrow character") + .addText((text) => { + text + .setValue(this.plugin.settings.rightArrow) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + if (!value) + return; + if (value.length > 1) { + text.setValue(value[0]); + return; + } + this.plugin.settings.rightArrow = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Comparison") + .setDesc("<= | >= | /= will be converted to ≤ | ≥ | ≠") + .addToggle((toggle) => { + toggle + .setValue(this.plugin.settings.comparisons) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.comparisons = value; + yield this.plugin.saveSettings(); + })); + }); + new obsidian.Setting(containerEl) + .setName("Fractions") + .setDesc("1/2 will be converted to ½. Supported UTF-8 fractions: ½, ⅓, ⅔, ¼, ¾, ⅕, ⅖, ⅗, ⅘, ⅙, ⅚, ⅐, ⅛, ⅜, ⅝, ⅞, ⅑, ⅒") + .addToggle((toggle) => { + toggle + .setValue(this.plugin.settings.fractions) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.fractions = value; + yield this.plugin.saveSettings(); + })); + }); + } +} +const ignoreListRegEx = /frontmatter|code|math|templater|hashtag/; +function shouldCheckTextAtPos(instance, pos) { + // Empty line + if (!instance.getLine(pos.line)) { + return true; + } + const tokens = instance.getTokenTypeAt(pos); + // Plain text line + if (!tokens) { + return true; + } + // Not codeblock or frontmatter + if (!ignoreListRegEx.test(tokens)) { + return true; + } + return false; +} + +module.exports = SmartTypography; diff --git a/.obsidian/plugins/obsidian-smart-typography/manifest.json b/.obsidian/plugins/obsidian-smart-typography/manifest.json new file mode 100644 index 00000000..e9c79f1b --- /dev/null +++ b/.obsidian/plugins/obsidian-smart-typography/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "obsidian-smart-typography", + "name": "Smart Typography", + "version": "1.0.18", + "minAppVersion": "0.15.0", + "description": "Converts quotes to curly quotes, dashes to em dashes, and periods to ellipses", + "author": "mgmeyers", + "authorUrl": "https://github.com/mgmeyers/obsidian-smart-typography", + "isDesktopOnly": false +} diff --git a/.obsidian/plugins/vscode-editor/data.json b/.obsidian/plugins/vscode-editor/data.json new file mode 100644 index 00000000..f54801d3 --- /dev/null +++ b/.obsidian/plugins/vscode-editor/data.json @@ -0,0 +1,23 @@ +{ + "extensions": [ + "ts", + "js", + "html", + "py", + "css", + "c", + "cpp", + "go", + "rs", + "java", + "lua", + "php" + ], + "folding": true, + "lineNumbers": true, + "minimap": true, + "semanticValidation": true, + "syntaxValidation": true, + "themeColor": "AUTO", + "fontSize": 16 +} \ No newline at end of file diff --git a/.obsidian/plugins/vscode-editor/main.js b/.obsidian/plugins/vscode-editor/main.js new file mode 100644 index 00000000..7c889ed0 --- /dev/null +++ b/.obsidian/plugins/vscode-editor/main.js @@ -0,0 +1,1369 @@ +var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf;var __hasOwnProp=Object.prototype.hasOwnProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:true,configurable:true,writable:true,value:value}):obj[key]=value;var __esm=(fn,res)=>function __init(){return fn&&(res=(0,fn[__getOwnPropNames(fn)[0]])(fn=0)),res};var __commonJS=(cb,mod)=>function __require2(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:true}):target,mod));var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:true}),mod);var __publicField=(obj,key,value)=>{__defNormalProp(obj,typeof key!=="symbol"?key+"":key,value);return value};function tail(array2,n=0){return array2[array2.length-(1+n)]}function tail2(arr){if(arr.length===0){throw new Error("Invalid tail call")}return[arr.slice(0,arr.length-1),arr[arr.length-1]]}function equals(one,other,itemEquals=((a,b)=>a===b)){if(one===other){return true}if(!one||!other){return false}if(one.length!==other.length){return false}for(let i=0,len=one.length;icomparator(array2[i],key)))}function binarySearch2(length2,compareToKey){let low=0,high=length2-1;while(low<=high){const mid=(low+high)/2|0;const comp=compareToKey(mid);if(comp<0){low=mid+1}else if(comp>0){high=mid-1}else{return mid}}return-(low+1)}function findFirstInSorted(array2,p){let low=0,high=array2.length;if(high===0){return 0}while(low=data.length){throw new TypeError("invalid index")}const pivotValue=data[Math.floor(data.length*Math.random())];const lower=[];const higher=[];const pivots=[];for(const value of data){const val=compare2(value,pivotValue);if(val<0){lower.push(value)}else if(val>0){higher.push(value)}else{pivots.push(value)}}if(nth!!e))}function coalesceInPlace(array2){let to=0;for(let i=0;i0}function distinct(array2,keyFn=(value=>value)){const seen=new Set;return array2.filter((element=>{const key=keyFn(element);if(seen.has(key)){return false}seen.add(key);return true}))}function findLast(arr,predicate){const idx=findLastIndex(arr,predicate);if(idx===-1){return void 0}return arr[idx]}function findLastIndex(array2,fn){for(let i=array2.length-1;i>=0;i--){const element=array2[i];if(fn(element)){return i}}return-1}function firstOrDefault(array2,notFoundValue){return array2.length>0?array2[0]:notFoundValue}function range(arg,to){let from=typeof to==="number"?arg:0;if(typeof to==="number"){from=arg}else{from=0;to=arg}const result=[];if(from<=to){for(let i=from;ito;i--){result.push(i)}}return result}function arrayInsert(target,insertIndex,insertArr){const before=target.slice(0,insertIndex);const after=target.slice(insertIndex);return before.concat(insertArr,after)}function pushToStart(arr,value){const index=arr.indexOf(value);if(index>-1){arr.splice(index,1);arr.unshift(value)}}function pushToEnd(arr,value){const index=arr.indexOf(value);if(index>-1){arr.splice(index,1);arr.push(value)}}function pushMany(arr,items){for(const item of items){arr.push(item)}}function asArray(x){return Array.isArray(x)?x:[x]}function mapFind(array2,mapFn){for(const value of array2){const mapped=mapFn(value);if(mapped!==void 0){return mapped}}return void 0}function insertInto(array2,start,newItems){const startIdx=getActualStartIndex(array2,start);const originalLength=array2.length;const newItemsLength=newItems.length;array2.length=originalLength+newItemsLength;for(let i=originalLength-1;i>=startIdx;i--){array2[i+newItemsLength]=array2[i]}for(let i=0;icomparator(selector(a),selector(b))}function tieBreakComparators(...comparators){return(item1,item2)=>{for(const comparator of comparators){const result=comparator(item1,item2);if(!CompareResult.isNeitherLessOrGreaterThan(result)){return result}}return CompareResult.neitherLessOrGreaterThan}}function reverseOrder(comparator){return(a,b)=>-comparator(a,b)}function findMaxBy(items,comparator){if(items.length===0){return void 0}let max=items[0];for(let i=1;i0){max=item}}return max}function findLastMaxBy(items,comparator){if(items.length===0){return void 0}let max=items[0];for(let i=1;i=0){max=item}}return max}function findMinBy(items,comparator){return findMaxBy(items,((a,b)=>-comparator(a,b)))}function findMaxIdxBy(items,comparator){if(items.length===0){return-1}let maxIdx=0;for(let i=1;i0){maxIdx=i}}return maxIdx}var CompareResult,numberComparator,booleanComparator,ArrayQueue,CallbackIterable;var init_arrays=__esm({"node_modules/monaco-editor/esm/vs/base/common/arrays.js"(){(function(CompareResult2){function isLessThan(result){return result<0}CompareResult2.isLessThan=isLessThan;function isLessThanOrEqual(result){return result<=0}CompareResult2.isLessThanOrEqual=isLessThanOrEqual;function isGreaterThan(result){return result>0}CompareResult2.isGreaterThan=isGreaterThan;function isNeitherLessOrGreaterThan(result){return result===0}CompareResult2.isNeitherLessOrGreaterThan=isNeitherLessOrGreaterThan;CompareResult2.greaterThan=1;CompareResult2.lessThan=-1;CompareResult2.neitherLessOrGreaterThan=0})(CompareResult||(CompareResult={}));numberComparator=(a,b)=>a-b;booleanComparator=(a,b)=>numberComparator(a?1:0,b?1:0);ArrayQueue=class{constructor(items){this.items=items;this.firstIdx=0;this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(predicate){let startIdx=this.firstIdx;while(startIdx=0&&predicate(this.items[endIdx])){endIdx--}const result=endIdx===this.lastIdx?null:this.items.slice(endIdx+1,this.lastIdx+1);this.lastIdx=endIdx;return result}peek(){if(this.length===0){return void 0}return this.items[this.firstIdx]}dequeue(){const result=this.items[this.firstIdx];this.firstIdx++;return result}takeCount(count){const result=this.items.slice(this.firstIdx,this.firstIdx+count);this.firstIdx+=count;return result}};CallbackIterable=class{constructor(iterate){this.iterate=iterate}toArray(){const result=[];this.iterate((item=>{result.push(item);return true}));return result}filter(predicate){return new CallbackIterable((cb=>this.iterate((item=>predicate(item)?cb(item):true))))}map(mapFn){return new CallbackIterable((cb=>this.iterate((item=>cb(mapFn(item))))))}findLast(predicate){let result;this.iterate((item=>{if(predicate(item)){result=item}return true}));return result}findLastMaxBy(comparator){let result;let first2=true;this.iterate((item=>{if(first2||CompareResult.isGreaterThan(comparator(item,result))){first2=false;result=item}return true}));return result}};CallbackIterable.empty=new CallbackIterable((_callback=>{}))}});function isString(str){return typeof str==="string"}function isObject(obj){return typeof obj==="object"&&obj!==null&&!Array.isArray(obj)&&!(obj instanceof RegExp)&&!(obj instanceof Date)}function isTypedArray(obj){const TypedArray=Object.getPrototypeOf(Uint8Array);return typeof obj==="object"&&obj instanceof TypedArray}function isNumber(obj){return typeof obj==="number"&&!isNaN(obj)}function isIterable(obj){return!!obj&&typeof obj[Symbol.iterator]==="function"}function isBoolean(obj){return obj===true||obj===false}function isUndefined(obj){return typeof obj==="undefined"}function isDefined(arg){return!isUndefinedOrNull(arg)}function isUndefinedOrNull(obj){return isUndefined(obj)||obj===null}function assertType(condition,type){if(!condition){throw new Error(type?`Unexpected type, expected '${type}'`:"Unexpected type")}}function assertIsDefined(arg){if(isUndefinedOrNull(arg)){throw new Error("Assertion Failed: argument is undefined or null")}return arg}function isFunction(obj){return typeof obj==="function"}function validateConstraints(args,constraints){const len=Math.min(args.length,constraints.length);for(let i=0;i{result[key]=value&&typeof value==="object"?deepClone(value):value}));return result}function deepFreeze(obj){if(!obj||typeof obj!=="object"){return obj}const stack=[obj];while(stack.length>0){const obj2=stack.shift();Object.freeze(obj2);for(const key in obj2){if(_hasOwnProperty.call(obj2,key)){const prop=obj2[key];if(typeof prop==="object"&&!Object.isFrozen(prop)&&!isTypedArray(prop)){stack.push(prop)}}}}return obj}function cloneAndChange(obj,changer){return _cloneAndChange(obj,changer,new Set)}function _cloneAndChange(obj,changer,seen){if(isUndefinedOrNull(obj)){return obj}const changed=changer(obj);if(typeof changed!=="undefined"){return changed}if(Array.isArray(obj)){const r1=[];for(const e of obj){r1.push(_cloneAndChange(e,changer,seen))}return r1}if(isObject(obj)){if(seen.has(obj)){throw new Error("Cannot clone recursive data-structure")}seen.add(obj);const r2={};for(const i2 in obj){if(_hasOwnProperty.call(obj,i2)){r2[i2]=_cloneAndChange(obj[i2],changer,seen)}}seen.delete(obj);return r2}return obj}function mixin(destination,source,overwrite=true){if(!isObject(destination)){return source}if(isObject(source)){Object.keys(source).forEach((key=>{if(key in destination){if(overwrite){if(isObject(destination[key])&&isObject(source[key])){mixin(destination[key],source[key],overwrite)}else{destination[key]=source[key]}}}else{destination[key]=source[key]}}))}return destination}function equals2(one,other){if(one===other){return true}if(one===null||one===void 0||other===null||other===void 0){return false}if(typeof one!==typeof other){return false}if(typeof one!=="object"){return false}if(Array.isArray(one)!==Array.isArray(other)){return false}let i;let key;if(Array.isArray(one)){if(one.length!==other.length){return false}for(i=0;ifunction(){const args=Array.prototype.slice.call(arguments,0);return invoke(method,args)};const result={};for(const methodName of methodNames){result[methodName]=createProxyMethod(methodName)}return result}var _hasOwnProperty;var init_objects=__esm({"node_modules/monaco-editor/esm/vs/base/common/objects.js"(){init_types();_hasOwnProperty=Object.prototype.hasOwnProperty}});function _format(message,args){let result;if(args.length===0){result=message}else{result=message.replace(/\{(\d+)\}/g,((match2,rest)=>{const index=rest[0];const arg=args[index];let result2=match2;if(typeof arg==="string"){result2=arg}else if(typeof arg==="number"||typeof arg==="boolean"||arg===void 0||arg===null){result2=String(arg)}return result2}))}if(isPseudo){result="["+result.replace(/[aouei]/g,"$&$&")+"]"}return result}function localize(data,message,...args){return _format(message,args)}function getConfiguredDefaultLocale(_){return void 0}var isPseudo;var init_nls=__esm({"node_modules/monaco-editor/esm/vs/nls.js"(){isPseudo=typeof document!=="undefined"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0}});function isLittleEndian(){if(!_isLittleEndianComputed){_isLittleEndianComputed=true;const test=new Uint8Array(2);test[0]=1;test[1]=2;const view=new Uint16Array(test.buffer);_isLittleEndian=view[0]===(2<<8)+1}return _isLittleEndian}var _a,LANGUAGE_DEFAULT,_isWindows,_isMacintosh,_isLinux,_isLinuxSnap,_isNative,_isWeb,_isElectron,_isIOS,_isCI,_isMobile,_locale,_language,_platformLocale,_translationsConfigFile,_userAgent,globals,nodeProcess,isElectronProcess,isElectronRenderer,_platform,isWindows,isMacintosh,isLinux,isNative,isWeb,isWebWorker,isIOS,isMobile,userAgent,language,setTimeout0IsFaster,setTimeout0,OS,_isLittleEndian,_isLittleEndianComputed,isChrome,isFirefox,isSafari,isEdge,isAndroid;var init_platform=__esm({"node_modules/monaco-editor/esm/vs/base/common/platform.js"(){init_nls();LANGUAGE_DEFAULT="en";_isWindows=false;_isMacintosh=false;_isLinux=false;_isLinuxSnap=false;_isNative=false;_isWeb=false;_isElectron=false;_isIOS=false;_isCI=false;_isMobile=false;_locale=void 0;_language=LANGUAGE_DEFAULT;_platformLocale=LANGUAGE_DEFAULT;_translationsConfigFile=void 0;_userAgent=void 0;globals=typeof self==="object"?self:typeof global==="object"?global:{};nodeProcess=void 0;if(typeof globals.vscode!=="undefined"&&typeof globals.vscode.process!=="undefined"){nodeProcess=globals.vscode.process}else if(typeof process!=="undefined"){nodeProcess=process}isElectronProcess=typeof((_a=nodeProcess===null||nodeProcess===void 0?void 0:nodeProcess.versions)===null||_a===void 0?void 0:_a.electron)==="string";isElectronRenderer=isElectronProcess&&(nodeProcess===null||nodeProcess===void 0?void 0:nodeProcess.type)==="renderer";if(typeof navigator==="object"&&!isElectronRenderer){_userAgent=navigator.userAgent;_isWindows=_userAgent.indexOf("Windows")>=0;_isMacintosh=_userAgent.indexOf("Macintosh")>=0;_isIOS=(_userAgent.indexOf("Macintosh")>=0||_userAgent.indexOf("iPad")>=0||_userAgent.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0;_isLinux=_userAgent.indexOf("Linux")>=0;_isMobile=(_userAgent===null||_userAgent===void 0?void 0:_userAgent.indexOf("Mobi"))>=0;_isWeb=true;const configuredLocale=getConfiguredDefaultLocale(localize({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"));_locale=configuredLocale||LANGUAGE_DEFAULT;_language=_locale;_platformLocale=navigator.language}else if(typeof nodeProcess==="object"){_isWindows=nodeProcess.platform==="win32";_isMacintosh=nodeProcess.platform==="darwin";_isLinux=nodeProcess.platform==="linux";_isLinuxSnap=_isLinux&&!!nodeProcess.env["SNAP"]&&!!nodeProcess.env["SNAP_REVISION"];_isElectron=isElectronProcess;_isCI=!!nodeProcess.env["CI"]||!!nodeProcess.env["BUILD_ARTIFACTSTAGINGDIRECTORY"];_locale=LANGUAGE_DEFAULT;_language=LANGUAGE_DEFAULT;const rawNlsConfig=nodeProcess.env["VSCODE_NLS_CONFIG"];if(rawNlsConfig){try{const nlsConfig=JSON.parse(rawNlsConfig);const resolved=nlsConfig.availableLanguages["*"];_locale=nlsConfig.locale;_platformLocale=nlsConfig.osLocale;_language=resolved?resolved:LANGUAGE_DEFAULT;_translationsConfigFile=nlsConfig._translationsConfigFile}catch(e){}}_isNative=true}else{console.error("Unable to resolve platform.")}_platform=0;if(_isMacintosh){_platform=1}else if(_isWindows){_platform=3}else if(_isLinux){_platform=2}isWindows=_isWindows;isMacintosh=_isMacintosh;isLinux=_isLinux;isNative=_isNative;isWeb=_isWeb;isWebWorker=_isWeb&&typeof globals.importScripts==="function";isIOS=_isIOS;isMobile=_isMobile;userAgent=_userAgent;language=_language;setTimeout0IsFaster=typeof globals.postMessage==="function"&&!globals.importScripts;setTimeout0=(()=>{if(setTimeout0IsFaster){const pending=[];globals.addEventListener("message",(e=>{if(e.data&&e.data.vscodeScheduleAsyncWork){for(let i=0,len=pending.length;i{const myId=++lastId;pending.push({id:myId,callback:callback});globals.postMessage({vscodeScheduleAsyncWork:myId},"*")}}return callback=>setTimeout(callback)})();OS=_isMacintosh||_isIOS?2:_isWindows?1:3;_isLittleEndian=true;_isLittleEndianComputed=false;isChrome=!!(userAgent&&userAgent.indexOf("Chrome")>=0);isFirefox=!!(userAgent&&userAgent.indexOf("Firefox")>=0);isSafari=!!(!isChrome&&(userAgent&&userAgent.indexOf("Safari")>=0));isEdge=!!(userAgent&&userAgent.indexOf("Edg/")>=0);isAndroid=!!(userAgent&&userAgent.indexOf("Android")>=0)}});var EDITOR_MODEL_DEFAULTS;var init_textModelDefaults=__esm({"node_modules/monaco-editor/esm/vs/editor/common/core/textModelDefaults.js"(){EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:true,detectIndentation:true,trimAutoWhitespace:true,largeFileOptimizations:true,bracketPairColorizationOptions:{enabled:true,independentColorPoolPerBracketType:false}}}});var Iterable;var init_iterator=__esm({"node_modules/monaco-editor/esm/vs/base/common/iterator.js"(){(function(Iterable2){function is(thing){return thing&&typeof thing==="object"&&typeof thing[Symbol.iterator]==="function"}Iterable2.is=is;const _empty2=Object.freeze([]);function empty2(){return _empty2}Iterable2.empty=empty2;function*single(element){yield element}Iterable2.single=single;function wrap(iterableOrElement){if(is(iterableOrElement)){return iterableOrElement}else{return single(iterableOrElement)}}Iterable2.wrap=wrap;function from(iterable){return iterable||_empty2}Iterable2.from=from;function isEmpty(iterable){return!iterable||iterable[Symbol.iterator]().next().done===true}Iterable2.isEmpty=isEmpty;function first2(iterable){return iterable[Symbol.iterator]().next().value}Iterable2.first=first2;function some(iterable,predicate){for(const element of iterable){if(predicate(element)){return true}}return false}Iterable2.some=some;function find(iterable,predicate){for(const element of iterable){if(predicate(element)){return element}}return void 0}Iterable2.find=find;function*filter(iterable,predicate){for(const element of iterable){if(predicate(element)){yield element}}}Iterable2.filter=filter;function*map(iterable,fn){let index=0;for(const element of iterable){yield fn(element,index++)}}Iterable2.map=map;function*concat3(...iterables){for(const iterable of iterables){for(const element of iterable){yield element}}}Iterable2.concat=concat3;function reduce(iterable,reducer,initialValue){let value=initialValue;for(const element of iterable){value=reducer(value,element)}return value}Iterable2.reduce=reduce;function*slice(arr,from2,to=arr.length){if(from2<0){from2+=arr.length}if(to<0){to+=arr.length}else if(to>arr.length){to=arr.length}for(;from2{if(!didRemove){didRemove=true;this._remove(newNode)}}}shift(){if(this._first===Node2.Undefined){return void 0}else{const res=this._first.element;this._remove(this._first);return res}}pop(){if(this._last===Node2.Undefined){return void 0}else{const res=this._last.element;this._remove(this._last);return res}}_remove(node){if(node.prev!==Node2.Undefined&&node.next!==Node2.Undefined){const anchor=node.prev;anchor.next=node.next;node.next.prev=anchor}else if(node.prev===Node2.Undefined&&node.next===Node2.Undefined){this._first=Node2.Undefined;this._last=Node2.Undefined}else if(node.next===Node2.Undefined){this._last=this._last.prev;this._last.next=Node2.Undefined}else if(node.prev===Node2.Undefined){this._first=this._first.next;this._first.prev=Node2.Undefined}this._size-=1}*[Symbol.iterator](){let node=this._first;while(node!==Node2.Undefined){yield node.element;node=node.next}}}}});function createWordRegExp(allowInWords=""){let source="(-?\\d*\\.\\d\\w*)|([^";for(const sep2 of USUAL_WORD_SEPARATORS){if(allowInWords.indexOf(sep2)>=0){continue}source+="\\"+sep2}source+="\\s]+)";return new RegExp(source,"g")}function ensureValidWordDefinition(wordDefinition){let result=DEFAULT_WORD_REGEXP;if(wordDefinition&&wordDefinition instanceof RegExp){if(!wordDefinition.global){let flags="g";if(wordDefinition.ignoreCase){flags+="i"}if(wordDefinition.multiline){flags+="m"}if(wordDefinition.unicode){flags+="u"}result=new RegExp(wordDefinition.source,flags)}else{result=wordDefinition}}result.lastIndex=0;return result}function getWordAtText(column,wordDefinition,text2,textOffset,config){if(!config){config=Iterable.first(_defaultConfig)}if(text2.length>config.maxLen){let start=column-config.maxLen/2;if(start<0){start=0}else{textOffset+=start}text2=text2.substring(start,column+config.maxLen/2);return getWordAtText(column,wordDefinition,text2,textOffset,config)}const t1=Date.now();const pos=column-1-textOffset;let prevRegexIndex=-1;let match2=null;for(let i=1;;i++){if(Date.now()-t1>=config.timeBudget){break}const regexIndex=pos-config.windowSize*i;wordDefinition.lastIndex=Math.max(0,regexIndex);const thisMatch=_findRegexMatchEnclosingPosition(wordDefinition,text2,pos,prevRegexIndex);if(!thisMatch&&match2){break}match2=thisMatch;if(regexIndex<=0){break}prevRegexIndex=regexIndex}if(match2){const result={word:match2[0],startColumn:textOffset+1+match2.index,endColumn:textOffset+1+match2.index+match2[0].length};wordDefinition.lastIndex=0;return result}return null}function _findRegexMatchEnclosingPosition(wordDefinition,text2,pos,stopPos){let match2;while(match2=wordDefinition.exec(text2)){const matchIndex=match2.index||0;if(matchIndex<=pos&&wordDefinition.lastIndex>=pos){return match2}else if(stopPos>0&&matchIndex>stopPos){return null}}return null}var USUAL_WORD_SEPARATORS,DEFAULT_WORD_REGEXP,_defaultConfig;var init_wordHelper=__esm({"node_modules/monaco-editor/esm/vs/editor/common/core/wordHelper.js"(){init_iterator();init_linkedList();USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";DEFAULT_WORD_REGEXP=createWordRegExp();_defaultConfig=new LinkedList;_defaultConfig.unshift({maxLen:1e3,windowSize:15,timeBudget:150})}});function applyUpdate(value,update){if(typeof value!=="object"||typeof update!=="object"||!value||!update){return new ApplyUpdateResult(update,value!==update)}if(Array.isArray(value)||Array.isArray(update)){const arrayEquals=Array.isArray(value)&&Array.isArray(update)&&equals(value,update);return new ApplyUpdateResult(update,!arrayEquals)}let didChange=false;for(const key in update){if(update.hasOwnProperty(key)){const result=applyUpdate(value[key],update[key]);if(result.didChange){value[key]=result.newValue;didChange=true}}}return new ApplyUpdateResult(value,didChange)}function boolean(value,defaultValue){if(typeof value==="undefined"){return defaultValue}if(value==="false"){return false}return Boolean(value)}function clampedInt(value,defaultValue,minimum,maximum){if(typeof value==="undefined"){return defaultValue}let r=parseInt(value,10);if(isNaN(r)){return defaultValue}r=Math.max(minimum,r);r=Math.min(maximum,r);return r|0}function clampedFloat(value,defaultValue,minimum,maximum){if(typeof value==="undefined"){return defaultValue}const r=EditorFloatOption.float(value,defaultValue);return EditorFloatOption.clamp(r,minimum,maximum)}function stringSet(value,defaultValue,allowedValues,renamedValues){if(typeof value!=="string"){return defaultValue}if(renamedValues&&value in renamedValues){return renamedValues[value]}if(allowedValues.indexOf(value)===-1){return defaultValue}return value}function _autoIndentFromString(autoIndent){switch(autoIndent){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}function _cursorBlinkingStyleFromString(cursorBlinkingStyle){switch(cursorBlinkingStyle){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}function _cursorStyleFromString(cursorStyle){switch(cursorStyle){case"line":return TextEditorCursorStyle.Line;case"block":return TextEditorCursorStyle.Block;case"underline":return TextEditorCursorStyle.Underline;case"line-thin":return TextEditorCursorStyle.LineThin;case"block-outline":return TextEditorCursorStyle.BlockOutline;case"underline-thin":return TextEditorCursorStyle.UnderlineThin}}function _multiCursorModifierFromString(multiCursorModifier){if(multiCursorModifier==="ctrlCmd"){return isMacintosh?"metaKey":"ctrlKey"}return"altKey"}function filterValidationDecorations(options2){const renderValidationDecorations=options2.get(96);if(renderValidationDecorations==="editable"){return options2.get(89)}return renderValidationDecorations==="on"?false:true}function _scrollbarVisibilityFromString(visibility,defaultValue){if(typeof visibility!=="string"){return defaultValue}switch(visibility){case"hidden":return 2;case"visible":return 3;default:return 1}}function primitiveSet(value,defaultValue,allowedValues){const idx=allowedValues.indexOf(value);if(idx===-1){return defaultValue}return allowedValues[idx]}function register(option){editorOptionsRegistry[option.id]=option;return option}var MINIMAP_GUTTER_WIDTH,ConfigurationChangedEvent,ComputeOptionsMemory,BaseEditorOption,ApplyUpdateResult,ComputedEditorOption,SimpleEditorOption,EditorBooleanOption,EditorIntOption,EditorFloatOption,EditorStringOption,EditorStringEnumOption,EditorEnumOption,EditorAccessibilitySupport,EditorComments,TextEditorCursorStyle,EditorClassName,EditorEmptySelectionClipboard,EditorFind,EditorFontLigatures,EditorFontVariations,EditorFontInfo,EditorFontSize,EditorFontWeight,EditorGoToLocation,EditorHover,EditorLayoutInfoComputer,WrappingStrategy,EditorLightbulb,EditorStickyScroll,EditorInlayHints,EditorLineDecorationsWidth,EditorLineHeight,EditorMinimap,EditorPadding,EditorParameterHints,EditorPixelRatio,EditorQuickSuggestions,EditorRenderLineNumbersOption,EditorRulers,ReadonlyMessage,EditorScrollbar,inUntrustedWorkspace,unicodeHighlightConfigKeys,UnicodeHighlight,InlineEditorSuggest,BracketPairColorization,GuideOptions,EditorSuggest,SmartSelect,WrappingIndentOption,EditorWrappingInfoComputer,EditorDropIntoEditor,EditorPasteAs,DEFAULT_WINDOWS_FONT_FAMILY,DEFAULT_MAC_FONT_FAMILY,DEFAULT_LINUX_FONT_FAMILY,EDITOR_FONT_DEFAULTS,editorOptionsRegistry,EditorOptions;var init_editorOptions=__esm({"node_modules/monaco-editor/esm/vs/editor/common/config/editorOptions.js"(){init_arrays();init_objects();init_platform();init_textModelDefaults();init_wordHelper();init_nls();MINIMAP_GUTTER_WIDTH=8;ConfigurationChangedEvent=class{constructor(values){this._values=values}hasChanged(id){return this._values[id]}};ComputeOptionsMemory=class{constructor(){this.stableMinimapLayoutInput=null;this.stableFitMaxMinimapScale=0;this.stableFitRemainingWidth=0}};BaseEditorOption=class{constructor(id,name,defaultValue,schema){this.id=id;this.name=name;this.defaultValue=defaultValue;this.schema=schema}applyUpdate(value,update){return applyUpdate(value,update)}compute(env2,options2,value){return value}};ApplyUpdateResult=class{constructor(newValue,didChange){this.newValue=newValue;this.didChange=didChange}};ComputedEditorOption=class{constructor(id){this.schema=void 0;this.id=id;this.name="_never_";this.defaultValue=void 0}applyUpdate(value,update){return applyUpdate(value,update)}validate(input){return this.defaultValue}};SimpleEditorOption=class{constructor(id,name,defaultValue,schema){this.id=id;this.name=name;this.defaultValue=defaultValue;this.schema=schema}applyUpdate(value,update){return applyUpdate(value,update)}validate(input){if(typeof input==="undefined"){return this.defaultValue}return input}compute(env2,options2,value){return value}};EditorBooleanOption=class extends SimpleEditorOption{constructor(id,name,defaultValue,schema=void 0){if(typeof schema!=="undefined"){schema.type="boolean";schema.default=defaultValue}super(id,name,defaultValue,schema)}validate(input){return boolean(input,this.defaultValue)}};EditorIntOption=class extends SimpleEditorOption{static clampedInt(value,defaultValue,minimum,maximum){return clampedInt(value,defaultValue,minimum,maximum)}constructor(id,name,defaultValue,minimum,maximum,schema=void 0){if(typeof schema!=="undefined"){schema.type="integer";schema.default=defaultValue;schema.minimum=minimum;schema.maximum=maximum}super(id,name,defaultValue,schema);this.minimum=minimum;this.maximum=maximum}validate(input){return EditorIntOption.clampedInt(input,this.defaultValue,this.minimum,this.maximum)}};EditorFloatOption=class extends SimpleEditorOption{static clamp(n,min,max){if(nmax){return max}return n}static float(value,defaultValue){if(typeof value==="number"){return value}if(typeof value==="undefined"){return defaultValue}const r=parseFloat(value);return isNaN(r)?defaultValue:r}constructor(id,name,defaultValue,validationFn,schema){if(typeof schema!=="undefined"){schema.type="number";schema.default=defaultValue}super(id,name,defaultValue,schema);this.validationFn=validationFn}validate(input){return this.validationFn(EditorFloatOption.float(input,this.defaultValue))}};EditorStringOption=class extends SimpleEditorOption{static string(value,defaultValue){if(typeof value!=="string"){return defaultValue}return value}constructor(id,name,defaultValue,schema=void 0){if(typeof schema!=="undefined"){schema.type="string";schema.default=defaultValue}super(id,name,defaultValue,schema)}validate(input){return EditorStringOption.string(input,this.defaultValue)}};EditorStringEnumOption=class extends SimpleEditorOption{constructor(id,name,defaultValue,allowedValues,schema=void 0){if(typeof schema!=="undefined"){schema.type="string";schema.enum=allowedValues;schema.default=defaultValue}super(id,name,defaultValue,schema);this._allowedValues=allowedValues}validate(input){return stringSet(input,this.defaultValue,this._allowedValues)}};EditorEnumOption=class extends BaseEditorOption{constructor(id,name,defaultValue,defaultStringValue,allowedValues,convert,schema=void 0){if(typeof schema!=="undefined"){schema.type="string";schema.enum=allowedValues;schema.default=defaultStringValue}super(id,name,defaultValue,schema);this._allowedValues=allowedValues;this._convert=convert}validate(input){if(typeof input!=="string"){return this.defaultValue}if(this._allowedValues.indexOf(input)===-1){return this.defaultValue}return this._convert(input)}};EditorAccessibilitySupport=class extends BaseEditorOption{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[localize("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached"),localize("accessibilitySupport.on","Optimize for usage with a Screen Reader"),localize("accessibilitySupport.off","Assume a screen reader is not attached")],default:"auto",tags:["accessibility"],description:localize("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(input){switch(input){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(env2,options2,value){if(value===0){return env2.accessibilitySupport}return value}};EditorComments=class extends BaseEditorOption{constructor(){const defaults={insertSpace:true,ignoreEmptyLines:true};super(22,"comments",defaults,{"editor.comments.insertSpace":{type:"boolean",default:defaults.insertSpace,description:localize("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:defaults.ignoreEmptyLines,description:localize("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{insertSpace:boolean(input.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:boolean(input.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}};(function(TextEditorCursorStyle3){TextEditorCursorStyle3[TextEditorCursorStyle3["Line"]=1]="Line";TextEditorCursorStyle3[TextEditorCursorStyle3["Block"]=2]="Block";TextEditorCursorStyle3[TextEditorCursorStyle3["Underline"]=3]="Underline";TextEditorCursorStyle3[TextEditorCursorStyle3["LineThin"]=4]="LineThin";TextEditorCursorStyle3[TextEditorCursorStyle3["BlockOutline"]=5]="BlockOutline";TextEditorCursorStyle3[TextEditorCursorStyle3["UnderlineThin"]=6]="UnderlineThin"})(TextEditorCursorStyle||(TextEditorCursorStyle={}));EditorClassName=class extends ComputedEditorOption{constructor(){super(139)}compute(env2,options2,_){const classNames=["monaco-editor"];if(options2.get(38)){classNames.push(options2.get(38))}if(env2.extraEditorClassName){classNames.push(env2.extraEditorClassName)}if(options2.get(72)==="default"){classNames.push("mouse-default")}else if(options2.get(72)==="copy"){classNames.push("mouse-copy")}if(options2.get(109)){classNames.push("showUnused")}if(options2.get(137)){classNames.push("showDeprecated")}return classNames.join(" ")}};EditorEmptySelectionClipboard=class extends EditorBooleanOption{constructor(){super(36,"emptySelectionClipboard",true,{description:localize("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(env2,options2,value){return value&&env2.emptySelectionClipboard}};EditorFind=class extends BaseEditorOption{constructor(){const defaults={cursorMoveOnType:true,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:false,addExtraSpaceOnTop:true,loop:true};super(40,"find",defaults,{"editor.find.cursorMoveOnType":{type:"boolean",default:defaults.cursorMoveOnType,description:localize("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:defaults.seedSearchStringFromSelection,enumDescriptions:[localize("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),localize("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),localize("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:localize("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:defaults.autoFindInSelection,enumDescriptions:[localize("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),localize("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),localize("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:localize("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:defaults.globalFindClipboard,description:localize("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:defaults.addExtraSpaceOnTop,description: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.")},"editor.find.loop":{type:"boolean",default:defaults.loop,description:localize("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{cursorMoveOnType:boolean(input.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof _input.seedSearchStringFromSelection==="boolean"?_input.seedSearchStringFromSelection?"always":"never":stringSet(input.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof _input.autoFindInSelection==="boolean"?_input.autoFindInSelection?"always":"never":stringSet(input.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:boolean(input.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:boolean(input.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:boolean(input.loop,this.defaultValue.loop)}}};EditorFontLigatures=class extends BaseEditorOption{constructor(){super(50,"fontLigatures",EditorFontLigatures.OFF,{anyOf:[{type:"boolean",description: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.")},{type:"string",description:localize("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description: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."),default:false})}validate(input){if(typeof input==="undefined"){return this.defaultValue}if(typeof input==="string"){if(input==="false"){return EditorFontLigatures.OFF}if(input==="true"){return EditorFontLigatures.ON}return input}if(Boolean(input)){return EditorFontLigatures.ON}return EditorFontLigatures.OFF}};EditorFontLigatures.OFF='"liga" off, "calt" off';EditorFontLigatures.ON='"liga" on, "calt" on';EditorFontVariations=class extends BaseEditorOption{constructor(){super(53,"fontVariations",EditorFontVariations.OFF,{anyOf:[{type:"boolean",description:localize("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:localize("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:localize("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:false})}validate(input){if(typeof input==="undefined"){return this.defaultValue}if(typeof input==="string"){if(input==="false"){return EditorFontVariations.OFF}if(input==="true"){return EditorFontVariations.TRANSLATE}return input}if(Boolean(input)){return EditorFontVariations.TRANSLATE}return EditorFontVariations.OFF}compute(env2,options2,value){return env2.fontInfo.fontVariationSettings}};EditorFontVariations.OFF="normal";EditorFontVariations.TRANSLATE="translate";EditorFontInfo=class extends ComputedEditorOption{constructor(){super(49)}compute(env2,options2,_){return env2.fontInfo}};EditorFontSize=class extends SimpleEditorOption{constructor(){super(51,"fontSize",EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:EDITOR_FONT_DEFAULTS.fontSize,description:localize("fontSize","Controls the font size in pixels.")})}validate(input){const r=EditorFloatOption.float(input,this.defaultValue);if(r===0){return EDITOR_FONT_DEFAULTS.fontSize}return EditorFloatOption.clamp(r,6,100)}compute(env2,options2,value){return env2.fontInfo.fontSize}};EditorFontWeight=class extends BaseEditorOption{constructor(){super(52,"fontWeight",EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:EditorFontWeight.MINIMUM_VALUE,maximum:EditorFontWeight.MAXIMUM_VALUE,errorMessage:localize("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:EditorFontWeight.SUGGESTION_VALUES}],default:EDITOR_FONT_DEFAULTS.fontWeight,description:localize("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(input){if(input==="normal"||input==="bold"){return input}return String(EditorIntOption.clampedInt(input,EDITOR_FONT_DEFAULTS.fontWeight,EditorFontWeight.MINIMUM_VALUE,EditorFontWeight.MAXIMUM_VALUE))}};EditorFontWeight.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];EditorFontWeight.MINIMUM_VALUE=1;EditorFontWeight.MAXIMUM_VALUE=1e3;EditorGoToLocation=class extends BaseEditorOption{constructor(){const defaults={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""};const jsonSubset={type:"string",enum:["peek","gotoAndPeek","goto"],default:defaults.multiple,enumDescriptions:[localize("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),localize("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),localize("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]};const alternativeCommandOptions=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(57,"gotoLocation",defaults,{"editor.gotoLocation.multiple":{deprecationMessage:localize("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:localize("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},jsonSubset),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:localize("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},jsonSubset),"editor.gotoLocation.multipleDeclarations":Object.assign({description:localize("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},jsonSubset),"editor.gotoLocation.multipleImplementations":Object.assign({description:localize("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},jsonSubset),"editor.gotoLocation.multipleReferences":Object.assign({description:localize("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},jsonSubset),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:defaults.alternativeDefinitionCommand,enum:alternativeCommandOptions,description:localize("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:defaults.alternativeTypeDefinitionCommand,enum:alternativeCommandOptions,description:localize("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:defaults.alternativeDeclarationCommand,enum:alternativeCommandOptions,description:localize("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:defaults.alternativeImplementationCommand,enum:alternativeCommandOptions,description:localize("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:defaults.alternativeReferenceCommand,enum:alternativeCommandOptions,description:localize("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(_input){var _a6,_b3,_c2,_d2,_e2;if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{multiple:stringSet(input.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(_a6=input.multipleDefinitions)!==null&&_a6!==void 0?_a6:stringSet(input.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(_b3=input.multipleTypeDefinitions)!==null&&_b3!==void 0?_b3:stringSet(input.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(_c2=input.multipleDeclarations)!==null&&_c2!==void 0?_c2:stringSet(input.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(_d2=input.multipleImplementations)!==null&&_d2!==void 0?_d2:stringSet(input.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(_e2=input.multipleReferences)!==null&&_e2!==void 0?_e2:stringSet(input.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:EditorStringOption.string(input.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:EditorStringOption.string(input.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:EditorStringOption.string(input.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:EditorStringOption.string(input.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:EditorStringOption.string(input.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}};EditorHover=class extends BaseEditorOption{constructor(){const defaults={enabled:true,delay:300,sticky:true,above:true};super(59,"hover",defaults,{"editor.hover.enabled":{type:"boolean",default:defaults.enabled,description:localize("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:defaults.delay,minimum:0,maximum:1e4,description:localize("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:defaults.sticky,description:localize("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:defaults.above,description:localize("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{enabled:boolean(input.enabled,this.defaultValue.enabled),delay:EditorIntOption.clampedInt(input.delay,this.defaultValue.delay,0,1e4),sticky:boolean(input.sticky,this.defaultValue.sticky),above:boolean(input.above,this.defaultValue.above)}}};EditorLayoutInfoComputer=class extends ComputedEditorOption{constructor(){super(142)}compute(env2,options2,_){return EditorLayoutInfoComputer.computeLayout(options2,{memory:env2.memory,outerWidth:env2.outerWidth,outerHeight:env2.outerHeight,isDominatedByLongLines:env2.isDominatedByLongLines,lineHeight:env2.fontInfo.lineHeight,viewLineCount:env2.viewLineCount,lineNumbersDigitCount:env2.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:env2.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:env2.fontInfo.maxDigitWidth,pixelRatio:env2.pixelRatio,glyphMarginDecorationLaneCount:env2.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(input){const typicalViewportLineCount=input.height/input.lineHeight;const extraLinesBeforeFirstLine=Math.floor(input.paddingTop/input.lineHeight);let extraLinesBeyondLastLine=Math.floor(input.paddingBottom/input.lineHeight);if(input.scrollBeyondLastLine){extraLinesBeyondLastLine=Math.max(extraLinesBeyondLastLine,typicalViewportLineCount-1)}const desiredRatio=(extraLinesBeforeFirstLine+input.viewLineCount+extraLinesBeyondLastLine)/(input.pixelRatio*input.height);const minimapLineCount=Math.floor(input.viewLineCount/desiredRatio);return{typicalViewportLineCount:typicalViewportLineCount,extraLinesBeforeFirstLine:extraLinesBeforeFirstLine,extraLinesBeyondLastLine:extraLinesBeyondLastLine,desiredRatio:desiredRatio,minimapLineCount:minimapLineCount}}static _computeMinimapLayout(input,memory){const outerWidth=input.outerWidth;const outerHeight=input.outerHeight;const pixelRatio=input.pixelRatio;if(!input.minimap.enabled){return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:false,minimapIsSampling:false,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(pixelRatio*outerHeight),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:outerHeight}}const stableMinimapLayoutInput=memory.stableMinimapLayoutInput;const couldUseMemory=stableMinimapLayoutInput&&input.outerHeight===stableMinimapLayoutInput.outerHeight&&input.lineHeight===stableMinimapLayoutInput.lineHeight&&input.typicalHalfwidthCharacterWidth===stableMinimapLayoutInput.typicalHalfwidthCharacterWidth&&input.pixelRatio===stableMinimapLayoutInput.pixelRatio&&input.scrollBeyondLastLine===stableMinimapLayoutInput.scrollBeyondLastLine&&input.paddingTop===stableMinimapLayoutInput.paddingTop&&input.paddingBottom===stableMinimapLayoutInput.paddingBottom&&input.minimap.enabled===stableMinimapLayoutInput.minimap.enabled&&input.minimap.side===stableMinimapLayoutInput.minimap.side&&input.minimap.size===stableMinimapLayoutInput.minimap.size&&input.minimap.showSlider===stableMinimapLayoutInput.minimap.showSlider&&input.minimap.renderCharacters===stableMinimapLayoutInput.minimap.renderCharacters&&input.minimap.maxColumn===stableMinimapLayoutInput.minimap.maxColumn&&input.minimap.scale===stableMinimapLayoutInput.minimap.scale&&input.verticalScrollbarWidth===stableMinimapLayoutInput.verticalScrollbarWidth&&input.isViewportWrapping===stableMinimapLayoutInput.isViewportWrapping;const lineHeight=input.lineHeight;const typicalHalfwidthCharacterWidth=input.typicalHalfwidthCharacterWidth;const scrollBeyondLastLine=input.scrollBeyondLastLine;const minimapRenderCharacters=input.minimap.renderCharacters;let minimapScale=pixelRatio>=2?Math.round(input.minimap.scale*2):input.minimap.scale;const minimapMaxColumn=input.minimap.maxColumn;const minimapSize=input.minimap.size;const minimapSide=input.minimap.side;const verticalScrollbarWidth=input.verticalScrollbarWidth;const viewLineCount=input.viewLineCount;const remainingWidth=input.remainingWidth;const isViewportWrapping=input.isViewportWrapping;const baseCharHeight=minimapRenderCharacters?2:3;let minimapCanvasInnerHeight=Math.floor(pixelRatio*outerHeight);const minimapCanvasOuterHeight=minimapCanvasInnerHeight/pixelRatio;let minimapHeightIsEditorHeight=false;let minimapIsSampling=false;let minimapLineHeight=baseCharHeight*minimapScale;let minimapCharWidth=minimapScale/pixelRatio;let minimapWidthMultiplier=1;if(minimapSize==="fill"||minimapSize==="fit"){const{typicalViewportLineCount:typicalViewportLineCount,extraLinesBeforeFirstLine:extraLinesBeforeFirstLine,extraLinesBeyondLastLine:extraLinesBeyondLastLine,desiredRatio:desiredRatio,minimapLineCount:minimapLineCount}=EditorLayoutInfoComputer.computeContainedMinimapLineCount({viewLineCount:viewLineCount,scrollBeyondLastLine:scrollBeyondLastLine,paddingTop:input.paddingTop,paddingBottom:input.paddingBottom,height:outerHeight,lineHeight:lineHeight,pixelRatio:pixelRatio});const ratio=viewLineCount/minimapLineCount;if(ratio>1){minimapHeightIsEditorHeight=true;minimapIsSampling=true;minimapScale=1;minimapLineHeight=1;minimapCharWidth=minimapScale/pixelRatio}else{let fitBecomesFill=false;let maxMinimapScale=minimapScale+1;if(minimapSize==="fit"){const effectiveMinimapHeight=Math.ceil((extraLinesBeforeFirstLine+viewLineCount+extraLinesBeyondLastLine)*minimapLineHeight);if(isViewportWrapping&&couldUseMemory&&remainingWidth<=memory.stableFitRemainingWidth){fitBecomesFill=true;maxMinimapScale=memory.stableFitMaxMinimapScale}else{fitBecomesFill=effectiveMinimapHeight>minimapCanvasInnerHeight}}if(minimapSize==="fill"||fitBecomesFill){minimapHeightIsEditorHeight=true;const configuredMinimapScale=minimapScale;minimapLineHeight=Math.min(lineHeight*pixelRatio,Math.max(1,Math.floor(1/desiredRatio)));if(isViewportWrapping&&couldUseMemory&&remainingWidth<=memory.stableFitRemainingWidth){maxMinimapScale=memory.stableFitMaxMinimapScale}minimapScale=Math.min(maxMinimapScale,Math.max(1,Math.floor(minimapLineHeight/baseCharHeight)));if(minimapScale>configuredMinimapScale){minimapWidthMultiplier=Math.min(2,minimapScale/configuredMinimapScale)}minimapCharWidth=minimapScale/pixelRatio/minimapWidthMultiplier;minimapCanvasInnerHeight=Math.ceil(Math.max(typicalViewportLineCount,extraLinesBeforeFirstLine+viewLineCount+extraLinesBeyondLastLine)*minimapLineHeight);if(isViewportWrapping){memory.stableMinimapLayoutInput=input;memory.stableFitRemainingWidth=remainingWidth;memory.stableFitMaxMinimapScale=minimapScale}else{memory.stableMinimapLayoutInput=null;memory.stableFitRemainingWidth=0}}}}const minimapMaxWidth=Math.floor(minimapMaxColumn*minimapCharWidth);const minimapWidth=Math.min(minimapMaxWidth,Math.max(0,Math.floor((remainingWidth-verticalScrollbarWidth-2)*minimapCharWidth/(typicalHalfwidthCharacterWidth+minimapCharWidth)))+MINIMAP_GUTTER_WIDTH);let minimapCanvasInnerWidth=Math.floor(pixelRatio*minimapWidth);const minimapCanvasOuterWidth=minimapCanvasInnerWidth/pixelRatio;minimapCanvasInnerWidth=Math.floor(minimapCanvasInnerWidth*minimapWidthMultiplier);const renderMinimap=minimapRenderCharacters?1:2;const minimapLeft=minimapSide==="left"?0:outerWidth-minimapWidth-verticalScrollbarWidth;return{renderMinimap:renderMinimap,minimapLeft:minimapLeft,minimapWidth:minimapWidth,minimapHeightIsEditorHeight:minimapHeightIsEditorHeight,minimapIsSampling:minimapIsSampling,minimapScale:minimapScale,minimapLineHeight:minimapLineHeight,minimapCanvasInnerWidth:minimapCanvasInnerWidth,minimapCanvasInnerHeight:minimapCanvasInnerHeight,minimapCanvasOuterWidth:minimapCanvasOuterWidth,minimapCanvasOuterHeight:minimapCanvasOuterHeight}}static computeLayout(options2,env2){const outerWidth=env2.outerWidth|0;const outerHeight=env2.outerHeight|0;const lineHeight=env2.lineHeight|0;const lineNumbersDigitCount=env2.lineNumbersDigitCount|0;const typicalHalfwidthCharacterWidth=env2.typicalHalfwidthCharacterWidth;const maxDigitWidth=env2.maxDigitWidth;const pixelRatio=env2.pixelRatio;const viewLineCount=env2.viewLineCount;const wordWrapOverride2=options2.get(134);const wordWrapOverride1=wordWrapOverride2==="inherit"?options2.get(133):wordWrapOverride2;const wordWrap=wordWrapOverride1==="inherit"?options2.get(129):wordWrapOverride1;const wordWrapColumn=options2.get(132);const isDominatedByLongLines=env2.isDominatedByLongLines;const showGlyphMargin=options2.get(56);const showLineNumbers=options2.get(66).renderType!==0;const lineNumbersMinChars=options2.get(67);const scrollBeyondLastLine=options2.get(103);const padding=options2.get(82);const minimap=options2.get(71);const scrollbar=options2.get(101);const verticalScrollbarWidth=scrollbar.verticalScrollbarSize;const verticalScrollbarHasArrows=scrollbar.verticalHasArrows;const scrollbarArrowSize=scrollbar.arrowSize;const horizontalScrollbarHeight=scrollbar.horizontalScrollbarSize;const folding=options2.get(42);const showFoldingDecoration=options2.get(108)!=="never";let lineDecorationsWidth=options2.get(64);if(folding&&showFoldingDecoration){lineDecorationsWidth+=16}let lineNumbersWidth=0;if(showLineNumbers){const digitCount2=Math.max(lineNumbersDigitCount,lineNumbersMinChars);lineNumbersWidth=Math.round(digitCount2*maxDigitWidth)}let glyphMarginWidth=0;if(showGlyphMargin){glyphMarginWidth=lineHeight*env2.glyphMarginDecorationLaneCount}let glyphMarginLeft=0;let lineNumbersLeft=glyphMarginLeft+glyphMarginWidth;let decorationsLeft=lineNumbersLeft+lineNumbersWidth;let contentLeft=decorationsLeft+lineDecorationsWidth;const remainingWidth=outerWidth-glyphMarginWidth-lineNumbersWidth-lineDecorationsWidth;let isWordWrapMinified=false;let isViewportWrapping=false;let wrappingColumn=-1;if(wordWrapOverride1==="inherit"&&isDominatedByLongLines){isWordWrapMinified=true;isViewportWrapping=true}else if(wordWrap==="on"||wordWrap==="bounded"){isViewportWrapping=true}else if(wordWrap==="wordWrapColumn"){wrappingColumn=wordWrapColumn}const minimapLayout=EditorLayoutInfoComputer._computeMinimapLayout({outerWidth:outerWidth,outerHeight:outerHeight,lineHeight:lineHeight,typicalHalfwidthCharacterWidth:typicalHalfwidthCharacterWidth,pixelRatio:pixelRatio,scrollBeyondLastLine:scrollBeyondLastLine,paddingTop:padding.top,paddingBottom:padding.bottom,minimap:minimap,verticalScrollbarWidth:verticalScrollbarWidth,viewLineCount:viewLineCount,remainingWidth:remainingWidth,isViewportWrapping:isViewportWrapping},env2.memory||new ComputeOptionsMemory);if(minimapLayout.renderMinimap!==0&&minimapLayout.minimapLeft===0){glyphMarginLeft+=minimapLayout.minimapWidth;lineNumbersLeft+=minimapLayout.minimapWidth;decorationsLeft+=minimapLayout.minimapWidth;contentLeft+=minimapLayout.minimapWidth}const contentWidth=remainingWidth-minimapLayout.minimapWidth;const viewportColumn=Math.max(1,Math.floor((contentWidth-verticalScrollbarWidth-2)/typicalHalfwidthCharacterWidth));const verticalArrowSize=verticalScrollbarHasArrows?scrollbarArrowSize:0;if(isViewportWrapping){wrappingColumn=Math.max(1,viewportColumn);if(wordWrap==="bounded"){wrappingColumn=Math.min(wrappingColumn,wordWrapColumn)}}return{width:outerWidth,height:outerHeight,glyphMarginLeft:glyphMarginLeft,glyphMarginWidth:glyphMarginWidth,glyphMarginDecorationLaneCount:env2.glyphMarginDecorationLaneCount,lineNumbersLeft:lineNumbersLeft,lineNumbersWidth:lineNumbersWidth,decorationsLeft:decorationsLeft,decorationsWidth:lineDecorationsWidth,contentLeft:contentLeft,contentWidth:contentWidth,minimap:minimapLayout,viewportColumn:viewportColumn,isWordWrapMinified:isWordWrapMinified,isViewportWrapping:isViewportWrapping,wrappingColumn:wrappingColumn,verticalScrollbarWidth:verticalScrollbarWidth,horizontalScrollbarHeight:horizontalScrollbarHeight,overviewRuler:{top:verticalArrowSize,width:verticalScrollbarWidth,height:outerHeight-2*verticalArrowSize,right:0}}}};WrappingStrategy=class extends BaseEditorOption{constructor(){super(136,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[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."),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.")],type:"string",enum:["simple","advanced"],default:"simple",description:localize("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(input){return stringSet(input,"simple",["simple","advanced"])}compute(env2,options2,value){const accessibilitySupport=options2.get(2);if(accessibilitySupport===2){return"advanced"}return value}};EditorLightbulb=class extends BaseEditorOption{constructor(){const defaults={enabled:true};super(63,"lightbulb",defaults,{"editor.lightbulb.enabled":{type:"boolean",default:defaults.enabled,description:localize("codeActions","Enables the Code Action lightbulb in the editor.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{enabled:boolean(input.enabled,this.defaultValue.enabled)}}};EditorStickyScroll=class extends BaseEditorOption{constructor(){const defaults={enabled:false,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:true};super(113,"stickyScroll",defaults,{"editor.stickyScroll.enabled":{type:"boolean",default:defaults.enabled,description:localize("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor.")},"editor.stickyScroll.maxLineCount":{type:"number",default:defaults.maxLineCount,minimum:1,maximum:10,description:localize("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:defaults.defaultModel,description:localize("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:defaults.scrollWithEditor,description:localize("editor.stickyScroll.scrollWithEditor","Enable scrolling of the sticky scroll widget with the editor's horizontal scrollbar.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{enabled:boolean(input.enabled,this.defaultValue.enabled),maxLineCount:EditorIntOption.clampedInt(input.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:stringSet(input.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:boolean(input.scrollWithEditor,this.defaultValue.scrollWithEditor)}}};EditorInlayHints=class extends BaseEditorOption{constructor(){const defaults={enabled:"on",fontSize:0,fontFamily:"",padding:false};super(138,"inlayHints",defaults,{"editor.inlayHints.enabled":{type:"string",default:defaults.enabled,description:localize("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[localize("editor.inlayHints.on","Inlay hints are enabled"),localize("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",isMacintosh?`Ctrl+Option`:`Ctrl+Alt`),localize("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",isMacintosh?`Ctrl+Option`:`Ctrl+Alt`),localize("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:defaults.fontSize,markdownDescription:localize("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:defaults.fontFamily,markdownDescription:localize("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:defaults.padding,description:localize("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;if(typeof input.enabled==="boolean"){input.enabled=input.enabled?"on":"off"}return{enabled:stringSet(input.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:EditorIntOption.clampedInt(input.fontSize,this.defaultValue.fontSize,0,100),fontFamily:EditorStringOption.string(input.fontFamily,this.defaultValue.fontFamily),padding:boolean(input.padding,this.defaultValue.padding)}}};EditorLineDecorationsWidth=class extends BaseEditorOption{constructor(){super(64,"lineDecorationsWidth",10)}validate(input){if(typeof input==="string"&&/^\d+(\.\d+)?ch$/.test(input)){const multiple=parseFloat(input.substring(0,input.length-2));return-multiple}else{return EditorIntOption.clampedInt(input,this.defaultValue,0,1e3)}}compute(env2,options2,value){if(value<0){return EditorIntOption.clampedInt(-value*env2.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3)}else{return value}}};EditorLineHeight=class extends EditorFloatOption{constructor(){super(65,"lineHeight",EDITOR_FONT_DEFAULTS.lineHeight,(x=>EditorFloatOption.clamp(x,0,150)),{markdownDescription:localize("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(env2,options2,value){return env2.fontInfo.lineHeight}};EditorMinimap=class extends BaseEditorOption{constructor(){const defaults={enabled:true,size:"proportional",side:"right",showSlider:"mouseover",autohide:false,renderCharacters:true,maxColumn:120,scale:1};super(71,"minimap",defaults,{"editor.minimap.enabled":{type:"boolean",default:defaults.enabled,description:localize("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:defaults.autohide,description:localize("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[localize("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),localize("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),localize("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:defaults.size,description:localize("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:defaults.side,description:localize("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:defaults.showSlider,description:localize("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:defaults.scale,minimum:1,maximum:3,enum:[1,2,3],description:localize("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:defaults.renderCharacters,description:localize("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:defaults.maxColumn,description:localize("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{enabled:boolean(input.enabled,this.defaultValue.enabled),autohide:boolean(input.autohide,this.defaultValue.autohide),size:stringSet(input.size,this.defaultValue.size,["proportional","fill","fit"]),side:stringSet(input.side,this.defaultValue.side,["right","left"]),showSlider:stringSet(input.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:boolean(input.renderCharacters,this.defaultValue.renderCharacters),scale:EditorIntOption.clampedInt(input.scale,1,1,3),maxColumn:EditorIntOption.clampedInt(input.maxColumn,this.defaultValue.maxColumn,1,1e4)}}};EditorPadding=class extends BaseEditorOption{constructor(){super(82,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:localize("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:localize("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{top:EditorIntOption.clampedInt(input.top,0,0,1e3),bottom:EditorIntOption.clampedInt(input.bottom,0,0,1e3)}}};EditorParameterHints=class extends BaseEditorOption{constructor(){const defaults={enabled:true,cycle:true};super(84,"parameterHints",defaults,{"editor.parameterHints.enabled":{type:"boolean",default:defaults.enabled,description:localize("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:defaults.cycle,description:localize("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{enabled:boolean(input.enabled,this.defaultValue.enabled),cycle:boolean(input.cycle,this.defaultValue.cycle)}}};EditorPixelRatio=class extends ComputedEditorOption{constructor(){super(140)}compute(env2,options2,_){return env2.pixelRatio}};EditorQuickSuggestions=class extends BaseEditorOption{constructor(){const defaults={other:"on",comments:"off",strings:"off"};const types=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[localize("on","Quick suggestions show inside the suggest widget"),localize("inline","Quick suggestions show as ghost text"),localize("off","Quick suggestions are disabled")]}];super(87,"quickSuggestions",defaults,{type:"object",additionalProperties:false,properties:{strings:{anyOf:types,default:defaults.strings,description:localize("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:types,default:defaults.comments,description:localize("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:types,default:defaults.other,description:localize("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:defaults,markdownDescription:localize("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.",`#editor.suggestOnTriggerCharacters#`)});this.defaultValue=defaults}validate(input){if(typeof input==="boolean"){const value=input?"on":"off";return{comments:value,strings:value,other:value}}if(!input||typeof input!=="object"){return this.defaultValue}const{other:other,comments:comments,strings:strings}=input;const allowedValues=["on","inline","off"];let validatedOther;let validatedComments;let validatedStrings;if(typeof other==="boolean"){validatedOther=other?"on":"off"}else{validatedOther=stringSet(other,this.defaultValue.other,allowedValues)}if(typeof comments==="boolean"){validatedComments=comments?"on":"off"}else{validatedComments=stringSet(comments,this.defaultValue.comments,allowedValues)}if(typeof strings==="boolean"){validatedStrings=strings?"on":"off"}else{validatedStrings=stringSet(strings,this.defaultValue.strings,allowedValues)}return{other:validatedOther,comments:validatedComments,strings:validatedStrings}}};EditorRenderLineNumbersOption=class extends BaseEditorOption{constructor(){super(66,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[localize("lineNumbers.off","Line numbers are not rendered."),localize("lineNumbers.on","Line numbers are rendered as absolute number."),localize("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),localize("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:localize("lineNumbers","Controls the display of line numbers.")})}validate(lineNumbers){let renderType=this.defaultValue.renderType;let renderFn=this.defaultValue.renderFn;if(typeof lineNumbers!=="undefined"){if(typeof lineNumbers==="function"){renderType=4;renderFn=lineNumbers}else if(lineNumbers==="interval"){renderType=3}else if(lineNumbers==="relative"){renderType=2}else if(lineNumbers==="on"){renderType=1}else{renderType=0}}return{renderType:renderType,renderFn:renderFn}}};EditorRulers=class extends BaseEditorOption{constructor(){const defaults=[];const columnSchema={type:"number",description:localize("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(100,"rulers",defaults,{type:"array",items:{anyOf:[columnSchema,{type:["object"],properties:{column:columnSchema,color:{type:"string",description:localize("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:defaults,description: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.")})}validate(input){if(Array.isArray(input)){const rulers=[];for(const _element of input){if(typeof _element==="number"){rulers.push({column:EditorIntOption.clampedInt(_element,0,0,1e4),color:null})}else if(_element&&typeof _element==="object"){const element=_element;rulers.push({column:EditorIntOption.clampedInt(element.column,0,0,1e4),color:element.color})}}rulers.sort(((a,b)=>a.column-b.column));return rulers}return this.defaultValue}};ReadonlyMessage=class extends BaseEditorOption{constructor(){const defaults=void 0;super(90,"readOnlyMessage",defaults)}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}return _input}};EditorScrollbar=class extends BaseEditorOption{constructor(){const defaults={vertical:1,horizontal:1,arrowSize:11,useShadows:true,verticalHasArrows:false,horizontalHasArrows:false,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:true,alwaysConsumeMouseWheel:true,scrollByPage:false};super(101,"scrollbar",defaults,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[localize("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),localize("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),localize("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:localize("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[localize("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),localize("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),localize("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:localize("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:defaults.verticalScrollbarSize,description:localize("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:defaults.horizontalScrollbarSize,description:localize("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:defaults.scrollByPage,description:localize("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;const horizontalScrollbarSize=EditorIntOption.clampedInt(input.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3);const verticalScrollbarSize=EditorIntOption.clampedInt(input.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:EditorIntOption.clampedInt(input.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:_scrollbarVisibilityFromString(input.vertical,this.defaultValue.vertical),horizontal:_scrollbarVisibilityFromString(input.horizontal,this.defaultValue.horizontal),useShadows:boolean(input.useShadows,this.defaultValue.useShadows),verticalHasArrows:boolean(input.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:boolean(input.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:boolean(input.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:boolean(input.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:horizontalScrollbarSize,horizontalSliderSize:EditorIntOption.clampedInt(input.horizontalSliderSize,horizontalScrollbarSize,0,1e3),verticalScrollbarSize:verticalScrollbarSize,verticalSliderSize:EditorIntOption.clampedInt(input.verticalSliderSize,verticalScrollbarSize,0,1e3),scrollByPage:boolean(input.scrollByPage,this.defaultValue.scrollByPage)}}};inUntrustedWorkspace="inUntrustedWorkspace";unicodeHighlightConfigKeys={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};UnicodeHighlight=class extends BaseEditorOption{constructor(){const defaults={nonBasicASCII:inUntrustedWorkspace,invisibleCharacters:true,ambiguousCharacters:true,includeComments:inUntrustedWorkspace,includeStrings:true,allowedCharacters:{},allowedLocales:{_os:true,_vscode:true}};super(123,"unicodeHighlight",defaults,{[unicodeHighlightConfigKeys.nonBasicASCII]:{restricted:true,type:["boolean","string"],enum:[true,false,inUntrustedWorkspace],default:defaults.nonBasicASCII,description:localize("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[unicodeHighlightConfigKeys.invisibleCharacters]:{restricted:true,type:"boolean",default:defaults.invisibleCharacters,description:localize("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[unicodeHighlightConfigKeys.ambiguousCharacters]:{restricted:true,type:"boolean",default:defaults.ambiguousCharacters,description:localize("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[unicodeHighlightConfigKeys.includeComments]:{restricted:true,type:["boolean","string"],enum:[true,false,inUntrustedWorkspace],default:defaults.includeComments,description:localize("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[unicodeHighlightConfigKeys.includeStrings]:{restricted:true,type:["boolean","string"],enum:[true,false,inUntrustedWorkspace],default:defaults.includeStrings,description:localize("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[unicodeHighlightConfigKeys.allowedCharacters]:{restricted:true,type:"object",default:defaults.allowedCharacters,description:localize("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[unicodeHighlightConfigKeys.allowedLocales]:{restricted:true,type:"object",additionalProperties:{type:"boolean"},default:defaults.allowedLocales,description:localize("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(value,update){let didChange=false;if(update.allowedCharacters&&value){if(!equals2(value.allowedCharacters,update.allowedCharacters)){value=Object.assign(Object.assign({},value),{allowedCharacters:update.allowedCharacters});didChange=true}}if(update.allowedLocales&&value){if(!equals2(value.allowedLocales,update.allowedLocales)){value=Object.assign(Object.assign({},value),{allowedLocales:update.allowedLocales});didChange=true}}const result=super.applyUpdate(value,update);if(didChange){return new ApplyUpdateResult(result.newValue,true)}return result}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{nonBasicASCII:primitiveSet(input.nonBasicASCII,inUntrustedWorkspace,[true,false,inUntrustedWorkspace]),invisibleCharacters:boolean(input.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:boolean(input.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:primitiveSet(input.includeComments,inUntrustedWorkspace,[true,false,inUntrustedWorkspace]),includeStrings:primitiveSet(input.includeStrings,inUntrustedWorkspace,[true,false,inUntrustedWorkspace]),allowedCharacters:this.validateBooleanMap(_input.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(_input.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(map,defaultValue){if(typeof map!=="object"||!map){return defaultValue}const result={};for(const[key,value]of Object.entries(map)){if(value===true){result[key]=true}}return result}};InlineEditorSuggest=class extends BaseEditorOption{constructor(){const defaults={enabled:true,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:false,keepOnBlur:false};super(61,"inlineSuggest",defaults,{"editor.inlineSuggest.enabled":{type:"boolean",default:defaults.enabled,description:localize("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:defaults.showToolbar,enum:["always","onHover"],enumDescriptions:[localize("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),localize("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion.")],description:localize("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:defaults.suppressSuggestions,description:localize("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{enabled:boolean(input.enabled,this.defaultValue.enabled),mode:stringSet(input.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:stringSet(input.showToolbar,this.defaultValue.showToolbar,["always","onHover"]),suppressSuggestions:boolean(input.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:boolean(input.keepOnBlur,this.defaultValue.keepOnBlur)}}};BracketPairColorization=class extends BaseEditorOption{constructor(){const defaults={enabled:EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(14,"bracketPairColorization",defaults,{"editor.bracketPairColorization.enabled":{type:"boolean",default:defaults.enabled,markdownDescription:localize("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:defaults.independentColorPoolPerBracketType,description:localize("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{enabled:boolean(input.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:boolean(input.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}};GuideOptions=class extends BaseEditorOption{constructor(){const defaults={bracketPairs:false,bracketPairsHorizontal:"active",highlightActiveBracketPair:true,indentation:true,highlightActiveIndentation:true};super(15,"guides",defaults,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[true,"active",false],enumDescriptions:[localize("editor.guides.bracketPairs.true","Enables bracket pair guides."),localize("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),localize("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:defaults.bracketPairs,description:localize("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[true,"active",false],enumDescriptions:[localize("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),localize("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),localize("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:defaults.bracketPairsHorizontal,description:localize("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:defaults.highlightActiveBracketPair,description:localize("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:defaults.indentation,description:localize("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[true,"always",false],enumDescriptions:[localize("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),localize("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),localize("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:defaults.highlightActiveIndentation,description:localize("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{bracketPairs:primitiveSet(input.bracketPairs,this.defaultValue.bracketPairs,[true,false,"active"]),bracketPairsHorizontal:primitiveSet(input.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[true,false,"active"]),highlightActiveBracketPair:boolean(input.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:boolean(input.indentation,this.defaultValue.indentation),highlightActiveIndentation:primitiveSet(input.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[true,false,"always"])}}};EditorSuggest=class extends BaseEditorOption{constructor(){const defaults={insertMode:"insert",filterGraceful:true,snippetsPreventQuickSuggestions:false,localityBonus:false,shareSuggestSelections:false,selectionMode:"always",showIcons:true,showStatusBar:false,preview:false,previewMode:"subwordSmart",showInlineDetails:true,showMethods:true,showFunctions:true,showConstructors:true,showDeprecated:true,matchOnWordStartOnly:true,showFields:true,showVariables:true,showClasses:true,showStructs:true,showInterfaces:true,showModules:true,showProperties:true,showEvents:true,showOperators:true,showUnits:true,showValues:true,showConstants:true,showEnums:true,showEnumMembers:true,showKeywords:true,showWords:true,showColors:true,showFiles:true,showReferences:true,showFolders:true,showTypeParameters:true,showSnippets:true,showUsers:true,showIssues:true};super(116,"suggest",defaults,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[localize("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),localize("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:defaults.insertMode,description:localize("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:defaults.filterGraceful,description:localize("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:defaults.localityBonus,description:localize("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:defaults.shareSuggestSelections,markdownDescription:localize("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[localize("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),localize("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),localize("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),localize("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:defaults.selectionMode,markdownDescription:localize("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:defaults.snippetsPreventQuickSuggestions,description:localize("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:defaults.showIcons,description:localize("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:defaults.showStatusBar,description:localize("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:defaults.preview,description:localize("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:defaults.showInlineDetails,description:localize("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:localize("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:localize("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:true,markdownDescription:localize("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{insertMode:stringSet(input.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:boolean(input.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:boolean(input.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:boolean(input.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:boolean(input.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:stringSet(input.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:boolean(input.showIcons,this.defaultValue.showIcons),showStatusBar:boolean(input.showStatusBar,this.defaultValue.showStatusBar),preview:boolean(input.preview,this.defaultValue.preview),previewMode:stringSet(input.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:boolean(input.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:boolean(input.showMethods,this.defaultValue.showMethods),showFunctions:boolean(input.showFunctions,this.defaultValue.showFunctions),showConstructors:boolean(input.showConstructors,this.defaultValue.showConstructors),showDeprecated:boolean(input.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:boolean(input.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:boolean(input.showFields,this.defaultValue.showFields),showVariables:boolean(input.showVariables,this.defaultValue.showVariables),showClasses:boolean(input.showClasses,this.defaultValue.showClasses),showStructs:boolean(input.showStructs,this.defaultValue.showStructs),showInterfaces:boolean(input.showInterfaces,this.defaultValue.showInterfaces),showModules:boolean(input.showModules,this.defaultValue.showModules),showProperties:boolean(input.showProperties,this.defaultValue.showProperties),showEvents:boolean(input.showEvents,this.defaultValue.showEvents),showOperators:boolean(input.showOperators,this.defaultValue.showOperators),showUnits:boolean(input.showUnits,this.defaultValue.showUnits),showValues:boolean(input.showValues,this.defaultValue.showValues),showConstants:boolean(input.showConstants,this.defaultValue.showConstants),showEnums:boolean(input.showEnums,this.defaultValue.showEnums),showEnumMembers:boolean(input.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:boolean(input.showKeywords,this.defaultValue.showKeywords),showWords:boolean(input.showWords,this.defaultValue.showWords),showColors:boolean(input.showColors,this.defaultValue.showColors),showFiles:boolean(input.showFiles,this.defaultValue.showFiles),showReferences:boolean(input.showReferences,this.defaultValue.showReferences),showFolders:boolean(input.showFolders,this.defaultValue.showFolders),showTypeParameters:boolean(input.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:boolean(input.showSnippets,this.defaultValue.showSnippets),showUsers:boolean(input.showUsers,this.defaultValue.showUsers),showIssues:boolean(input.showIssues,this.defaultValue.showIssues)}}};SmartSelect=class extends BaseEditorOption{constructor(){super(111,"smartSelect",{selectLeadingAndTrailingWhitespace:true,selectSubwords:true},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:localize("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:true,type:"boolean"},"editor.smartSelect.selectSubwords":{description:localize("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:true,type:"boolean"}})}validate(input){if(!input||typeof input!=="object"){return this.defaultValue}return{selectLeadingAndTrailingWhitespace:boolean(input.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:boolean(input.selectSubwords,this.defaultValue.selectSubwords)}}};WrappingIndentOption=class extends BaseEditorOption{constructor(){super(135,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[localize("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),localize("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),localize("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),localize("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:localize("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(input){switch(input){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(env2,options2,value){const accessibilitySupport=options2.get(2);if(accessibilitySupport===2){return 0}return value}};EditorWrappingInfoComputer=class extends ComputedEditorOption{constructor(){super(143)}compute(env2,options2,_){const layoutInfo=options2.get(142);return{isDominatedByLongLines:env2.isDominatedByLongLines,isWordWrapMinified:layoutInfo.isWordWrapMinified,isViewportWrapping:layoutInfo.isViewportWrapping,wrappingColumn:layoutInfo.wrappingColumn}}};EditorDropIntoEditor=class extends BaseEditorOption{constructor(){const defaults={enabled:true,showDropSelector:"afterDrop"};super(35,"dropIntoEditor",defaults,{"editor.dropIntoEditor.enabled":{type:"boolean",default:defaults.enabled,markdownDescription:localize("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:localize("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[localize("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),localize("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{enabled:boolean(input.enabled,this.defaultValue.enabled),showDropSelector:stringSet(input.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}};EditorPasteAs=class extends BaseEditorOption{constructor(){const defaults={enabled:true,showPasteSelector:"afterPaste"};super(83,"pasteAs",defaults,{"editor.pasteAs.enabled":{type:"boolean",default:defaults.enabled,markdownDescription:localize("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:localize("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[localize("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),localize("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(_input){if(!_input||typeof _input!=="object"){return this.defaultValue}const input=_input;return{enabled:boolean(input.enabled,this.defaultValue.enabled),showPasteSelector:stringSet(input.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}};DEFAULT_WINDOWS_FONT_FAMILY="Consolas, 'Courier New', monospace";DEFAULT_MAC_FONT_FAMILY="Menlo, Monaco, 'Courier New', monospace";DEFAULT_LINUX_FONT_FAMILY="'Droid Sans Mono', 'monospace', monospace";EDITOR_FONT_DEFAULTS={fontFamily:isMacintosh?DEFAULT_MAC_FONT_FAMILY:isLinux?DEFAULT_LINUX_FONT_FAMILY:DEFAULT_WINDOWS_FONT_FAMILY,fontWeight:"normal",fontSize:isMacintosh?12:14,lineHeight:0,letterSpacing:0};editorOptionsRegistry=[];EditorOptions={acceptSuggestionOnCommitCharacter:register(new EditorBooleanOption(0,"acceptSuggestionOnCommitCharacter",true,{markdownDescription: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.")})),acceptSuggestionOnEnter:register(new EditorStringEnumOption(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",localize("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription: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.")})),accessibilitySupport:register(new EditorAccessibilitySupport),accessibilityPageSize:register(new EditorIntOption(3,"accessibilityPageSize",10,1,1073741824,{description:localize("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:register(new EditorStringOption(4,"ariaLabel",localize("editorViewAccessibleLabel","Editor content"))),ariaRequired:register(new EditorBooleanOption(5,"ariaRequired",false,void 0)),screenReaderAnnounceInlineSuggestion:register(new EditorBooleanOption(7,"screenReaderAnnounceInlineSuggestion",true,{description:localize("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:register(new EditorStringEnumOption(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",localize("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),localize("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:localize("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:register(new EditorStringEnumOption(8,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",localize("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:localize("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:register(new EditorStringEnumOption(9,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",localize("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:localize("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:register(new EditorStringEnumOption(10,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",localize("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),localize("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:localize("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:register(new EditorEnumOption(11,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],_autoIndentFromString,{enumDescriptions:[localize("editor.autoIndent.none","The editor will not insert indentation automatically."),localize("editor.autoIndent.keep","The editor will keep the current line's indentation."),localize("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),localize("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),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.")],description:localize("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:register(new EditorBooleanOption(12,"automaticLayout",false)),autoSurround:register(new EditorStringEnumOption(13,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[localize("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),localize("editor.autoSurround.quotes","Surround with quotes but not brackets."),localize("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:localize("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:register(new BracketPairColorization),bracketPairGuides:register(new GuideOptions),stickyTabStops:register(new EditorBooleanOption(114,"stickyTabStops",false,{description:localize("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:register(new EditorBooleanOption(16,"codeLens",true,{description:localize("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:register(new EditorStringOption(17,"codeLensFontFamily","",{description:localize("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:register(new EditorIntOption(18,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:localize("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:register(new EditorBooleanOption(19,"colorDecorators",true,{description:localize("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:register(new EditorStringEnumOption(145,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[localize("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),localize("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),localize("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:localize("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:register(new EditorIntOption(20,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:localize("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:register(new EditorBooleanOption(21,"columnSelection",false,{description:localize("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:register(new EditorComments),contextmenu:register(new EditorBooleanOption(23,"contextmenu",true)),copyWithSyntaxHighlighting:register(new EditorBooleanOption(24,"copyWithSyntaxHighlighting",true,{description:localize("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:register(new EditorEnumOption(25,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],_cursorBlinkingStyleFromString,{description:localize("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:register(new EditorStringEnumOption(26,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[localize("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),localize("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),localize("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:localize("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:register(new EditorEnumOption(27,"cursorStyle",TextEditorCursorStyle.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],_cursorStyleFromString,{description:localize("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:register(new EditorIntOption(28,"cursorSurroundingLines",0,0,1073741824,{description:localize("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:register(new EditorStringEnumOption(29,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[localize("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),localize("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:localize("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:register(new EditorIntOption(30,"cursorWidth",0,0,1073741824,{markdownDescription:localize("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:register(new EditorBooleanOption(31,"disableLayerHinting",false)),disableMonospaceOptimizations:register(new EditorBooleanOption(32,"disableMonospaceOptimizations",false)),domReadOnly:register(new EditorBooleanOption(33,"domReadOnly",false)),dragAndDrop:register(new EditorBooleanOption(34,"dragAndDrop",true,{description:localize("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:register(new EditorEmptySelectionClipboard),dropIntoEditor:register(new EditorDropIntoEditor),stickyScroll:register(new EditorStickyScroll),experimentalWhitespaceRendering:register(new EditorStringEnumOption(37,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[localize("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),localize("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),localize("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:localize("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:register(new EditorStringOption(38,"extraEditorClassName","")),fastScrollSensitivity:register(new EditorFloatOption(39,"fastScrollSensitivity",5,(x=>x<=0?5:x),{markdownDescription:localize("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:register(new EditorFind),fixedOverflowWidgets:register(new EditorBooleanOption(41,"fixedOverflowWidgets",false)),folding:register(new EditorBooleanOption(42,"folding",true,{description:localize("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:register(new EditorStringEnumOption(43,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[localize("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),localize("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:localize("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:register(new EditorBooleanOption(44,"foldingHighlight",true,{description:localize("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:register(new EditorBooleanOption(45,"foldingImportsByDefault",false,{description:localize("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:register(new EditorIntOption(46,"foldingMaximumRegions",5e3,10,65e3,{description:localize("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:register(new EditorBooleanOption(47,"unfoldOnClickAfterEndOfLine",false,{description:localize("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:register(new EditorStringOption(48,"fontFamily",EDITOR_FONT_DEFAULTS.fontFamily,{description:localize("fontFamily","Controls the font family.")})),fontInfo:register(new EditorFontInfo),fontLigatures2:register(new EditorFontLigatures),fontSize:register(new EditorFontSize),fontWeight:register(new EditorFontWeight),fontVariations:register(new EditorFontVariations),formatOnPaste:register(new EditorBooleanOption(54,"formatOnPaste",false,{description: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.")})),formatOnType:register(new EditorBooleanOption(55,"formatOnType",false,{description:localize("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:register(new EditorBooleanOption(56,"glyphMargin",true,{description:localize("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:register(new EditorGoToLocation),hideCursorInOverviewRuler:register(new EditorBooleanOption(58,"hideCursorInOverviewRuler",false,{description:localize("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:register(new EditorHover),inDiffEditor:register(new EditorBooleanOption(60,"inDiffEditor",false)),letterSpacing:register(new EditorFloatOption(62,"letterSpacing",EDITOR_FONT_DEFAULTS.letterSpacing,(x=>EditorFloatOption.clamp(x,-5,20)),{description:localize("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:register(new EditorLightbulb),lineDecorationsWidth:register(new EditorLineDecorationsWidth),lineHeight:register(new EditorLineHeight),lineNumbers:register(new EditorRenderLineNumbersOption),lineNumbersMinChars:register(new EditorIntOption(67,"lineNumbersMinChars",5,1,300)),linkedEditing:register(new EditorBooleanOption(68,"linkedEditing",false,{description:localize("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:register(new EditorBooleanOption(69,"links",true,{description:localize("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:register(new EditorStringEnumOption(70,"matchBrackets","always",["always","near","never"],{description:localize("matchBrackets","Highlight matching brackets.")})),minimap:register(new EditorMinimap),mouseStyle:register(new EditorStringEnumOption(72,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:register(new EditorFloatOption(73,"mouseWheelScrollSensitivity",1,(x=>x===0?1:x),{markdownDescription:localize("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:register(new EditorBooleanOption(74,"mouseWheelZoom",false,{markdownDescription:localize("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:register(new EditorBooleanOption(75,"multiCursorMergeOverlapping",true,{description:localize("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:register(new EditorEnumOption(76,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],_multiCursorModifierFromString,{markdownEnumDescriptions:[localize("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),localize("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:localize({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"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](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:register(new EditorStringEnumOption(77,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[localize("multiCursorPaste.spread","Each cursor pastes a single line of the text."),localize("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:localize("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:register(new EditorIntOption(78,"multiCursorLimit",1e4,1,1e5,{markdownDescription:localize("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:register(new EditorBooleanOption(79,"occurrencesHighlight",true,{description:localize("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:register(new EditorBooleanOption(80,"overviewRulerBorder",true,{description:localize("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:register(new EditorIntOption(81,"overviewRulerLanes",3,0,3)),padding:register(new EditorPadding),pasteAs:register(new EditorPasteAs),parameterHints:register(new EditorParameterHints),peekWidgetDefaultFocus:register(new EditorStringEnumOption(85,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[localize("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),localize("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:localize("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:register(new EditorBooleanOption(86,"definitionLinkOpensInPeek",false,{description:localize("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:register(new EditorQuickSuggestions),quickSuggestionsDelay:register(new EditorIntOption(88,"quickSuggestionsDelay",10,0,1073741824,{description:localize("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:register(new EditorBooleanOption(89,"readOnly",false)),readOnlyMessage:register(new ReadonlyMessage),renameOnType:register(new EditorBooleanOption(91,"renameOnType",false,{description:localize("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:localize("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:register(new EditorBooleanOption(92,"renderControlCharacters",true,{description:localize("renderControlCharacters","Controls whether the editor should render control characters."),restricted:true})),renderFinalNewline:register(new EditorStringEnumOption(93,"renderFinalNewline",isLinux?"dimmed":"on",["off","on","dimmed"],{description:localize("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:register(new EditorStringEnumOption(94,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",localize("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:localize("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:register(new EditorBooleanOption(95,"renderLineHighlightOnlyWhenFocus",false,{description:localize("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:register(new EditorStringEnumOption(96,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:register(new EditorStringEnumOption(97,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",localize("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),localize("renderWhitespace.selection","Render whitespace characters only on selected text."),localize("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:localize("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:register(new EditorIntOption(98,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:register(new EditorBooleanOption(99,"roundedSelection",true,{description:localize("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:register(new EditorRulers),scrollbar:register(new EditorScrollbar),scrollBeyondLastColumn:register(new EditorIntOption(102,"scrollBeyondLastColumn",4,0,1073741824,{description:localize("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:register(new EditorBooleanOption(103,"scrollBeyondLastLine",true,{description:localize("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:register(new EditorBooleanOption(104,"scrollPredominantAxis",true,{description: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.")})),selectionClipboard:register(new EditorBooleanOption(105,"selectionClipboard",true,{description:localize("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:isLinux})),selectionHighlight:register(new EditorBooleanOption(106,"selectionHighlight",true,{description:localize("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:register(new EditorBooleanOption(107,"selectOnLineNumbers",true)),showFoldingControls:register(new EditorStringEnumOption(108,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[localize("showFoldingControls.always","Always show the folding controls."),localize("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),localize("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:localize("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:register(new EditorBooleanOption(109,"showUnused",true,{description:localize("showUnused","Controls fading out of unused code.")})),showDeprecated:register(new EditorBooleanOption(137,"showDeprecated",true,{description:localize("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:register(new EditorInlayHints),snippetSuggestions:register(new EditorStringEnumOption(110,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[localize("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),localize("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),localize("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),localize("snippetSuggestions.none","Do not show snippet suggestions.")],description:localize("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:register(new SmartSelect),smoothScrolling:register(new EditorBooleanOption(112,"smoothScrolling",false,{description:localize("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:register(new EditorIntOption(115,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:register(new EditorSuggest),inlineSuggest:register(new InlineEditorSuggest),inlineCompletionsAccessibilityVerbose:register(new EditorBooleanOption(146,"inlineCompletionsAccessibilityVerbose",false,{description:localize("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:register(new EditorIntOption(117,"suggestFontSize",0,0,1e3,{markdownDescription:localize("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:register(new EditorIntOption(118,"suggestLineHeight",0,0,1e3,{markdownDescription:localize("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:register(new EditorBooleanOption(119,"suggestOnTriggerCharacters",true,{description:localize("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:register(new EditorStringEnumOption(120,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[localize("suggestSelection.first","Always select the first suggestion."),localize("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),localize("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:localize("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:register(new EditorStringEnumOption(121,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[localize("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),localize("tabCompletion.off","Disable tab completions."),localize("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:localize("tabCompletion","Enables tab completions.")})),tabIndex:register(new EditorIntOption(122,"tabIndex",0,-1,1073741824)),unicodeHighlight:register(new UnicodeHighlight),unusualLineTerminators:register(new EditorStringEnumOption(124,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[localize("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),localize("unusualLineTerminators.off","Unusual line terminators are ignored."),localize("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:localize("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:register(new EditorBooleanOption(125,"useShadowDOM",true)),useTabStops:register(new EditorBooleanOption(126,"useTabStops",true,{description:localize("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:register(new EditorStringEnumOption(127,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[localize("wordBreak.normal","Use the default line break rule."),localize("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:localize("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:register(new EditorStringOption(128,"wordSeparators",USUAL_WORD_SEPARATORS,{description:localize("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:register(new EditorStringEnumOption(129,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[localize("wordWrap.off","Lines will never wrap."),localize("wordWrap.on","Lines will wrap at the viewport width."),localize({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),localize({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:localize({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:register(new EditorStringOption(130,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:register(new EditorStringOption(131,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:register(new EditorIntOption(132,"wordWrapColumn",80,1,1073741824,{markdownDescription:localize({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:register(new EditorStringEnumOption(133,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:register(new EditorStringEnumOption(134,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:register(new EditorClassName),defaultColorDecorators:register(new EditorBooleanOption(144,"defaultColorDecorators",false,{markdownDescription:localize("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:register(new EditorPixelRatio),tabFocusMode:register(new EditorBooleanOption(141,"tabFocusMode",false,{markdownDescription:localize("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:register(new EditorLayoutInfoComputer),wrappingInfo:register(new EditorWrappingInfoComputer),wrappingIndent:register(new WrappingIndentOption),wrappingStrategy:register(new WrappingStrategy)}}});function onUnexpectedError(e){if(!isCancellationError(e)){errorHandler.onUnexpectedError(e)}return void 0}function onUnexpectedExternalError(e){if(!isCancellationError(e)){errorHandler.onUnexpectedExternalError(e)}return void 0}function transformErrorForSerialization(error){if(error instanceof Error){const{name:name,message:message}=error;const stack=error.stacktrace||error.stack;return{$isError:true,name:name,message:message,stack:stack,noTelemetry:ErrorNoTelemetry.isErrorNoTelemetry(error)}}return error}function isCancellationError(error){if(error instanceof CancellationError){return true}return error instanceof Error&&error.name===canceledName&&error.message===canceledName}function canceled(){const error=new Error(canceledName);error.name=error.message;return error}function illegalArgument(name){if(name){return new Error(`Illegal argument: ${name}`)}else{return new Error("Illegal argument")}}function illegalState(name){if(name){return new Error(`Illegal state: ${name}`)}else{return new Error("Illegal state")}}var ErrorHandler,errorHandler,canceledName,CancellationError,NotSupportedError,ErrorNoTelemetry,BugIndicatingError;var init_errors=__esm({"node_modules/monaco-editor/esm/vs/base/common/errors.js"(){ErrorHandler=class{constructor(){this.listeners=[];this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack){if(ErrorNoTelemetry.isErrorNoTelemetry(e)){throw new ErrorNoTelemetry(e.message+"\n\n"+e.stack)}throw new Error(e.message+"\n\n"+e.stack)}throw e}),0)}}emit(e){this.listeners.forEach((listener=>{listener(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e);this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};errorHandler=new ErrorHandler;canceledName="Canceled";CancellationError=class extends Error{constructor(){super(canceledName);this.name=this.message}};NotSupportedError=class extends Error{constructor(message){super("NotSupported");if(message){this.message=message}}};ErrorNoTelemetry=class extends Error{constructor(msg){super(msg);this.name="CodeExpectedError"}static fromError(err){if(err instanceof ErrorNoTelemetry){return err}const result=new ErrorNoTelemetry;result.message=err.message;result.stack=err.stack;return result}static isErrorNoTelemetry(err){return err.name==="CodeExpectedError"}};BugIndicatingError=class extends Error{constructor(message){super(message||"An unexpected bug occurred.");Object.setPrototypeOf(this,BugIndicatingError.prototype)}}}});function once(fn){const _this=this;let didCall=false;let result;return function(){if(didCall){return result}didCall=true;result=fn.apply(_this,arguments);return result}}var init_functional=__esm({"node_modules/monaco-editor/esm/vs/base/common/functional.js"(){}});function setDisposableTracker(tracker){disposableTracker=tracker}function trackDisposable(x){disposableTracker===null||disposableTracker===void 0?void 0:disposableTracker.trackDisposable(x);return x}function markAsDisposed(disposable){disposableTracker===null||disposableTracker===void 0?void 0:disposableTracker.markAsDisposed(disposable)}function setParentOfDisposable(child,parent){disposableTracker===null||disposableTracker===void 0?void 0:disposableTracker.setParent(child,parent)}function setParentOfDisposables(children,parent){if(!disposableTracker){return}for(const child of children){disposableTracker.setParent(child,parent)}}function markAsSingleton(singleton){disposableTracker===null||disposableTracker===void 0?void 0:disposableTracker.markAsSingleton(singleton);return singleton}function isDisposable(thing){return typeof thing.dispose==="function"&&thing.dispose.length===0}function dispose(arg){if(Iterable.is(arg)){const errors=[];for(const d of arg){if(d){try{d.dispose()}catch(e){errors.push(e)}}}if(errors.length===1){throw errors[0]}else if(errors.length>1){throw new AggregateError(errors,"Encountered errors while disposing of store")}return Array.isArray(arg)?[]:arg}else if(arg){arg.dispose();return arg}}function combinedDisposable(...disposables){const parent=toDisposable((()=>dispose(disposables)));setParentOfDisposables(disposables,parent);return parent}function toDisposable(fn){const self2=trackDisposable({dispose:once((()=>{markAsDisposed(self2);fn()}))});return self2}var TRACK_DISPOSABLES,disposableTracker,DisposableStore,Disposable,MutableDisposable,RefCountedDisposable,ImmortalReference,DisposableMap;var init_lifecycle=__esm({"node_modules/monaco-editor/esm/vs/base/common/lifecycle.js"(){init_functional();init_iterator();TRACK_DISPOSABLES=false;disposableTracker=null;if(TRACK_DISPOSABLES){const __is_disposable_tracked__="__is_disposable_tracked__";setDisposableTracker(new class{trackDisposable(x){const stack=new Error("Potentially leaked disposable").stack;setTimeout((()=>{if(!x[__is_disposable_tracked__]){console.log(stack)}}),3e3)}setParent(child,parent){if(child&&child!==Disposable.None){try{child[__is_disposable_tracked__]=true}catch(_a6){}}}markAsDisposed(disposable){if(disposable&&disposable!==Disposable.None){try{disposable[__is_disposable_tracked__]=true}catch(_a6){}}}markAsSingleton(disposable){}})}DisposableStore=class{constructor(){this._toDispose=new Set;this._isDisposed=false;trackDisposable(this)}dispose(){if(this._isDisposed){return}markAsDisposed(this);this._isDisposed=true;this.clear()}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size===0){return}try{dispose(this._toDispose)}finally{this._toDispose.clear()}}add(o){if(!o){return o}if(o===this){throw new Error("Cannot register a disposable on itself!")}setParentOfDisposable(o,this);if(this._isDisposed){if(!DisposableStore.DISABLE_DISPOSED_WARNING){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)}}else{this._toDispose.add(o)}return o}};DisposableStore.DISABLE_DISPOSED_WARNING=false;Disposable=class{constructor(){this._store=new DisposableStore;trackDisposable(this);setParentOfDisposable(this._store,this)}dispose(){markAsDisposed(this);this._store.dispose()}_register(o){if(o===this){throw new Error("Cannot register a disposable on itself!")}return this._store.add(o)}};Disposable.None=Object.freeze({dispose(){}});MutableDisposable=class{constructor(){this._isDisposed=false;trackDisposable(this)}get value(){return this._isDisposed?void 0:this._value}set value(value){var _a6;if(this._isDisposed||value===this._value){return}(_a6=this._value)===null||_a6===void 0?void 0:_a6.dispose();if(value){setParentOfDisposable(value,this)}this._value=value}clear(){this.value=void 0}dispose(){var _a6;this._isDisposed=true;markAsDisposed(this);(_a6=this._value)===null||_a6===void 0?void 0:_a6.dispose();this._value=void 0}};RefCountedDisposable=class{constructor(_disposable){this._disposable=_disposable;this._counter=1}acquire(){this._counter++;return this}release(){if(--this._counter===0){this._disposable.dispose()}return this}};ImmortalReference=class{constructor(object){this.object=object}dispose(){}};DisposableMap=class{constructor(){this._store=new Map;this._isDisposed=false;trackDisposable(this)}dispose(){markAsDisposed(this);this._isDisposed=true;this.clearAndDisposeAll()}clearAndDisposeAll(){if(!this._store.size){return}try{dispose(this._store.values())}finally{this._store.clear()}}get(key){return this._store.get(key)}set(key,value,skipDisposeOnOverwrite=false){var _a6;if(this._isDisposed){console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack)}if(!skipDisposeOnOverwrite){(_a6=this._store.get(key))===null||_a6===void 0?void 0:_a6.dispose()}this._store.set(key,value)}deleteAndDispose(key){var _a6;(_a6=this._store.get(key))===null||_a6===void 0?void 0:_a6.dispose();this._store.delete(key)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}}});var hasPerformanceNow,StopWatch;var init_stopwatch=__esm({"node_modules/monaco-editor/esm/vs/base/common/stopwatch.js"(){hasPerformanceNow=globalThis.performance&&typeof globalThis.performance.now==="function";StopWatch=class{static create(highResolution){return new StopWatch(highResolution)}constructor(highResolution){this._now=hasPerformanceNow&&highResolution===false?Date.now:globalThis.performance.now.bind(globalThis.performance);this._startTime=this._now();this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){if(this._stopTime!==-1){return this._stopTime-this._startTime}return this._now()-this._startTime}}}});var _enableDisposeWithListenerWarning,_enableSnapshotPotentialLeakWarning,Event,EventProfiling,_globalLeakWarningThreshold,LeakageMonitor,Stacktrace,UniqueContainer,compactionThreshold,forEachListener,Emitter,createEventDeliveryQueue,EventDeliveryQueuePrivate,PauseableEmitter,DebounceEmitter,MicrotaskEmitter,EventMultiplexer,EventBufferer,Relay;var init_event=__esm({"node_modules/monaco-editor/esm/vs/base/common/event.js"(){init_errors();init_functional();init_lifecycle();init_linkedList();init_stopwatch();_enableDisposeWithListenerWarning=false;_enableSnapshotPotentialLeakWarning=false;(function(Event2){Event2.None=()=>Disposable.None;function _addLeakageTraceLogic(options2){if(_enableSnapshotPotentialLeakWarning){const{onDidAddListener:origListenerDidAdd}=options2;const stack=Stacktrace.create();let count=0;options2.onDidAddListener=()=>{if(++count===2){console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here");stack.print()}origListenerDidAdd===null||origListenerDidAdd===void 0?void 0:origListenerDidAdd()}}}function defer(event,disposable){return debounce(event,(()=>void 0),0,void 0,true,void 0,disposable)}Event2.defer=defer;function once3(event){return(listener,thisArgs=null,disposables)=>{let didFire=false;let result=void 0;result=event((e=>{if(didFire){return}else if(result){result.dispose()}else{didFire=true}return listener.call(thisArgs,e)}),null,disposables);if(didFire){result.dispose()}return result}}Event2.once=once3;function map(event,map2,disposable){return snapshot(((listener,thisArgs=null,disposables)=>event((i=>listener.call(thisArgs,map2(i))),null,disposables)),disposable)}Event2.map=map;function forEach(event,each,disposable){return snapshot(((listener,thisArgs=null,disposables)=>event((i=>{each(i);listener.call(thisArgs,i)}),null,disposables)),disposable)}Event2.forEach=forEach;function filter(event,filter2,disposable){return snapshot(((listener,thisArgs=null,disposables)=>event((e=>filter2(e)&&listener.call(thisArgs,e)),null,disposables)),disposable)}Event2.filter=filter;function signal(event){return event}Event2.signal=signal;function any(...events){return(listener,thisArgs=null,disposables)=>combinedDisposable(...events.map((event=>event((e=>listener.call(thisArgs,e)),null,disposables))))}Event2.any=any;function reduce(event,merge,initial,disposable){let output=initial;return map(event,(e=>{output=merge(output,e);return output}),disposable)}Event2.reduce=reduce;function snapshot(event,disposable){let listener;const options2={onWillAddFirstListener(){listener=event(emitter.fire,emitter)},onDidRemoveLastListener(){listener===null||listener===void 0?void 0:listener.dispose()}};if(!disposable){_addLeakageTraceLogic(options2)}const emitter=new Emitter(options2);disposable===null||disposable===void 0?void 0:disposable.add(emitter);return emitter.event}function debounce(event,merge,delay=100,leading=false,flushOnListenerRemove=false,leakWarningThreshold,disposable){let subscription;let output=void 0;let handle=void 0;let numDebouncedCalls=0;let doFire;const options2={leakWarningThreshold:leakWarningThreshold,onWillAddFirstListener(){subscription=event((cur=>{numDebouncedCalls++;output=merge(output,cur);if(leading&&!handle){emitter.fire(output);output=void 0}doFire=()=>{const _output=output;output=void 0;handle=void 0;if(!leading||numDebouncedCalls>1){emitter.fire(_output)}numDebouncedCalls=0};if(typeof delay==="number"){clearTimeout(handle);handle=setTimeout(doFire,delay)}else{if(handle===void 0){handle=0;queueMicrotask(doFire)}}}))},onWillRemoveListener(){if(flushOnListenerRemove&&numDebouncedCalls>0){doFire===null||doFire===void 0?void 0:doFire()}},onDidRemoveLastListener(){doFire=void 0;subscription.dispose()}};if(!disposable){_addLeakageTraceLogic(options2)}const emitter=new Emitter(options2);disposable===null||disposable===void 0?void 0:disposable.add(emitter);return emitter.event}Event2.debounce=debounce;function accumulate(event,delay=0,disposable){return Event2.debounce(event,((last,e)=>{if(!last){return[e]}last.push(e);return last}),delay,void 0,true,void 0,disposable)}Event2.accumulate=accumulate;function latch(event,equals4=((a,b)=>a===b),disposable){let firstCall=true;let cache;return filter(event,(value=>{const shouldEmit=firstCall||!equals4(value,cache);firstCall=false;cache=value;return shouldEmit}),disposable)}Event2.latch=latch;function split(event,isT,disposable){return[Event2.filter(event,isT,disposable),Event2.filter(event,(e=>!isT(e)),disposable)]}Event2.split=split;function buffer(event,flushAfterTimeout=false,_buffer=[]){let buffer2=_buffer.slice();let listener=event((e=>{if(buffer2){buffer2.push(e)}else{emitter.fire(e)}}));const flush=()=>{buffer2===null||buffer2===void 0?void 0:buffer2.forEach((e=>emitter.fire(e)));buffer2=null};const emitter=new Emitter({onWillAddFirstListener(){if(!listener){listener=event((e=>emitter.fire(e)))}},onDidAddFirstListener(){if(buffer2){if(flushAfterTimeout){setTimeout(flush)}else{flush()}}},onDidRemoveLastListener(){if(listener){listener.dispose()}listener=null}});return emitter.event}Event2.buffer=buffer;class ChainableEvent{constructor(event){this.event=event;this.disposables=new DisposableStore}map(fn){return new ChainableEvent(map(this.event,fn,this.disposables))}forEach(fn){return new ChainableEvent(forEach(this.event,fn,this.disposables))}filter(fn){return new ChainableEvent(filter(this.event,fn,this.disposables))}reduce(merge,initial){return new ChainableEvent(reduce(this.event,merge,initial,this.disposables))}latch(){return new ChainableEvent(latch(this.event,void 0,this.disposables))}debounce(merge,delay=100,leading=false,flushOnListenerRemove=false,leakWarningThreshold){return new ChainableEvent(debounce(this.event,merge,delay,leading,flushOnListenerRemove,leakWarningThreshold,this.disposables))}on(listener,thisArgs,disposables){return this.event(listener,thisArgs,disposables)}once(listener,thisArgs,disposables){return once3(this.event)(listener,thisArgs,disposables)}dispose(){this.disposables.dispose()}}function chain(event){return new ChainableEvent(event)}Event2.chain=chain;function fromNodeEventEmitter(emitter,eventName,map2=(id=>id)){const fn=(...args)=>result.fire(map2(...args));const onFirstListenerAdd=()=>emitter.on(eventName,fn);const onLastListenerRemove=()=>emitter.removeListener(eventName,fn);const result=new Emitter({onWillAddFirstListener:onFirstListenerAdd,onDidRemoveLastListener:onLastListenerRemove});return result.event}Event2.fromNodeEventEmitter=fromNodeEventEmitter;function fromDOMEventEmitter(emitter,eventName,map2=(id=>id)){const fn=(...args)=>result.fire(map2(...args));const onFirstListenerAdd=()=>emitter.addEventListener(eventName,fn);const onLastListenerRemove=()=>emitter.removeEventListener(eventName,fn);const result=new Emitter({onWillAddFirstListener:onFirstListenerAdd,onDidRemoveLastListener:onLastListenerRemove});return result.event}Event2.fromDOMEventEmitter=fromDOMEventEmitter;function toPromise(event){return new Promise((resolve2=>once3(event)(resolve2)))}Event2.toPromise=toPromise;function fromPromise(promise){const result=new Emitter;promise.then((res=>{result.fire(res)}),(()=>{result.fire(void 0)})).finally((()=>{result.dispose()}));return result.event}Event2.fromPromise=fromPromise;function runAndSubscribe(event,handler){handler(void 0);return event((e=>handler(e)))}Event2.runAndSubscribe=runAndSubscribe;function runAndSubscribeWithStore(event,handler){let store=null;function run(e){store===null||store===void 0?void 0:store.dispose();store=new DisposableStore;handler(e,store)}run(void 0);const disposable=event((e=>run(e)));return toDisposable((()=>{disposable.dispose();store===null||store===void 0?void 0:store.dispose()}))}Event2.runAndSubscribeWithStore=runAndSubscribeWithStore;class EmitterObserver{constructor(_observable,store){this._observable=_observable;this._counter=0;this._hasChanged=false;const options2={onWillAddFirstListener:()=>{_observable.addObserver(this)},onDidRemoveLastListener:()=>{_observable.removeObserver(this)}};if(!store){_addLeakageTraceLogic(options2)}this.emitter=new Emitter(options2);if(store){store.add(this.emitter)}}beginUpdate(_observable){this._counter++}handlePossibleChange(_observable){}handleChange(_observable,_change){this._hasChanged=true}endUpdate(_observable){this._counter--;if(this._counter===0){this._observable.reportChanges();if(this._hasChanged){this._hasChanged=false;this.emitter.fire(this._observable.get())}}}}function fromObservable(obs,store){const observer=new EmitterObserver(obs,store);return observer.emitter.event}Event2.fromObservable=fromObservable;function fromObservableLight(observable){return listener=>{let count=0;let didChange=false;const observer={beginUpdate(){count++},endUpdate(){count--;if(count===0){observable.reportChanges();if(didChange){didChange=false;listener()}}},handlePossibleChange(){},handleChange(){didChange=true}};observable.addObserver(observer);observable.reportChanges();return{dispose(){observable.removeObserver(observer)}}}}Event2.fromObservableLight=fromObservableLight})(Event||(Event={}));EventProfiling=class{constructor(name){this.listenerCount=0;this.invocationCount=0;this.elapsedOverall=0;this.durations=[];this.name=`${name}_${EventProfiling._idPool++}`;EventProfiling.all.add(this)}start(listenerCount){this._stopWatch=new StopWatch;this.listenerCount=listenerCount}stop(){if(this._stopWatch){const elapsed=this._stopWatch.elapsed();this.durations.push(elapsed);this.elapsedOverall+=elapsed;this.invocationCount+=1;this._stopWatch=void 0}}};EventProfiling.all=new Set;EventProfiling._idPool=0;_globalLeakWarningThreshold=-1;LeakageMonitor=class{constructor(threshold,name=Math.random().toString(18).slice(2,5)){this.threshold=threshold;this.name=name;this._warnCountdown=0}dispose(){var _a6;(_a6=this._stacks)===null||_a6===void 0?void 0:_a6.clear()}check(stack,listenerCount){const threshold=this.threshold;if(threshold<=0||listenerCount{const count2=this._stacks.get(stack.value)||0;this._stacks.set(stack.value,count2-1)}}};Stacktrace=class{static create(){var _a6;return new Stacktrace((_a6=(new Error).stack)!==null&&_a6!==void 0?_a6:"")}constructor(value){this.value=value}print(){console.warn(this.value.split("\n").slice(2).join("\n"))}};UniqueContainer=class{constructor(value){this.value=value}};compactionThreshold=2;forEachListener=(listeners,fn)=>{if(listeners instanceof UniqueContainer){fn(listeners)}else{for(let i=0;i0||((_a6=this._options)===null||_a6===void 0?void 0:_a6.leakWarningThreshold)?new LeakageMonitor((_c2=(_b3=this._options)===null||_b3===void 0?void 0:_b3.leakWarningThreshold)!==null&&_c2!==void 0?_c2:_globalLeakWarningThreshold):void 0;this._perfMon=((_d2=this._options)===null||_d2===void 0?void 0:_d2._profName)?new EventProfiling(this._options._profName):void 0;this._deliveryQueue=(_e2=this._options)===null||_e2===void 0?void 0:_e2.deliveryQueue}dispose(){var _a6,_b3,_c2,_d2;if(!this._disposed){this._disposed=true;if(((_a6=this._deliveryQueue)===null||_a6===void 0?void 0:_a6.current)===this){this._deliveryQueue.reset()}if(this._listeners){if(_enableDisposeWithListenerWarning){const listeners=this._listeners;queueMicrotask((()=>{forEachListener(listeners,(l=>{var _a7;return(_a7=l.stack)===null||_a7===void 0?void 0:_a7.print()}))}))}this._listeners=void 0;this._size=0}(_c2=(_b3=this._options)===null||_b3===void 0?void 0:_b3.onDidRemoveLastListener)===null||_c2===void 0?void 0:_c2.call(_b3);(_d2=this._leakageMon)===null||_d2===void 0?void 0:_d2.dispose()}}get event(){var _a6;(_a6=this._event)!==null&&_a6!==void 0?_a6:this._event=(callback,thisArgs,disposables)=>{var _a7,_b3,_c2,_d2,_e2;if(this._leakageMon&&this._size>this._leakageMon.threshold*3){console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`);return Disposable.None}if(this._disposed){return Disposable.None}if(thisArgs){callback=callback.bind(thisArgs)}const contained=new UniqueContainer(callback);let removeMonitor;let stack;if(this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)){contained.stack=Stacktrace.create();removeMonitor=this._leakageMon.check(contained.stack,this._size+1)}if(_enableDisposeWithListenerWarning){contained.stack=stack!==null&&stack!==void 0?stack:Stacktrace.create()}if(!this._listeners){(_b3=(_a7=this._options)===null||_a7===void 0?void 0:_a7.onWillAddFirstListener)===null||_b3===void 0?void 0:_b3.call(_a7,this);this._listeners=contained;(_d2=(_c2=this._options)===null||_c2===void 0?void 0:_c2.onDidAddFirstListener)===null||_d2===void 0?void 0:_d2.call(_c2,this)}else if(this._listeners instanceof UniqueContainer){(_e2=this._deliveryQueue)!==null&&_e2!==void 0?_e2:this._deliveryQueue=new EventDeliveryQueuePrivate;this._listeners=[this._listeners,contained]}else{this._listeners.push(contained)}this._size++;const result=toDisposable((()=>{removeMonitor===null||removeMonitor===void 0?void 0:removeMonitor();this._removeListener(contained)}));if(disposables instanceof DisposableStore){disposables.add(result)}else if(Array.isArray(disposables)){disposables.push(result)}return result};return this._event}_removeListener(listener){var _a6,_b3,_c2,_d2;(_b3=(_a6=this._options)===null||_a6===void 0?void 0:_a6.onWillRemoveListener)===null||_b3===void 0?void 0:_b3.call(_a6,this);if(!this._listeners){return}if(this._size===1){this._listeners=void 0;(_d2=(_c2=this._options)===null||_c2===void 0?void 0:_c2.onDidRemoveLastListener)===null||_d2===void 0?void 0:_d2.call(_c2,this);this._size=0;return}const listeners=this._listeners;const index=listeners.indexOf(listener);if(index===-1){console.log("disposed?",this._disposed);console.log("size?",this._size);console.log("arr?",JSON.stringify(this._listeners));throw new Error("Attempted to dispose unknown listener")}this._size--;listeners[index]=void 0;const adjustDeliveryQueue=this._deliveryQueue.current===this;if(this._size*compactionThreshold<=listeners.length){let n=0;for(let i=0;i0}};createEventDeliveryQueue=()=>new EventDeliveryQueuePrivate;EventDeliveryQueuePrivate=class{constructor(){this.i=-1;this.end=0}enqueue(emitter,value,end){this.i=0;this.end=end;this.current=emitter;this.value=value}reset(){this.i=this.end;this.current=void 0;this.value=void 0}};PauseableEmitter=class extends Emitter{constructor(options2){super(options2);this._isPaused=0;this._eventQueue=new LinkedList;this._mergeFn=options2===null||options2===void 0?void 0:options2.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0){if(this._mergeFn){if(this._eventQueue.size>0){const events=Array.from(this._eventQueue);this._eventQueue.clear();super.fire(this._mergeFn(events))}}else{while(!this._isPaused&&this._eventQueue.size!==0){super.fire(this._eventQueue.shift())}}}}fire(event){if(this._size){if(this._isPaused!==0){this._eventQueue.push(event)}else{super.fire(event)}}}};DebounceEmitter=class extends PauseableEmitter{constructor(options2){var _a6;super(options2);this._delay=(_a6=options2.delay)!==null&&_a6!==void 0?_a6:100}fire(event){if(!this._handle){this.pause();this._handle=setTimeout((()=>{this._handle=void 0;this.resume()}),this._delay)}super.fire(event)}};MicrotaskEmitter=class extends Emitter{constructor(options2){super(options2);this._queuedEvents=[];this._mergeFn=options2===null||options2===void 0?void 0:options2.merge}fire(event){if(!this.hasListeners()){return}this._queuedEvents.push(event);if(this._queuedEvents.length===1){queueMicrotask((()=>{if(this._mergeFn){super.fire(this._mergeFn(this._queuedEvents))}else{this._queuedEvents.forEach((e=>super.fire(e)))}this._queuedEvents=[]}))}}};EventMultiplexer=class{constructor(){this.hasListeners=false;this.events=[];this.emitter=new Emitter({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(event){const e={event:event,listener:null};this.events.push(e);if(this.hasListeners){this.hook(e)}const dispose2=()=>{if(this.hasListeners){this.unhook(e)}const idx=this.events.indexOf(e);this.events.splice(idx,1)};return toDisposable(once(dispose2))}onFirstListenerAdd(){this.hasListeners=true;this.events.forEach((e=>this.hook(e)))}onLastListenerRemove(){this.hasListeners=false;this.events.forEach((e=>this.unhook(e)))}hook(e){e.listener=e.event((r=>this.emitter.fire(r)))}unhook(e){if(e.listener){e.listener.dispose()}e.listener=null}dispose(){this.emitter.dispose()}};EventBufferer=class{constructor(){this.buffers=[]}wrapEvent(event){return(listener,thisArgs,disposables)=>event((i=>{const buffer=this.buffers[this.buffers.length-1];if(buffer){buffer.push((()=>listener.call(thisArgs,i)))}else{listener.call(thisArgs,i)}}),void 0,disposables)}bufferEvents(fn){const buffer=[];this.buffers.push(buffer);const r=fn();this.buffers.pop();buffer.forEach((flush=>flush()));return r}};Relay=class{constructor(){this.listening=false;this.inputEvent=Event.None;this.inputEventListener=Disposable.None;this.emitter=new Emitter({onDidAddFirstListener:()=>{this.listening=true;this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=false;this.inputEventListener.dispose()}});this.event=this.emitter.event}set input(event){this.inputEvent=event;if(this.listening){this.inputEventListener.dispose();this.inputEventListener=event(this.emitter.fire,this.emitter)}}dispose(){this.inputEventListener.dispose();this.emitter.dispose()}}}});var shortcutEvent,CancellationToken,MutableToken,CancellationTokenSource;var init_cancellation=__esm({"node_modules/monaco-editor/esm/vs/base/common/cancellation.js"(){init_event();shortcutEvent=Object.freeze((function(callback,context){const handle=setTimeout(callback.bind(context),0);return{dispose(){clearTimeout(handle)}}}));(function(CancellationToken2){function isCancellationToken(thing){if(thing===CancellationToken2.None||thing===CancellationToken2.Cancelled){return true}if(thing instanceof MutableToken){return true}if(!thing||typeof thing!=="object"){return false}return typeof thing.isCancellationRequested==="boolean"&&typeof thing.onCancellationRequested==="function"}CancellationToken2.isCancellationToken=isCancellationToken;CancellationToken2.None=Object.freeze({isCancellationRequested:false,onCancellationRequested:Event.None});CancellationToken2.Cancelled=Object.freeze({isCancellationRequested:true,onCancellationRequested:shortcutEvent})})(CancellationToken||(CancellationToken={}));MutableToken=class{constructor(){this._isCancelled=false;this._emitter=null}cancel(){if(!this._isCancelled){this._isCancelled=true;if(this._emitter){this._emitter.fire(void 0);this.dispose()}}}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){if(this._isCancelled){return shortcutEvent}if(!this._emitter){this._emitter=new Emitter}return this._emitter.event}dispose(){if(this._emitter){this._emitter.dispose();this._emitter=null}}};CancellationTokenSource=class{constructor(parent){this._token=void 0;this._parentListener=void 0;this._parentListener=parent&&parent.onCancellationRequested(this.cancel,this)}get token(){if(!this._token){this._token=new MutableToken}return this._token}cancel(){if(!this._token){this._token=CancellationToken.Cancelled}else if(this._token instanceof MutableToken){this._token.cancel()}}dispose(cancel=false){var _a6;if(cancel){this.cancel()}(_a6=this._parentListener)===null||_a6===void 0?void 0:_a6.dispose();if(!this._token){this._token=CancellationToken.None}else if(this._token instanceof MutableToken){this._token.dispose()}}}}});function KeyChord(firstPart,secondPart){const chordPart=(secondPart&65535)<<16>>>0;return(firstPart|chordPart)>>>0}var KeyCodeStrMap,uiMap,userSettingsUSMap,userSettingsGeneralMap,EVENT_KEY_CODE_MAP,NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE,scanCodeIntToStr,scanCodeStrToInt,scanCodeLowerCaseStrToInt,IMMUTABLE_CODE_TO_KEY_CODE,IMMUTABLE_KEY_CODE_TO_CODE,KeyCodeUtils;var init_keyCodes=__esm({"node_modules/monaco-editor/esm/vs/base/common/keyCodes.js"(){KeyCodeStrMap=class{constructor(){this._keyCodeToStr=[];this._strToKeyCode=Object.create(null)}define(keyCode,str){this._keyCodeToStr[keyCode]=str;this._strToKeyCode[str.toLowerCase()]=keyCode}keyCodeToStr(keyCode){return this._keyCodeToStr[keyCode]}strToKeyCode(str){return this._strToKeyCode[str.toLowerCase()]||0}};uiMap=new KeyCodeStrMap;userSettingsUSMap=new KeyCodeStrMap;userSettingsGeneralMap=new KeyCodeStrMap;EVENT_KEY_CODE_MAP=new Array(230);NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE={};scanCodeIntToStr=[];scanCodeStrToInt=Object.create(null);scanCodeLowerCaseStrToInt=Object.create(null);IMMUTABLE_CODE_TO_KEY_CODE=[];IMMUTABLE_KEY_CODE_TO_CODE=[];for(let i=0;i<=193;i++){IMMUTABLE_CODE_TO_KEY_CODE[i]=-1}for(let i=0;i<=132;i++){IMMUTABLE_KEY_CODE_TO_CODE[i]=-1}(function(){const empty2="";const mappings=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",empty2,empty2],[1,1,"Hyper",0,empty2,0,empty2,empty2,empty2],[1,2,"Super",0,empty2,0,empty2,empty2,empty2],[1,3,"Fn",0,empty2,0,empty2,empty2,empty2],[1,4,"FnLock",0,empty2,0,empty2,empty2,empty2],[1,5,"Suspend",0,empty2,0,empty2,empty2,empty2],[1,6,"Resume",0,empty2,0,empty2,empty2,empty2],[1,7,"Turbo",0,empty2,0,empty2,empty2,empty2],[1,8,"Sleep",0,empty2,0,"VK_SLEEP",empty2,empty2],[1,9,"WakeUp",0,empty2,0,empty2,empty2,empty2],[0,10,"KeyA",31,"A",65,"VK_A",empty2,empty2],[0,11,"KeyB",32,"B",66,"VK_B",empty2,empty2],[0,12,"KeyC",33,"C",67,"VK_C",empty2,empty2],[0,13,"KeyD",34,"D",68,"VK_D",empty2,empty2],[0,14,"KeyE",35,"E",69,"VK_E",empty2,empty2],[0,15,"KeyF",36,"F",70,"VK_F",empty2,empty2],[0,16,"KeyG",37,"G",71,"VK_G",empty2,empty2],[0,17,"KeyH",38,"H",72,"VK_H",empty2,empty2],[0,18,"KeyI",39,"I",73,"VK_I",empty2,empty2],[0,19,"KeyJ",40,"J",74,"VK_J",empty2,empty2],[0,20,"KeyK",41,"K",75,"VK_K",empty2,empty2],[0,21,"KeyL",42,"L",76,"VK_L",empty2,empty2],[0,22,"KeyM",43,"M",77,"VK_M",empty2,empty2],[0,23,"KeyN",44,"N",78,"VK_N",empty2,empty2],[0,24,"KeyO",45,"O",79,"VK_O",empty2,empty2],[0,25,"KeyP",46,"P",80,"VK_P",empty2,empty2],[0,26,"KeyQ",47,"Q",81,"VK_Q",empty2,empty2],[0,27,"KeyR",48,"R",82,"VK_R",empty2,empty2],[0,28,"KeyS",49,"S",83,"VK_S",empty2,empty2],[0,29,"KeyT",50,"T",84,"VK_T",empty2,empty2],[0,30,"KeyU",51,"U",85,"VK_U",empty2,empty2],[0,31,"KeyV",52,"V",86,"VK_V",empty2,empty2],[0,32,"KeyW",53,"W",87,"VK_W",empty2,empty2],[0,33,"KeyX",54,"X",88,"VK_X",empty2,empty2],[0,34,"KeyY",55,"Y",89,"VK_Y",empty2,empty2],[0,35,"KeyZ",56,"Z",90,"VK_Z",empty2,empty2],[0,36,"Digit1",22,"1",49,"VK_1",empty2,empty2],[0,37,"Digit2",23,"2",50,"VK_2",empty2,empty2],[0,38,"Digit3",24,"3",51,"VK_3",empty2,empty2],[0,39,"Digit4",25,"4",52,"VK_4",empty2,empty2],[0,40,"Digit5",26,"5",53,"VK_5",empty2,empty2],[0,41,"Digit6",27,"6",54,"VK_6",empty2,empty2],[0,42,"Digit7",28,"7",55,"VK_7",empty2,empty2],[0,43,"Digit8",29,"8",56,"VK_8",empty2,empty2],[0,44,"Digit9",30,"9",57,"VK_9",empty2,empty2],[0,45,"Digit0",21,"0",48,"VK_0",empty2,empty2],[1,46,"Enter",3,"Enter",13,"VK_RETURN",empty2,empty2],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",empty2,empty2],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",empty2,empty2],[1,49,"Tab",2,"Tab",9,"VK_TAB",empty2,empty2],[1,50,"Space",10,"Space",32,"VK_SPACE",empty2,empty2],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,empty2,0,empty2,empty2,empty2],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",empty2,empty2],[1,64,"F1",59,"F1",112,"VK_F1",empty2,empty2],[1,65,"F2",60,"F2",113,"VK_F2",empty2,empty2],[1,66,"F3",61,"F3",114,"VK_F3",empty2,empty2],[1,67,"F4",62,"F4",115,"VK_F4",empty2,empty2],[1,68,"F5",63,"F5",116,"VK_F5",empty2,empty2],[1,69,"F6",64,"F6",117,"VK_F6",empty2,empty2],[1,70,"F7",65,"F7",118,"VK_F7",empty2,empty2],[1,71,"F8",66,"F8",119,"VK_F8",empty2,empty2],[1,72,"F9",67,"F9",120,"VK_F9",empty2,empty2],[1,73,"F10",68,"F10",121,"VK_F10",empty2,empty2],[1,74,"F11",69,"F11",122,"VK_F11",empty2,empty2],[1,75,"F12",70,"F12",123,"VK_F12",empty2,empty2],[1,76,"PrintScreen",0,empty2,0,empty2,empty2,empty2],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",empty2,empty2],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",empty2,empty2],[1,79,"Insert",19,"Insert",45,"VK_INSERT",empty2,empty2],[1,80,"Home",14,"Home",36,"VK_HOME",empty2,empty2],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",empty2,empty2],[1,82,"Delete",20,"Delete",46,"VK_DELETE",empty2,empty2],[1,83,"End",13,"End",35,"VK_END",empty2,empty2],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",empty2,empty2],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",empty2],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",empty2],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",empty2],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",empty2],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",empty2,empty2],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",empty2,empty2],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",empty2,empty2],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",empty2,empty2],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",empty2,empty2],[1,94,"NumpadEnter",3,empty2,0,empty2,empty2,empty2],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",empty2,empty2],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",empty2,empty2],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",empty2,empty2],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",empty2,empty2],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",empty2,empty2],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",empty2,empty2],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",empty2,empty2],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",empty2,empty2],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",empty2,empty2],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",empty2,empty2],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",empty2,empty2],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",empty2,empty2],[1,107,"ContextMenu",58,"ContextMenu",93,empty2,empty2,empty2],[1,108,"Power",0,empty2,0,empty2,empty2,empty2],[1,109,"NumpadEqual",0,empty2,0,empty2,empty2,empty2],[1,110,"F13",71,"F13",124,"VK_F13",empty2,empty2],[1,111,"F14",72,"F14",125,"VK_F14",empty2,empty2],[1,112,"F15",73,"F15",126,"VK_F15",empty2,empty2],[1,113,"F16",74,"F16",127,"VK_F16",empty2,empty2],[1,114,"F17",75,"F17",128,"VK_F17",empty2,empty2],[1,115,"F18",76,"F18",129,"VK_F18",empty2,empty2],[1,116,"F19",77,"F19",130,"VK_F19",empty2,empty2],[1,117,"F20",78,"F20",131,"VK_F20",empty2,empty2],[1,118,"F21",79,"F21",132,"VK_F21",empty2,empty2],[1,119,"F22",80,"F22",133,"VK_F22",empty2,empty2],[1,120,"F23",81,"F23",134,"VK_F23",empty2,empty2],[1,121,"F24",82,"F24",135,"VK_F24",empty2,empty2],[1,122,"Open",0,empty2,0,empty2,empty2,empty2],[1,123,"Help",0,empty2,0,empty2,empty2,empty2],[1,124,"Select",0,empty2,0,empty2,empty2,empty2],[1,125,"Again",0,empty2,0,empty2,empty2,empty2],[1,126,"Undo",0,empty2,0,empty2,empty2,empty2],[1,127,"Cut",0,empty2,0,empty2,empty2,empty2],[1,128,"Copy",0,empty2,0,empty2,empty2,empty2],[1,129,"Paste",0,empty2,0,empty2,empty2,empty2],[1,130,"Find",0,empty2,0,empty2,empty2,empty2],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",empty2,empty2],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",empty2,empty2],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",empty2,empty2],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",empty2,empty2],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",empty2,empty2],[1,136,"KanaMode",0,empty2,0,empty2,empty2,empty2],[0,137,"IntlYen",0,empty2,0,empty2,empty2,empty2],[1,138,"Convert",0,empty2,0,empty2,empty2,empty2],[1,139,"NonConvert",0,empty2,0,empty2,empty2,empty2],[1,140,"Lang1",0,empty2,0,empty2,empty2,empty2],[1,141,"Lang2",0,empty2,0,empty2,empty2,empty2],[1,142,"Lang3",0,empty2,0,empty2,empty2,empty2],[1,143,"Lang4",0,empty2,0,empty2,empty2,empty2],[1,144,"Lang5",0,empty2,0,empty2,empty2,empty2],[1,145,"Abort",0,empty2,0,empty2,empty2,empty2],[1,146,"Props",0,empty2,0,empty2,empty2,empty2],[1,147,"NumpadParenLeft",0,empty2,0,empty2,empty2,empty2],[1,148,"NumpadParenRight",0,empty2,0,empty2,empty2,empty2],[1,149,"NumpadBackspace",0,empty2,0,empty2,empty2,empty2],[1,150,"NumpadMemoryStore",0,empty2,0,empty2,empty2,empty2],[1,151,"NumpadMemoryRecall",0,empty2,0,empty2,empty2,empty2],[1,152,"NumpadMemoryClear",0,empty2,0,empty2,empty2,empty2],[1,153,"NumpadMemoryAdd",0,empty2,0,empty2,empty2,empty2],[1,154,"NumpadMemorySubtract",0,empty2,0,empty2,empty2,empty2],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",empty2,empty2],[1,156,"NumpadClearEntry",0,empty2,0,empty2,empty2,empty2],[1,0,empty2,5,"Ctrl",17,"VK_CONTROL",empty2,empty2],[1,0,empty2,4,"Shift",16,"VK_SHIFT",empty2,empty2],[1,0,empty2,6,"Alt",18,"VK_MENU",empty2,empty2],[1,0,empty2,57,"Meta",91,"VK_COMMAND",empty2,empty2],[1,157,"ControlLeft",5,empty2,0,"VK_LCONTROL",empty2,empty2],[1,158,"ShiftLeft",4,empty2,0,"VK_LSHIFT",empty2,empty2],[1,159,"AltLeft",6,empty2,0,"VK_LMENU",empty2,empty2],[1,160,"MetaLeft",57,empty2,0,"VK_LWIN",empty2,empty2],[1,161,"ControlRight",5,empty2,0,"VK_RCONTROL",empty2,empty2],[1,162,"ShiftRight",4,empty2,0,"VK_RSHIFT",empty2,empty2],[1,163,"AltRight",6,empty2,0,"VK_RMENU",empty2,empty2],[1,164,"MetaRight",57,empty2,0,"VK_RWIN",empty2,empty2],[1,165,"BrightnessUp",0,empty2,0,empty2,empty2,empty2],[1,166,"BrightnessDown",0,empty2,0,empty2,empty2,empty2],[1,167,"MediaPlay",0,empty2,0,empty2,empty2,empty2],[1,168,"MediaRecord",0,empty2,0,empty2,empty2,empty2],[1,169,"MediaFastForward",0,empty2,0,empty2,empty2,empty2],[1,170,"MediaRewind",0,empty2,0,empty2,empty2,empty2],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",empty2,empty2],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",empty2,empty2],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",empty2,empty2],[1,174,"Eject",0,empty2,0,empty2,empty2,empty2],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",empty2,empty2],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",empty2,empty2],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",empty2,empty2],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",empty2,empty2],[1,179,"LaunchApp1",0,empty2,0,"VK_MEDIA_LAUNCH_APP1",empty2,empty2],[1,180,"SelectTask",0,empty2,0,empty2,empty2,empty2],[1,181,"LaunchScreenSaver",0,empty2,0,empty2,empty2,empty2],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",empty2,empty2],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",empty2,empty2],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",empty2,empty2],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",empty2,empty2],[1,186,"BrowserStop",0,empty2,0,"VK_BROWSER_STOP",empty2,empty2],[1,187,"BrowserRefresh",0,empty2,0,"VK_BROWSER_REFRESH",empty2,empty2],[1,188,"BrowserFavorites",0,empty2,0,"VK_BROWSER_FAVORITES",empty2,empty2],[1,189,"ZoomToggle",0,empty2,0,empty2,empty2,empty2],[1,190,"MailReply",0,empty2,0,empty2,empty2,empty2],[1,191,"MailForward",0,empty2,0,empty2,empty2,empty2],[1,192,"MailSend",0,empty2,0,empty2,empty2,empty2],[1,0,empty2,114,"KeyInComposition",229,empty2,empty2,empty2],[1,0,empty2,116,"ABNT_C2",194,"VK_ABNT_C2",empty2,empty2],[1,0,empty2,96,"OEM_8",223,"VK_OEM_8",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_KANA",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_HANGUL",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_JUNJA",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_FINAL",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_HANJA",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_KANJI",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_CONVERT",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_NONCONVERT",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_ACCEPT",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_MODECHANGE",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_SELECT",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_PRINT",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_EXECUTE",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_SNAPSHOT",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_HELP",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_APPS",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_PROCESSKEY",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_PACKET",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_DBE_SBCSCHAR",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_DBE_DBCSCHAR",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_ATTN",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_CRSEL",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_EXSEL",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_EREOF",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_PLAY",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_ZOOM",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_NONAME",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_PA1",empty2,empty2],[1,0,empty2,0,empty2,0,"VK_OEM_CLEAR",empty2,empty2]];const seenKeyCode=[];const seenScanCode=[];for(const mapping of mappings){const[immutable,scanCode,scanCodeStr,keyCode,keyCodeStr,eventKeyCode,vkey,usUserSettingsLabel,generalUserSettingsLabel]=mapping;if(!seenScanCode[scanCode]){seenScanCode[scanCode]=true;scanCodeIntToStr[scanCode]=scanCodeStr;scanCodeStrToInt[scanCodeStr]=scanCode;scanCodeLowerCaseStrToInt[scanCodeStr.toLowerCase()]=scanCode;if(immutable){IMMUTABLE_CODE_TO_KEY_CODE[scanCode]=keyCode;if(keyCode!==0&&keyCode!==3&&keyCode!==5&&keyCode!==4&&keyCode!==6&&keyCode!==57){IMMUTABLE_KEY_CODE_TO_CODE[keyCode]=scanCode}}}if(!seenKeyCode[keyCode]){seenKeyCode[keyCode]=true;if(!keyCodeStr){throw new Error(`String representation missing for key code ${keyCode} around scan code ${scanCodeStr}`)}uiMap.define(keyCode,keyCodeStr);userSettingsUSMap.define(keyCode,usUserSettingsLabel||keyCodeStr);userSettingsGeneralMap.define(keyCode,generalUserSettingsLabel||usUserSettingsLabel||keyCodeStr)}if(eventKeyCode){EVENT_KEY_CODE_MAP[eventKeyCode]=keyCode}if(vkey){NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[vkey]=keyCode}}IMMUTABLE_KEY_CODE_TO_CODE[3]=46})();(function(KeyCodeUtils2){function toString(keyCode){return uiMap.keyCodeToStr(keyCode)}KeyCodeUtils2.toString=toString;function fromString(key){return uiMap.strToKeyCode(key)}KeyCodeUtils2.fromString=fromString;function toUserSettingsUS(keyCode){return userSettingsUSMap.keyCodeToStr(keyCode)}KeyCodeUtils2.toUserSettingsUS=toUserSettingsUS;function toUserSettingsGeneral(keyCode){return userSettingsGeneralMap.keyCodeToStr(keyCode)}KeyCodeUtils2.toUserSettingsGeneral=toUserSettingsGeneral;function fromUserSettings(key){return userSettingsUSMap.strToKeyCode(key)||userSettingsGeneralMap.strToKeyCode(key)}KeyCodeUtils2.fromUserSettings=fromUserSettings;function toElectronAccelerator(keyCode){if(keyCode>=98&&keyCode<=113){return null}switch(keyCode){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return uiMap.keyCodeToStr(keyCode)}KeyCodeUtils2.toElectronAccelerator=toElectronAccelerator})(KeyCodeUtils||(KeyCodeUtils={}))}});var safeProcess,cwd,env,platform;var init_process=__esm({"node_modules/monaco-editor/esm/vs/base/common/process.js"(){init_platform();if(typeof globals.vscode!=="undefined"&&typeof globals.vscode.process!=="undefined"){const sandboxProcess=globals.vscode.process;safeProcess={get platform(){return sandboxProcess.platform},get arch(){return sandboxProcess.arch},get env(){return sandboxProcess.env},cwd(){return sandboxProcess.cwd()}}}else if(typeof process!=="undefined"){safeProcess={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env["VSCODE_CWD"]||process.cwd()}}}else{safeProcess={get platform(){return isWindows?"win32":isMacintosh?"darwin":"linux"},get arch(){return void 0},get env(){return{}},cwd(){return"/"}}}cwd=safeProcess.cwd;env=safeProcess.env;platform=safeProcess.platform}});function validateObject(pathObject,name){if(pathObject===null||typeof pathObject!=="object"){throw new ErrorInvalidArgType(name,"Object",pathObject)}}function validateString(value,name){if(typeof value!=="string"){throw new ErrorInvalidArgType(name,"string",value)}}function isPathSeparator(code){return code===CHAR_FORWARD_SLASH||code===CHAR_BACKWARD_SLASH}function isPosixPathSeparator(code){return code===CHAR_FORWARD_SLASH}function isWindowsDeviceRoot(code){return code>=CHAR_UPPERCASE_A&&code<=CHAR_UPPERCASE_Z||code>=CHAR_LOWERCASE_A&&code<=CHAR_LOWERCASE_Z}function normalizeString(path,allowAboveRoot,separator,isPathSeparator3){let res="";let lastSegmentLength=0;let lastSlash=-1;let dots=0;let code=0;for(let i=0;i<=path.length;++i){if(i2){const lastSlashIndex=res.lastIndexOf(separator);if(lastSlashIndex===-1){res="";lastSegmentLength=0}else{res=res.slice(0,lastSlashIndex);lastSegmentLength=res.length-1-res.lastIndexOf(separator)}lastSlash=i;dots=0;continue}else if(res.length!==0){res="";lastSegmentLength=0;lastSlash=i;dots=0;continue}}if(allowAboveRoot){res+=res.length>0?`${separator}..`:"..";lastSegmentLength=2}}else{if(res.length>0){res+=`${separator}${path.slice(lastSlash+1,i)}`}else{res=path.slice(lastSlash+1,i)}lastSegmentLength=i-lastSlash-1}lastSlash=i;dots=0}else if(code===CHAR_DOT&&dots!==-1){++dots}else{dots=-1}}return res}function _format2(sep2,pathObject){validateObject(pathObject,"pathObject");const dir=pathObject.dir||pathObject.root;const base=pathObject.base||`${pathObject.name||""}${pathObject.ext||""}`;if(!dir){return base}return dir===pathObject.root?`${dir}${base}`:`${dir}${sep2}${base}`}var CHAR_UPPERCASE_A,CHAR_LOWERCASE_A,CHAR_UPPERCASE_Z,CHAR_LOWERCASE_Z,CHAR_DOT,CHAR_FORWARD_SLASH,CHAR_BACKWARD_SLASH,CHAR_COLON,CHAR_QUESTION_MARK,ErrorInvalidArgType,platformIsWin32,win32,posixCwd,posix,normalize,resolve,relative,dirname,basename,extname,sep;var init_path=__esm({"node_modules/monaco-editor/esm/vs/base/common/path.js"(){init_process();CHAR_UPPERCASE_A=65;CHAR_LOWERCASE_A=97;CHAR_UPPERCASE_Z=90;CHAR_LOWERCASE_Z=122;CHAR_DOT=46;CHAR_FORWARD_SLASH=47;CHAR_BACKWARD_SLASH=92;CHAR_COLON=58;CHAR_QUESTION_MARK=63;ErrorInvalidArgType=class extends Error{constructor(name,expected,actual){let determiner;if(typeof expected==="string"&&expected.indexOf("not ")===0){determiner="must not be";expected=expected.replace(/^not /,"")}else{determiner="must be"}const type=name.indexOf(".")!==-1?"property":"argument";let msg=`The "${name}" ${type} ${determiner} of type ${expected}`;msg+=`. Received type ${typeof actual}`;super(msg);this.code="ERR_INVALID_ARG_TYPE"}};platformIsWin32=platform==="win32";win32={resolve(...pathSegments){let resolvedDevice="";let resolvedTail="";let resolvedAbsolute=false;for(let i=pathSegments.length-1;i>=-1;i--){let path;if(i>=0){path=pathSegments[i];validateString(path,"path");if(path.length===0){continue}}else if(resolvedDevice.length===0){path=cwd()}else{path=env[`=${resolvedDevice}`]||cwd();if(path===void 0||path.slice(0,2).toLowerCase()!==resolvedDevice.toLowerCase()&&path.charCodeAt(2)===CHAR_BACKWARD_SLASH){path=`${resolvedDevice}\\`}}const len=path.length;let rootEnd=0;let device="";let isAbsolute=false;const code=path.charCodeAt(0);if(len===1){if(isPathSeparator(code)){rootEnd=1;isAbsolute=true}}else if(isPathSeparator(code)){isAbsolute=true;if(isPathSeparator(path.charCodeAt(1))){let j=2;let last=j;while(j2&&isPathSeparator(path.charCodeAt(2))){isAbsolute=true;rootEnd=3}}if(device.length>0){if(resolvedDevice.length>0){if(device.toLowerCase()!==resolvedDevice.toLowerCase()){continue}}else{resolvedDevice=device}}if(resolvedAbsolute){if(resolvedDevice.length>0){break}}else{resolvedTail=`${path.slice(rootEnd)}\\${resolvedTail}`;resolvedAbsolute=isAbsolute;if(isAbsolute&&resolvedDevice.length>0){break}}}resolvedTail=normalizeString(resolvedTail,!resolvedAbsolute,"\\",isPathSeparator);return resolvedAbsolute?`${resolvedDevice}\\${resolvedTail}`:`${resolvedDevice}${resolvedTail}`||"."},normalize(path){validateString(path,"path");const len=path.length;if(len===0){return"."}let rootEnd=0;let device;let isAbsolute=false;const code=path.charCodeAt(0);if(len===1){return isPosixPathSeparator(code)?"\\":path}if(isPathSeparator(code)){isAbsolute=true;if(isPathSeparator(path.charCodeAt(1))){let j=2;let last=j;while(j2&&isPathSeparator(path.charCodeAt(2))){isAbsolute=true;rootEnd=3}}let tail3=rootEnd0&&isPathSeparator(path.charCodeAt(len-1))){tail3+="\\"}if(device===void 0){return isAbsolute?`\\${tail3}`:tail3}return isAbsolute?`${device}\\${tail3}`:`${device}${tail3}`},isAbsolute(path){validateString(path,"path");const len=path.length;if(len===0){return false}const code=path.charCodeAt(0);return isPathSeparator(code)||len>2&&isWindowsDeviceRoot(code)&&path.charCodeAt(1)===CHAR_COLON&&isPathSeparator(path.charCodeAt(2))},join(...paths){if(paths.length===0){return"."}let joined;let firstPart;for(let i=0;i0){if(joined===void 0){joined=firstPart=arg}else{joined+=`\\${arg}`}}}if(joined===void 0){return"."}let needsReplace=true;let slashCount=0;if(typeof firstPart==="string"&&isPathSeparator(firstPart.charCodeAt(0))){++slashCount;const firstLen=firstPart.length;if(firstLen>1&&isPathSeparator(firstPart.charCodeAt(1))){++slashCount;if(firstLen>2){if(isPathSeparator(firstPart.charCodeAt(2))){++slashCount}else{needsReplace=false}}}}if(needsReplace){while(slashCount=2){joined=`\\${joined.slice(slashCount)}`}}return win32.normalize(joined)},relative(from,to){validateString(from,"from");validateString(to,"to");if(from===to){return""}const fromOrig=win32.resolve(from);const toOrig=win32.resolve(to);if(fromOrig===toOrig){return""}from=fromOrig.toLowerCase();to=toOrig.toLowerCase();if(from===to){return""}let fromStart=0;while(fromStartfromStart&&from.charCodeAt(fromEnd-1)===CHAR_BACKWARD_SLASH){fromEnd--}const fromLen=fromEnd-fromStart;let toStart=0;while(toStarttoStart&&to.charCodeAt(toEnd-1)===CHAR_BACKWARD_SLASH){toEnd--}const toLen=toEnd-toStart;const length2=fromLenlength2){if(to.charCodeAt(toStart+i)===CHAR_BACKWARD_SLASH){return toOrig.slice(toStart+i+1)}if(i===2){return toOrig.slice(toStart+i)}}if(fromLen>length2){if(from.charCodeAt(fromStart+i)===CHAR_BACKWARD_SLASH){lastCommonSep=i}else if(i===2){lastCommonSep=3}}if(lastCommonSep===-1){lastCommonSep=0}}let out="";for(i=fromStart+lastCommonSep+1;i<=fromEnd;++i){if(i===fromEnd||from.charCodeAt(i)===CHAR_BACKWARD_SLASH){out+=out.length===0?"..":"\\.."}}toStart+=lastCommonSep;if(out.length>0){return`${out}${toOrig.slice(toStart,toEnd)}`}if(toOrig.charCodeAt(toStart)===CHAR_BACKWARD_SLASH){++toStart}return toOrig.slice(toStart,toEnd)},toNamespacedPath(path){if(typeof path!=="string"||path.length===0){return path}const resolvedPath=win32.resolve(path);if(resolvedPath.length<=2){return path}if(resolvedPath.charCodeAt(0)===CHAR_BACKWARD_SLASH){if(resolvedPath.charCodeAt(1)===CHAR_BACKWARD_SLASH){const code=resolvedPath.charCodeAt(2);if(code!==CHAR_QUESTION_MARK&&code!==CHAR_DOT){return`\\\\?\\UNC\\${resolvedPath.slice(2)}`}}}else if(isWindowsDeviceRoot(resolvedPath.charCodeAt(0))&&resolvedPath.charCodeAt(1)===CHAR_COLON&&resolvedPath.charCodeAt(2)===CHAR_BACKWARD_SLASH){return`\\\\?\\${resolvedPath}`}return path},dirname(path){validateString(path,"path");const len=path.length;if(len===0){return"."}let rootEnd=-1;let offset=0;const code=path.charCodeAt(0);if(len===1){return isPathSeparator(code)?path:"."}if(isPathSeparator(code)){rootEnd=offset=1;if(isPathSeparator(path.charCodeAt(1))){let j=2;let last=j;while(j2&&isPathSeparator(path.charCodeAt(2))?3:2;offset=rootEnd}let end=-1;let matchedSlash=true;for(let i=len-1;i>=offset;--i){if(isPathSeparator(path.charCodeAt(i))){if(!matchedSlash){end=i;break}}else{matchedSlash=false}}if(end===-1){if(rootEnd===-1){return"."}end=rootEnd}return path.slice(0,end)},basename(path,ext){if(ext!==void 0){validateString(ext,"ext")}validateString(path,"path");let start=0;let end=-1;let matchedSlash=true;let i;if(path.length>=2&&isWindowsDeviceRoot(path.charCodeAt(0))&&path.charCodeAt(1)===CHAR_COLON){start=2}if(ext!==void 0&&ext.length>0&&ext.length<=path.length){if(ext===path){return""}let extIdx=ext.length-1;let firstNonSlashEnd=-1;for(i=path.length-1;i>=start;--i){const code=path.charCodeAt(i);if(isPathSeparator(code)){if(!matchedSlash){start=i+1;break}}else{if(firstNonSlashEnd===-1){matchedSlash=false;firstNonSlashEnd=i+1}if(extIdx>=0){if(code===ext.charCodeAt(extIdx)){if(--extIdx===-1){end=i}}else{extIdx=-1;end=firstNonSlashEnd}}}}if(start===end){end=firstNonSlashEnd}else if(end===-1){end=path.length}return path.slice(start,end)}for(i=path.length-1;i>=start;--i){if(isPathSeparator(path.charCodeAt(i))){if(!matchedSlash){start=i+1;break}}else if(end===-1){matchedSlash=false;end=i+1}}if(end===-1){return""}return path.slice(start,end)},extname(path){validateString(path,"path");let start=0;let startDot=-1;let startPart=0;let end=-1;let matchedSlash=true;let preDotState=0;if(path.length>=2&&path.charCodeAt(1)===CHAR_COLON&&isWindowsDeviceRoot(path.charCodeAt(0))){start=startPart=2}for(let i=path.length-1;i>=start;--i){const code=path.charCodeAt(i);if(isPathSeparator(code)){if(!matchedSlash){startPart=i+1;break}continue}if(end===-1){matchedSlash=false;end=i+1}if(code===CHAR_DOT){if(startDot===-1){startDot=i}else if(preDotState!==1){preDotState=1}}else if(startDot!==-1){preDotState=-1}}if(startDot===-1||end===-1||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1){return""}return path.slice(startDot,end)},format:_format2.bind(null,"\\"),parse(path){validateString(path,"path");const ret={root:"",dir:"",base:"",ext:"",name:""};if(path.length===0){return ret}const len=path.length;let rootEnd=0;let code=path.charCodeAt(0);if(len===1){if(isPathSeparator(code)){ret.root=ret.dir=path;return ret}ret.base=ret.name=path;return ret}if(isPathSeparator(code)){rootEnd=1;if(isPathSeparator(path.charCodeAt(1))){let j=2;let last=j;while(j0){ret.root=path.slice(0,rootEnd)}let startDot=-1;let startPart=rootEnd;let end=-1;let matchedSlash=true;let i=path.length-1;let preDotState=0;for(;i>=rootEnd;--i){code=path.charCodeAt(i);if(isPathSeparator(code)){if(!matchedSlash){startPart=i+1;break}continue}if(end===-1){matchedSlash=false;end=i+1}if(code===CHAR_DOT){if(startDot===-1){startDot=i}else if(preDotState!==1){preDotState=1}}else if(startDot!==-1){preDotState=-1}}if(end!==-1){if(startDot===-1||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1){ret.base=ret.name=path.slice(startPart,end)}else{ret.name=path.slice(startPart,startDot);ret.base=path.slice(startPart,end);ret.ext=path.slice(startDot,end)}}if(startPart>0&&startPart!==rootEnd){ret.dir=path.slice(0,startPart-1)}else{ret.dir=ret.root}return ret},sep:"\\",delimiter:";",win32:null,posix:null};posixCwd=(()=>{if(platformIsWin32){const regexp=/\\/g;return()=>{const cwd2=cwd().replace(regexp,"/");return cwd2.slice(cwd2.indexOf("/"))}}return()=>cwd()})();posix={resolve(...pathSegments){let resolvedPath="";let resolvedAbsolute=false;for(let i=pathSegments.length-1;i>=-1&&!resolvedAbsolute;i--){const path=i>=0?pathSegments[i]:posixCwd();validateString(path,"path");if(path.length===0){continue}resolvedPath=`${path}/${resolvedPath}`;resolvedAbsolute=path.charCodeAt(0)===CHAR_FORWARD_SLASH}resolvedPath=normalizeString(resolvedPath,!resolvedAbsolute,"/",isPosixPathSeparator);if(resolvedAbsolute){return`/${resolvedPath}`}return resolvedPath.length>0?resolvedPath:"."},normalize(path){validateString(path,"path");if(path.length===0){return"."}const isAbsolute=path.charCodeAt(0)===CHAR_FORWARD_SLASH;const trailingSeparator=path.charCodeAt(path.length-1)===CHAR_FORWARD_SLASH;path=normalizeString(path,!isAbsolute,"/",isPosixPathSeparator);if(path.length===0){if(isAbsolute){return"/"}return trailingSeparator?"./":"."}if(trailingSeparator){path+="/"}return isAbsolute?`/${path}`:path},isAbsolute(path){validateString(path,"path");return path.length>0&&path.charCodeAt(0)===CHAR_FORWARD_SLASH},join(...paths){if(paths.length===0){return"."}let joined;for(let i=0;i0){if(joined===void 0){joined=arg}else{joined+=`/${arg}`}}}if(joined===void 0){return"."}return posix.normalize(joined)},relative(from,to){validateString(from,"from");validateString(to,"to");if(from===to){return""}from=posix.resolve(from);to=posix.resolve(to);if(from===to){return""}const fromStart=1;const fromEnd=from.length;const fromLen=fromEnd-fromStart;const toStart=1;const toLen=to.length-toStart;const length2=fromLenlength2){if(to.charCodeAt(toStart+i)===CHAR_FORWARD_SLASH){return to.slice(toStart+i+1)}if(i===0){return to.slice(toStart+i)}}else if(fromLen>length2){if(from.charCodeAt(fromStart+i)===CHAR_FORWARD_SLASH){lastCommonSep=i}else if(i===0){lastCommonSep=0}}}let out="";for(i=fromStart+lastCommonSep+1;i<=fromEnd;++i){if(i===fromEnd||from.charCodeAt(i)===CHAR_FORWARD_SLASH){out+=out.length===0?"..":"/.."}}return`${out}${to.slice(toStart+lastCommonSep)}`},toNamespacedPath(path){return path},dirname(path){validateString(path,"path");if(path.length===0){return"."}const hasRoot=path.charCodeAt(0)===CHAR_FORWARD_SLASH;let end=-1;let matchedSlash=true;for(let i=path.length-1;i>=1;--i){if(path.charCodeAt(i)===CHAR_FORWARD_SLASH){if(!matchedSlash){end=i;break}}else{matchedSlash=false}}if(end===-1){return hasRoot?"/":"."}if(hasRoot&&end===1){return"//"}return path.slice(0,end)},basename(path,ext){if(ext!==void 0){validateString(ext,"ext")}validateString(path,"path");let start=0;let end=-1;let matchedSlash=true;let i;if(ext!==void 0&&ext.length>0&&ext.length<=path.length){if(ext===path){return""}let extIdx=ext.length-1;let firstNonSlashEnd=-1;for(i=path.length-1;i>=0;--i){const code=path.charCodeAt(i);if(code===CHAR_FORWARD_SLASH){if(!matchedSlash){start=i+1;break}}else{if(firstNonSlashEnd===-1){matchedSlash=false;firstNonSlashEnd=i+1}if(extIdx>=0){if(code===ext.charCodeAt(extIdx)){if(--extIdx===-1){end=i}}else{extIdx=-1;end=firstNonSlashEnd}}}}if(start===end){end=firstNonSlashEnd}else if(end===-1){end=path.length}return path.slice(start,end)}for(i=path.length-1;i>=0;--i){if(path.charCodeAt(i)===CHAR_FORWARD_SLASH){if(!matchedSlash){start=i+1;break}}else if(end===-1){matchedSlash=false;end=i+1}}if(end===-1){return""}return path.slice(start,end)},extname(path){validateString(path,"path");let startDot=-1;let startPart=0;let end=-1;let matchedSlash=true;let preDotState=0;for(let i=path.length-1;i>=0;--i){const code=path.charCodeAt(i);if(code===CHAR_FORWARD_SLASH){if(!matchedSlash){startPart=i+1;break}continue}if(end===-1){matchedSlash=false;end=i+1}if(code===CHAR_DOT){if(startDot===-1){startDot=i}else if(preDotState!==1){preDotState=1}}else if(startDot!==-1){preDotState=-1}}if(startDot===-1||end===-1||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1){return""}return path.slice(startDot,end)},format:_format2.bind(null,"/"),parse(path){validateString(path,"path");const ret={root:"",dir:"",base:"",ext:"",name:""};if(path.length===0){return ret}const isAbsolute=path.charCodeAt(0)===CHAR_FORWARD_SLASH;let start;if(isAbsolute){ret.root="/";start=1}else{start=0}let startDot=-1;let startPart=0;let end=-1;let matchedSlash=true;let i=path.length-1;let preDotState=0;for(;i>=start;--i){const code=path.charCodeAt(i);if(code===CHAR_FORWARD_SLASH){if(!matchedSlash){startPart=i+1;break}continue}if(end===-1){matchedSlash=false;end=i+1}if(code===CHAR_DOT){if(startDot===-1){startDot=i}else if(preDotState!==1){preDotState=1}}else if(startDot!==-1){preDotState=-1}}if(end!==-1){const start2=startPart===0&&isAbsolute?1:startPart;if(startDot===-1||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1){ret.base=ret.name=path.slice(start2,end)}else{ret.name=path.slice(start2,startDot);ret.base=path.slice(start2,end);ret.ext=path.slice(startDot,end)}}if(startPart>0){ret.dir=path.slice(0,startPart-1)}else if(isAbsolute){ret.dir="/"}return ret},sep:"/",delimiter:":",win32:null,posix:null};posix.win32=win32.win32=win32;posix.posix=win32.posix=posix;normalize=platformIsWin32?win32.normalize:posix.normalize;resolve=platformIsWin32?win32.resolve:posix.resolve;relative=platformIsWin32?win32.relative:posix.relative;dirname=platformIsWin32?win32.dirname:posix.dirname;basename=platformIsWin32?win32.basename:posix.basename;extname=platformIsWin32?win32.extname:posix.extname;sep=platformIsWin32?win32.sep:posix.sep}});function _validateUri(ret,_strict){if(!ret.scheme&&_strict){throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${ret.authority}", path: "${ret.path}", query: "${ret.query}", fragment: "${ret.fragment}"}`)}if(ret.scheme&&!_schemePattern.test(ret.scheme)){throw new Error("[UriError]: Scheme contains illegal characters.")}if(ret.path){if(ret.authority){if(!_singleSlashStart.test(ret.path)){throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}}else{if(_doubleSlashStart.test(ret.path)){throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}}}function _schemeFix(scheme,_strict){if(!scheme&&!_strict){return"file"}return scheme}function _referenceResolution(scheme,path){switch(scheme){case"https":case"http":case"file":if(!path){path=_slash}else if(path[0]!==_slash){path=_slash+path}break}return path}function encodeURIComponentFast(uriComponent,isPath,isAuthority){let res=void 0;let nativeEncodePos=-1;for(let pos=0;pos=97&&code<=122||code>=65&&code<=90||code>=48&&code<=57||code===45||code===46||code===95||code===126||isPath&&code===47||isAuthority&&code===91||isAuthority&&code===93||isAuthority&&code===58){if(nativeEncodePos!==-1){res+=encodeURIComponent(uriComponent.substring(nativeEncodePos,pos));nativeEncodePos=-1}if(res!==void 0){res+=uriComponent.charAt(pos)}}else{if(res===void 0){res=uriComponent.substr(0,pos)}const escaped=encodeTable[code];if(escaped!==void 0){if(nativeEncodePos!==-1){res+=encodeURIComponent(uriComponent.substring(nativeEncodePos,pos));nativeEncodePos=-1}res+=escaped}else if(nativeEncodePos===-1){nativeEncodePos=pos}}}if(nativeEncodePos!==-1){res+=encodeURIComponent(uriComponent.substring(nativeEncodePos))}return res!==void 0?res:uriComponent}function encodeURIComponentMinimal(path){let res=void 0;for(let pos=0;pos1&&uri.scheme==="file"){value=`//${uri.authority}${uri.path}`}else if(uri.path.charCodeAt(0)===47&&(uri.path.charCodeAt(1)>=65&&uri.path.charCodeAt(1)<=90||uri.path.charCodeAt(1)>=97&&uri.path.charCodeAt(1)<=122)&&uri.path.charCodeAt(2)===58){if(!keepDriveLetterCasing){value=uri.path[1].toLowerCase()+uri.path.substr(2)}else{value=uri.path.substr(1)}}else{value=uri.path}if(isWindows){value=value.replace(/\//g,"\\")}return value}function _asFormatted(uri,skipEncoding){const encoder=!skipEncoding?encodeURIComponentFast:encodeURIComponentMinimal;let res="";let{scheme:scheme,authority:authority,path:path,query:query,fragment:fragment}=uri;if(scheme){res+=scheme;res+=":"}if(authority||scheme==="file"){res+=_slash;res+=_slash}if(authority){let idx=authority.indexOf("@");if(idx!==-1){const userinfo=authority.substr(0,idx);authority=authority.substr(idx+1);idx=userinfo.lastIndexOf(":");if(idx===-1){res+=encoder(userinfo,false,false)}else{res+=encoder(userinfo.substr(0,idx),false,false);res+=":";res+=encoder(userinfo.substr(idx+1),false,true)}res+="@"}authority=authority.toLowerCase();idx=authority.lastIndexOf(":");if(idx===-1){res+=encoder(authority,false,true)}else{res+=encoder(authority.substr(0,idx),false,true);res+=authority.substr(idx)}}if(path){if(path.length>=3&&path.charCodeAt(0)===47&&path.charCodeAt(2)===58){const code=path.charCodeAt(1);if(code>=65&&code<=90){path=`/${String.fromCharCode(code+32)}:${path.substr(3)}`}}else if(path.length>=2&&path.charCodeAt(1)===58){const code=path.charCodeAt(0);if(code>=65&&code<=90){path=`${String.fromCharCode(code+32)}:${path.substr(2)}`}}res+=encoder(path,true,false)}if(query){res+="?";res+=encoder(query,false,false)}if(fragment){res+="#";res+=!skipEncoding?encodeURIComponentFast(fragment,false,false):fragment}return res}function decodeURIComponentGraceful(str){try{return decodeURIComponent(str)}catch(_a6){if(str.length>3){return str.substr(0,3)+decodeURIComponentGraceful(str.substr(3))}else{return str}}}function percentDecode(str){if(!str.match(_rEncodedAsHex)){return str}return str.replace(_rEncodedAsHex,(match2=>decodeURIComponentGraceful(match2)))}var _schemePattern,_singleSlashStart,_doubleSlashStart,_empty,_slash,_regexp,URI,_pathSepMarker,Uri,encodeTable,_rEncodedAsHex;var init_uri=__esm({"node_modules/monaco-editor/esm/vs/base/common/uri.js"(){init_path();init_platform();_schemePattern=/^\w[\w\d+.-]*$/;_singleSlashStart=/^\//;_doubleSlashStart=/^\/\//;_empty="";_slash="/";_regexp=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;URI=class{static isUri(thing){if(thing instanceof URI){return true}if(!thing){return false}return typeof thing.authority==="string"&&typeof thing.fragment==="string"&&typeof thing.path==="string"&&typeof thing.query==="string"&&typeof thing.scheme==="string"&&typeof thing.fsPath==="string"&&typeof thing.with==="function"&&typeof thing.toString==="function"}constructor(schemeOrData,authority,path,query,fragment,_strict=false){if(typeof schemeOrData==="object"){this.scheme=schemeOrData.scheme||_empty;this.authority=schemeOrData.authority||_empty;this.path=schemeOrData.path||_empty;this.query=schemeOrData.query||_empty;this.fragment=schemeOrData.fragment||_empty}else{this.scheme=_schemeFix(schemeOrData,_strict);this.authority=authority||_empty;this.path=_referenceResolution(this.scheme,path||_empty);this.query=query||_empty;this.fragment=fragment||_empty;_validateUri(this,_strict)}}get fsPath(){return uriToFsPath(this,false)}with(change){if(!change){return this}let{scheme:scheme,authority:authority,path:path,query:query,fragment:fragment}=change;if(scheme===void 0){scheme=this.scheme}else if(scheme===null){scheme=_empty}if(authority===void 0){authority=this.authority}else if(authority===null){authority=_empty}if(path===void 0){path=this.path}else if(path===null){path=_empty}if(query===void 0){query=this.query}else if(query===null){query=_empty}if(fragment===void 0){fragment=this.fragment}else if(fragment===null){fragment=_empty}if(scheme===this.scheme&&authority===this.authority&&path===this.path&&query===this.query&&fragment===this.fragment){return this}return new Uri(scheme,authority,path,query,fragment)}static parse(value,_strict=false){const match2=_regexp.exec(value);if(!match2){return new Uri(_empty,_empty,_empty,_empty,_empty)}return new Uri(match2[2]||_empty,percentDecode(match2[4]||_empty),percentDecode(match2[5]||_empty),percentDecode(match2[7]||_empty),percentDecode(match2[9]||_empty),_strict)}static file(path){let authority=_empty;if(isWindows){path=path.replace(/\\/g,_slash)}if(path[0]===_slash&&path[1]===_slash){const idx=path.indexOf(_slash,2);if(idx===-1){authority=path.substring(2);path=_slash}else{authority=path.substring(2,idx);path=path.substring(idx)||_slash}}return new Uri("file",authority,path,_empty,_empty)}static from(components,strict){const result=new Uri(components.scheme,components.authority,components.path,components.query,components.fragment,strict);return result}static joinPath(uri,...pathFragment){if(!uri.path){throw new Error(`[UriError]: cannot call joinPath on URI without path`)}let newPath;if(isWindows&&uri.scheme==="file"){newPath=URI.file(win32.join(uriToFsPath(uri,true),...pathFragment)).path}else{newPath=posix.join(uri.path,...pathFragment)}return uri.with({path:newPath})}toString(skipEncoding=false){return _asFormatted(this,skipEncoding)}toJSON(){return this}static revive(data){var _a6,_b3;if(!data){return data}else if(data instanceof URI){return data}else{const result=new Uri(data);result._formatted=(_a6=data.external)!==null&&_a6!==void 0?_a6:null;result._fsPath=data._sep===_pathSepMarker?(_b3=data.fsPath)!==null&&_b3!==void 0?_b3:null:null;return result}}};_pathSepMarker=isWindows?1:void 0;Uri=class extends URI{constructor(){super(...arguments);this._formatted=null;this._fsPath=null}get fsPath(){if(!this._fsPath){this._fsPath=uriToFsPath(this,false)}return this._fsPath}toString(skipEncoding=false){if(!skipEncoding){if(!this._formatted){this._formatted=_asFormatted(this,false)}return this._formatted}else{return _asFormatted(this,true)}}toJSON(){const res={$mid:1};if(this._fsPath){res.fsPath=this._fsPath;res._sep=_pathSepMarker}if(this._formatted){res.external=this._formatted}if(this.path){res.path=this.path}if(this.scheme){res.scheme=this.scheme}if(this.authority){res.authority=this.authority}if(this.query){res.query=this.query}if(this.fragment){res.fragment=this.fragment}return res}};encodeTable={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};_rEncodedAsHex=/(%[0-9A-Za-z][0-9A-Za-z])+/g}});var Position;var init_position=__esm({"node_modules/monaco-editor/esm/vs/editor/common/core/position.js"(){Position=class{constructor(lineNumber,column){this.lineNumber=lineNumber;this.column=column}with(newLineNumber=this.lineNumber,newColumn=this.column){if(newLineNumber===this.lineNumber&&newColumn===this.column){return this}else{return new Position(newLineNumber,newColumn)}}delta(deltaLineNumber=0,deltaColumn=0){return this.with(this.lineNumber+deltaLineNumber,this.column+deltaColumn)}equals(other){return Position.equals(this,other)}static equals(a,b){if(!a&&!b){return true}return!!a&&!!b&&a.lineNumber===b.lineNumber&&a.column===b.column}isBefore(other){return Position.isBefore(this,other)}static isBefore(a,b){if(a.lineNumberendLineNumber||startLineNumber===endLineNumber&&startColumn>endColumn){this.startLineNumber=endLineNumber;this.startColumn=endColumn;this.endLineNumber=startLineNumber;this.endColumn=startColumn}else{this.startLineNumber=startLineNumber;this.startColumn=startColumn;this.endLineNumber=endLineNumber;this.endColumn=endColumn}}isEmpty(){return Range.isEmpty(this)}static isEmpty(range2){return range2.startLineNumber===range2.endLineNumber&&range2.startColumn===range2.endColumn}containsPosition(position){return Range.containsPosition(this,position)}static containsPosition(range2,position){if(position.lineNumberrange2.endLineNumber){return false}if(position.lineNumber===range2.startLineNumber&&position.columnrange2.endColumn){return false}return true}static strictContainsPosition(range2,position){if(position.lineNumberrange2.endLineNumber){return false}if(position.lineNumber===range2.startLineNumber&&position.column<=range2.startColumn){return false}if(position.lineNumber===range2.endLineNumber&&position.column>=range2.endColumn){return false}return true}containsRange(range2){return Range.containsRange(this,range2)}static containsRange(range2,otherRange){if(otherRange.startLineNumberrange2.endLineNumber||otherRange.endLineNumber>range2.endLineNumber){return false}if(otherRange.startLineNumber===range2.startLineNumber&&otherRange.startColumnrange2.endColumn){return false}return true}strictContainsRange(range2){return Range.strictContainsRange(this,range2)}static strictContainsRange(range2,otherRange){if(otherRange.startLineNumberrange2.endLineNumber||otherRange.endLineNumber>range2.endLineNumber){return false}if(otherRange.startLineNumber===range2.startLineNumber&&otherRange.startColumn<=range2.startColumn){return false}if(otherRange.endLineNumber===range2.endLineNumber&&otherRange.endColumn>=range2.endColumn){return false}return true}plusRange(range2){return Range.plusRange(this,range2)}static plusRange(a,b){let startLineNumber;let startColumn;let endLineNumber;let endColumn;if(b.startLineNumbera.endLineNumber){endLineNumber=b.endLineNumber;endColumn=b.endColumn}else if(b.endLineNumber===a.endLineNumber){endLineNumber=b.endLineNumber;endColumn=Math.max(b.endColumn,a.endColumn)}else{endLineNumber=a.endLineNumber;endColumn=a.endColumn}return new Range(startLineNumber,startColumn,endLineNumber,endColumn)}intersectRanges(range2){return Range.intersectRanges(this,range2)}static intersectRanges(a,b){let resultStartLineNumber=a.startLineNumber;let resultStartColumn=a.startColumn;let resultEndLineNumber=a.endLineNumber;let resultEndColumn=a.endColumn;const otherStartLineNumber=b.startLineNumber;const otherStartColumn=b.startColumn;const otherEndLineNumber=b.endLineNumber;const otherEndColumn=b.endColumn;if(resultStartLineNumberotherEndLineNumber){resultEndLineNumber=otherEndLineNumber;resultEndColumn=otherEndColumn}else if(resultEndLineNumber===otherEndLineNumber){resultEndColumn=Math.min(resultEndColumn,otherEndColumn)}if(resultStartLineNumber>resultEndLineNumber){return null}if(resultStartLineNumber===resultEndLineNumber&&resultStartColumn>resultEndColumn){return null}return new Range(resultStartLineNumber,resultStartColumn,resultEndLineNumber,resultEndColumn)}equalsRange(other){return Range.equalsRange(this,other)}static equalsRange(a,b){if(!a&&!b){return true}return!!a&&!!b&&a.startLineNumber===b.startLineNumber&&a.startColumn===b.startColumn&&a.endLineNumber===b.endLineNumber&&a.endColumn===b.endColumn}getEndPosition(){return Range.getEndPosition(this)}static getEndPosition(range2){return new Position(range2.endLineNumber,range2.endColumn)}getStartPosition(){return Range.getStartPosition(this)}static getStartPosition(range2){return new Position(range2.startLineNumber,range2.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(endLineNumber,endColumn){return new Range(this.startLineNumber,this.startColumn,endLineNumber,endColumn)}setStartPosition(startLineNumber,startColumn){return new Range(startLineNumber,startColumn,this.endLineNumber,this.endColumn)}collapseToStart(){return Range.collapseToStart(this)}static collapseToStart(range2){return new Range(range2.startLineNumber,range2.startColumn,range2.startLineNumber,range2.startColumn)}collapseToEnd(){return Range.collapseToEnd(this)}static collapseToEnd(range2){return new Range(range2.endLineNumber,range2.endColumn,range2.endLineNumber,range2.endColumn)}delta(lineCount){return new Range(this.startLineNumber+lineCount,this.startColumn,this.endLineNumber+lineCount,this.endColumn)}static fromPositions(start,end=start){return new Range(start.lineNumber,start.column,end.lineNumber,end.column)}static lift(range2){if(!range2){return null}return new Range(range2.startLineNumber,range2.startColumn,range2.endLineNumber,range2.endColumn)}static isIRange(obj){return obj&&typeof obj.startLineNumber==="number"&&typeof obj.startColumn==="number"&&typeof obj.endLineNumber==="number"&&typeof obj.endColumn==="number"}static areIntersectingOrTouching(a,b){if(a.endLineNumberrange2.startLineNumber}toJSON(){return this}}}});var Selection;var init_selection=__esm({"node_modules/monaco-editor/esm/vs/editor/common/core/selection.js"(){init_position();init_range();Selection=class extends Range{constructor(selectionStartLineNumber,selectionStartColumn,positionLineNumber,positionColumn){super(selectionStartLineNumber,selectionStartColumn,positionLineNumber,positionColumn);this.selectionStartLineNumber=selectionStartLineNumber;this.selectionStartColumn=selectionStartColumn;this.positionLineNumber=positionLineNumber;this.positionColumn=positionColumn}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(other){return Selection.selectionsEqual(this,other)}static selectionsEqual(a,b){return a.selectionStartLineNumber===b.selectionStartLineNumber&&a.selectionStartColumn===b.selectionStartColumn&&a.positionLineNumber===b.positionLineNumber&&a.positionColumn===b.positionColumn}getDirection(){if(this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn){return 0}return 1}setEndPosition(endLineNumber,endColumn){if(this.getDirection()===0){return new Selection(this.startLineNumber,this.startColumn,endLineNumber,endColumn)}return new Selection(endLineNumber,endColumn,this.startLineNumber,this.startColumn)}getPosition(){return new Position(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Position(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(startLineNumber,startColumn){if(this.getDirection()===0){return new Selection(startLineNumber,startColumn,this.endLineNumber,this.endColumn)}return new Selection(this.endLineNumber,this.endColumn,startLineNumber,startColumn)}static fromPositions(start,end=start){return new Selection(start.lineNumber,start.column,end.lineNumber,end.column)}static fromRange(range2,direction){if(direction===0){return new Selection(range2.startLineNumber,range2.startColumn,range2.endLineNumber,range2.endColumn)}else{return new Selection(range2.endLineNumber,range2.endColumn,range2.startLineNumber,range2.startColumn)}}static liftSelection(sel){return new Selection(sel.selectionStartLineNumber,sel.selectionStartColumn,sel.positionLineNumber,sel.positionColumn)}static selectionsArrEqual(a,b){if(a&&!b||!a&&b){return false}if(!a&&!b){return true}if(a.length!==b.length){return false}for(let i=0,len=a.length;i{if(this._tokenizationSupports.get(languageId)!==support){return}this._tokenizationSupports.delete(languageId);this.handleChange([languageId])}))}get(languageId){return this._tokenizationSupports.get(languageId)||null}registerFactory(languageId,factory){var _a6;(_a6=this._factories.get(languageId))===null||_a6===void 0?void 0:_a6.dispose();const myData=new TokenizationSupportFactoryData(this,languageId,factory);this._factories.set(languageId,myData);return toDisposable((()=>{const v=this._factories.get(languageId);if(!v||v!==myData){return}this._factories.delete(languageId);v.dispose()}))}getOrCreate(languageId){return __awaiter(this,void 0,void 0,(function*(){const tokenizationSupport=this.get(languageId);if(tokenizationSupport){return tokenizationSupport}const factory=this._factories.get(languageId);if(!factory||factory.isResolved){return null}yield factory.resolve();return this.get(languageId)}))}isResolved(languageId){const tokenizationSupport=this.get(languageId);if(tokenizationSupport){return true}const factory=this._factories.get(languageId);if(!factory||factory.isResolved){return true}return false}setColorMap(colorMap){this._colorMap=colorMap;this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:true})}getColorMap(){return this._colorMap}getDefaultBackground(){if(this._colorMap&&this._colorMap.length>2){return this._colorMap[2]}return null}};TokenizationSupportFactoryData=class extends Disposable{get isResolved(){return this._isResolved}constructor(_registry2,_languageId,_factory){super();this._registry=_registry2;this._languageId=_languageId;this._factory=_factory;this._isDisposed=false;this._resolvePromise=null;this._isResolved=false}dispose(){this._isDisposed=true;super.dispose()}resolve(){return __awaiter(this,void 0,void 0,(function*(){if(!this._resolvePromise){this._resolvePromise=this._create()}return this._resolvePromise}))}_create(){return __awaiter(this,void 0,void 0,(function*(){const value=yield this._factory.tokenizationSupport;this._isResolved=true;if(value&&!this._isDisposed){this._register(this._registry.register(this._languageId,value))}}))}}}});function isLocationLink(thing){return thing&&URI.isUri(thing.uri)&&Range.isIRange(thing.range)&&(Range.isIRange(thing.originSelectionRange)||Range.isIRange(thing.targetSelectionRange))}function getAriaLabelForSymbol(symbolName,kind){return localize("symbolAriaLabel","{0} ({1})",symbolName,symbolKindNames[kind])}var Token,TokenizationResult,EncodedTokenizationResult,CompletionItemKinds,InlineCompletionTriggerKind,SelectedSuggestionInfo,SignatureHelpTriggerKind,DocumentHighlightKind,symbolKindNames,SymbolKinds,FoldingRangeKind,Command,InlayHintKind,LazyTokenizationSupport,TokenizationRegistry2;var init_languages=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages.js"(){init_codicons();init_uri();init_range();init_tokenizationRegistry();init_nls();Token=class{constructor(offset,type,language81){this.offset=offset;this.type=type;this.language=language81;this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};TokenizationResult=class{constructor(tokens,endState){this.tokens=tokens;this.endState=endState;this._tokenizationResultBrand=void 0}};EncodedTokenizationResult=class{constructor(tokens,endState){this.tokens=tokens;this.endState=endState;this._encodedTokenizationResultBrand=void 0}};(function(CompletionItemKinds2){const byKind=new Map;byKind.set(0,Codicon.symbolMethod);byKind.set(1,Codicon.symbolFunction);byKind.set(2,Codicon.symbolConstructor);byKind.set(3,Codicon.symbolField);byKind.set(4,Codicon.symbolVariable);byKind.set(5,Codicon.symbolClass);byKind.set(6,Codicon.symbolStruct);byKind.set(7,Codicon.symbolInterface);byKind.set(8,Codicon.symbolModule);byKind.set(9,Codicon.symbolProperty);byKind.set(10,Codicon.symbolEvent);byKind.set(11,Codicon.symbolOperator);byKind.set(12,Codicon.symbolUnit);byKind.set(13,Codicon.symbolValue);byKind.set(15,Codicon.symbolEnum);byKind.set(14,Codicon.symbolConstant);byKind.set(15,Codicon.symbolEnum);byKind.set(16,Codicon.symbolEnumMember);byKind.set(17,Codicon.symbolKeyword);byKind.set(27,Codicon.symbolSnippet);byKind.set(18,Codicon.symbolText);byKind.set(19,Codicon.symbolColor);byKind.set(20,Codicon.symbolFile);byKind.set(21,Codicon.symbolReference);byKind.set(22,Codicon.symbolCustomColor);byKind.set(23,Codicon.symbolFolder);byKind.set(24,Codicon.symbolTypeParameter);byKind.set(25,Codicon.account);byKind.set(26,Codicon.issues);function toIcon(kind){let codicon=byKind.get(kind);if(!codicon){console.info("No codicon found for CompletionItemKind "+kind);codicon=Codicon.symbolProperty}return codicon}CompletionItemKinds2.toIcon=toIcon;const data=new Map;data.set("method",0);data.set("function",1);data.set("constructor",2);data.set("field",3);data.set("variable",4);data.set("class",5);data.set("struct",6);data.set("interface",7);data.set("module",8);data.set("property",9);data.set("event",10);data.set("operator",11);data.set("unit",12);data.set("value",13);data.set("constant",14);data.set("enum",15);data.set("enum-member",16);data.set("enumMember",16);data.set("keyword",17);data.set("snippet",27);data.set("text",18);data.set("color",19);data.set("file",20);data.set("reference",21);data.set("customcolor",22);data.set("folder",23);data.set("type-parameter",24);data.set("typeParameter",24);data.set("account",25);data.set("issue",26);function fromString(value,strict){let res=data.get(value);if(typeof res==="undefined"&&!strict){res=9}return res}CompletionItemKinds2.fromString=fromString})(CompletionItemKinds||(CompletionItemKinds={}));(function(InlineCompletionTriggerKind3){InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Automatic"]=0]="Automatic";InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Explicit"]=1]="Explicit"})(InlineCompletionTriggerKind||(InlineCompletionTriggerKind={}));SelectedSuggestionInfo=class{constructor(range2,text2,completionKind,isSnippetText){this.range=range2;this.text=text2;this.completionKind=completionKind;this.isSnippetText=isSnippetText}equals(other){return Range.lift(this.range).equalsRange(other.range)&&this.text===other.text&&this.completionKind===other.completionKind&&this.isSnippetText===other.isSnippetText}};(function(SignatureHelpTriggerKind3){SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["Invoke"]=1]="Invoke";SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["TriggerCharacter"]=2]="TriggerCharacter";SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["ContentChange"]=3]="ContentChange"})(SignatureHelpTriggerKind||(SignatureHelpTriggerKind={}));(function(DocumentHighlightKind6){DocumentHighlightKind6[DocumentHighlightKind6["Text"]=0]="Text";DocumentHighlightKind6[DocumentHighlightKind6["Read"]=1]="Read";DocumentHighlightKind6[DocumentHighlightKind6["Write"]=2]="Write"})(DocumentHighlightKind||(DocumentHighlightKind={}));symbolKindNames={[17]:localize("Array","array"),[16]:localize("Boolean","boolean"),[4]:localize("Class","class"),[13]:localize("Constant","constant"),[8]:localize("Constructor","constructor"),[9]:localize("Enum","enumeration"),[21]:localize("EnumMember","enumeration member"),[23]:localize("Event","event"),[7]:localize("Field","field"),[0]:localize("File","file"),[11]:localize("Function","function"),[10]:localize("Interface","interface"),[19]:localize("Key","key"),[5]:localize("Method","method"),[1]:localize("Module","module"),[2]:localize("Namespace","namespace"),[20]:localize("Null","null"),[15]:localize("Number","number"),[18]:localize("Object","object"),[24]:localize("Operator","operator"),[3]:localize("Package","package"),[6]:localize("Property","property"),[14]:localize("String","string"),[22]:localize("Struct","struct"),[25]:localize("TypeParameter","type parameter"),[12]:localize("Variable","variable")};(function(SymbolKinds2){const byKind=new Map;byKind.set(0,Codicon.symbolFile);byKind.set(1,Codicon.symbolModule);byKind.set(2,Codicon.symbolNamespace);byKind.set(3,Codicon.symbolPackage);byKind.set(4,Codicon.symbolClass);byKind.set(5,Codicon.symbolMethod);byKind.set(6,Codicon.symbolProperty);byKind.set(7,Codicon.symbolField);byKind.set(8,Codicon.symbolConstructor);byKind.set(9,Codicon.symbolEnum);byKind.set(10,Codicon.symbolInterface);byKind.set(11,Codicon.symbolFunction);byKind.set(12,Codicon.symbolVariable);byKind.set(13,Codicon.symbolConstant);byKind.set(14,Codicon.symbolString);byKind.set(15,Codicon.symbolNumber);byKind.set(16,Codicon.symbolBoolean);byKind.set(17,Codicon.symbolArray);byKind.set(18,Codicon.symbolObject);byKind.set(19,Codicon.symbolKey);byKind.set(20,Codicon.symbolNull);byKind.set(21,Codicon.symbolEnumMember);byKind.set(22,Codicon.symbolStruct);byKind.set(23,Codicon.symbolEvent);byKind.set(24,Codicon.symbolOperator);byKind.set(25,Codicon.symbolTypeParameter);function toIcon(kind){let icon=byKind.get(kind);if(!icon){console.info("No codicon found for SymbolKind "+kind);icon=Codicon.symbolProperty}return icon}SymbolKinds2.toIcon=toIcon})(SymbolKinds||(SymbolKinds={}));FoldingRangeKind=class{static fromValue(value){switch(value){case"comment":return FoldingRangeKind.Comment;case"imports":return FoldingRangeKind.Imports;case"region":return FoldingRangeKind.Region}return new FoldingRangeKind(value)}constructor(value){this.value=value}};FoldingRangeKind.Comment=new FoldingRangeKind("comment");FoldingRangeKind.Imports=new FoldingRangeKind("imports");FoldingRangeKind.Region=new FoldingRangeKind("region");(function(Command6){function is(obj){if(!obj||typeof obj!=="object"){return false}return typeof obj.id==="string"&&typeof obj.title==="string"}Command6.is=is})(Command||(Command={}));(function(InlayHintKind3){InlayHintKind3[InlayHintKind3["Type"]=1]="Type";InlayHintKind3[InlayHintKind3["Parameter"]=2]="Parameter"})(InlayHintKind||(InlayHintKind={}));LazyTokenizationSupport=class{constructor(createSupport){this.createSupport=createSupport;this._tokenizationSupport=null}dispose(){if(this._tokenizationSupport){this._tokenizationSupport.then((support=>{if(support){support.dispose()}}))}}get tokenizationSupport(){if(!this._tokenizationSupport){this._tokenizationSupport=this.createSupport()}return this._tokenizationSupport}};TokenizationRegistry2=new TokenizationRegistry}});var AccessibilitySupport,CodeActionTriggerType,CompletionItemInsertTextRule,CompletionItemKind,CompletionItemTag,CompletionTriggerKind,ContentWidgetPositionPreference,CursorChangeReason,DefaultEndOfLine,DocumentHighlightKind2,EditorAutoIndentStrategy,EditorOption,EndOfLinePreference,EndOfLineSequence,GlyphMarginLane,IndentAction,InjectedTextCursorStops,InlayHintKind2,InlineCompletionTriggerKind2,KeyCode,MarkerSeverity,MarkerTag,MinimapPosition,MouseTargetType,OverlayWidgetPositionPreference,OverviewRulerLane,PositionAffinity,RenderLineNumbersType,RenderMinimap,ScrollType,ScrollbarVisibility,SelectionDirection,SignatureHelpTriggerKind2,SymbolKind,SymbolTag,TextEditorCursorBlinkingStyle,TextEditorCursorStyle2,TrackedRangeStickiness,WrappingIndent;var init_standaloneEnums=__esm({"node_modules/monaco-editor/esm/vs/editor/common/standalone/standaloneEnums.js"(){(function(AccessibilitySupport2){AccessibilitySupport2[AccessibilitySupport2["Unknown"]=0]="Unknown";AccessibilitySupport2[AccessibilitySupport2["Disabled"]=1]="Disabled";AccessibilitySupport2[AccessibilitySupport2["Enabled"]=2]="Enabled"})(AccessibilitySupport||(AccessibilitySupport={}));(function(CodeActionTriggerType2){CodeActionTriggerType2[CodeActionTriggerType2["Invoke"]=1]="Invoke";CodeActionTriggerType2[CodeActionTriggerType2["Auto"]=2]="Auto"})(CodeActionTriggerType||(CodeActionTriggerType={}));(function(CompletionItemInsertTextRule2){CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["None"]=0]="None";CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["KeepWhitespace"]=1]="KeepWhitespace";CompletionItemInsertTextRule2[CompletionItemInsertTextRule2["InsertAsSnippet"]=4]="InsertAsSnippet"})(CompletionItemInsertTextRule||(CompletionItemInsertTextRule={}));(function(CompletionItemKind5){CompletionItemKind5[CompletionItemKind5["Method"]=0]="Method";CompletionItemKind5[CompletionItemKind5["Function"]=1]="Function";CompletionItemKind5[CompletionItemKind5["Constructor"]=2]="Constructor";CompletionItemKind5[CompletionItemKind5["Field"]=3]="Field";CompletionItemKind5[CompletionItemKind5["Variable"]=4]="Variable";CompletionItemKind5[CompletionItemKind5["Class"]=5]="Class";CompletionItemKind5[CompletionItemKind5["Struct"]=6]="Struct";CompletionItemKind5[CompletionItemKind5["Interface"]=7]="Interface";CompletionItemKind5[CompletionItemKind5["Module"]=8]="Module";CompletionItemKind5[CompletionItemKind5["Property"]=9]="Property";CompletionItemKind5[CompletionItemKind5["Event"]=10]="Event";CompletionItemKind5[CompletionItemKind5["Operator"]=11]="Operator";CompletionItemKind5[CompletionItemKind5["Unit"]=12]="Unit";CompletionItemKind5[CompletionItemKind5["Value"]=13]="Value";CompletionItemKind5[CompletionItemKind5["Constant"]=14]="Constant";CompletionItemKind5[CompletionItemKind5["Enum"]=15]="Enum";CompletionItemKind5[CompletionItemKind5["EnumMember"]=16]="EnumMember";CompletionItemKind5[CompletionItemKind5["Keyword"]=17]="Keyword";CompletionItemKind5[CompletionItemKind5["Text"]=18]="Text";CompletionItemKind5[CompletionItemKind5["Color"]=19]="Color";CompletionItemKind5[CompletionItemKind5["File"]=20]="File";CompletionItemKind5[CompletionItemKind5["Reference"]=21]="Reference";CompletionItemKind5[CompletionItemKind5["Customcolor"]=22]="Customcolor";CompletionItemKind5[CompletionItemKind5["Folder"]=23]="Folder";CompletionItemKind5[CompletionItemKind5["TypeParameter"]=24]="TypeParameter";CompletionItemKind5[CompletionItemKind5["User"]=25]="User";CompletionItemKind5[CompletionItemKind5["Issue"]=26]="Issue";CompletionItemKind5[CompletionItemKind5["Snippet"]=27]="Snippet"})(CompletionItemKind||(CompletionItemKind={}));(function(CompletionItemTag5){CompletionItemTag5[CompletionItemTag5["Deprecated"]=1]="Deprecated"})(CompletionItemTag||(CompletionItemTag={}));(function(CompletionTriggerKind2){CompletionTriggerKind2[CompletionTriggerKind2["Invoke"]=0]="Invoke";CompletionTriggerKind2[CompletionTriggerKind2["TriggerCharacter"]=1]="TriggerCharacter";CompletionTriggerKind2[CompletionTriggerKind2["TriggerForIncompleteCompletions"]=2]="TriggerForIncompleteCompletions"})(CompletionTriggerKind||(CompletionTriggerKind={}));(function(ContentWidgetPositionPreference2){ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["EXACT"]=0]="EXACT";ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["ABOVE"]=1]="ABOVE";ContentWidgetPositionPreference2[ContentWidgetPositionPreference2["BELOW"]=2]="BELOW"})(ContentWidgetPositionPreference||(ContentWidgetPositionPreference={}));(function(CursorChangeReason2){CursorChangeReason2[CursorChangeReason2["NotSet"]=0]="NotSet";CursorChangeReason2[CursorChangeReason2["ContentFlush"]=1]="ContentFlush";CursorChangeReason2[CursorChangeReason2["RecoverFromMarkers"]=2]="RecoverFromMarkers";CursorChangeReason2[CursorChangeReason2["Explicit"]=3]="Explicit";CursorChangeReason2[CursorChangeReason2["Paste"]=4]="Paste";CursorChangeReason2[CursorChangeReason2["Undo"]=5]="Undo";CursorChangeReason2[CursorChangeReason2["Redo"]=6]="Redo"})(CursorChangeReason||(CursorChangeReason={}));(function(DefaultEndOfLine2){DefaultEndOfLine2[DefaultEndOfLine2["LF"]=1]="LF";DefaultEndOfLine2[DefaultEndOfLine2["CRLF"]=2]="CRLF"})(DefaultEndOfLine||(DefaultEndOfLine={}));(function(DocumentHighlightKind6){DocumentHighlightKind6[DocumentHighlightKind6["Text"]=0]="Text";DocumentHighlightKind6[DocumentHighlightKind6["Read"]=1]="Read";DocumentHighlightKind6[DocumentHighlightKind6["Write"]=2]="Write"})(DocumentHighlightKind2||(DocumentHighlightKind2={}));(function(EditorAutoIndentStrategy2){EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["None"]=0]="None";EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Keep"]=1]="Keep";EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Brackets"]=2]="Brackets";EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Advanced"]=3]="Advanced";EditorAutoIndentStrategy2[EditorAutoIndentStrategy2["Full"]=4]="Full"})(EditorAutoIndentStrategy||(EditorAutoIndentStrategy={}));(function(EditorOption2){EditorOption2[EditorOption2["acceptSuggestionOnCommitCharacter"]=0]="acceptSuggestionOnCommitCharacter";EditorOption2[EditorOption2["acceptSuggestionOnEnter"]=1]="acceptSuggestionOnEnter";EditorOption2[EditorOption2["accessibilitySupport"]=2]="accessibilitySupport";EditorOption2[EditorOption2["accessibilityPageSize"]=3]="accessibilityPageSize";EditorOption2[EditorOption2["ariaLabel"]=4]="ariaLabel";EditorOption2[EditorOption2["ariaRequired"]=5]="ariaRequired";EditorOption2[EditorOption2["autoClosingBrackets"]=6]="autoClosingBrackets";EditorOption2[EditorOption2["screenReaderAnnounceInlineSuggestion"]=7]="screenReaderAnnounceInlineSuggestion";EditorOption2[EditorOption2["autoClosingDelete"]=8]="autoClosingDelete";EditorOption2[EditorOption2["autoClosingOvertype"]=9]="autoClosingOvertype";EditorOption2[EditorOption2["autoClosingQuotes"]=10]="autoClosingQuotes";EditorOption2[EditorOption2["autoIndent"]=11]="autoIndent";EditorOption2[EditorOption2["automaticLayout"]=12]="automaticLayout";EditorOption2[EditorOption2["autoSurround"]=13]="autoSurround";EditorOption2[EditorOption2["bracketPairColorization"]=14]="bracketPairColorization";EditorOption2[EditorOption2["guides"]=15]="guides";EditorOption2[EditorOption2["codeLens"]=16]="codeLens";EditorOption2[EditorOption2["codeLensFontFamily"]=17]="codeLensFontFamily";EditorOption2[EditorOption2["codeLensFontSize"]=18]="codeLensFontSize";EditorOption2[EditorOption2["colorDecorators"]=19]="colorDecorators";EditorOption2[EditorOption2["colorDecoratorsLimit"]=20]="colorDecoratorsLimit";EditorOption2[EditorOption2["columnSelection"]=21]="columnSelection";EditorOption2[EditorOption2["comments"]=22]="comments";EditorOption2[EditorOption2["contextmenu"]=23]="contextmenu";EditorOption2[EditorOption2["copyWithSyntaxHighlighting"]=24]="copyWithSyntaxHighlighting";EditorOption2[EditorOption2["cursorBlinking"]=25]="cursorBlinking";EditorOption2[EditorOption2["cursorSmoothCaretAnimation"]=26]="cursorSmoothCaretAnimation";EditorOption2[EditorOption2["cursorStyle"]=27]="cursorStyle";EditorOption2[EditorOption2["cursorSurroundingLines"]=28]="cursorSurroundingLines";EditorOption2[EditorOption2["cursorSurroundingLinesStyle"]=29]="cursorSurroundingLinesStyle";EditorOption2[EditorOption2["cursorWidth"]=30]="cursorWidth";EditorOption2[EditorOption2["disableLayerHinting"]=31]="disableLayerHinting";EditorOption2[EditorOption2["disableMonospaceOptimizations"]=32]="disableMonospaceOptimizations";EditorOption2[EditorOption2["domReadOnly"]=33]="domReadOnly";EditorOption2[EditorOption2["dragAndDrop"]=34]="dragAndDrop";EditorOption2[EditorOption2["dropIntoEditor"]=35]="dropIntoEditor";EditorOption2[EditorOption2["emptySelectionClipboard"]=36]="emptySelectionClipboard";EditorOption2[EditorOption2["experimentalWhitespaceRendering"]=37]="experimentalWhitespaceRendering";EditorOption2[EditorOption2["extraEditorClassName"]=38]="extraEditorClassName";EditorOption2[EditorOption2["fastScrollSensitivity"]=39]="fastScrollSensitivity";EditorOption2[EditorOption2["find"]=40]="find";EditorOption2[EditorOption2["fixedOverflowWidgets"]=41]="fixedOverflowWidgets";EditorOption2[EditorOption2["folding"]=42]="folding";EditorOption2[EditorOption2["foldingStrategy"]=43]="foldingStrategy";EditorOption2[EditorOption2["foldingHighlight"]=44]="foldingHighlight";EditorOption2[EditorOption2["foldingImportsByDefault"]=45]="foldingImportsByDefault";EditorOption2[EditorOption2["foldingMaximumRegions"]=46]="foldingMaximumRegions";EditorOption2[EditorOption2["unfoldOnClickAfterEndOfLine"]=47]="unfoldOnClickAfterEndOfLine";EditorOption2[EditorOption2["fontFamily"]=48]="fontFamily";EditorOption2[EditorOption2["fontInfo"]=49]="fontInfo";EditorOption2[EditorOption2["fontLigatures"]=50]="fontLigatures";EditorOption2[EditorOption2["fontSize"]=51]="fontSize";EditorOption2[EditorOption2["fontWeight"]=52]="fontWeight";EditorOption2[EditorOption2["fontVariations"]=53]="fontVariations";EditorOption2[EditorOption2["formatOnPaste"]=54]="formatOnPaste";EditorOption2[EditorOption2["formatOnType"]=55]="formatOnType";EditorOption2[EditorOption2["glyphMargin"]=56]="glyphMargin";EditorOption2[EditorOption2["gotoLocation"]=57]="gotoLocation";EditorOption2[EditorOption2["hideCursorInOverviewRuler"]=58]="hideCursorInOverviewRuler";EditorOption2[EditorOption2["hover"]=59]="hover";EditorOption2[EditorOption2["inDiffEditor"]=60]="inDiffEditor";EditorOption2[EditorOption2["inlineSuggest"]=61]="inlineSuggest";EditorOption2[EditorOption2["letterSpacing"]=62]="letterSpacing";EditorOption2[EditorOption2["lightbulb"]=63]="lightbulb";EditorOption2[EditorOption2["lineDecorationsWidth"]=64]="lineDecorationsWidth";EditorOption2[EditorOption2["lineHeight"]=65]="lineHeight";EditorOption2[EditorOption2["lineNumbers"]=66]="lineNumbers";EditorOption2[EditorOption2["lineNumbersMinChars"]=67]="lineNumbersMinChars";EditorOption2[EditorOption2["linkedEditing"]=68]="linkedEditing";EditorOption2[EditorOption2["links"]=69]="links";EditorOption2[EditorOption2["matchBrackets"]=70]="matchBrackets";EditorOption2[EditorOption2["minimap"]=71]="minimap";EditorOption2[EditorOption2["mouseStyle"]=72]="mouseStyle";EditorOption2[EditorOption2["mouseWheelScrollSensitivity"]=73]="mouseWheelScrollSensitivity";EditorOption2[EditorOption2["mouseWheelZoom"]=74]="mouseWheelZoom";EditorOption2[EditorOption2["multiCursorMergeOverlapping"]=75]="multiCursorMergeOverlapping";EditorOption2[EditorOption2["multiCursorModifier"]=76]="multiCursorModifier";EditorOption2[EditorOption2["multiCursorPaste"]=77]="multiCursorPaste";EditorOption2[EditorOption2["multiCursorLimit"]=78]="multiCursorLimit";EditorOption2[EditorOption2["occurrencesHighlight"]=79]="occurrencesHighlight";EditorOption2[EditorOption2["overviewRulerBorder"]=80]="overviewRulerBorder";EditorOption2[EditorOption2["overviewRulerLanes"]=81]="overviewRulerLanes";EditorOption2[EditorOption2["padding"]=82]="padding";EditorOption2[EditorOption2["pasteAs"]=83]="pasteAs";EditorOption2[EditorOption2["parameterHints"]=84]="parameterHints";EditorOption2[EditorOption2["peekWidgetDefaultFocus"]=85]="peekWidgetDefaultFocus";EditorOption2[EditorOption2["definitionLinkOpensInPeek"]=86]="definitionLinkOpensInPeek";EditorOption2[EditorOption2["quickSuggestions"]=87]="quickSuggestions";EditorOption2[EditorOption2["quickSuggestionsDelay"]=88]="quickSuggestionsDelay";EditorOption2[EditorOption2["readOnly"]=89]="readOnly";EditorOption2[EditorOption2["readOnlyMessage"]=90]="readOnlyMessage";EditorOption2[EditorOption2["renameOnType"]=91]="renameOnType";EditorOption2[EditorOption2["renderControlCharacters"]=92]="renderControlCharacters";EditorOption2[EditorOption2["renderFinalNewline"]=93]="renderFinalNewline";EditorOption2[EditorOption2["renderLineHighlight"]=94]="renderLineHighlight";EditorOption2[EditorOption2["renderLineHighlightOnlyWhenFocus"]=95]="renderLineHighlightOnlyWhenFocus";EditorOption2[EditorOption2["renderValidationDecorations"]=96]="renderValidationDecorations";EditorOption2[EditorOption2["renderWhitespace"]=97]="renderWhitespace";EditorOption2[EditorOption2["revealHorizontalRightPadding"]=98]="revealHorizontalRightPadding";EditorOption2[EditorOption2["roundedSelection"]=99]="roundedSelection";EditorOption2[EditorOption2["rulers"]=100]="rulers";EditorOption2[EditorOption2["scrollbar"]=101]="scrollbar";EditorOption2[EditorOption2["scrollBeyondLastColumn"]=102]="scrollBeyondLastColumn";EditorOption2[EditorOption2["scrollBeyondLastLine"]=103]="scrollBeyondLastLine";EditorOption2[EditorOption2["scrollPredominantAxis"]=104]="scrollPredominantAxis";EditorOption2[EditorOption2["selectionClipboard"]=105]="selectionClipboard";EditorOption2[EditorOption2["selectionHighlight"]=106]="selectionHighlight";EditorOption2[EditorOption2["selectOnLineNumbers"]=107]="selectOnLineNumbers";EditorOption2[EditorOption2["showFoldingControls"]=108]="showFoldingControls";EditorOption2[EditorOption2["showUnused"]=109]="showUnused";EditorOption2[EditorOption2["snippetSuggestions"]=110]="snippetSuggestions";EditorOption2[EditorOption2["smartSelect"]=111]="smartSelect";EditorOption2[EditorOption2["smoothScrolling"]=112]="smoothScrolling";EditorOption2[EditorOption2["stickyScroll"]=113]="stickyScroll";EditorOption2[EditorOption2["stickyTabStops"]=114]="stickyTabStops";EditorOption2[EditorOption2["stopRenderingLineAfter"]=115]="stopRenderingLineAfter";EditorOption2[EditorOption2["suggest"]=116]="suggest";EditorOption2[EditorOption2["suggestFontSize"]=117]="suggestFontSize";EditorOption2[EditorOption2["suggestLineHeight"]=118]="suggestLineHeight";EditorOption2[EditorOption2["suggestOnTriggerCharacters"]=119]="suggestOnTriggerCharacters";EditorOption2[EditorOption2["suggestSelection"]=120]="suggestSelection";EditorOption2[EditorOption2["tabCompletion"]=121]="tabCompletion";EditorOption2[EditorOption2["tabIndex"]=122]="tabIndex";EditorOption2[EditorOption2["unicodeHighlighting"]=123]="unicodeHighlighting";EditorOption2[EditorOption2["unusualLineTerminators"]=124]="unusualLineTerminators";EditorOption2[EditorOption2["useShadowDOM"]=125]="useShadowDOM";EditorOption2[EditorOption2["useTabStops"]=126]="useTabStops";EditorOption2[EditorOption2["wordBreak"]=127]="wordBreak";EditorOption2[EditorOption2["wordSeparators"]=128]="wordSeparators";EditorOption2[EditorOption2["wordWrap"]=129]="wordWrap";EditorOption2[EditorOption2["wordWrapBreakAfterCharacters"]=130]="wordWrapBreakAfterCharacters";EditorOption2[EditorOption2["wordWrapBreakBeforeCharacters"]=131]="wordWrapBreakBeforeCharacters";EditorOption2[EditorOption2["wordWrapColumn"]=132]="wordWrapColumn";EditorOption2[EditorOption2["wordWrapOverride1"]=133]="wordWrapOverride1";EditorOption2[EditorOption2["wordWrapOverride2"]=134]="wordWrapOverride2";EditorOption2[EditorOption2["wrappingIndent"]=135]="wrappingIndent";EditorOption2[EditorOption2["wrappingStrategy"]=136]="wrappingStrategy";EditorOption2[EditorOption2["showDeprecated"]=137]="showDeprecated";EditorOption2[EditorOption2["inlayHints"]=138]="inlayHints";EditorOption2[EditorOption2["editorClassName"]=139]="editorClassName";EditorOption2[EditorOption2["pixelRatio"]=140]="pixelRatio";EditorOption2[EditorOption2["tabFocusMode"]=141]="tabFocusMode";EditorOption2[EditorOption2["layoutInfo"]=142]="layoutInfo";EditorOption2[EditorOption2["wrappingInfo"]=143]="wrappingInfo";EditorOption2[EditorOption2["defaultColorDecorators"]=144]="defaultColorDecorators";EditorOption2[EditorOption2["colorDecoratorsActivatedOn"]=145]="colorDecoratorsActivatedOn";EditorOption2[EditorOption2["inlineCompletionsAccessibilityVerbose"]=146]="inlineCompletionsAccessibilityVerbose"})(EditorOption||(EditorOption={}));(function(EndOfLinePreference2){EndOfLinePreference2[EndOfLinePreference2["TextDefined"]=0]="TextDefined";EndOfLinePreference2[EndOfLinePreference2["LF"]=1]="LF";EndOfLinePreference2[EndOfLinePreference2["CRLF"]=2]="CRLF"})(EndOfLinePreference||(EndOfLinePreference={}));(function(EndOfLineSequence2){EndOfLineSequence2[EndOfLineSequence2["LF"]=0]="LF";EndOfLineSequence2[EndOfLineSequence2["CRLF"]=1]="CRLF"})(EndOfLineSequence||(EndOfLineSequence={}));(function(GlyphMarginLane3){GlyphMarginLane3[GlyphMarginLane3["Left"]=1]="Left";GlyphMarginLane3[GlyphMarginLane3["Right"]=2]="Right"})(GlyphMarginLane||(GlyphMarginLane={}));(function(IndentAction3){IndentAction3[IndentAction3["None"]=0]="None";IndentAction3[IndentAction3["Indent"]=1]="Indent";IndentAction3[IndentAction3["IndentOutdent"]=2]="IndentOutdent";IndentAction3[IndentAction3["Outdent"]=3]="Outdent"})(IndentAction||(IndentAction={}));(function(InjectedTextCursorStops3){InjectedTextCursorStops3[InjectedTextCursorStops3["Both"]=0]="Both";InjectedTextCursorStops3[InjectedTextCursorStops3["Right"]=1]="Right";InjectedTextCursorStops3[InjectedTextCursorStops3["Left"]=2]="Left";InjectedTextCursorStops3[InjectedTextCursorStops3["None"]=3]="None"})(InjectedTextCursorStops||(InjectedTextCursorStops={}));(function(InlayHintKind3){InlayHintKind3[InlayHintKind3["Type"]=1]="Type";InlayHintKind3[InlayHintKind3["Parameter"]=2]="Parameter"})(InlayHintKind2||(InlayHintKind2={}));(function(InlineCompletionTriggerKind3){InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Automatic"]=0]="Automatic";InlineCompletionTriggerKind3[InlineCompletionTriggerKind3["Explicit"]=1]="Explicit"})(InlineCompletionTriggerKind2||(InlineCompletionTriggerKind2={}));(function(KeyCode3){KeyCode3[KeyCode3["DependsOnKbLayout"]=-1]="DependsOnKbLayout";KeyCode3[KeyCode3["Unknown"]=0]="Unknown";KeyCode3[KeyCode3["Backspace"]=1]="Backspace";KeyCode3[KeyCode3["Tab"]=2]="Tab";KeyCode3[KeyCode3["Enter"]=3]="Enter";KeyCode3[KeyCode3["Shift"]=4]="Shift";KeyCode3[KeyCode3["Ctrl"]=5]="Ctrl";KeyCode3[KeyCode3["Alt"]=6]="Alt";KeyCode3[KeyCode3["PauseBreak"]=7]="PauseBreak";KeyCode3[KeyCode3["CapsLock"]=8]="CapsLock";KeyCode3[KeyCode3["Escape"]=9]="Escape";KeyCode3[KeyCode3["Space"]=10]="Space";KeyCode3[KeyCode3["PageUp"]=11]="PageUp";KeyCode3[KeyCode3["PageDown"]=12]="PageDown";KeyCode3[KeyCode3["End"]=13]="End";KeyCode3[KeyCode3["Home"]=14]="Home";KeyCode3[KeyCode3["LeftArrow"]=15]="LeftArrow";KeyCode3[KeyCode3["UpArrow"]=16]="UpArrow";KeyCode3[KeyCode3["RightArrow"]=17]="RightArrow";KeyCode3[KeyCode3["DownArrow"]=18]="DownArrow";KeyCode3[KeyCode3["Insert"]=19]="Insert";KeyCode3[KeyCode3["Delete"]=20]="Delete";KeyCode3[KeyCode3["Digit0"]=21]="Digit0";KeyCode3[KeyCode3["Digit1"]=22]="Digit1";KeyCode3[KeyCode3["Digit2"]=23]="Digit2";KeyCode3[KeyCode3["Digit3"]=24]="Digit3";KeyCode3[KeyCode3["Digit4"]=25]="Digit4";KeyCode3[KeyCode3["Digit5"]=26]="Digit5";KeyCode3[KeyCode3["Digit6"]=27]="Digit6";KeyCode3[KeyCode3["Digit7"]=28]="Digit7";KeyCode3[KeyCode3["Digit8"]=29]="Digit8";KeyCode3[KeyCode3["Digit9"]=30]="Digit9";KeyCode3[KeyCode3["KeyA"]=31]="KeyA";KeyCode3[KeyCode3["KeyB"]=32]="KeyB";KeyCode3[KeyCode3["KeyC"]=33]="KeyC";KeyCode3[KeyCode3["KeyD"]=34]="KeyD";KeyCode3[KeyCode3["KeyE"]=35]="KeyE";KeyCode3[KeyCode3["KeyF"]=36]="KeyF";KeyCode3[KeyCode3["KeyG"]=37]="KeyG";KeyCode3[KeyCode3["KeyH"]=38]="KeyH";KeyCode3[KeyCode3["KeyI"]=39]="KeyI";KeyCode3[KeyCode3["KeyJ"]=40]="KeyJ";KeyCode3[KeyCode3["KeyK"]=41]="KeyK";KeyCode3[KeyCode3["KeyL"]=42]="KeyL";KeyCode3[KeyCode3["KeyM"]=43]="KeyM";KeyCode3[KeyCode3["KeyN"]=44]="KeyN";KeyCode3[KeyCode3["KeyO"]=45]="KeyO";KeyCode3[KeyCode3["KeyP"]=46]="KeyP";KeyCode3[KeyCode3["KeyQ"]=47]="KeyQ";KeyCode3[KeyCode3["KeyR"]=48]="KeyR";KeyCode3[KeyCode3["KeyS"]=49]="KeyS";KeyCode3[KeyCode3["KeyT"]=50]="KeyT";KeyCode3[KeyCode3["KeyU"]=51]="KeyU";KeyCode3[KeyCode3["KeyV"]=52]="KeyV";KeyCode3[KeyCode3["KeyW"]=53]="KeyW";KeyCode3[KeyCode3["KeyX"]=54]="KeyX";KeyCode3[KeyCode3["KeyY"]=55]="KeyY";KeyCode3[KeyCode3["KeyZ"]=56]="KeyZ";KeyCode3[KeyCode3["Meta"]=57]="Meta";KeyCode3[KeyCode3["ContextMenu"]=58]="ContextMenu";KeyCode3[KeyCode3["F1"]=59]="F1";KeyCode3[KeyCode3["F2"]=60]="F2";KeyCode3[KeyCode3["F3"]=61]="F3";KeyCode3[KeyCode3["F4"]=62]="F4";KeyCode3[KeyCode3["F5"]=63]="F5";KeyCode3[KeyCode3["F6"]=64]="F6";KeyCode3[KeyCode3["F7"]=65]="F7";KeyCode3[KeyCode3["F8"]=66]="F8";KeyCode3[KeyCode3["F9"]=67]="F9";KeyCode3[KeyCode3["F10"]=68]="F10";KeyCode3[KeyCode3["F11"]=69]="F11";KeyCode3[KeyCode3["F12"]=70]="F12";KeyCode3[KeyCode3["F13"]=71]="F13";KeyCode3[KeyCode3["F14"]=72]="F14";KeyCode3[KeyCode3["F15"]=73]="F15";KeyCode3[KeyCode3["F16"]=74]="F16";KeyCode3[KeyCode3["F17"]=75]="F17";KeyCode3[KeyCode3["F18"]=76]="F18";KeyCode3[KeyCode3["F19"]=77]="F19";KeyCode3[KeyCode3["F20"]=78]="F20";KeyCode3[KeyCode3["F21"]=79]="F21";KeyCode3[KeyCode3["F22"]=80]="F22";KeyCode3[KeyCode3["F23"]=81]="F23";KeyCode3[KeyCode3["F24"]=82]="F24";KeyCode3[KeyCode3["NumLock"]=83]="NumLock";KeyCode3[KeyCode3["ScrollLock"]=84]="ScrollLock";KeyCode3[KeyCode3["Semicolon"]=85]="Semicolon";KeyCode3[KeyCode3["Equal"]=86]="Equal";KeyCode3[KeyCode3["Comma"]=87]="Comma";KeyCode3[KeyCode3["Minus"]=88]="Minus";KeyCode3[KeyCode3["Period"]=89]="Period";KeyCode3[KeyCode3["Slash"]=90]="Slash";KeyCode3[KeyCode3["Backquote"]=91]="Backquote";KeyCode3[KeyCode3["BracketLeft"]=92]="BracketLeft";KeyCode3[KeyCode3["Backslash"]=93]="Backslash";KeyCode3[KeyCode3["BracketRight"]=94]="BracketRight";KeyCode3[KeyCode3["Quote"]=95]="Quote";KeyCode3[KeyCode3["OEM_8"]=96]="OEM_8";KeyCode3[KeyCode3["IntlBackslash"]=97]="IntlBackslash";KeyCode3[KeyCode3["Numpad0"]=98]="Numpad0";KeyCode3[KeyCode3["Numpad1"]=99]="Numpad1";KeyCode3[KeyCode3["Numpad2"]=100]="Numpad2";KeyCode3[KeyCode3["Numpad3"]=101]="Numpad3";KeyCode3[KeyCode3["Numpad4"]=102]="Numpad4";KeyCode3[KeyCode3["Numpad5"]=103]="Numpad5";KeyCode3[KeyCode3["Numpad6"]=104]="Numpad6";KeyCode3[KeyCode3["Numpad7"]=105]="Numpad7";KeyCode3[KeyCode3["Numpad8"]=106]="Numpad8";KeyCode3[KeyCode3["Numpad9"]=107]="Numpad9";KeyCode3[KeyCode3["NumpadMultiply"]=108]="NumpadMultiply";KeyCode3[KeyCode3["NumpadAdd"]=109]="NumpadAdd";KeyCode3[KeyCode3["NUMPAD_SEPARATOR"]=110]="NUMPAD_SEPARATOR";KeyCode3[KeyCode3["NumpadSubtract"]=111]="NumpadSubtract";KeyCode3[KeyCode3["NumpadDecimal"]=112]="NumpadDecimal";KeyCode3[KeyCode3["NumpadDivide"]=113]="NumpadDivide";KeyCode3[KeyCode3["KEY_IN_COMPOSITION"]=114]="KEY_IN_COMPOSITION";KeyCode3[KeyCode3["ABNT_C1"]=115]="ABNT_C1";KeyCode3[KeyCode3["ABNT_C2"]=116]="ABNT_C2";KeyCode3[KeyCode3["AudioVolumeMute"]=117]="AudioVolumeMute";KeyCode3[KeyCode3["AudioVolumeUp"]=118]="AudioVolumeUp";KeyCode3[KeyCode3["AudioVolumeDown"]=119]="AudioVolumeDown";KeyCode3[KeyCode3["BrowserSearch"]=120]="BrowserSearch";KeyCode3[KeyCode3["BrowserHome"]=121]="BrowserHome";KeyCode3[KeyCode3["BrowserBack"]=122]="BrowserBack";KeyCode3[KeyCode3["BrowserForward"]=123]="BrowserForward";KeyCode3[KeyCode3["MediaTrackNext"]=124]="MediaTrackNext";KeyCode3[KeyCode3["MediaTrackPrevious"]=125]="MediaTrackPrevious";KeyCode3[KeyCode3["MediaStop"]=126]="MediaStop";KeyCode3[KeyCode3["MediaPlayPause"]=127]="MediaPlayPause";KeyCode3[KeyCode3["LaunchMediaPlayer"]=128]="LaunchMediaPlayer";KeyCode3[KeyCode3["LaunchMail"]=129]="LaunchMail";KeyCode3[KeyCode3["LaunchApp2"]=130]="LaunchApp2";KeyCode3[KeyCode3["Clear"]=131]="Clear";KeyCode3[KeyCode3["MAX_VALUE"]=132]="MAX_VALUE"})(KeyCode||(KeyCode={}));(function(MarkerSeverity4){MarkerSeverity4[MarkerSeverity4["Hint"]=1]="Hint";MarkerSeverity4[MarkerSeverity4["Info"]=2]="Info";MarkerSeverity4[MarkerSeverity4["Warning"]=4]="Warning";MarkerSeverity4[MarkerSeverity4["Error"]=8]="Error"})(MarkerSeverity||(MarkerSeverity={}));(function(MarkerTag3){MarkerTag3[MarkerTag3["Unnecessary"]=1]="Unnecessary";MarkerTag3[MarkerTag3["Deprecated"]=2]="Deprecated"})(MarkerTag||(MarkerTag={}));(function(MinimapPosition3){MinimapPosition3[MinimapPosition3["Inline"]=1]="Inline";MinimapPosition3[MinimapPosition3["Gutter"]=2]="Gutter"})(MinimapPosition||(MinimapPosition={}));(function(MouseTargetType2){MouseTargetType2[MouseTargetType2["UNKNOWN"]=0]="UNKNOWN";MouseTargetType2[MouseTargetType2["TEXTAREA"]=1]="TEXTAREA";MouseTargetType2[MouseTargetType2["GUTTER_GLYPH_MARGIN"]=2]="GUTTER_GLYPH_MARGIN";MouseTargetType2[MouseTargetType2["GUTTER_LINE_NUMBERS"]=3]="GUTTER_LINE_NUMBERS";MouseTargetType2[MouseTargetType2["GUTTER_LINE_DECORATIONS"]=4]="GUTTER_LINE_DECORATIONS";MouseTargetType2[MouseTargetType2["GUTTER_VIEW_ZONE"]=5]="GUTTER_VIEW_ZONE";MouseTargetType2[MouseTargetType2["CONTENT_TEXT"]=6]="CONTENT_TEXT";MouseTargetType2[MouseTargetType2["CONTENT_EMPTY"]=7]="CONTENT_EMPTY";MouseTargetType2[MouseTargetType2["CONTENT_VIEW_ZONE"]=8]="CONTENT_VIEW_ZONE";MouseTargetType2[MouseTargetType2["CONTENT_WIDGET"]=9]="CONTENT_WIDGET";MouseTargetType2[MouseTargetType2["OVERVIEW_RULER"]=10]="OVERVIEW_RULER";MouseTargetType2[MouseTargetType2["SCROLLBAR"]=11]="SCROLLBAR";MouseTargetType2[MouseTargetType2["OVERLAY_WIDGET"]=12]="OVERLAY_WIDGET";MouseTargetType2[MouseTargetType2["OUTSIDE_EDITOR"]=13]="OUTSIDE_EDITOR"})(MouseTargetType||(MouseTargetType={}));(function(OverlayWidgetPositionPreference2){OverlayWidgetPositionPreference2[OverlayWidgetPositionPreference2["TOP_RIGHT_CORNER"]=0]="TOP_RIGHT_CORNER";OverlayWidgetPositionPreference2[OverlayWidgetPositionPreference2["BOTTOM_RIGHT_CORNER"]=1]="BOTTOM_RIGHT_CORNER";OverlayWidgetPositionPreference2[OverlayWidgetPositionPreference2["TOP_CENTER"]=2]="TOP_CENTER"})(OverlayWidgetPositionPreference||(OverlayWidgetPositionPreference={}));(function(OverviewRulerLane3){OverviewRulerLane3[OverviewRulerLane3["Left"]=1]="Left";OverviewRulerLane3[OverviewRulerLane3["Center"]=2]="Center";OverviewRulerLane3[OverviewRulerLane3["Right"]=4]="Right";OverviewRulerLane3[OverviewRulerLane3["Full"]=7]="Full"})(OverviewRulerLane||(OverviewRulerLane={}));(function(PositionAffinity2){PositionAffinity2[PositionAffinity2["Left"]=0]="Left";PositionAffinity2[PositionAffinity2["Right"]=1]="Right";PositionAffinity2[PositionAffinity2["None"]=2]="None";PositionAffinity2[PositionAffinity2["LeftOfInjectedText"]=3]="LeftOfInjectedText";PositionAffinity2[PositionAffinity2["RightOfInjectedText"]=4]="RightOfInjectedText"})(PositionAffinity||(PositionAffinity={}));(function(RenderLineNumbersType2){RenderLineNumbersType2[RenderLineNumbersType2["Off"]=0]="Off";RenderLineNumbersType2[RenderLineNumbersType2["On"]=1]="On";RenderLineNumbersType2[RenderLineNumbersType2["Relative"]=2]="Relative";RenderLineNumbersType2[RenderLineNumbersType2["Interval"]=3]="Interval";RenderLineNumbersType2[RenderLineNumbersType2["Custom"]=4]="Custom"})(RenderLineNumbersType||(RenderLineNumbersType={}));(function(RenderMinimap2){RenderMinimap2[RenderMinimap2["None"]=0]="None";RenderMinimap2[RenderMinimap2["Text"]=1]="Text";RenderMinimap2[RenderMinimap2["Blocks"]=2]="Blocks"})(RenderMinimap||(RenderMinimap={}));(function(ScrollType2){ScrollType2[ScrollType2["Smooth"]=0]="Smooth";ScrollType2[ScrollType2["Immediate"]=1]="Immediate"})(ScrollType||(ScrollType={}));(function(ScrollbarVisibility2){ScrollbarVisibility2[ScrollbarVisibility2["Auto"]=1]="Auto";ScrollbarVisibility2[ScrollbarVisibility2["Hidden"]=2]="Hidden";ScrollbarVisibility2[ScrollbarVisibility2["Visible"]=3]="Visible"})(ScrollbarVisibility||(ScrollbarVisibility={}));(function(SelectionDirection3){SelectionDirection3[SelectionDirection3["LTR"]=0]="LTR";SelectionDirection3[SelectionDirection3["RTL"]=1]="RTL"})(SelectionDirection||(SelectionDirection={}));(function(SignatureHelpTriggerKind3){SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["Invoke"]=1]="Invoke";SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["TriggerCharacter"]=2]="TriggerCharacter";SignatureHelpTriggerKind3[SignatureHelpTriggerKind3["ContentChange"]=3]="ContentChange"})(SignatureHelpTriggerKind2||(SignatureHelpTriggerKind2={}));(function(SymbolKind5){SymbolKind5[SymbolKind5["File"]=0]="File";SymbolKind5[SymbolKind5["Module"]=1]="Module";SymbolKind5[SymbolKind5["Namespace"]=2]="Namespace";SymbolKind5[SymbolKind5["Package"]=3]="Package";SymbolKind5[SymbolKind5["Class"]=4]="Class";SymbolKind5[SymbolKind5["Method"]=5]="Method";SymbolKind5[SymbolKind5["Property"]=6]="Property";SymbolKind5[SymbolKind5["Field"]=7]="Field";SymbolKind5[SymbolKind5["Constructor"]=8]="Constructor";SymbolKind5[SymbolKind5["Enum"]=9]="Enum";SymbolKind5[SymbolKind5["Interface"]=10]="Interface";SymbolKind5[SymbolKind5["Function"]=11]="Function";SymbolKind5[SymbolKind5["Variable"]=12]="Variable";SymbolKind5[SymbolKind5["Constant"]=13]="Constant";SymbolKind5[SymbolKind5["String"]=14]="String";SymbolKind5[SymbolKind5["Number"]=15]="Number";SymbolKind5[SymbolKind5["Boolean"]=16]="Boolean";SymbolKind5[SymbolKind5["Array"]=17]="Array";SymbolKind5[SymbolKind5["Object"]=18]="Object";SymbolKind5[SymbolKind5["Key"]=19]="Key";SymbolKind5[SymbolKind5["Null"]=20]="Null";SymbolKind5[SymbolKind5["EnumMember"]=21]="EnumMember";SymbolKind5[SymbolKind5["Struct"]=22]="Struct";SymbolKind5[SymbolKind5["Event"]=23]="Event";SymbolKind5[SymbolKind5["Operator"]=24]="Operator";SymbolKind5[SymbolKind5["TypeParameter"]=25]="TypeParameter"})(SymbolKind||(SymbolKind={}));(function(SymbolTag5){SymbolTag5[SymbolTag5["Deprecated"]=1]="Deprecated"})(SymbolTag||(SymbolTag={}));(function(TextEditorCursorBlinkingStyle2){TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Hidden"]=0]="Hidden";TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Blink"]=1]="Blink";TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Smooth"]=2]="Smooth";TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Phase"]=3]="Phase";TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Expand"]=4]="Expand";TextEditorCursorBlinkingStyle2[TextEditorCursorBlinkingStyle2["Solid"]=5]="Solid"})(TextEditorCursorBlinkingStyle||(TextEditorCursorBlinkingStyle={}));(function(TextEditorCursorStyle3){TextEditorCursorStyle3[TextEditorCursorStyle3["Line"]=1]="Line";TextEditorCursorStyle3[TextEditorCursorStyle3["Block"]=2]="Block";TextEditorCursorStyle3[TextEditorCursorStyle3["Underline"]=3]="Underline";TextEditorCursorStyle3[TextEditorCursorStyle3["LineThin"]=4]="LineThin";TextEditorCursorStyle3[TextEditorCursorStyle3["BlockOutline"]=5]="BlockOutline";TextEditorCursorStyle3[TextEditorCursorStyle3["UnderlineThin"]=6]="UnderlineThin"})(TextEditorCursorStyle2||(TextEditorCursorStyle2={}));(function(TrackedRangeStickiness2){TrackedRangeStickiness2[TrackedRangeStickiness2["AlwaysGrowsWhenTypingAtEdges"]=0]="AlwaysGrowsWhenTypingAtEdges";TrackedRangeStickiness2[TrackedRangeStickiness2["NeverGrowsWhenTypingAtEdges"]=1]="NeverGrowsWhenTypingAtEdges";TrackedRangeStickiness2[TrackedRangeStickiness2["GrowsOnlyWhenTypingBefore"]=2]="GrowsOnlyWhenTypingBefore";TrackedRangeStickiness2[TrackedRangeStickiness2["GrowsOnlyWhenTypingAfter"]=3]="GrowsOnlyWhenTypingAfter"})(TrackedRangeStickiness||(TrackedRangeStickiness={}));(function(WrappingIndent2){WrappingIndent2[WrappingIndent2["None"]=0]="None";WrappingIndent2[WrappingIndent2["Same"]=1]="Same";WrappingIndent2[WrappingIndent2["Indent"]=2]="Indent";WrappingIndent2[WrappingIndent2["DeepIndent"]=3]="DeepIndent"})(WrappingIndent||(WrappingIndent={}))}});function createMonacoBaseAPI(){return{editor:void 0,languages:void 0,CancellationTokenSource:CancellationTokenSource,Emitter:Emitter,KeyCode:KeyCode,KeyMod:KeyMod,Position:Position,Range:Range,Selection:Selection,SelectionDirection:SelectionDirection,MarkerSeverity:MarkerSeverity,MarkerTag:MarkerTag,Uri:URI,Token:Token}}var KeyMod;var init_editorBaseApi=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/editorBaseApi.js"(){init_cancellation();init_event();init_keyCodes();init_uri();init_position();init_range();init_selection();init_languages();init_standaloneEnums();KeyMod=class{static chord(firstPart,secondPart){return KeyChord(firstPart,secondPart)}};KeyMod.CtrlCmd=2048;KeyMod.Shift=1024;KeyMod.Alt=512;KeyMod.WinCtrl=256}});var init_=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/browser/standalone-tokens.css"(){}});var LRUCachedFunction,CachedFunction;var init_cache=__esm({"node_modules/monaco-editor/esm/vs/base/common/cache.js"(){LRUCachedFunction=class{constructor(fn){this.fn=fn;this.lastCache=void 0;this.lastArgKey=void 0}get(arg){const key=JSON.stringify(arg);if(this.lastArgKey!==key){this.lastArgKey=key;this.lastCache=this.fn(arg)}return this.lastCache}};CachedFunction=class{get cachedValues(){return this._map}constructor(fn){this.fn=fn;this._map=new Map}get(arg){if(this._map.has(arg)){return this._map.get(arg)}const value=this.fn(arg);this._map.set(arg,value);return value}}}});var Lazy;var init_lazy=__esm({"node_modules/monaco-editor/esm/vs/base/common/lazy.js"(){Lazy=class{constructor(executor){this.executor=executor;this._didRun=false}get value(){if(!this._didRun){try{this._value=this.executor()}catch(err){this._error=err}finally{this._didRun=true}}if(this._error){throw this._error}return this._value}get rawValue(){return this._value}}}});function isFalsyOrWhitespace(str){if(!str||typeof str!=="string"){return true}return str.trim().length===0}function format(value,...args){if(args.length===0){return value}return value.replace(_formatRegexp,(function(match2,group3){const idx=parseInt(group3,10);return isNaN(idx)||idx<0||idx>=args.length?match2:args[idx]}))}function escape(html2){return html2.replace(/[<>&]/g,(function(match2){switch(match2){case"<":return"<";case">":return">";case"&":return"&";default:return match2}}))}function escapeRegExpCharacters(value){return value.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function trim(haystack,needle=" "){const trimmed=ltrim(haystack,needle);return rtrim(trimmed,needle)}function ltrim(haystack,needle){if(!haystack||!needle){return haystack}const needleLen=needle.length;if(needleLen===0||haystack.length===0){return haystack}let offset=0;while(haystack.indexOf(needle,offset)===offset){offset=offset+needleLen}return haystack.substring(offset)}function rtrim(haystack,needle){if(!haystack||!needle){return haystack}const needleLen=needle.length,haystackLen=haystack.length;if(needleLen===0||haystackLen===0){return haystack}let offset=haystackLen,idx=-1;while(true){idx=haystack.lastIndexOf(needle,offset-1);if(idx===-1||idx+needleLen!==offset){break}if(idx===0){return""}offset=idx}return haystack.substring(0,offset)}function convertSimple2RegExpPattern(pattern){return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function stripWildcards(pattern){return pattern.replace(/\*/g,"")}function createRegExp(searchString,isRegex,options2={}){if(!searchString){throw new Error("Cannot create regex from empty string")}if(!isRegex){searchString=escapeRegExpCharacters(searchString)}if(options2.wholeWord){if(!/\B/.test(searchString.charAt(0))){searchString="\\b"+searchString}if(!/\B/.test(searchString.charAt(searchString.length-1))){searchString=searchString+"\\b"}}let modifiers="";if(options2.global){modifiers+="g"}if(!options2.matchCase){modifiers+="i"}if(options2.multiline){modifiers+="m"}if(options2.unicode){modifiers+="u"}return new RegExp(searchString,modifiers)}function regExpLeadsToEndlessLoop(regexp){if(regexp.source==="^"||regexp.source==="^$"||regexp.source==="$"||regexp.source==="^\\s*$"){return false}const match2=regexp.exec("");return!!(match2&®exp.lastIndex===0)}function splitLines(str){return str.split(/\r\n|\r|\n/)}function firstNonWhitespaceIndex(str){for(let i=0,len=str.length;i=0;i--){const chCode=str.charCodeAt(i);if(chCode!==32&&chCode!==9){return i}}return-1}function compare(a,b){if(ab){return 1}else{return 0}}function compareSubstring(a,b,aStart=0,aEnd=a.length,bStart=0,bEnd=b.length){for(;aStartcodeB){return 1}}const aLen=aEnd-aStart;const bLen=bEnd-bStart;if(aLenbLen){return 1}return 0}function compareIgnoreCase(a,b){return compareSubstringIgnoreCase(a,b,0,a.length,0,b.length)}function compareSubstringIgnoreCase(a,b,aStart=0,aEnd=a.length,bStart=0,bEnd=b.length){for(;aStart=128||codeB>=128){return compareSubstring(a.toLowerCase(),b.toLowerCase(),aStart,aEnd,bStart,bEnd)}if(isLowerAsciiLetter(codeA)){codeA-=32}if(isLowerAsciiLetter(codeB)){codeB-=32}const diff=codeA-codeB;if(diff===0){continue}return diff}const aLen=aEnd-aStart;const bLen=bEnd-bStart;if(aLenbLen){return 1}return 0}function isAsciiDigit(code){return code>=48&&code<=57}function isLowerAsciiLetter(code){return code>=97&&code<=122}function isUpperAsciiLetter(code){return code>=65&&code<=90}function equalsIgnoreCase(a,b){return a.length===b.length&&compareSubstringIgnoreCase(a,b)===0}function startsWithIgnoreCase(str,candidate){const candidateLength=candidate.length;if(candidate.length>str.length){return false}return compareSubstringIgnoreCase(str,candidate,0,candidateLength)===0}function commonPrefixLength(a,b){const len=Math.min(a.length,b.length);let i;for(i=0;i1){const prevCharCode=str.charCodeAt(offset-2);if(isHighSurrogate(prevCharCode)){return computeCodePoint(prevCharCode,charCode)}}return charCode}function nextCharLength(str,initialOffset){const iterator=new GraphemeIterator(str,initialOffset);return iterator.nextGraphemeLength()}function prevCharLength(str,initialOffset){const iterator=new GraphemeIterator(str,initialOffset);return iterator.prevGraphemeLength()}function getCharContainingOffset(str,offset){if(offset>0&&isLowSurrogate(str.charCodeAt(offset))){offset--}const endOffset=offset+nextCharLength(str,offset);const startOffset=endOffset-prevCharLength(str,endOffset);return[startOffset,endOffset]}function makeContainsRtl(){return/(?:[\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\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function containsRTL(str){if(!CONTAINS_RTL){CONTAINS_RTL=makeContainsRtl()}return CONTAINS_RTL.test(str)}function isBasicASCII(str){return IS_BASIC_ASCII.test(str)}function containsUnusualLineTerminators(str){return UNUSUAL_LINE_TERMINATORS.test(str)}function isFullWidthCharacter(charCode){return charCode>=11904&&charCode<=55215||charCode>=63744&&charCode<=64255||charCode>=65281&&charCode<=65374}function isEmojiImprecise(x){return x>=127462&&x<=127487||x===8986||x===8987||x===9200||x===9203||x>=9728&&x<=10175||x===11088||x===11093||x>=127744&&x<=128591||x>=128640&&x<=128764||x>=128992&&x<=129008||x>=129280&&x<=129535||x>=129648&&x<=129782}function startsWithUTF8BOM(str){return!!(str&&str.length>0&&str.charCodeAt(0)===65279)}function containsUppercaseCharacter(target,ignoreEscapedChars=false){if(!target){return false}if(ignoreEscapedChars){target=target.replace(/\\./g,"")}return target.toLowerCase()!==target}function singleLetterHash(n){const LETTERS_CNT=90-65+1;n=n%(2*LETTERS_CNT);if(n0){const optionalZwjCodePoint=iterator.prevCodePoint();if(optionalZwjCodePoint===8205){resultOffset=iterator.offset}}return resultOffset}function isEmojiModifier(codePoint){return 127995<=codePoint&&codePoint<=127999}var _a2,_formatRegexp,CodePointIterator,GraphemeIterator,CONTAINS_RTL,IS_BASIC_ASCII,UNUSUAL_LINE_TERMINATORS,UTF8_BOM_CHARACTER,GraphemeBreakTree,noBreakWhitespace,AmbiguousCharacters,InvisibleCharacters;var init_strings=__esm({"node_modules/monaco-editor/esm/vs/base/common/strings.js"(){init_cache();init_lazy();_formatRegexp=/{(\d+)}/g;CodePointIterator=class{get offset(){return this._offset}constructor(str,offset=0){this._str=str;this._len=str.length;this._offset=offset}setOffset(offset){this._offset=offset}prevCodePoint(){const codePoint=getPrevCodePoint(this._str,this._offset);this._offset-=codePoint>=65536?2:1;return codePoint}nextCodePoint(){const codePoint=getNextCodePoint(this._str,this._len,this._offset);this._offset+=codePoint>=65536?2:1;return codePoint}eol(){return this._offset>=this._len}};GraphemeIterator=class{get offset(){return this._iterator.offset}constructor(str,offset=0){this._iterator=new CodePointIterator(str,offset)}nextGraphemeLength(){const graphemeBreakTree=GraphemeBreakTree.getInstance();const iterator=this._iterator;const initialOffset=iterator.offset;let graphemeBreakType=graphemeBreakTree.getGraphemeBreakType(iterator.nextCodePoint());while(!iterator.eol()){const offset=iterator.offset;const nextGraphemeBreakType=graphemeBreakTree.getGraphemeBreakType(iterator.nextCodePoint());if(breakBetweenGraphemeBreakType(graphemeBreakType,nextGraphemeBreakType)){iterator.setOffset(offset);break}graphemeBreakType=nextGraphemeBreakType}return iterator.offset-initialOffset}prevGraphemeLength(){const graphemeBreakTree=GraphemeBreakTree.getInstance();const iterator=this._iterator;const initialOffset=iterator.offset;let graphemeBreakType=graphemeBreakTree.getGraphemeBreakType(iterator.prevCodePoint());while(iterator.offset>0){const offset=iterator.offset;const prevGraphemeBreakType=graphemeBreakTree.getGraphemeBreakType(iterator.prevCodePoint());if(breakBetweenGraphemeBreakType(prevGraphemeBreakType,graphemeBreakType)){iterator.setOffset(offset);break}graphemeBreakType=prevGraphemeBreakType}return initialOffset-iterator.offset}eol(){return this._iterator.eol()}};CONTAINS_RTL=void 0;IS_BASIC_ASCII=/^[\t\n\r\x20-\x7E]*$/;UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;UTF8_BOM_CHARACTER=String.fromCharCode(65279);GraphemeBreakTree=class{static getInstance(){if(!GraphemeBreakTree._INSTANCE){GraphemeBreakTree._INSTANCE=new GraphemeBreakTree}return GraphemeBreakTree._INSTANCE}constructor(){this._data=getGraphemeBreakRawData()}getGraphemeBreakType(codePoint){if(codePoint<32){if(codePoint===10){return 3}if(codePoint===13){return 2}return 4}if(codePoint<127){return 0}const data=this._data;const nodeCount=data.length/3;let nodeIndex=1;while(nodeIndex<=nodeCount){if(codePointdata[3*nodeIndex+1]){nodeIndex=2*nodeIndex+1}else{return data[3*nodeIndex+2]}}return 0}};GraphemeBreakTree._INSTANCE=null;noBreakWhitespace=" ";AmbiguousCharacters=class{static getInstance(locales){return _a2.cache.get(Array.from(locales))}static getLocales(){return _a2._locales.value}constructor(confusableDictionary){this.confusableDictionary=confusableDictionary}isAmbiguous(codePoint){return this.confusableDictionary.has(codePoint)}getPrimaryConfusable(codePoint){return this.confusableDictionary.get(codePoint)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}};_a2=AmbiguousCharacters;AmbiguousCharacters.ambiguousCharacterData=new Lazy((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')));AmbiguousCharacters.cache=new LRUCachedFunction((locales=>{function arrayToMap(arr){const result=new Map;for(let i=0;i!l.startsWith("_")&&l in data));if(filteredLocales.length===0){filteredLocales=["_default"]}let languageSpecificMap=void 0;for(const locale2 of filteredLocales){const map2=arrayToMap(data[locale2]);languageSpecificMap=intersectMaps(languageSpecificMap,map2)}const commonMap=arrayToMap(data["_common"]);const map=mergeMaps(commonMap,languageSpecificMap);return new _a2(map)}));AmbiguousCharacters._locales=new Lazy((()=>Object.keys(_a2.ambiguousCharacterData.value).filter((k=>!k.startsWith("_")))));InvisibleCharacters=class{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){if(!this._data){this._data=new Set(InvisibleCharacters.getRawData())}return this._data}static isInvisibleCharacter(codePoint){return InvisibleCharacters.getData().has(codePoint)}static get codePoints(){return InvisibleCharacters.getData()}};InvisibleCharacters._data=void 0}});function addMatchMediaChangeListener(query,callback){if(typeof query==="string"){query=window.matchMedia(query)}query.addEventListener("change",callback)}function getZoomFactor(){return WindowManager.INSTANCE.getZoomFactor()}function isStandalone(){return standalone}var WindowManager,DevicePixelRatioMonitor,PixelRatioImpl,PixelRatioFacade,PixelRatio,userAgent2,isFirefox2,isWebKit,isChrome2,isSafari2,isWebkitWebView,isElectron,isAndroid2,standalone;var init_browser=__esm({"node_modules/monaco-editor/esm/vs/base/browser/browser.js"(){init_event();init_lifecycle();WindowManager=class{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}};WindowManager.INSTANCE=new WindowManager;DevicePixelRatioMonitor=class extends Disposable{constructor(){super();this._onDidChange=this._register(new Emitter);this.onDidChange=this._onDidChange.event;this._listener=()=>this._handleChange(true);this._mediaQueryList=null;this._handleChange(false)}_handleChange(fireEvent){var _a6;(_a6=this._mediaQueryList)===null||_a6===void 0?void 0:_a6.removeEventListener("change",this._listener);this._mediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);this._mediaQueryList.addEventListener("change",this._listener);if(fireEvent){this._onDidChange.fire()}}};PixelRatioImpl=class extends Disposable{get value(){return this._value}constructor(){super();this._onDidChange=this._register(new Emitter);this.onDidChange=this._onDidChange.event;this._value=this._getPixelRatio();const dprMonitor=this._register(new DevicePixelRatioMonitor);this._register(dprMonitor.onDidChange((()=>{this._value=this._getPixelRatio();this._onDidChange.fire(this._value)})))}_getPixelRatio(){const ctx=document.createElement("canvas").getContext("2d");const dpr=window.devicePixelRatio||1;const bsr=ctx.webkitBackingStorePixelRatio||ctx.mozBackingStorePixelRatio||ctx.msBackingStorePixelRatio||ctx.oBackingStorePixelRatio||ctx.backingStorePixelRatio||1;return dpr/bsr}};PixelRatioFacade=class{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){if(!this._pixelRatioMonitor){this._pixelRatioMonitor=markAsSingleton(new PixelRatioImpl)}return this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}};PixelRatio=new PixelRatioFacade;userAgent2=navigator.userAgent;isFirefox2=userAgent2.indexOf("Firefox")>=0;isWebKit=userAgent2.indexOf("AppleWebKit")>=0;isChrome2=userAgent2.indexOf("Chrome")>=0;isSafari2=!isChrome2&&userAgent2.indexOf("Safari")>=0;isWebkitWebView=!isChrome2&&!isSafari2&&isWebKit;isElectron=userAgent2.indexOf("Electron/")>=0;isAndroid2=userAgent2.indexOf("Android")>=0;standalone=false;if(window.matchMedia){const standaloneMatchMedia=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)");const fullScreenMatchMedia=window.matchMedia("(display-mode: fullscreen)");standalone=standaloneMatchMedia.matches;addMatchMediaChangeListener(standaloneMatchMedia,(({matches:matches})=>{if(standalone&&fullScreenMatchMedia.matches){return}standalone=matches}))}}});function numberAsPixels(value){return typeof value==="number"?`${value}px`:value}function createFastDomNode(domNode){return new FastDomNode(domNode)}var FastDomNode;var init_fastDomNode=__esm({"node_modules/monaco-editor/esm/vs/base/browser/fastDomNode.js"(){FastDomNode=class{constructor(domNode){this.domNode=domNode;this._maxWidth="";this._width="";this._height="";this._top="";this._left="";this._bottom="";this._right="";this._paddingLeft="";this._fontFamily="";this._fontWeight="";this._fontSize="";this._fontStyle="";this._fontFeatureSettings="";this._fontVariationSettings="";this._textDecoration="";this._lineHeight="";this._letterSpacing="";this._className="";this._display="";this._position="";this._visibility="";this._color="";this._backgroundColor="";this._layerHint=false;this._contain="none";this._boxShadow=""}setMaxWidth(_maxWidth){const maxWidth=numberAsPixels(_maxWidth);if(this._maxWidth===maxWidth){return}this._maxWidth=maxWidth;this.domNode.style.maxWidth=this._maxWidth}setWidth(_width){const width=numberAsPixels(_width);if(this._width===width){return}this._width=width;this.domNode.style.width=this._width}setHeight(_height){const height=numberAsPixels(_height);if(this._height===height){return}this._height=height;this.domNode.style.height=this._height}setTop(_top){const top=numberAsPixels(_top);if(this._top===top){return}this._top=top;this.domNode.style.top=this._top}setLeft(_left){const left=numberAsPixels(_left);if(this._left===left){return}this._left=left;this.domNode.style.left=this._left}setBottom(_bottom){const bottom=numberAsPixels(_bottom);if(this._bottom===bottom){return}this._bottom=bottom;this.domNode.style.bottom=this._bottom}setRight(_right){const right=numberAsPixels(_right);if(this._right===right){return}this._right=right;this.domNode.style.right=this._right}setPaddingLeft(_paddingLeft){const paddingLeft=numberAsPixels(_paddingLeft);if(this._paddingLeft===paddingLeft){return}this._paddingLeft=paddingLeft;this.domNode.style.paddingLeft=this._paddingLeft}setFontFamily(fontFamily){if(this._fontFamily===fontFamily){return}this._fontFamily=fontFamily;this.domNode.style.fontFamily=this._fontFamily}setFontWeight(fontWeight){if(this._fontWeight===fontWeight){return}this._fontWeight=fontWeight;this.domNode.style.fontWeight=this._fontWeight}setFontSize(_fontSize){const fontSize=numberAsPixels(_fontSize);if(this._fontSize===fontSize){return}this._fontSize=fontSize;this.domNode.style.fontSize=this._fontSize}setFontStyle(fontStyle){if(this._fontStyle===fontStyle){return}this._fontStyle=fontStyle;this.domNode.style.fontStyle=this._fontStyle}setFontFeatureSettings(fontFeatureSettings){if(this._fontFeatureSettings===fontFeatureSettings){return}this._fontFeatureSettings=fontFeatureSettings;this.domNode.style.fontFeatureSettings=this._fontFeatureSettings}setFontVariationSettings(fontVariationSettings){if(this._fontVariationSettings===fontVariationSettings){return}this._fontVariationSettings=fontVariationSettings;this.domNode.style.fontVariationSettings=this._fontVariationSettings}setTextDecoration(textDecoration){if(this._textDecoration===textDecoration){return}this._textDecoration=textDecoration;this.domNode.style.textDecoration=this._textDecoration}setLineHeight(_lineHeight){const lineHeight=numberAsPixels(_lineHeight);if(this._lineHeight===lineHeight){return}this._lineHeight=lineHeight;this.domNode.style.lineHeight=this._lineHeight}setLetterSpacing(_letterSpacing){const letterSpacing=numberAsPixels(_letterSpacing);if(this._letterSpacing===letterSpacing){return}this._letterSpacing=letterSpacing;this.domNode.style.letterSpacing=this._letterSpacing}setClassName(className){if(this._className===className){return}this._className=className;this.domNode.className=this._className}toggleClassName(className,shouldHaveIt){this.domNode.classList.toggle(className,shouldHaveIt);this._className=this.domNode.className}setDisplay(display){if(this._display===display){return}this._display=display;this.domNode.style.display=this._display}setPosition(position){if(this._position===position){return}this._position=position;this.domNode.style.position=this._position}setVisibility(visibility){if(this._visibility===visibility){return}this._visibility=visibility;this.domNode.style.visibility=this._visibility}setColor(color){if(this._color===color){return}this._color=color;this.domNode.style.color=this._color}setBackgroundColor(backgroundColor){if(this._backgroundColor===backgroundColor){return}this._backgroundColor=backgroundColor;this.domNode.style.backgroundColor=this._backgroundColor}setLayerHinting(layerHint){if(this._layerHint===layerHint){return}this._layerHint=layerHint;this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":""}setBoxShadow(boxShadow){if(this._boxShadow===boxShadow){return}this._boxShadow=boxShadow;this.domNode.style.boxShadow=boxShadow}setContain(contain){if(this._contain===contain){return}this._contain=contain;this.domNode.style.contain=this._contain}setAttribute(name,value){this.domNode.setAttribute(name,value)}removeAttribute(name){this.domNode.removeAttribute(name)}appendChild(child){this.domNode.appendChild(child.domNode)}removeChild(child){this.domNode.removeChild(child.domNode)}}}});function applyFontInfo(domNode,fontInfo){if(domNode instanceof FastDomNode){domNode.setFontFamily(fontInfo.getMassagedFontFamily());domNode.setFontWeight(fontInfo.fontWeight);domNode.setFontSize(fontInfo.fontSize);domNode.setFontFeatureSettings(fontInfo.fontFeatureSettings);domNode.setFontVariationSettings(fontInfo.fontVariationSettings);domNode.setLineHeight(fontInfo.lineHeight);domNode.setLetterSpacing(fontInfo.letterSpacing)}else{domNode.style.fontFamily=fontInfo.getMassagedFontFamily();domNode.style.fontWeight=fontInfo.fontWeight;domNode.style.fontSize=fontInfo.fontSize+"px";domNode.style.fontFeatureSettings=fontInfo.fontFeatureSettings;domNode.style.fontVariationSettings=fontInfo.fontVariationSettings;domNode.style.lineHeight=fontInfo.lineHeight+"px";domNode.style.letterSpacing=fontInfo.letterSpacing+"px"}}var init_domFontInfo=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/config/domFontInfo.js"(){init_fastDomNode()}});function readCharWidths(bareFontInfo,requests){const reader=new DomCharWidthReader(bareFontInfo,requests);reader.read()}var CharWidthRequest,DomCharWidthReader;var init_charWidthReader=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/config/charWidthReader.js"(){init_domFontInfo();CharWidthRequest=class{constructor(chr,type){this.chr=chr;this.type=type;this.width=0}fulfill(width){this.width=width}};DomCharWidthReader=class{constructor(bareFontInfo,requests){this._bareFontInfo=bareFontInfo;this._requests=requests;this._container=null;this._testElements=null}read(){this._createDomElements();document.body.appendChild(this._container);this._readFromDomElements();document.body.removeChild(this._container);this._container=null;this._testElements=null}_createDomElements(){const container=document.createElement("div");container.style.position="absolute";container.style.top="-50000px";container.style.width="50000px";const regularDomNode=document.createElement("div");applyFontInfo(regularDomNode,this._bareFontInfo);container.appendChild(regularDomNode);const boldDomNode=document.createElement("div");applyFontInfo(boldDomNode,this._bareFontInfo);boldDomNode.style.fontWeight="bold";container.appendChild(boldDomNode);const italicDomNode=document.createElement("div");applyFontInfo(italicDomNode,this._bareFontInfo);italicDomNode.style.fontStyle="italic";container.appendChild(italicDomNode);const testElements=[];for(const request of this._requests){let parent;if(request.type===0){parent=regularDomNode}if(request.type===2){parent=boldDomNode}if(request.type===1){parent=italicDomNode}parent.appendChild(document.createElement("br"));const testElement=document.createElement("span");DomCharWidthReader._render(testElement,request);parent.appendChild(testElement);testElements.push(testElement)}this._container=container;this._testElements=testElements}static _render(testElement,request){if(request.chr===" "){let htmlString=" ";for(let i=0;i<8;i++){htmlString+=htmlString}testElement.innerText=htmlString}else{let testString=request.chr;for(let i=0;i<8;i++){testString+=testString}testElement.textContent=testString}}_readFromDomElements(){for(let i=0,len=this._requests.length;i{this._evictUntrustedReadingsTimeout=-1;this._evictUntrustedReadings()}),5e3)}}_evictUntrustedReadings(){const values=this._cache.getValues();let somethingRemoved=false;for(const item of values){if(!item.isTrusted){somethingRemoved=true;this._cache.remove(item)}}if(somethingRemoved){this._onDidChange.fire()}}readFontInfo(bareFontInfo){if(!this._cache.has(bareFontInfo)){let readConfig=this._actualReadFontInfo(bareFontInfo);if(readConfig.typicalHalfwidthCharacterWidth<=2||readConfig.typicalFullwidthCharacterWidth<=2||readConfig.spaceWidth<=2||readConfig.maxDigitWidth<=2){readConfig=new FontInfo({pixelRatio:PixelRatio.value,fontFamily:readConfig.fontFamily,fontWeight:readConfig.fontWeight,fontSize:readConfig.fontSize,fontFeatureSettings:readConfig.fontFeatureSettings,fontVariationSettings:readConfig.fontVariationSettings,lineHeight:readConfig.lineHeight,letterSpacing:readConfig.letterSpacing,isMonospace:readConfig.isMonospace,typicalHalfwidthCharacterWidth:Math.max(readConfig.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(readConfig.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:readConfig.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(readConfig.spaceWidth,5),middotWidth:Math.max(readConfig.middotWidth,5),wsmiddotWidth:Math.max(readConfig.wsmiddotWidth,5),maxDigitWidth:Math.max(readConfig.maxDigitWidth,5)},false)}this._writeToCache(bareFontInfo,readConfig)}return this._cache.get(bareFontInfo)}_createRequest(chr,type,all,monospace){const result=new CharWidthRequest(chr,type);all.push(result);monospace===null||monospace===void 0?void 0:monospace.push(result);return result}_actualReadFontInfo(bareFontInfo){const all=[];const monospace=[];const typicalHalfwidthCharacter=this._createRequest("n",0,all,monospace);const typicalFullwidthCharacter=this._createRequest("m",0,all,null);const space=this._createRequest(" ",0,all,monospace);const digit0=this._createRequest("0",0,all,monospace);const digit1=this._createRequest("1",0,all,monospace);const digit2=this._createRequest("2",0,all,monospace);const digit3=this._createRequest("3",0,all,monospace);const digit4=this._createRequest("4",0,all,monospace);const digit5=this._createRequest("5",0,all,monospace);const digit6=this._createRequest("6",0,all,monospace);const digit7=this._createRequest("7",0,all,monospace);const digit8=this._createRequest("8",0,all,monospace);const digit9=this._createRequest("9",0,all,monospace);const rightwardsArrow=this._createRequest("→",0,all,monospace);const halfwidthRightwardsArrow=this._createRequest("→",0,all,null);const middot=this._createRequest("·",0,all,monospace);const wsmiddotWidth=this._createRequest(String.fromCharCode(11825),0,all,null);const monospaceTestChars="|/-_ilm%";for(let i=0,len=monospaceTestChars.length;i.001){isMonospace=false;break}}let canUseHalfwidthRightwardsArrow=true;if(isMonospace&&halfwidthRightwardsArrow.width!==referenceWidth){canUseHalfwidthRightwardsArrow=false}if(halfwidthRightwardsArrow.width>rightwardsArrow.width){canUseHalfwidthRightwardsArrow=false}return new FontInfo({pixelRatio:PixelRatio.value,fontFamily:bareFontInfo.fontFamily,fontWeight:bareFontInfo.fontWeight,fontSize:bareFontInfo.fontSize,fontFeatureSettings:bareFontInfo.fontFeatureSettings,fontVariationSettings:bareFontInfo.fontVariationSettings,lineHeight:bareFontInfo.lineHeight,letterSpacing:bareFontInfo.letterSpacing,isMonospace:isMonospace,typicalHalfwidthCharacterWidth:typicalHalfwidthCharacter.width,typicalFullwidthCharacterWidth:typicalFullwidthCharacter.width,canUseHalfwidthRightwardsArrow:canUseHalfwidthRightwardsArrow,spaceWidth:space.width,middotWidth:middot.width,wsmiddotWidth:wsmiddotWidth.width,maxDigitWidth:maxDigitWidth},true)}};FontMeasurementsCache=class{constructor(){this._keys=Object.create(null);this._values=Object.create(null)}has(item){const itemId=item.getId();return!!this._values[itemId]}get(item){const itemId=item.getId();return this._values[itemId]}put(item,value){const itemId=item.getId();this._keys[itemId]=item;this._values[itemId]=value}remove(item){const itemId=item.getId();delete this._keys[itemId];delete this._values[itemId]}getValues(){return Object.keys(this._keys).map((id=>this._values[id]))}};FontMeasurements=new FontMeasurementsImpl}});function storeServiceDependency(id,target,index){if(target[_util.DI_TARGET]===target){target[_util.DI_DEPENDENCIES].push({id:id,index:index})}else{target[_util.DI_DEPENDENCIES]=[{id:id,index:index}];target[_util.DI_TARGET]=target}}function createDecorator(serviceId){if(_util.serviceIds.has(serviceId)){return _util.serviceIds.get(serviceId)}const id=function(target,key,index){if(arguments.length!==3){throw new Error("@IServiceName-decorator can only be used to decorate a parameter")}storeServiceDependency(id,target,index)};id.toString=()=>serviceId;_util.serviceIds.set(serviceId,id);return id}var _util,IInstantiationService;var init_instantiation=__esm({"node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiation.js"(){(function(_util2){_util2.serviceIds=new Map;_util2.DI_TARGET="$di$target";_util2.DI_DEPENDENCIES="$di$dependencies";function getServiceDependencies(ctor){return ctor[_util2.DI_DEPENDENCIES]||[]}_util2.getServiceDependencies=getServiceDependencies})(_util||(_util={}));IInstantiationService=createDecorator("instantiationService")}});var ICodeEditorService;var init_codeEditorService=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js"(){init_instantiation();ICodeEditorService=createDecorator("codeEditorService")}});function ok(value,message){if(!value){throw new Error(message?`Assertion failed (${message})`:"Assertion Failed")}}function assertNever(value,message="Unreachable"){throw new Error(message)}function assertFn(condition){if(!condition()){debugger;condition();onUnexpectedError(new BugIndicatingError("Assertion Failed"))}}function checkAdjacentItems(items,predicate){let i=0;while(i\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(token){switch(token.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return token.isTripleEq?"===":"==";case 4:return token.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return token.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return token.lexeme;case 18:return token.lexeme;case 19:return token.lexeme;case 20:return"EOF";default:throw illegalState(`unhandled token type: ${JSON.stringify(token)}; have you forgotten to add a case?`)}}reset(value){this._input=value;this._start=0;this._current=0;this._tokens=[];this._errors=[];return this}scan(){while(!this._isAtEnd()){this._start=this._current;const ch=this._advance();switch(ch){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const isTripleEq=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:isTripleEq})}else{this._addToken(2)}break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const isTripleEq=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:isTripleEq})}else if(this._match(126)){this._addToken(9)}else{this._error(hintDidYouMean("==","=~"))}break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:if(this._match(38)){this._addToken(15)}else{this._error(hintDidYouMean("&&"))}break;case 124:if(this._match(124)){this._addToken(16)}else{this._error(hintDidYouMean("||"))}break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}}this._start=this._current;this._addToken(20);return Array.from(this._tokens)}_match(expected){if(this._isAtEnd()){return false}if(this._input.charCodeAt(this._current)!==expected){return false}this._current++;return true}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(type){this._tokens.push({type:type,offset:this._start})}_error(additional){const offset=this._start;const lexeme=this._input.substring(this._start,this._current);const errToken={type:19,offset:this._start,lexeme:lexeme};this._errors.push({offset:offset,lexeme:lexeme,additionalInfo:additional});this._tokens.push(errToken)}_string(){this.stringRe.lastIndex=this._start;const match2=this.stringRe.exec(this._input);if(match2){this._current=this._start+match2[0].length;const lexeme=this._input.substring(this._start,this._current);const keyword=Scanner._keywords.get(lexeme);if(keyword){this._addToken(keyword)}else{this._tokens.push({type:17,lexeme:lexeme,offset:this._start})}}}_quotedString(){while(this._peek()!==39&&!this._isAtEnd()){this._advance()}if(this._isAtEnd()){this._error(hintDidYouForgetToOpenOrCloseQuote);return}this._advance();this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let p=this._current;let inEscape=false;let inCharacterClass=false;while(true){if(p>=this._input.length){this._current=p;this._error(hintDidYouForgetToEscapeSlash);return}const ch=this._input.charCodeAt(p);if(inEscape){inEscape=false}else if(ch===47&&!inCharacterClass){p++;break}else if(ch===91){inCharacterClass=true}else if(ch===92){inEscape=true}else if(ch===93){inCharacterClass=false}p++}while(p=this._input.length}};Scanner._regexFlags=new Set(["i","g","s","m","y","u"].map((ch=>ch.charCodeAt(0))));Scanner._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}});function expressionsAreEqualWithConstantSubstitution(a,b){const aExpr=a?a.substituteConstants():void 0;const bExpr=b?b.substituteConstants():void 0;if(!aExpr&&!bExpr){return true}if(!aExpr||!bExpr){return false}return aExpr.equals(bExpr)}function cmp(a,b){return a.cmp(b)}function withFloatOrStr(value,callback){if(typeof value==="string"){const n=parseFloat(value);if(!isNaN(n)){value=n}}if(typeof value==="string"||typeof value==="number"){return callback(value)}return ContextKeyFalseExpr.INSTANCE}function eliminateConstantsInArray(arr){let newArr=null;for(let i=0,len=arr.length;ikey2){return 1}return 0}function cmp2(key1,value1,key2,value2){if(key1key2){return 1}if(value1value2){return 1}return 0}function implies(p,q){if(p.type===0||q.type===1){return true}if(p.type===9){if(q.type===9){return allElementsIncluded(p.expr,q.expr)}return false}if(q.type===9){for(const element of q.expr){if(implies(p,element)){return true}}return false}if(p.type===6){if(q.type===6){return allElementsIncluded(q.expr,p.expr)}for(const element of p.expr){if(implies(element,q)){return true}}return false}return p.equals(q)}function allElementsIncluded(p,q){let pIndex=0;let qIndex=0;while(pIndex=0){const value=serializedValue.slice(start+1,end);const caseIgnoreFlag=serializedValue[end+1]==="i"?"i":"";try{regex=new RegExp(value,caseIgnoreFlag)}catch(_e2){throw this._errExpectedButGot(`REGEX`,expr)}}}if(regex===null){throw this._errExpectedButGot("REGEX",expr)}return ContextKeyRegexExpr.create(key,regex)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,errorNoInAfterNot);const right=this._value();return ContextKeyExpr.notIn(key,right)}const maybeOp=this._peek().type;switch(maybeOp){case 3:{this._advance();const right=this._value();if(this._previous().type===18){return ContextKeyExpr.equals(key,right)}switch(right){case"true":return ContextKeyExpr.has(key);case"false":return ContextKeyExpr.not(key);default:return ContextKeyExpr.equals(key,right)}}case 4:{this._advance();const right=this._value();if(this._previous().type===18){return ContextKeyExpr.notEquals(key,right)}switch(right){case"true":return ContextKeyExpr.not(key);case"false":return ContextKeyExpr.has(key);default:return ContextKeyExpr.notEquals(key,right)}}case 5:this._advance();return ContextKeySmallerExpr.create(key,this._value());case 6:this._advance();return ContextKeySmallerEqualsExpr.create(key,this._value());case 7:this._advance();return ContextKeyGreaterExpr.create(key,this._value());case 8:this._advance();return ContextKeyGreaterEqualsExpr.create(key,this._value());case 13:this._advance();return ContextKeyExpr.in(key,this._value());default:return ContextKeyExpr.has(key)}}case 20:this._parsingErrors.push({message:errorUnexpectedEOF,offset:peek.offset,lexeme:"",additionalInfo:hintUnexpectedEOF});throw Parser._parseError;default:throw this._errExpectedButGot(`true | false | KEY \n\t| KEY '=~' REGEX \n\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const token=this._peek();switch(token.type){case 17:case 18:this._advance();return token.lexeme;case 11:this._advance();return"true";case 12:this._advance();return"false";case 13:this._advance();return"in";default:return""}}_removeFlagsGY(flags){return flags.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(token){if(this._check(token)){this._advance();return true}return false}_advance(){if(!this._isAtEnd()){this._current++}return this._previous()}_consume(type,message){if(this._check(type)){return this._advance()}throw this._errExpectedButGot(message,this._peek())}_errExpectedButGot(expected,got,additionalInfo){const message=localize("contextkey.parser.error.expectedButGot","Expected: {0}\nReceived: '{1}'.",expected,Scanner.getLexeme(got));const offset=got.offset;const lexeme=Scanner.getLexeme(got);this._parsingErrors.push({message:message,offset:offset,lexeme:lexeme,additionalInfo:additionalInfo});return Parser._parseError}_check(type){return this._peek().type===type}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}};Parser._parseError=new Error;ContextKeyExpr=class{static false(){return ContextKeyFalseExpr.INSTANCE}static true(){return ContextKeyTrueExpr.INSTANCE}static has(key){return ContextKeyDefinedExpr.create(key)}static equals(key,value){return ContextKeyEqualsExpr.create(key,value)}static notEquals(key,value){return ContextKeyNotEqualsExpr.create(key,value)}static regex(key,value){return ContextKeyRegexExpr.create(key,value)}static in(key,value){return ContextKeyInExpr.create(key,value)}static notIn(key,value){return ContextKeyNotInExpr.create(key,value)}static not(key){return ContextKeyNotExpr.create(key)}static and(...expr){return ContextKeyAndExpr.create(expr,null,true)}static or(...expr){return ContextKeyOrExpr.create(expr,null,true)}static deserialize(serialized){if(serialized===void 0||serialized===null){return void 0}const expr=this._parser.parse(serialized);return expr}};ContextKeyExpr._parser=new Parser({regexParsingWithErrorRecovery:false});ContextKeyFalseExpr=class{constructor(){this.type=0}cmp(other){return this.type-other.type}equals(other){return other.type===this.type}substituteConstants(){return this}evaluate(context){return false}serialize(){return"false"}keys(){return[]}negate(){return ContextKeyTrueExpr.INSTANCE}};ContextKeyFalseExpr.INSTANCE=new ContextKeyFalseExpr;ContextKeyTrueExpr=class{constructor(){this.type=1}cmp(other){return this.type-other.type}equals(other){return other.type===this.type}substituteConstants(){return this}evaluate(context){return true}serialize(){return"true"}keys(){return[]}negate(){return ContextKeyFalseExpr.INSTANCE}};ContextKeyTrueExpr.INSTANCE=new ContextKeyTrueExpr;ContextKeyDefinedExpr=class{static create(key,negated=null){const constantValue=CONSTANT_VALUES.get(key);if(typeof constantValue==="boolean"){return constantValue?ContextKeyTrueExpr.INSTANCE:ContextKeyFalseExpr.INSTANCE}return new ContextKeyDefinedExpr(key,negated)}constructor(key,negated){this.key=key;this.negated=negated;this.type=2}cmp(other){if(other.type!==this.type){return this.type-other.type}return cmp1(this.key,other.key)}equals(other){if(other.type===this.type){return this.key===other.key}return false}substituteConstants(){const constantValue=CONSTANT_VALUES.get(this.key);if(typeof constantValue==="boolean"){return constantValue?ContextKeyTrueExpr.INSTANCE:ContextKeyFalseExpr.INSTANCE}return this}evaluate(context){return!!context.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){if(!this.negated){this.negated=ContextKeyNotExpr.create(this.key,this)}return this.negated}};ContextKeyEqualsExpr=class{static create(key,value,negated=null){if(typeof value==="boolean"){return value?ContextKeyDefinedExpr.create(key,negated):ContextKeyNotExpr.create(key,negated)}const constantValue=CONSTANT_VALUES.get(key);if(typeof constantValue==="boolean"){const trueValue=constantValue?"true":"false";return value===trueValue?ContextKeyTrueExpr.INSTANCE:ContextKeyFalseExpr.INSTANCE}return new ContextKeyEqualsExpr(key,value,negated)}constructor(key,value,negated){this.key=key;this.value=value;this.negated=negated;this.type=4}cmp(other){if(other.type!==this.type){return this.type-other.type}return cmp2(this.key,this.value,other.key,other.value)}equals(other){if(other.type===this.type){return this.key===other.key&&this.value===other.value}return false}substituteConstants(){const constantValue=CONSTANT_VALUES.get(this.key);if(typeof constantValue==="boolean"){const trueValue=constantValue?"true":"false";return this.value===trueValue?ContextKeyTrueExpr.INSTANCE:ContextKeyFalseExpr.INSTANCE}return this}evaluate(context){return context.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){if(!this.negated){this.negated=ContextKeyNotEqualsExpr.create(this.key,this.value,this)}return this.negated}};ContextKeyInExpr=class{static create(key,valueKey){return new ContextKeyInExpr(key,valueKey)}constructor(key,valueKey){this.key=key;this.valueKey=valueKey;this.type=10;this.negated=null}cmp(other){if(other.type!==this.type){return this.type-other.type}return cmp2(this.key,this.valueKey,other.key,other.valueKey)}equals(other){if(other.type===this.type){return this.key===other.key&&this.valueKey===other.valueKey}return false}substituteConstants(){return this}evaluate(context){const source=context.getValue(this.valueKey);const item=context.getValue(this.key);if(Array.isArray(source)){return source.includes(item)}if(typeof item==="string"&&typeof source==="object"&&source!==null){return hasOwnProperty.call(source,item)}return false}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){if(!this.negated){this.negated=ContextKeyNotInExpr.create(this.key,this.valueKey)}return this.negated}};ContextKeyNotInExpr=class{static create(key,valueKey){return new ContextKeyNotInExpr(key,valueKey)}constructor(key,valueKey){this.key=key;this.valueKey=valueKey;this.type=11;this._negated=ContextKeyInExpr.create(key,valueKey)}cmp(other){if(other.type!==this.type){return this.type-other.type}return this._negated.cmp(other._negated)}equals(other){if(other.type===this.type){return this._negated.equals(other._negated)}return false}substituteConstants(){return this}evaluate(context){return!this._negated.evaluate(context)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}};ContextKeyNotEqualsExpr=class{static create(key,value,negated=null){if(typeof value==="boolean"){if(value){return ContextKeyNotExpr.create(key,negated)}return ContextKeyDefinedExpr.create(key,negated)}const constantValue=CONSTANT_VALUES.get(key);if(typeof constantValue==="boolean"){const falseValue=constantValue?"true":"false";return value===falseValue?ContextKeyFalseExpr.INSTANCE:ContextKeyTrueExpr.INSTANCE}return new ContextKeyNotEqualsExpr(key,value,negated)}constructor(key,value,negated){this.key=key;this.value=value;this.negated=negated;this.type=5}cmp(other){if(other.type!==this.type){return this.type-other.type}return cmp2(this.key,this.value,other.key,other.value)}equals(other){if(other.type===this.type){return this.key===other.key&&this.value===other.value}return false}substituteConstants(){const constantValue=CONSTANT_VALUES.get(this.key);if(typeof constantValue==="boolean"){const falseValue=constantValue?"true":"false";return this.value===falseValue?ContextKeyFalseExpr.INSTANCE:ContextKeyTrueExpr.INSTANCE}return this}evaluate(context){return context.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){if(!this.negated){this.negated=ContextKeyEqualsExpr.create(this.key,this.value,this)}return this.negated}};ContextKeyNotExpr=class{static create(key,negated=null){const constantValue=CONSTANT_VALUES.get(key);if(typeof constantValue==="boolean"){return constantValue?ContextKeyFalseExpr.INSTANCE:ContextKeyTrueExpr.INSTANCE}return new ContextKeyNotExpr(key,negated)}constructor(key,negated){this.key=key;this.negated=negated;this.type=3}cmp(other){if(other.type!==this.type){return this.type-other.type}return cmp1(this.key,other.key)}equals(other){if(other.type===this.type){return this.key===other.key}return false}substituteConstants(){const constantValue=CONSTANT_VALUES.get(this.key);if(typeof constantValue==="boolean"){return constantValue?ContextKeyFalseExpr.INSTANCE:ContextKeyTrueExpr.INSTANCE}return this}evaluate(context){return!context.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){if(!this.negated){this.negated=ContextKeyDefinedExpr.create(this.key,this)}return this.negated}};ContextKeyGreaterExpr=class{static create(key,_value,negated=null){return withFloatOrStr(_value,(value=>new ContextKeyGreaterExpr(key,value,negated)))}constructor(key,value,negated){this.key=key;this.value=value;this.negated=negated;this.type=12}cmp(other){if(other.type!==this.type){return this.type-other.type}return cmp2(this.key,this.value,other.key,other.value)}equals(other){if(other.type===this.type){return this.key===other.key&&this.value===other.value}return false}substituteConstants(){return this}evaluate(context){if(typeof this.value==="string"){return false}return parseFloat(context.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){if(!this.negated){this.negated=ContextKeySmallerEqualsExpr.create(this.key,this.value,this)}return this.negated}};ContextKeyGreaterEqualsExpr=class{static create(key,_value,negated=null){return withFloatOrStr(_value,(value=>new ContextKeyGreaterEqualsExpr(key,value,negated)))}constructor(key,value,negated){this.key=key;this.value=value;this.negated=negated;this.type=13}cmp(other){if(other.type!==this.type){return this.type-other.type}return cmp2(this.key,this.value,other.key,other.value)}equals(other){if(other.type===this.type){return this.key===other.key&&this.value===other.value}return false}substituteConstants(){return this}evaluate(context){if(typeof this.value==="string"){return false}return parseFloat(context.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){if(!this.negated){this.negated=ContextKeySmallerExpr.create(this.key,this.value,this)}return this.negated}};ContextKeySmallerExpr=class{static create(key,_value,negated=null){return withFloatOrStr(_value,(value=>new ContextKeySmallerExpr(key,value,negated)))}constructor(key,value,negated){this.key=key;this.value=value;this.negated=negated;this.type=14}cmp(other){if(other.type!==this.type){return this.type-other.type}return cmp2(this.key,this.value,other.key,other.value)}equals(other){if(other.type===this.type){return this.key===other.key&&this.value===other.value}return false}substituteConstants(){return this}evaluate(context){if(typeof this.value==="string"){return false}return parseFloat(context.getValue(this.key))new ContextKeySmallerEqualsExpr(key,value,negated)))}constructor(key,value,negated){this.key=key;this.value=value;this.negated=negated;this.type=15}cmp(other){if(other.type!==this.type){return this.type-other.type}return cmp2(this.key,this.value,other.key,other.value)}equals(other){if(other.type===this.type){return this.key===other.key&&this.value===other.value}return false}substituteConstants(){return this}evaluate(context){if(typeof this.value==="string"){return false}return parseFloat(context.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){if(!this.negated){this.negated=ContextKeyGreaterExpr.create(this.key,this.value,this)}return this.negated}};ContextKeyRegexExpr=class{static create(key,regexp){return new ContextKeyRegexExpr(key,regexp)}constructor(key,regexp){this.key=key;this.regexp=regexp;this.type=7;this.negated=null}cmp(other){if(other.type!==this.type){return this.type-other.type}if(this.keyother.key){return 1}const thisSource=this.regexp?this.regexp.source:"";const otherSource=other.regexp?other.regexp.source:"";if(thisSourceotherSource){return 1}return 0}equals(other){if(other.type===this.type){const thisSource=this.regexp?this.regexp.source:"";const otherSource=other.regexp?other.regexp.source:"";return this.key===other.key&&thisSource===otherSource}return false}substituteConstants(){return this}evaluate(context){const value=context.getValue(this.key);return this.regexp?this.regexp.test(value):false}serialize(){const value=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${value}`}keys(){return[this.key]}negate(){if(!this.negated){this.negated=ContextKeyNotRegexExpr.create(this)}return this.negated}};ContextKeyNotRegexExpr=class{static create(actual){return new ContextKeyNotRegexExpr(actual)}constructor(_actual){this._actual=_actual;this.type=8}cmp(other){if(other.type!==this.type){return this.type-other.type}return this._actual.cmp(other._actual)}equals(other){if(other.type===this.type){return this._actual.equals(other._actual)}return false}substituteConstants(){return this}evaluate(context){return!this._actual.evaluate(context)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}};ContextKeyAndExpr=class{static create(_expr,negated,extraRedundantCheck){return ContextKeyAndExpr._normalizeArr(_expr,negated,extraRedundantCheck)}constructor(expr,negated){this.expr=expr;this.negated=negated;this.type=6}cmp(other){if(other.type!==this.type){return this.type-other.type}if(this.expr.lengthother.expr.length){return 1}for(let i=0,len=this.expr.length;i1){const lastElement=expr[expr.length-1];if(lastElement.type!==9){break}expr.pop();const secondToLastElement=expr.pop();const isFinished=expr.length===0;const resultElement=ContextKeyOrExpr.create(lastElement.expr.map((el=>ContextKeyAndExpr.create([el,secondToLastElement],null,extraRedundantCheck))),null,isFinished);if(resultElement){expr.push(resultElement);expr.sort(cmp)}}if(expr.length===1){return expr[0]}if(extraRedundantCheck){for(let i=0;ie.serialize())).join(" && ")}keys(){const result=[];for(const expr of this.expr){result.push(...expr.keys())}return result}negate(){if(!this.negated){const result=[];for(const expr of this.expr){result.push(expr.negate())}this.negated=ContextKeyOrExpr.create(result,this,true)}return this.negated}};ContextKeyOrExpr=class{static create(_expr,negated,extraRedundantCheck){return ContextKeyOrExpr._normalizeArr(_expr,negated,extraRedundantCheck)}constructor(expr,negated){this.expr=expr;this.negated=negated;this.type=9}cmp(other){if(other.type!==this.type){return this.type-other.type}if(this.expr.lengthother.expr.length){return 1}for(let i=0,len=this.expr.length;ie.serialize())).join(" || ")}keys(){const result=[];for(const expr of this.expr){result.push(...expr.keys())}return result}negate(){if(!this.negated){const result=[];for(const expr of this.expr){result.push(expr.negate())}while(result.length>1){const LEFT=result.shift();const RIGHT=result.shift();const all=[];for(const left of getTerminals(LEFT)){for(const right of getTerminals(RIGHT)){all.push(ContextKeyAndExpr.create([left,right],null,false))}}result.unshift(ContextKeyOrExpr.create(all,null,false))}this.negated=ContextKeyOrExpr.create(result,this,true)}return this.negated}};RawContextKey=class extends ContextKeyDefinedExpr{static all(){return RawContextKey._info.values()}constructor(key,defaultValue,metaOrHide){super(key,null);this._defaultValue=defaultValue;if(typeof metaOrHide==="object"){RawContextKey._info.push(Object.assign(Object.assign({},metaOrHide),{key:key}))}else if(metaOrHide!==true){RawContextKey._info.push({key:key,description:metaOrHide,type:defaultValue!==null&&defaultValue!==void 0?typeof defaultValue:void 0})}}bindTo(target){return target.createKey(this.key,this._defaultValue)}getValue(target){return target.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(value){return ContextKeyEqualsExpr.create(this.key,value)}};RawContextKey._info=[];IContextKeyService=createDecorator("contextKeyService")}});var IAccessibilityService,CONTEXT_ACCESSIBILITY_MODE_ENABLED;var init_accessibility=__esm({"node_modules/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js"(){init_contextkey();init_instantiation();IAccessibilityService=createDecorator("accessibilityService");CONTEXT_ACCESSIBILITY_MODE_ENABLED=new RawContextKey("accessibilityModeEnabled",false)}});var __decorate,__param,defaultOptions,DiffNavigator;var init_diffNavigator=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffNavigator.js"(){init_assert();init_event();init_lifecycle();init_objects();init_range();init_audioCueService();init_codeEditorService();init_accessibility();__decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};defaultOptions={followsCaret:true,ignoreCharChanges:true,alwaysRevealFirst:true,findResultLoop:true};DiffNavigator=class DiffNavigator2 extends Disposable{constructor(editor2,options2={},_audioCueService,_codeEditorService,_accessibilityService){super();this._audioCueService=_audioCueService;this._codeEditorService=_codeEditorService;this._accessibilityService=_accessibilityService;this._onDidUpdate=this._register(new Emitter);this._editor=editor2;this._options=mixin(options2,defaultOptions,false);this.disposed=false;this.nextIdx=-1;this.ranges=[];this.ignoreSelectionChange=false;this.revealFirst=Boolean(this._options.alwaysRevealFirst);this._register(this._editor.onDidUpdateDiff((()=>this._onDiffUpdated())));if(this._options.followsCaret){this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e=>{if(this.ignoreSelectionChange){return}this._updateAccessibilityState(e.position.lineNumber);this.nextIdx=-1})))}this._init()}_init(){const changes=this._editor.getLineChanges();if(!changes){return}}_onDiffUpdated(){this._init();this._compute(this._editor.getLineChanges());if(this.revealFirst){if(this._editor.getLineChanges()!==null){this.revealFirst=false;this.nextIdx=-1;this.next(1)}}}_compute(lineChanges){this.ranges=[];if(lineChanges){lineChanges.forEach((lineChange=>{if(!this._options.ignoreCharChanges&&lineChange.charChanges){lineChange.charChanges.forEach((charChange=>{this.ranges.push({rhs:true,range:new Range(charChange.modifiedStartLineNumber,charChange.modifiedStartColumn,charChange.modifiedEndLineNumber,charChange.modifiedEndColumn)})}))}else{if(lineChange.modifiedEndLineNumber===0){this.ranges.push({rhs:true,range:new Range(lineChange.modifiedStartLineNumber,1,lineChange.modifiedStartLineNumber+1,1)})}else{this.ranges.push({rhs:true,range:new Range(lineChange.modifiedStartLineNumber,1,lineChange.modifiedEndLineNumber+1,1)})}}}))}this.ranges.sort(((left,right)=>Range.compareRangesUsingStarts(left.range,right.range)));this._onDidUpdate.fire(this)}_initIdx(fwd){let found=false;const position=this._editor.getPosition();if(!position){this.nextIdx=0;return}for(let i=0,len=this.ranges.length;i=this.ranges.length){this.nextIdx=0}}else{this.nextIdx-=1;if(this.nextIdx<0){this.nextIdx=this.ranges.length-1}}const info=this.ranges[this.nextIdx];this.ignoreSelectionChange=true;try{const pos=info.range.getStartPosition();this._editor.setPosition(pos);this._editor.revealRangeInCenter(info.range,scrollType);this._updateAccessibilityState(pos.lineNumber,true)}finally{this.ignoreSelectionChange=false}}_updateAccessibilityState(lineNumber,jumpToChange){var _a6;const modifiedEditor=(_a6=this._editor.getModel())===null||_a6===void 0?void 0:_a6.modified;if(!modifiedEditor){return}const insertedOrModified=modifiedEditor.getLineDecorations(lineNumber).find((l=>l.options.className==="line-insert"));if(insertedOrModified){this._audioCueService.playAudioCue(AudioCue.diffLineModified,{allowManyInParallel:true})}else if(jumpToChange){this._audioCueService.playAudioCue(AudioCue.diffLineDeleted,{allowManyInParallel:true})}else{return}const codeEditor=this._codeEditorService.getActiveCodeEditor();if(jumpToChange&&codeEditor&&insertedOrModified&&this._accessibilityService.isScreenReaderOptimized()){codeEditor.setSelection({startLineNumber:lineNumber,startColumn:0,endLineNumber:lineNumber,endColumn:Number.MAX_VALUE});codeEditor.writeScreenReaderContent("diff-navigation")}}canNavigate(){return this.ranges&&this.ranges.length>0}next(scrollType=0){if(!this.canNavigateNext()){return}this._move(true,scrollType)}previous(scrollType=0){if(!this.canNavigatePrevious()){return}this._move(false,scrollType)}canNavigateNext(){return this.canNavigateLoop()||this.nextIdx0&&context.getLanguageId(firstTokenIndex-1)===desiredLanguageId){firstTokenIndex--}return new ScopedLineTokens(context,desiredLanguageId,firstTokenIndex,lastTokenIndex+1,context.getStartOffset(firstTokenIndex),context.getEndOffset(lastTokenIndex))}function ignoreBracketsInToken(standardTokenType){return(standardTokenType&3)!==0}var ScopedLineTokens;var init_supports=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages/supports.js"(){ScopedLineTokens=class{constructor(actual,languageId,firstTokenIndex,lastTokenIndex,firstCharOffset,lastCharOffset){this._scopedLineTokensBrand=void 0;this._actual=actual;this.languageId=languageId;this._firstTokenIndex=firstTokenIndex;this._lastTokenIndex=lastTokenIndex;this.firstCharOffset=firstCharOffset;this._lastCharOffset=lastCharOffset}getLineContent(){const actualLineContent=this._actual.getLineContent();return actualLineContent.substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(offset){const actualLineContent=this._actual.getLineContent();return actualLineContent.substring(0,this.firstCharOffset+offset)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(offset){return this._actual.findTokenIndexAtOffset(offset+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(tokenIndex){return this._actual.getStandardTokenType(tokenIndex+this._firstTokenIndex)}}}});var CharacterPairSupport;var init_characterPair=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages/supports/characterPair.js"(){init_languageConfiguration();CharacterPairSupport=class{constructor(config){if(config.autoClosingPairs){this._autoClosingPairs=config.autoClosingPairs.map((el=>new StandardAutoClosingPairConditional(el)))}else if(config.brackets){this._autoClosingPairs=config.brackets.map((b=>new StandardAutoClosingPairConditional({open:b[0],close:b[1]})))}else{this._autoClosingPairs=[]}if(config.__electricCharacterSupport&&config.__electricCharacterSupport.docComment){const docComment=config.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new StandardAutoClosingPairConditional({open:docComment.open,close:docComment.close||""}))}this._autoCloseBeforeForQuotes=typeof config.autoCloseBefore==="string"?config.autoCloseBefore:CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES;this._autoCloseBeforeForBrackets=typeof config.autoCloseBefore==="string"?config.autoCloseBefore:CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS;this._surroundingPairs=config.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(forQuotes){return forQuotes?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}};CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=";:.,=}])> \n\t";CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS="'\"`;:.,=}])> \n\t"}});function readUInt16LE(source,offset){return source[offset+0]<<0>>>0|source[offset+1]<<8>>>0}function writeUInt16LE(destination,value,offset){destination[offset+0]=value&255;value=value>>>8;destination[offset+1]=value&255}function readUInt32BE(source,offset){return source[offset]*Math.pow(2,24)+source[offset+1]*Math.pow(2,16)+source[offset+2]*Math.pow(2,8)+source[offset+3]}function writeUInt32BE(destination,value,offset){destination[offset+3]=value;value=value>>>8;destination[offset+2]=value;value=value>>>8;destination[offset+1]=value;value=value>>>8;destination[offset]=value}function readUInt8(source,offset){return source[offset]}function writeUInt8(destination,value,offset){destination[offset]=value}var hasBuffer,indexOfTable,textDecoder,VSBuffer;var init_buffer=__esm({"node_modules/monaco-editor/esm/vs/base/common/buffer.js"(){init_lazy();hasBuffer=typeof Buffer!=="undefined";indexOfTable=new Lazy((()=>new Uint8Array(256)));VSBuffer=class{static wrap(actual){if(hasBuffer&&!Buffer.isBuffer(actual)){actual=Buffer.from(actual.buffer,actual.byteOffset,actual.byteLength)}return new VSBuffer(actual)}constructor(buffer){this.buffer=buffer;this.byteLength=this.buffer.byteLength}toString(){if(hasBuffer){return this.buffer.toString()}else{if(!textDecoder){textDecoder=new TextDecoder}return textDecoder.decode(this.buffer)}}}}});function getUTF16LE_TextDecoder(){if(!_utf16LE_TextDecoder){_utf16LE_TextDecoder=new TextDecoder("UTF-16LE")}return _utf16LE_TextDecoder}function getUTF16BE_TextDecoder(){if(!_utf16BE_TextDecoder){_utf16BE_TextDecoder=new TextDecoder("UTF-16BE")}return _utf16BE_TextDecoder}function getPlatformTextDecoder(){if(!_platformTextDecoder){_platformTextDecoder=isLittleEndian()?getUTF16LE_TextDecoder():getUTF16BE_TextDecoder()}return _platformTextDecoder}function decodeUTF16LE(source,offset,len){const view=new Uint16Array(source.buffer,offset,len);if(len>0&&(view[0]===65279||view[0]===65534)){return compatDecodeUTF16LE(source,offset,len)}return getUTF16LE_TextDecoder().decode(view)}function compatDecodeUTF16LE(source,offset,len){const result=[];let resultLen=0;for(let i=0;i=this._capacity){this._flushBuffer();this._completedStrings[this._completedStrings.length]=str;return}for(let i=0;i[b[0].toLowerCase(),b[1].toLowerCase()]));const group3=[];for(let i=0;i{const[aOpen,aClose]=a;const[bOpen,bClose]=b;return aOpen===bOpen||aOpen===bClose||aClose===bOpen||aClose===bClose};const mergeGroups=(g1,g2)=>{const newG=Math.min(g1,g2);const oldG=Math.max(g1,g2);for(let i=0;i0){result.push({open:currentOpen,close:currentClose})}}return result}function collectSuperstrings(str,brackets,currentIndex,dest){for(let i=0,len=brackets.length;i=0){dest.push(open)}}for(const close of bracket.close){if(close.indexOf(str)>=0){dest.push(close)}}}}function lengthcmp(a,b){return a.length-b.length}function unique(arr){if(arr.length<=1){return arr}const result=[];const seen=new Set;for(const element of arr){if(seen.has(element)){continue}result.push(element);seen.add(element)}return result}function getRegexForBracketPair(open,close,brackets,currentIndex){let pieces=[];pieces=pieces.concat(open);pieces=pieces.concat(close);for(let i=0,len=pieces.length;inew RichEditBracket(languageId,index,b.open,b.close,getRegexForBracketPair(b.open,b.close,brackets,index),getReversedRegexForBracketPair(b.open,b.close,brackets,index))));this.forwardRegex=getRegexForBrackets(this.brackets);this.reversedRegex=getReversedRegexForBrackets(this.brackets);this.textIsBracket={};this.textIsOpenBracket={};this.maxBracketLength=0;for(const bracket of this.brackets){for(const open of bracket.open){this.textIsBracket[open]=bracket;this.textIsOpenBracket[open]=true;this.maxBracketLength=Math.max(this.maxBracketLength,open.length)}for(const close of bracket.close){this.textIsBracket[close]=bracket;this.textIsOpenBracket[close]=false;this.maxBracketLength=Math.max(this.maxBracketLength,close.length)}}}};toReversedString=function(){function reverse(str){const arr=new Uint16Array(str.length);let offset=0;for(let i=str.length-1;i>=0;i--){arr[offset++]=str.charCodeAt(i)}return getPlatformTextDecoder().decode(arr)}let lastInput=null;let lastOutput=null;return function toReversedString2(str){if(lastInput!==str){lastInput=str;lastOutput=reverse(lastInput)}return lastOutput}}();BracketsUtils=class{static _findPrevBracketInText(reversedBracketRegex,lineNumber,reversedText,offset){const m=reversedText.match(reversedBracketRegex);if(!m){return null}const matchOffset=reversedText.length-(m.index||0);const matchLength=m[0].length;const absoluteMatchOffset=offset+matchOffset;return new Range(lineNumber,absoluteMatchOffset-matchLength+1,lineNumber,absoluteMatchOffset+1)}static findPrevBracketInRange(reversedBracketRegex,lineNumber,lineText,startOffset,endOffset){const reversedLineText=toReversedString(lineText);const reversedSubstr=reversedLineText.substring(lineText.length-endOffset,lineText.length-startOffset);return this._findPrevBracketInText(reversedBracketRegex,lineNumber,reversedSubstr,startOffset)}static findNextBracketInText(bracketRegex,lineNumber,text2,offset){const m=text2.match(bracketRegex);if(!m){return null}const matchOffset=m.index||0;const matchLength=m[0].length;if(matchLength===0){return null}const absoluteMatchOffset=offset+matchOffset;return new Range(lineNumber,absoluteMatchOffset+1,lineNumber,absoluteMatchOffset+1+matchLength)}static findNextBracketInRange(bracketRegex,lineNumber,lineText,startOffset,endOffset){const substr=lineText.substring(startOffset,endOffset);return this.findNextBracketInText(bracketRegex,lineNumber,substr,startOffset)}}}});var BracketElectricCharacterSupport;var init_electricCharacter=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages/supports/electricCharacter.js"(){init_arrays();init_supports();init_richEditBrackets();BracketElectricCharacterSupport=class{constructor(richEditBrackets){this._richEditBrackets=richEditBrackets}getElectricCharacters(){const result=[];if(this._richEditBrackets){for(const bracket of this._richEditBrackets.brackets){for(const close of bracket.close){const lastChar=close.charAt(close.length-1);result.push(lastChar)}}}return distinct(result)}onElectricCharacter(character,context,column){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0){return null}const tokenIndex=context.findTokenIndexAtOffset(column-1);if(ignoreBracketsInToken(context.getStandardTokenType(tokenIndex))){return null}const reversedBracketRegex=this._richEditBrackets.reversedRegex;const text2=context.getLineContent().substring(0,column-1)+character;const r=BracketsUtils.findPrevBracketInRange(reversedBracketRegex,1,text2,0,text2.length);if(!r){return null}const bracketText=text2.substring(r.startColumn-1,r.endColumn-1).toLowerCase();const isOpen=this._richEditBrackets.textIsOpenBracket[bracketText];if(isOpen){return null}const textBeforeBracket=context.getActualLineContentBefore(r.startColumn-1);if(!/^\s*$/.test(textBeforeBracket)){return null}return{matchOpenBracket:bracketText}}}}});function resetGlobalRegex(reg){if(reg.global){reg.lastIndex=0}return true}var IndentRulesSupport;var init_indentRules=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages/supports/indentRules.js"(){IndentRulesSupport=class{constructor(indentationRules){this._indentationRules=indentationRules}shouldIncrease(text2){if(this._indentationRules){if(this._indentationRules.increaseIndentPattern&&resetGlobalRegex(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(text2)){return true}}return false}shouldDecrease(text2){if(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&resetGlobalRegex(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(text2)){return true}return false}shouldIndentNextLine(text2){if(this._indentationRules&&this._indentationRules.indentNextLinePattern&&resetGlobalRegex(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(text2)){return true}return false}shouldIgnore(text2){if(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&resetGlobalRegex(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(text2)){return true}return false}getIndentMetadata(text2){let ret=0;if(this.shouldIncrease(text2)){ret+=1}if(this.shouldDecrease(text2)){ret+=2}if(this.shouldIndentNextLine(text2)){ret+=4}if(this.shouldIgnore(text2)){ret+=8}return ret}}}});var OnEnterSupport;var init_onEnter=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages/supports/onEnter.js"(){init_errors();init_strings();init_languageConfiguration();OnEnterSupport=class{constructor(opts){opts=opts||{};opts.brackets=opts.brackets||[["(",")"],["{","}"],["[","]"]];this._brackets=[];opts.brackets.forEach((bracket=>{const openRegExp=OnEnterSupport._createOpenBracketRegExp(bracket[0]);const closeRegExp=OnEnterSupport._createCloseBracketRegExp(bracket[1]);if(openRegExp&&closeRegExp){this._brackets.push({open:bracket[0],openRegExp:openRegExp,close:bracket[1],closeRegExp:closeRegExp})}}));this._regExpRules=opts.onEnterRules||[]}onEnter(autoIndent,previousLineText,beforeEnterText,afterEnterText){if(autoIndent>=3){for(let i=0,len=this._regExpRules.length;i{if(!obj.reg){return true}obj.reg.lastIndex=0;return obj.reg.test(obj.text)}));if(regResult){return rule.action}}}if(autoIndent>=2){if(beforeEnterText.length>0&&afterEnterText.length>0){for(let i=0,len=this._brackets.length;i=2){if(beforeEnterText.length>0){for(let i=0,len=this._brackets.length;i0&&id.charAt(id.length-1)==="#"){return id.substring(0,id.length-1)}return id}var Extensions,JSONContributionRegistry,jsonContributionRegistry;var init_jsonContributionRegistry=__esm({"node_modules/monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js"(){init_event();init_platform2();Extensions={JSONContribution:"base.contributions.json"};JSONContributionRegistry=class{constructor(){this._onDidChangeSchema=new Emitter;this.schemasById={}}registerSchema(uri,unresolvedSchemaContent){this.schemasById[normalizeId(uri)]=unresolvedSchemaContent;this._onDidChangeSchema.fire(uri)}notifySchemaChanged(uri){this._onDidChangeSchema.fire(uri)}};jsonContributionRegistry=new JSONContributionRegistry;Registry.add(Extensions.JSONContribution,jsonContributionRegistry)}});function overrideIdentifiersFromKey(key){const identifiers=[];if(OVERRIDE_PROPERTY_REGEX.test(key)){let matches=OVERRIDE_IDENTIFIER_REGEX.exec(key);while(matches===null||matches===void 0?void 0:matches.length){const identifier2=matches[1].trim();if(identifier2){identifiers.push(identifier2)}matches=OVERRIDE_IDENTIFIER_REGEX.exec(key)}}return distinct(identifiers)}function getDefaultValue(type){const t2=Array.isArray(type)?type[0]:type;switch(t2){case"boolean":return false;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}function validateProperty(property,schema){var _a6,_b3,_c2,_d2;if(!property.trim()){return localize("config.property.empty","Cannot register an empty property")}if(OVERRIDE_PROPERTY_REGEX.test(property)){return localize("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",property)}if(configurationRegistry.getConfigurationProperties()[property]!==void 0){return localize("config.property.duplicate","Cannot register '{0}'. This property is already registered.",property)}if(((_a6=schema.policy)===null||_a6===void 0?void 0:_a6.name)&&configurationRegistry.getPolicyConfigurations().get((_b3=schema.policy)===null||_b3===void 0?void 0:_b3.name)!==void 0){return localize("config.policy.duplicate","Cannot register '{0}'. The associated policy {1} is already registered with {2}.",property,(_c2=schema.policy)===null||_c2===void 0?void 0:_c2.name,configurationRegistry.getPolicyConfigurations().get((_d2=schema.policy)===null||_d2===void 0?void 0:_d2.name))}return null}var Extensions2,allSettings,applicationSettings,machineSettings,machineOverridableSettings,windowSettings,resourceSettings,resourceLanguageSettingsSchemaId,contributionRegistry,ConfigurationRegistry,OVERRIDE_IDENTIFIER_PATTERN,OVERRIDE_IDENTIFIER_REGEX,OVERRIDE_PROPERTY_PATTERN,OVERRIDE_PROPERTY_REGEX,configurationRegistry;var init_configurationRegistry=__esm({"node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js"(){init_arrays();init_event();init_types();init_nls();init_configuration();init_jsonContributionRegistry();init_platform2();Extensions2={Configuration:"base.contributions.configuration"};allSettings={properties:{},patternProperties:{}};applicationSettings={properties:{},patternProperties:{}};machineSettings={properties:{},patternProperties:{}};machineOverridableSettings={properties:{},patternProperties:{}};windowSettings={properties:{},patternProperties:{}};resourceSettings={properties:{},patternProperties:{}};resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage";contributionRegistry=Registry.as(Extensions.JSONContribution);ConfigurationRegistry=class{constructor(){this.overrideIdentifiers=new Set;this._onDidSchemaChange=new Emitter;this._onDidUpdateConfiguration=new Emitter;this.configurationDefaultsOverrides=new Map;this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:localize("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}};this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode];this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:true,allowTrailingCommas:true,allowComments:true};this.configurationProperties={};this.policyConfigurations=new Map;this.excludedConfigurationProperties={};contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema);this.registerOverridePropertyPatternKey()}registerConfiguration(configuration,validate=true){this.registerConfigurations([configuration],validate)}registerConfigurations(configurations,validate=true){const properties=new Set;this.doRegisterConfigurations(configurations,validate,properties);contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema);this._onDidSchemaChange.fire();this._onDidUpdateConfiguration.fire({properties:properties})}registerDefaultConfigurations(configurationDefaults){const properties=new Set;this.doRegisterDefaultConfigurations(configurationDefaults,properties);this._onDidSchemaChange.fire();this._onDidUpdateConfiguration.fire({properties:properties,defaultsOverrides:true})}doRegisterDefaultConfigurations(configurationDefaults,bucket){var _a6;const overrideIdentifiers=[];for(const{overrides:overrides,source:source}of configurationDefaults){for(const key in overrides){bucket.add(key);if(OVERRIDE_PROPERTY_REGEX.test(key)){const configurationDefaultOverride=this.configurationDefaultsOverrides.get(key);const valuesSources=(_a6=configurationDefaultOverride===null||configurationDefaultOverride===void 0?void 0:configurationDefaultOverride.valuesSources)!==null&&_a6!==void 0?_a6:new Map;if(source){for(const configuration of Object.keys(overrides[key])){valuesSources.set(configuration,source)}}const defaultValue=Object.assign(Object.assign({},(configurationDefaultOverride===null||configurationDefaultOverride===void 0?void 0:configurationDefaultOverride.value)||{}),overrides[key]);this.configurationDefaultsOverrides.set(key,{source:source,value:defaultValue,valuesSources:valuesSources});const plainKey=getLanguageTagSettingPlainKey(key);const property={type:"object",default:defaultValue,description:localize("defaultLanguageConfiguration.description","Configure settings to be overridden for the {0} language.",plainKey),$ref:resourceLanguageSettingsSchemaId,defaultDefaultValue:defaultValue,source:isString(source)?void 0:source,defaultValueSource:source};overrideIdentifiers.push(...overrideIdentifiersFromKey(key));this.configurationProperties[key]=property;this.defaultLanguageConfigurationOverridesNode.properties[key]=property}else{this.configurationDefaultsOverrides.set(key,{value:overrides[key],source:source});const property=this.configurationProperties[key];if(property){this.updatePropertyDefaultValue(key,property);this.updateSchema(key,property)}}}}this.doRegisterOverrideIdentifiers(overrideIdentifiers)}registerOverrideIdentifiers(overrideIdentifiers){this.doRegisterOverrideIdentifiers(overrideIdentifiers);this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(overrideIdentifiers){for(const overrideIdentifier of overrideIdentifiers){this.overrideIdentifiers.add(overrideIdentifier)}this.updateOverridePropertyPatternKey()}doRegisterConfigurations(configurations,validate,bucket){configurations.forEach((configuration=>{this.validateAndRegisterProperties(configuration,validate,configuration.extensionInfo,configuration.restrictedProperties,void 0,bucket);this.configurationContributors.push(configuration);this.registerJSONConfiguration(configuration)}))}validateAndRegisterProperties(configuration,validate=true,extensionInfo,restrictedProperties,scope=3,bucket){var _a6;scope=isUndefinedOrNull(configuration.scope)?scope:configuration.scope;const properties=configuration.properties;if(properties){for(const key in properties){const property=properties[key];if(validate&&validateProperty(key,property)){delete properties[key];continue}property.source=extensionInfo;property.defaultDefaultValue=properties[key].default;this.updatePropertyDefaultValue(key,property);if(OVERRIDE_PROPERTY_REGEX.test(key)){property.scope=void 0}else{property.scope=isUndefinedOrNull(property.scope)?scope:property.scope;property.restricted=isUndefinedOrNull(property.restricted)?!!(restrictedProperties===null||restrictedProperties===void 0?void 0:restrictedProperties.includes(key)):property.restricted}if(properties[key].hasOwnProperty("included")&&!properties[key].included){this.excludedConfigurationProperties[key]=properties[key];delete properties[key];continue}else{this.configurationProperties[key]=properties[key];if((_a6=properties[key].policy)===null||_a6===void 0?void 0:_a6.name){this.policyConfigurations.set(properties[key].policy.name,key)}}if(!properties[key].deprecationMessage&&properties[key].markdownDeprecationMessage){properties[key].deprecationMessage=properties[key].markdownDeprecationMessage}bucket.add(key)}}const subNodes=configuration.allOf;if(subNodes){for(const node of subNodes){this.validateAndRegisterProperties(node,validate,extensionInfo,restrictedProperties,scope,bucket)}}}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(configuration){const register4=configuration2=>{const properties=configuration2.properties;if(properties){for(const key in properties){this.updateSchema(key,properties[key])}}const subNodes=configuration2.allOf;subNodes===null||subNodes===void 0?void 0:subNodes.forEach(register4)};register4(configuration)}updateSchema(key,property){allSettings.properties[key]=property;switch(property.scope){case 1:applicationSettings.properties[key]=property;break;case 2:machineSettings.properties[key]=property;break;case 6:machineOverridableSettings.properties[key]=property;break;case 3:windowSettings.properties[key]=property;break;case 4:resourceSettings.properties[key]=property;break;case 5:resourceSettings.properties[key]=property;this.resourceLanguageSettingsSchema.properties[key]=property;break}}updateOverridePropertyPatternKey(){for(const overrideIdentifier of this.overrideIdentifiers.values()){const overrideIdentifierProperty=`[${overrideIdentifier}]`;const resourceLanguagePropertiesSchema={type:"object",description:localize("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:localize("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(overrideIdentifierProperty,resourceLanguagePropertiesSchema);allSettings.properties[overrideIdentifierProperty]=resourceLanguagePropertiesSchema;applicationSettings.properties[overrideIdentifierProperty]=resourceLanguagePropertiesSchema;machineSettings.properties[overrideIdentifierProperty]=resourceLanguagePropertiesSchema;machineOverridableSettings.properties[overrideIdentifierProperty]=resourceLanguagePropertiesSchema;windowSettings.properties[overrideIdentifierProperty]=resourceLanguagePropertiesSchema;resourceSettings.properties[overrideIdentifierProperty]=resourceLanguagePropertiesSchema}}registerOverridePropertyPatternKey(){const resourceLanguagePropertiesSchema={type:"object",description:localize("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:localize("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:resourceLanguageSettingsSchemaId};allSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN]=resourceLanguagePropertiesSchema;applicationSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN]=resourceLanguagePropertiesSchema;machineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN]=resourceLanguagePropertiesSchema;machineOverridableSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN]=resourceLanguagePropertiesSchema;windowSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN]=resourceLanguagePropertiesSchema;resourceSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN]=resourceLanguagePropertiesSchema;this._onDidSchemaChange.fire()}updatePropertyDefaultValue(key,property){const configurationdefaultOverride=this.configurationDefaultsOverrides.get(key);let defaultValue=configurationdefaultOverride===null||configurationdefaultOverride===void 0?void 0:configurationdefaultOverride.value;let defaultSource=configurationdefaultOverride===null||configurationdefaultOverride===void 0?void 0:configurationdefaultOverride.source;if(isUndefined(defaultValue)){defaultValue=property.defaultDefaultValue;defaultSource=void 0}if(isUndefined(defaultValue)){defaultValue=getDefaultValue(property.type)}property.default=defaultValue;property.defaultValueSource=defaultSource}};OVERRIDE_IDENTIFIER_PATTERN=`\\[([^\\]]+)\\]`;OVERRIDE_IDENTIFIER_REGEX=new RegExp(OVERRIDE_IDENTIFIER_PATTERN,"g");OVERRIDE_PROPERTY_PATTERN=`^(${OVERRIDE_IDENTIFIER_PATTERN})+$`;OVERRIDE_PROPERTY_REGEX=new RegExp(OVERRIDE_PROPERTY_PATTERN);configurationRegistry=new ConfigurationRegistry;Registry.add(Extensions2.Configuration,configurationRegistry)}});var Extensions3,EditorModesRegistry,ModesRegistry,PLAINTEXT_LANGUAGE_ID,PLAINTEXT_EXTENSION;var init_modesRegistry=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages/modesRegistry.js"(){init_nls();init_event();init_platform2();init_mime();init_configurationRegistry();Extensions3={ModesRegistry:"editor.modesRegistry"};EditorModesRegistry=class{constructor(){this._onDidChangeLanguages=new Emitter;this.onDidChangeLanguages=this._onDidChangeLanguages.event;this._languages=[]}registerLanguage(def){this._languages.push(def);this._onDidChangeLanguages.fire(void 0);return{dispose:()=>{for(let i=0,len=this._languages.length;iopen!==""&&close!==""))}var LanguageBracketsConfiguration,BracketKindBase,OpeningBracketKind,ClosingBracketKind;var init_languageBracketsConfiguration=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages/supports/languageBracketsConfiguration.js"(){init_cache();LanguageBracketsConfiguration=class{constructor(languageId,config){this.languageId=languageId;const bracketPairs=config.brackets?filterValidBrackets(config.brackets):[];const openingBracketInfos=new CachedFunction((bracket=>{const closing=new Set;return{info:new OpeningBracketKind(this,bracket,closing),closing:closing}}));const closingBracketInfos=new CachedFunction((bracket=>{const opening=new Set;const openingColorized=new Set;return{info:new ClosingBracketKind(this,bracket,opening,openingColorized),opening:opening,openingColorized:openingColorized}}));for(const[open,close]of bracketPairs){const opening=openingBracketInfos.get(open);const closing=closingBracketInfos.get(close);opening.closing.add(closing.info);closing.opening.add(opening.info)}const colorizedBracketPairs=config.colorizedBracketPairs?filterValidBrackets(config.colorizedBracketPairs):bracketPairs.filter((p=>!(p[0]==="<"&&p[1]===">")));for(const[open,close]of colorizedBracketPairs){const opening=openingBracketInfos.get(open);const closing=closingBracketInfos.get(close);opening.closing.add(closing.info);closing.openingColorized.add(opening.info);closing.opening.add(opening.info)}this._openingBrackets=new Map([...openingBracketInfos.cachedValues].map((([k,v])=>[k,v.info])));this._closingBrackets=new Map([...closingBracketInfos.cachedValues].map((([k,v])=>[k,v.info])))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(bracketText){return this._openingBrackets.get(bracketText)}getClosingBracketInfo(bracketText){return this._closingBrackets.get(bracketText)}getBracketInfo(bracketText){return this.getOpeningBracketInfo(bracketText)||this.getClosingBracketInfo(bracketText)}};BracketKindBase=class{constructor(config,bracketText){this.config=config;this.bracketText=bracketText}get languageId(){return this.config.languageId}};OpeningBracketKind=class extends BracketKindBase{constructor(config,bracketText,openedBrackets){super(config,bracketText);this.openedBrackets=openedBrackets;this.isOpeningBracket=true}};ClosingBracketKind=class extends BracketKindBase{constructor(config,bracketText,openingBrackets,openingColorizedBrackets){super(config,bracketText);this.openingBrackets=openingBrackets;this.openingColorizedBrackets=openingColorizedBrackets;this.isOpeningBracket=false}closes(other){if(other["config"]!==this.config){return false}return this.openingBrackets.has(other)}closesColorized(other){if(other["config"]!==this.config){return false}return this.openingColorizedBrackets.has(other)}getOpeningBrackets(){return[...this.openingBrackets]}}}});function computeConfig(languageId,registry,configurationService,languageService){let languageConfig=registry.getLanguageConfiguration(languageId);if(!languageConfig){if(!languageService.isRegisteredLanguageId(languageId)){return new ResolvedLanguageConfiguration(languageId,{})}languageConfig=new ResolvedLanguageConfiguration(languageId,{})}const customizedConfig=getCustomizedLanguageConfig(languageConfig.languageId,configurationService);const data=combineLanguageConfigurations([languageConfig.underlyingConfig,customizedConfig]);const config=new ResolvedLanguageConfiguration(languageConfig.languageId,data);return config}function getCustomizedLanguageConfig(languageId,configurationService){const brackets=configurationService.getValue(customizedLanguageConfigKeys.brackets,{overrideIdentifier:languageId});const colorizedBracketPairs=configurationService.getValue(customizedLanguageConfigKeys.colorizedBracketPairs,{overrideIdentifier:languageId});return{brackets:validateBracketPairs(brackets),colorizedBracketPairs:validateBracketPairs(colorizedBracketPairs)}}function validateBracketPairs(data){if(!Array.isArray(data)){return void 0}return data.map((pair=>{if(!Array.isArray(pair)||pair.length!==2){return void 0}return[pair[0],pair[1]]})).filter((p=>!!p))}function getIndentationAtPosition(model,lineNumber,column){const lineText=model.getLineContent(lineNumber);let indentation=getLeadingWhitespace(lineText);if(indentation.length>column-1){indentation=indentation.substring(0,column-1)}return indentation}function getScopedLineTokens(model,lineNumber,columnNumber){model.tokenization.forceTokenization(lineNumber);const lineTokens=model.tokenization.getLineTokens(lineNumber);const column=typeof columnNumber==="undefined"?model.getLineMaxColumn(lineNumber)-1:columnNumber-1;return createScopedLineTokens(lineTokens,column)}function combineLanguageConfigurations(configs){let result={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const entry of configs){result={comments:entry.comments||result.comments,brackets:entry.brackets||result.brackets,wordPattern:entry.wordPattern||result.wordPattern,indentationRules:entry.indentationRules||result.indentationRules,onEnterRules:entry.onEnterRules||result.onEnterRules,autoClosingPairs:entry.autoClosingPairs||result.autoClosingPairs,surroundingPairs:entry.surroundingPairs||result.surroundingPairs,autoCloseBefore:entry.autoCloseBefore||result.autoCloseBefore,folding:entry.folding||result.folding,colorizedBracketPairs:entry.colorizedBracketPairs||result.colorizedBracketPairs,__electricCharacterSupport:entry.__electricCharacterSupport||result.__electricCharacterSupport}}return result}var __decorate2,__param2,LanguageConfigurationServiceChangeEvent,ILanguageConfigurationService,LanguageConfigurationService,customizedLanguageConfigKeys,ComposedLanguageConfiguration,LanguageConfigurationContribution,LanguageConfigurationChangeEvent,LanguageConfigurationRegistry,ResolvedLanguageConfiguration;var init_languageConfigurationRegistry=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages/languageConfigurationRegistry.js"(){init_event();init_lifecycle();init_strings();init_wordHelper();init_languageConfiguration();init_supports();init_characterPair();init_electricCharacter();init_indentRules();init_onEnter();init_richEditBrackets();init_instantiation();init_configuration();init_language();init_extensions();init_modesRegistry();init_languageBracketsConfiguration();__decorate2=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param2=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};LanguageConfigurationServiceChangeEvent=class{constructor(languageId){this.languageId=languageId}affects(languageId){return!this.languageId?true:this.languageId===languageId}};ILanguageConfigurationService=createDecorator("languageConfigurationService");LanguageConfigurationService=class LanguageConfigurationService2 extends Disposable{constructor(configurationService,languageService){super();this.configurationService=configurationService;this.languageService=languageService;this._registry=this._register(new LanguageConfigurationRegistry);this.onDidChangeEmitter=this._register(new Emitter);this.onDidChange=this.onDidChangeEmitter.event;this.configurations=new Map;const languageConfigKeys=new Set(Object.values(customizedLanguageConfigKeys));this._register(this.configurationService.onDidChangeConfiguration((e=>{const globalConfigChanged=e.change.keys.some((k=>languageConfigKeys.has(k)));const localConfigChanged=e.change.overrides.filter((([overrideLangName,keys])=>keys.some((k=>languageConfigKeys.has(k))))).map((([overrideLangName])=>overrideLangName));if(globalConfigChanged){this.configurations.clear();this.onDidChangeEmitter.fire(new LanguageConfigurationServiceChangeEvent(void 0))}else{for(const languageId of localConfigChanged){if(this.languageService.isRegisteredLanguageId(languageId)){this.configurations.delete(languageId);this.onDidChangeEmitter.fire(new LanguageConfigurationServiceChangeEvent(languageId))}}}})));this._register(this._registry.onDidChange((e=>{this.configurations.delete(e.languageId);this.onDidChangeEmitter.fire(new LanguageConfigurationServiceChangeEvent(e.languageId))})))}register(languageId,configuration,priority){return this._registry.register(languageId,configuration,priority)}getLanguageConfiguration(languageId){let result=this.configurations.get(languageId);if(!result){result=computeConfig(languageId,this._registry,this.configurationService,this.languageService);this.configurations.set(languageId,result)}return result}};LanguageConfigurationService=__decorate2([__param2(0,IConfigurationService),__param2(1,ILanguageService)],LanguageConfigurationService);customizedLanguageConfigKeys={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};ComposedLanguageConfiguration=class{constructor(languageId){this.languageId=languageId;this._resolved=null;this._entries=[];this._order=0;this._resolved=null}register(configuration,priority){const entry=new LanguageConfigurationContribution(configuration,priority,++this._order);this._entries.push(entry);this._resolved=null;return toDisposable((()=>{for(let i=0;ie.configuration)))}};LanguageConfigurationContribution=class{constructor(configuration,priority,order){this.configuration=configuration;this.priority=priority;this.order=order}static cmp(a,b){if(a.priority===b.priority){return a.order-b.order}return a.priority-b.priority}};LanguageConfigurationChangeEvent=class{constructor(languageId){this.languageId=languageId}};LanguageConfigurationRegistry=class extends Disposable{constructor(){super();this._entries=new Map;this._onDidChange=this._register(new Emitter);this.onDidChange=this._onDidChange.event;this._register(this.register(PLAINTEXT_LANGUAGE_ID,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:true}},0))}register(languageId,configuration,priority=0){let entries2=this._entries.get(languageId);if(!entries2){entries2=new ComposedLanguageConfiguration(languageId);this._entries.set(languageId,entries2)}const disposable=entries2.register(configuration,priority);this._onDidChange.fire(new LanguageConfigurationChangeEvent(languageId));return toDisposable((()=>{disposable.dispose();this._onDidChange.fire(new LanguageConfigurationChangeEvent(languageId))}))}getLanguageConfiguration(languageId){const entries2=this._entries.get(languageId);return(entries2===null||entries2===void 0?void 0:entries2.getResolvedConfiguration())||null}};ResolvedLanguageConfiguration=class{constructor(languageId,underlyingConfig){this.languageId=languageId;this.underlyingConfig=underlyingConfig;this._brackets=null;this._electricCharacter=null;this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new OnEnterSupport(this.underlyingConfig):null;this.comments=ResolvedLanguageConfiguration._handleComments(this.underlyingConfig);this.characterPair=new CharacterPairSupport(this.underlyingConfig);this.wordDefinition=this.underlyingConfig.wordPattern||DEFAULT_WORD_REGEXP;this.indentationRules=this.underlyingConfig.indentationRules;if(this.underlyingConfig.indentationRules){this.indentRulesSupport=new IndentRulesSupport(this.underlyingConfig.indentationRules)}else{this.indentRulesSupport=null}this.foldingRules=this.underlyingConfig.folding||{};this.bracketsNew=new LanguageBracketsConfiguration(languageId,this.underlyingConfig)}getWordDefinition(){return ensureValidWordDefinition(this.wordDefinition)}get brackets(){if(!this._brackets&&this.underlyingConfig.brackets){this._brackets=new RichEditBrackets(this.languageId,this.underlyingConfig.brackets)}return this._brackets}get electricCharacter(){if(!this._electricCharacter){this._electricCharacter=new BracketElectricCharacterSupport(this.brackets)}return this._electricCharacter}onEnter(autoIndent,previousLineText,beforeEnterText,afterEnterText){if(!this._onEnterSupport){return null}return this._onEnterSupport.onEnter(autoIndent,previousLineText,beforeEnterText,afterEnterText)}getAutoClosingPairs(){return new AutoClosingPairs(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(forQuotes){return this.characterPair.getAutoCloseBeforeSet(forQuotes)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(conf80){const commentRule=conf80.comments;if(!commentRule){return null}const comments={};if(commentRule.lineComment){comments.lineCommentToken=commentRule.lineComment}if(commentRule.blockComment){const[blockStart,blockEnd]=commentRule.blockComment;comments.blockCommentStartToken=blockStart;comments.blockCommentEndToken=blockEnd}return comments}};registerSingleton(ILanguageConfigurationService,LanguageConfigurationService,1)}});function nullTokenize(languageId,state){return new TokenizationResult([new Token(0,"",languageId)],state)}function nullTokenizeEncoded(languageId,state){const tokens=new Uint32Array(2);tokens[0]=0;tokens[1]=(languageId<<0|0<<8|0<<11|1<<15|2<<24)>>>0;return new EncodedTokenizationResult(tokens,state===null?NullState:state)}var NullState;var init_nullTokenize=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages/nullTokenize.js"(){init_languages();NullState=new class{clone(){return this}equals(other){return this===other}}}});var IModelService;var init_model2=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/model.js"(){init_instantiation();IModelService=createDecorator("modelService")}});var MicrotaskDelay;var init_symbols=__esm({"node_modules/monaco-editor/esm/vs/base/common/symbols.js"(){MicrotaskDelay=Symbol("MicrotaskDelay")}});function isThenable(obj){return!!obj&&typeof obj.then==="function"}function createCancelablePromise(callback){const source=new CancellationTokenSource;const thenable=callback(source.token);const promise=new Promise(((resolve2,reject)=>{const subscription=source.token.onCancellationRequested((()=>{subscription.dispose();source.dispose();reject(new CancellationError)}));Promise.resolve(thenable).then((value=>{subscription.dispose();source.dispose();resolve2(value)}),(err=>{subscription.dispose();source.dispose();reject(err)}))}));return new class{cancel(){source.cancel()}then(resolve2,reject){return promise.then(resolve2,reject)}catch(reject){return this.then(void 0,reject)}finally(onfinally){return promise.finally(onfinally)}}}function raceCancellation(promise,token,defaultValue){return new Promise(((resolve2,reject)=>{const ref=token.onCancellationRequested((()=>{ref.dispose();resolve2(defaultValue)}));promise.then(resolve2,reject).finally((()=>ref.dispose()))}))}function timeout(millis,token){if(!token){return createCancelablePromise((token2=>timeout(millis,token2)))}return new Promise(((resolve2,reject)=>{const handle=setTimeout((()=>{disposable.dispose();resolve2()}),millis);const disposable=token.onCancellationRequested((()=>{clearTimeout(handle);disposable.dispose();reject(new CancellationError)}))}))}function disposableTimeout(handler,timeout2=0){const timer=setTimeout(handler,timeout2);return toDisposable((()=>clearTimeout(timer)))}function first(promiseFactories,shouldStop=(t2=>!!t2),defaultValue=null){let index=0;const len=promiseFactories.length;const loop=()=>{if(index>=len){return Promise.resolve(defaultValue)}const factory=promiseFactories[index++];const promise=Promise.resolve(factory());return promise.then((result=>{if(shouldStop(result)){return Promise.resolve(result)}return loop()}))};return loop()}function createCancelableAsyncIterable(callback){const source=new CancellationTokenSource;const innerIterable=callback(source.token);return new CancelableAsyncIterableObject(source,(emitter=>__awaiter2(this,void 0,void 0,(function*(){var _a6,e_5,_b3,_c2;const subscription=source.token.onCancellationRequested((()=>{subscription.dispose();source.dispose();emitter.reject(new CancellationError)}));try{try{for(var _d2=true,innerIterable_1=__asyncValues(innerIterable),innerIterable_1_1;innerIterable_1_1=yield innerIterable_1.next(),_a6=innerIterable_1_1.done,!_a6;_d2=true){_c2=innerIterable_1_1.value;_d2=false;const item=_c2;if(source.token.isCancellationRequested){return}emitter.emitOne(item)}}catch(e_5_1){e_5={error:e_5_1}}finally{try{if(!_d2&&!_a6&&(_b3=innerIterable_1.return))yield _b3.call(innerIterable_1)}finally{if(e_5)throw e_5.error}}subscription.dispose();source.dispose()}catch(err){subscription.dispose();source.dispose();emitter.reject(err)}}))))}var __awaiter2,__asyncValues,Throttler,timeoutDeferred,microtaskDeferred,Delayer,ThrottledDelayer,TimeoutTimer,IntervalTimer,RunOnceScheduler,runWhenIdle,IdleValue,DeferredPromise,Promises,AsyncIterableObject,CancelableAsyncIterableObject;var init_async=__esm({"node_modules/monaco-editor/esm/vs/base/common/async.js"(){init_cancellation();init_errors();init_event();init_lifecycle();init_platform();init_symbols();__awaiter2=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};__asyncValues=function(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var m=o[Symbol.asyncIterator],i;return m?m.call(o):(o=typeof __values==="function"?__values(o):o[Symbol.iterator](),i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i);function verb(n){i[n]=o[n]&&function(v){return new Promise((function(resolve2,reject){v=o[n](v),settle(resolve2,reject,v.done,v.value)}))}}function settle(resolve2,reject,d,v){Promise.resolve(v).then((function(v2){resolve2({value:v2,done:d})}),reject)}};Throttler=class{constructor(){this.isDisposed=false;this.activePromise=null;this.queuedPromise=null;this.queuedPromiseFactory=null}queue(promiseFactory){if(this.isDisposed){throw new Error("Throttler is disposed")}if(this.activePromise){this.queuedPromiseFactory=promiseFactory;if(!this.queuedPromise){const onComplete=()=>{this.queuedPromise=null;if(this.isDisposed){return}const result=this.queue(this.queuedPromiseFactory);this.queuedPromiseFactory=null;return result};this.queuedPromise=new Promise((resolve2=>{this.activePromise.then(onComplete,onComplete).then(resolve2)}))}return new Promise(((resolve2,reject)=>{this.queuedPromise.then(resolve2,reject)}))}this.activePromise=promiseFactory();return new Promise(((resolve2,reject)=>{this.activePromise.then((result=>{this.activePromise=null;resolve2(result)}),(err=>{this.activePromise=null;reject(err)}))}))}dispose(){this.isDisposed=true}};timeoutDeferred=(timeout2,fn)=>{let scheduled=true;const handle=setTimeout((()=>{scheduled=false;fn()}),timeout2);return{isTriggered:()=>scheduled,dispose:()=>{clearTimeout(handle);scheduled=false}}};microtaskDeferred=fn=>{let scheduled=true;queueMicrotask((()=>{if(scheduled){scheduled=false;fn()}}));return{isTriggered:()=>scheduled,dispose:()=>{scheduled=false}}};Delayer=class{constructor(defaultDelay){this.defaultDelay=defaultDelay;this.deferred=null;this.completionPromise=null;this.doResolve=null;this.doReject=null;this.task=null}trigger(task,delay=this.defaultDelay){this.task=task;this.cancelTimeout();if(!this.completionPromise){this.completionPromise=new Promise(((resolve2,reject)=>{this.doResolve=resolve2;this.doReject=reject})).then((()=>{this.completionPromise=null;this.doResolve=null;if(this.task){const task2=this.task;this.task=null;return task2()}return void 0}))}const fn=()=>{var _a6;this.deferred=null;(_a6=this.doResolve)===null||_a6===void 0?void 0:_a6.call(this,null)};this.deferred=delay===MicrotaskDelay?microtaskDeferred(fn):timeoutDeferred(delay,fn);return this.completionPromise}isTriggered(){var _a6;return!!((_a6=this.deferred)===null||_a6===void 0?void 0:_a6.isTriggered())}cancel(){var _a6;this.cancelTimeout();if(this.completionPromise){(_a6=this.doReject)===null||_a6===void 0?void 0:_a6.call(this,new CancellationError);this.completionPromise=null}}cancelTimeout(){var _a6;(_a6=this.deferred)===null||_a6===void 0?void 0:_a6.dispose();this.deferred=null}dispose(){this.cancel()}};ThrottledDelayer=class{constructor(defaultDelay){this.delayer=new Delayer(defaultDelay);this.throttler=new Throttler}trigger(promiseFactory,delay){return this.delayer.trigger((()=>this.throttler.queue(promiseFactory)),delay)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose();this.throttler.dispose()}};TimeoutTimer=class{constructor(runner,timeout2){this._token=-1;if(typeof runner==="function"&&typeof timeout2==="number"){this.setIfNotSet(runner,timeout2)}}dispose(){this.cancel()}cancel(){if(this._token!==-1){clearTimeout(this._token);this._token=-1}}cancelAndSet(runner,timeout2){this.cancel();this._token=setTimeout((()=>{this._token=-1;runner()}),timeout2)}setIfNotSet(runner,timeout2){if(this._token!==-1){return}this._token=setTimeout((()=>{this._token=-1;runner()}),timeout2)}};IntervalTimer=class{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){if(this._token!==-1){clearInterval(this._token);this._token=-1}}cancelAndSet(runner,interval){this.cancel();this._token=setInterval((()=>{runner()}),interval)}};RunOnceScheduler=class{constructor(runner,delay){this.timeoutToken=-1;this.runner=runner;this.timeout=delay;this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel();this.runner=null}cancel(){if(this.isScheduled()){clearTimeout(this.timeoutToken);this.timeoutToken=-1}}schedule(delay=this.timeout){this.cancel();this.timeoutToken=setTimeout(this.timeoutHandler,delay)}get delay(){return this.timeout}set delay(value){this.timeout=value}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1;if(this.runner){this.doRun()}}doRun(){var _a6;(_a6=this.runner)===null||_a6===void 0?void 0:_a6.call(this)}};(function(){if(typeof requestIdleCallback!=="function"||typeof cancelIdleCallback!=="function"){runWhenIdle=runner=>{setTimeout0((()=>{if(disposed){return}const end=Date.now()+15;runner(Object.freeze({didTimeout:true,timeRemaining(){return Math.max(0,end-Date.now())}}))}));let disposed=false;return{dispose(){if(disposed){return}disposed=true}}}}else{runWhenIdle=(runner,timeout2)=>{const handle=requestIdleCallback(runner,typeof timeout2==="number"?{timeout:timeout2}:void 0);let disposed=false;return{dispose(){if(disposed){return}disposed=true;cancelIdleCallback(handle)}}}}})();IdleValue=class{constructor(executor){this._didRun=false;this._executor=()=>{try{this._value=executor()}catch(err){this._error=err}finally{this._didRun=true}};this._handle=runWhenIdle((()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(!this._didRun){this._handle.dispose();this._executor()}if(this._error){throw this._error}return this._value}get isInitialized(){return this._didRun}};DeferredPromise=class{get isRejected(){var _a6;return((_a6=this.outcome)===null||_a6===void 0?void 0:_a6.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise(((c,e)=>{this.completeCallback=c;this.errorCallback=e}))}complete(value){return new Promise((resolve2=>{this.completeCallback(value);this.outcome={outcome:0,value:value};resolve2()}))}error(err){return new Promise((resolve2=>{this.errorCallback(err);this.outcome={outcome:1,value:err};resolve2()}))}cancel(){return this.error(new CancellationError)}};(function(Promises2){function settled(promises){return __awaiter2(this,void 0,void 0,(function*(){let firstError=void 0;const result=yield Promise.all(promises.map((promise=>promise.then((value=>value),(error=>{if(!firstError){firstError=error}return void 0})))));if(typeof firstError!=="undefined"){throw firstError}return result}))}Promises2.settled=settled;function withAsyncBody(bodyFn){return new Promise(((resolve2,reject)=>__awaiter2(this,void 0,void 0,(function*(){try{yield bodyFn(resolve2,reject)}catch(error){reject(error)}}))))}Promises2.withAsyncBody=withAsyncBody})(Promises||(Promises={}));AsyncIterableObject=class{static fromArray(items){return new AsyncIterableObject((writer=>{writer.emitMany(items)}))}static fromPromise(promise){return new AsyncIterableObject((emitter=>__awaiter2(this,void 0,void 0,(function*(){emitter.emitMany(yield promise)}))))}static fromPromises(promises){return new AsyncIterableObject((emitter=>__awaiter2(this,void 0,void 0,(function*(){yield Promise.all(promises.map((p=>__awaiter2(this,void 0,void 0,(function*(){return emitter.emitOne(yield p)})))))}))))}static merge(iterables){return new AsyncIterableObject((emitter=>__awaiter2(this,void 0,void 0,(function*(){yield Promise.all(iterables.map((iterable=>{var _a6,iterable_1,iterable_1_1;return __awaiter2(this,void 0,void 0,(function*(){var _b3,e_1,_c2,_d2;try{for(_a6=true,iterable_1=__asyncValues(iterable);iterable_1_1=yield iterable_1.next(),_b3=iterable_1_1.done,!_b3;_a6=true){_d2=iterable_1_1.value;_a6=false;const item=_d2;emitter.emitOne(item)}}catch(e_1_1){e_1={error:e_1_1}}finally{try{if(!_a6&&!_b3&&(_c2=iterable_1.return))yield _c2.call(iterable_1)}finally{if(e_1)throw e_1.error}}}))})))}))))}constructor(executor){this._state=0;this._results=[];this._error=null;this._onStateChanged=new Emitter;queueMicrotask((()=>__awaiter2(this,void 0,void 0,(function*(){const writer={emitOne:item=>this.emitOne(item),emitMany:items=>this.emitMany(items),reject:error=>this.reject(error)};try{yield Promise.resolve(executor(writer));this.resolve()}catch(err){this.reject(err)}finally{writer.emitOne=void 0;writer.emitMany=void 0;writer.reject=void 0}}))))}[Symbol.asyncIterator](){let i=0;return{next:()=>__awaiter2(this,void 0,void 0,(function*(){do{if(this._state===2){throw this._error}if(i__awaiter2(this,void 0,void 0,(function*(){var _a6,e_2,_b3,_c2;try{for(var _d2=true,iterable_2=__asyncValues(iterable),iterable_2_1;iterable_2_1=yield iterable_2.next(),_a6=iterable_2_1.done,!_a6;_d2=true){_c2=iterable_2_1.value;_d2=false;const item=_c2;emitter.emitOne(mapFn(item))}}catch(e_2_1){e_2={error:e_2_1}}finally{try{if(!_d2&&!_a6&&(_b3=iterable_2.return))yield _b3.call(iterable_2)}finally{if(e_2)throw e_2.error}}}))))}map(mapFn){return AsyncIterableObject.map(this,mapFn)}static filter(iterable,filterFn){return new AsyncIterableObject((emitter=>__awaiter2(this,void 0,void 0,(function*(){var _a6,e_3,_b3,_c2;try{for(var _d2=true,iterable_3=__asyncValues(iterable),iterable_3_1;iterable_3_1=yield iterable_3.next(),_a6=iterable_3_1.done,!_a6;_d2=true){_c2=iterable_3_1.value;_d2=false;const item=_c2;if(filterFn(item)){emitter.emitOne(item)}}}catch(e_3_1){e_3={error:e_3_1}}finally{try{if(!_d2&&!_a6&&(_b3=iterable_3.return))yield _b3.call(iterable_3)}finally{if(e_3)throw e_3.error}}}))))}filter(filterFn){return AsyncIterableObject.filter(this,filterFn)}static coalesce(iterable){return AsyncIterableObject.filter(iterable,(item=>!!item))}coalesce(){return AsyncIterableObject.coalesce(this)}static toPromise(iterable){var _a6,iterable_4,iterable_4_1;var _b3,e_4,_c2,_d2;return __awaiter2(this,void 0,void 0,(function*(){const result=[];try{for(_a6=true,iterable_4=__asyncValues(iterable);iterable_4_1=yield iterable_4.next(),_b3=iterable_4_1.done,!_b3;_a6=true){_d2=iterable_4_1.value;_a6=false;const item=_d2;result.push(item)}}catch(e_4_1){e_4={error:e_4_1}}finally{try{if(!_a6&&!_b3&&(_c2=iterable_4.return))yield _c2.call(iterable_4)}finally{if(e_4)throw e_4.error}}return result}))}toPromise(){return AsyncIterableObject.toPromise(this)}emitOne(value){if(this._state!==0){return}this._results.push(value);this._onStateChanged.fire()}emitMany(values){if(this._state!==0){return}this._results=this._results.concat(values);this._onStateChanged.fire()}resolve(){if(this._state!==0){return}this._state=1;this._onStateChanged.fire()}reject(error){if(this._state!==0){return}this._state=2;this._error=error;this._onStateChanged.fire()}};AsyncIterableObject.EMPTY=AsyncIterableObject.fromArray([]);CancelableAsyncIterableObject=class extends AsyncIterableObject{constructor(_source,executor){super(executor);this._source=_source}cancel(){this._source.cancel()}}}});function logOnceWebWorkerWarning(err){if(!isWeb){return}if(!webWorkerWarningLogged){webWorkerWarningLogged=true;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")}console.warn(err.message)}function propertyIsEvent(name){return name[0]==="o"&&name[1]==="n"&&isUpperAsciiLetter(name.charCodeAt(2))}function propertyIsDynamicEvent(name){return/^onDynamic/.test(name)&&isUpperAsciiLetter(name.charCodeAt(9))}function createProxyObject2(methodNames,invoke,proxyListen){const createProxyMethod=method=>function(){const args=Array.prototype.slice.call(arguments,0);return invoke(method,args)};const createProxyDynamicEvent=eventName=>function(arg){return proxyListen(eventName,arg)};const result={};for(const methodName of methodNames){if(propertyIsDynamicEvent(methodName)){result[methodName]=createProxyDynamicEvent(methodName);continue}if(propertyIsEvent(methodName)){result[methodName]=proxyListen(methodName,void 0);continue}result[methodName]=createProxyMethod(methodName)}return result}var INITIALIZE,webWorkerWarningLogged,RequestMessage,ReplyMessage,SubscribeEventMessage,EventMessage,UnsubscribeEventMessage,SimpleWorkerProtocol,SimpleWorkerClient;var init_simpleWorker=__esm({"node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js"(){init_errors();init_event();init_lifecycle();init_objects();init_platform();init_strings();INITIALIZE="$initialize";webWorkerWarningLogged=false;RequestMessage=class{constructor(vsWorker,req,method,args){this.vsWorker=vsWorker;this.req=req;this.method=method;this.args=args;this.type=0}};ReplyMessage=class{constructor(vsWorker,seq,res,err){this.vsWorker=vsWorker;this.seq=seq;this.res=res;this.err=err;this.type=1}};SubscribeEventMessage=class{constructor(vsWorker,req,eventName,arg){this.vsWorker=vsWorker;this.req=req;this.eventName=eventName;this.arg=arg;this.type=2}};EventMessage=class{constructor(vsWorker,req,event){this.vsWorker=vsWorker;this.req=req;this.event=event;this.type=3}};UnsubscribeEventMessage=class{constructor(vsWorker,req){this.vsWorker=vsWorker;this.req=req;this.type=4}};SimpleWorkerProtocol=class{constructor(handler){this._workerId=-1;this._handler=handler;this._lastSentReq=0;this._pendingReplies=Object.create(null);this._pendingEmitters=new Map;this._pendingEvents=new Map}setWorkerId(workerId){this._workerId=workerId}sendMessage(method,args){const req=String(++this._lastSentReq);return new Promise(((resolve2,reject)=>{this._pendingReplies[req]={resolve:resolve2,reject:reject};this._send(new RequestMessage(this._workerId,req,method,args))}))}listen(eventName,arg){let req=null;const emitter=new Emitter({onWillAddFirstListener:()=>{req=String(++this._lastSentReq);this._pendingEmitters.set(req,emitter);this._send(new SubscribeEventMessage(this._workerId,req,eventName,arg))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(req);this._send(new UnsubscribeEventMessage(this._workerId,req));req=null}});return emitter.event}handleMessage(message){if(!message||!message.vsWorker){return}if(this._workerId!==-1&&message.vsWorker!==this._workerId){return}this._handleMessage(message)}_handleMessage(msg){switch(msg.type){case 1:return this._handleReplyMessage(msg);case 0:return this._handleRequestMessage(msg);case 2:return this._handleSubscribeEventMessage(msg);case 3:return this._handleEventMessage(msg);case 4:return this._handleUnsubscribeEventMessage(msg)}}_handleReplyMessage(replyMessage){if(!this._pendingReplies[replyMessage.seq]){console.warn("Got reply to unknown seq");return}const reply=this._pendingReplies[replyMessage.seq];delete this._pendingReplies[replyMessage.seq];if(replyMessage.err){let err=replyMessage.err;if(replyMessage.err.$isError){err=new Error;err.name=replyMessage.err.name;err.message=replyMessage.err.message;err.stack=replyMessage.err.stack}reply.reject(err);return}reply.resolve(replyMessage.res)}_handleRequestMessage(requestMessage){const req=requestMessage.req;const result=this._handler.handleMessage(requestMessage.method,requestMessage.args);result.then((r=>{this._send(new ReplyMessage(this._workerId,req,r,void 0))}),(e=>{if(e.detail instanceof Error){e.detail=transformErrorForSerialization(e.detail)}this._send(new ReplyMessage(this._workerId,req,void 0,transformErrorForSerialization(e)))}))}_handleSubscribeEventMessage(msg){const req=msg.req;const disposable=this._handler.handleEvent(msg.eventName,msg.arg)((event=>{this._send(new EventMessage(this._workerId,req,event))}));this._pendingEvents.set(req,disposable)}_handleEventMessage(msg){if(!this._pendingEmitters.has(msg.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(msg.req).fire(msg.event)}_handleUnsubscribeEventMessage(msg){if(!this._pendingEvents.has(msg.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(msg.req).dispose();this._pendingEvents.delete(msg.req)}_send(msg){const transfer=[];if(msg.type===0){for(let i=0;i{this._protocol.handleMessage(msg)}),(err=>{lazyProxyReject===null||lazyProxyReject===void 0?void 0:lazyProxyReject(err)})));this._protocol=new SimpleWorkerProtocol({sendMessage:(msg,transfer)=>{this._worker.postMessage(msg,transfer)},handleMessage:(method,args)=>{if(typeof host[method]!=="function"){return Promise.reject(new Error("Missing method "+method+" on main thread host."))}try{return Promise.resolve(host[method].apply(host,args))}catch(e){return Promise.reject(e)}},handleEvent:(eventName,arg)=>{if(propertyIsDynamicEvent(eventName)){const event=host[eventName].call(host,arg);if(typeof event!=="function"){throw new Error(`Missing dynamic event ${eventName} on main thread host.`)}return event}if(propertyIsEvent(eventName)){const event=host[eventName];if(typeof event!=="function"){throw new Error(`Missing event ${eventName} on main thread host.`)}return event}throw new Error(`Malformed event name ${eventName}`)}});this._protocol.setWorkerId(this._worker.getId());let loaderConfiguration=null;const globalRequire=globalThis.require;if(typeof globalRequire!=="undefined"&&typeof globalRequire.getConfig==="function"){loaderConfiguration=globalRequire.getConfig()}else if(typeof globalThis.requirejs!=="undefined"){loaderConfiguration=globalThis.requirejs.s.contexts._.config}const hostMethods=getAllMethodNames(host);this._onModuleLoaded=this._protocol.sendMessage(INITIALIZE,[this._worker.getId(),JSON.parse(JSON.stringify(loaderConfiguration)),moduleId,hostMethods]);const proxyMethodRequest=(method,args)=>this._request(method,args);const proxyListen=(eventName,arg)=>this._protocol.listen(eventName,arg);this._lazyProxy=new Promise(((resolve2,reject)=>{lazyProxyReject=reject;this._onModuleLoaded.then((availableMethods=>{resolve2(createProxyObject2(availableMethods,proxyMethodRequest,proxyListen))}),(e=>{reject(e);this._onError("Worker failed to load "+moduleId,e)}))}))}getProxyObject(){return this._lazyProxy}_request(method,args){return new Promise(((resolve2,reject)=>{this._onModuleLoaded.then((()=>{this._protocol.sendMessage(method,args).then(resolve2,reject)}),reject)}))}_onError(message,error){console.error(message);console.info(error)}}}});function createTrustedTypesPolicy(policyName,policyOptions){var _a6;const monacoEnvironment2=globalThis.MonacoEnvironment;if(monacoEnvironment2===null||monacoEnvironment2===void 0?void 0:monacoEnvironment2.createTrustedTypesPolicy){try{return monacoEnvironment2.createTrustedTypesPolicy(policyName,policyOptions)}catch(err){onUnexpectedError(err);return void 0}}try{return(_a6=window.trustedTypes)===null||_a6===void 0?void 0:_a6.createPolicy(policyName,policyOptions)}catch(err){onUnexpectedError(err);return void 0}}var init_trustedTypes=__esm({"node_modules/monaco-editor/esm/vs/base/browser/trustedTypes.js"(){init_errors()}});function getWorker(label){const monacoEnvironment2=globalThis.MonacoEnvironment;if(monacoEnvironment2){if(typeof monacoEnvironment2.getWorker==="function"){return monacoEnvironment2.getWorker("workerMain.js",label)}if(typeof monacoEnvironment2.getWorkerUrl==="function"){const workerUrl=monacoEnvironment2.getWorkerUrl("workerMain.js",label);return new Worker(ttPolicy?ttPolicy.createScriptURL(workerUrl):workerUrl,{name:label})}}throw new Error(`You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker`)}function isPromiseLike(obj){if(typeof obj.then==="function"){return true}return false}var ttPolicy,WebWorker,DefaultWorkerFactory;var init_defaultWorkerFactory=__esm({"node_modules/monaco-editor/esm/vs/base/browser/defaultWorkerFactory.js"(){init_trustedTypes();init_errors();init_simpleWorker();ttPolicy=createTrustedTypesPolicy("defaultWorkerFactory",{createScriptURL:value=>value});WebWorker=class{constructor(moduleId,id,label,onMessageCallback,onErrorCallback){this.id=id;this.label=label;const workerOrPromise=getWorker(label);if(isPromiseLike(workerOrPromise)){this.worker=workerOrPromise}else{this.worker=Promise.resolve(workerOrPromise)}this.postMessage(moduleId,[]);this.worker.then((w=>{w.onmessage=function(ev){onMessageCallback(ev.data)};w.onmessageerror=onErrorCallback;if(typeof w.addEventListener==="function"){w.addEventListener("error",onErrorCallback)}}))}getId(){return this.id}postMessage(message,transfer){var _a6;(_a6=this.worker)===null||_a6===void 0?void 0:_a6.then((w=>{try{w.postMessage(message,transfer)}catch(err){onUnexpectedError(err);onUnexpectedError(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:err}))}}))}dispose(){var _a6;(_a6=this.worker)===null||_a6===void 0?void 0:_a6.then((w=>w.terminate()));this.worker=null}};DefaultWorkerFactory=class{constructor(label){this._label=label;this._webWorkerFailedBeforeError=false}create(moduleId,onMessageCallback,onErrorCallback){const workerId=++DefaultWorkerFactory.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError){throw this._webWorkerFailedBeforeError}return new WebWorker(moduleId,workerId,this._label||"anonymous"+workerId,onMessageCallback,(err=>{logOnceWebWorkerWarning(err);this._webWorkerFailedBeforeError=err;onErrorCallback(err)}))}};DefaultWorkerFactory.LAST_WORKER_ID=0}});var DiffChange;var init_diffChange=__esm({"node_modules/monaco-editor/esm/vs/base/common/diff/diffChange.js"(){DiffChange=class{constructor(originalStart,originalLength,modifiedStart,modifiedLength){this.originalStart=originalStart;this.originalLength=originalLength;this.modifiedStart=modifiedStart;this.modifiedLength=modifiedLength}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}}});function hash(obj){return doHash(obj,0)}function doHash(obj,hashVal){switch(typeof obj){case"object":if(obj===null){return numberHash(349,hashVal)}else if(Array.isArray(obj)){return arrayHash(obj,hashVal)}return objectHash(obj,hashVal);case"string":return stringHash(obj,hashVal);case"boolean":return booleanHash(obj,hashVal);case"number":return numberHash(obj,hashVal);case"undefined":return numberHash(937,hashVal);default:return numberHash(617,hashVal)}}function numberHash(val,initialHashVal){return(initialHashVal<<5)-initialHashVal+val|0}function booleanHash(b,initialHashVal){return numberHash(b?433:863,initialHashVal)}function stringHash(s,hashVal){hashVal=numberHash(149417,hashVal);for(let i=0,length2=s.length;idoHash(item,hashVal)),initialHashVal)}function objectHash(obj,initialHashVal){initialHashVal=numberHash(181387,initialHashVal);return Object.keys(obj).sort().reduce(((hashVal,key)=>{hashVal=stringHash(key,hashVal);return doHash(obj[key],hashVal)}),initialHashVal)}function leftRotate(value,bits,totalBits=32){const delta=totalBits-bits;const mask=~((1<>>delta)>>>0}function fill(dest,index=0,count=dest.byteLength,value=0){for(let i=0;ib.toString(16).padStart(2,"0"))).join("")}return leftPad((bufferOrValue>>>0).toString(16),bitsize/4)}var StringSHA1;var init_hash=__esm({"node_modules/monaco-editor/esm/vs/base/common/hash.js"(){init_strings();StringSHA1=class{constructor(){this._h0=1732584193;this._h1=4023233417;this._h2=2562383102;this._h3=271733878;this._h4=3285377520;this._buff=new Uint8Array(64+3);this._buffDV=new DataView(this._buff.buffer);this._buffLen=0;this._totalLen=0;this._leftoverHighSurrogate=0;this._finished=false}update(str){const strLen=str.length;if(strLen===0){return}const buff=this._buff;let buffLen=this._buffLen;let leftoverHighSurrogate=this._leftoverHighSurrogate;let charCode;let offset;if(leftoverHighSurrogate!==0){charCode=leftoverHighSurrogate;offset=-1;leftoverHighSurrogate=0}else{charCode=str.charCodeAt(0);offset=0}while(true){let codePoint=charCode;if(isHighSurrogate(charCode)){if(offset+1>>6;buff[buffLen++]=128|(codePoint&63)>>>0}else if(codePoint<65536){buff[buffLen++]=224|(codePoint&61440)>>>12;buff[buffLen++]=128|(codePoint&4032)>>>6;buff[buffLen++]=128|(codePoint&63)>>>0}else{buff[buffLen++]=240|(codePoint&1835008)>>>18;buff[buffLen++]=128|(codePoint&258048)>>>12;buff[buffLen++]=128|(codePoint&4032)>>>6;buff[buffLen++]=128|(codePoint&63)>>>0}if(buffLen>=64){this._step();buffLen-=64;this._totalLen+=64;buff[0]=buff[64+0];buff[1]=buff[64+1];buff[2]=buff[64+2]}return buffLen}digest(){if(!this._finished){this._finished=true;if(this._leftoverHighSurrogate){this._leftoverHighSurrogate=0;this._buffLen=this._push(this._buff,this._buffLen,65533)}this._totalLen+=this._buffLen;this._wrapUp()}return toHexString(this._h0)+toHexString(this._h1)+toHexString(this._h2)+toHexString(this._h3)+toHexString(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128;fill(this._buff,this._buffLen);if(this._buffLen>56){this._step();fill(this._buff)}const ml=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(ml/4294967296),false);this._buffDV.setUint32(60,ml%4294967296,false);this._step()}_step(){const bigBlock32=StringSHA1._bigBlock32;const data=this._buffDV;for(let j=0;j<64;j+=4){bigBlock32.setUint32(j,data.getUint32(j,false),false)}for(let j=64;j<320;j+=4){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)}let a=this._h0;let b=this._h1;let c=this._h2;let d=this._h3;let e=this._h4;let f,k;let temp;for(let j=0;j<80;j++){if(j<20){f=b&c|~b&d;k=1518500249}else if(j<40){f=b^c^d;k=1859775393}else if(j<60){f=b&c|b&d|c&d;k=2400959708}else{f=b^c^d;k=3395469782}temp=leftRotate(a,5)+f+e+k+bigBlock32.getUint32(j*4,false)&4294967295;e=d;d=c;c=leftRotate(b,30);b=a;a=temp}this._h0=this._h0+a&4294967295;this._h1=this._h1+b&4294967295;this._h2=this._h2+c&4294967295;this._h3=this._h3+d&4294967295;this._h4=this._h4+e&4294967295}};StringSHA1._bigBlock32=new DataView(new ArrayBuffer(320))}});function stringDiff(original,modified,pretty){return new LcsDiff(new StringDiffSequence(original),new StringDiffSequence(modified)).ComputeDiff(pretty).changes}var StringDiffSequence,Debug,MyArray,DiffChangeHelper,LcsDiff;var init_diff=__esm({"node_modules/monaco-editor/esm/vs/base/common/diff/diff.js"(){init_diffChange();init_hash();StringDiffSequence=class{constructor(source){this.source=source}getElements(){const source=this.source;const characters=new Int32Array(source.length);for(let i=0,len=source.length;i0||this.m_modifiedCount>0){this.m_changes.push(new DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount))}this.m_originalCount=0;this.m_modifiedCount=0;this.m_originalStart=1073741824;this.m_modifiedStart=1073741824}AddOriginalElement(originalIndex,modifiedIndex){this.m_originalStart=Math.min(this.m_originalStart,originalIndex);this.m_modifiedStart=Math.min(this.m_modifiedStart,modifiedIndex);this.m_originalCount++}AddModifiedElement(originalIndex,modifiedIndex){this.m_originalStart=Math.min(this.m_originalStart,originalIndex);this.m_modifiedStart=Math.min(this.m_modifiedStart,modifiedIndex);this.m_modifiedCount++}getChanges(){if(this.m_originalCount>0||this.m_modifiedCount>0){this.MarkNextChange()}return this.m_changes}getReverseChanges(){if(this.m_originalCount>0||this.m_modifiedCount>0){this.MarkNextChange()}this.m_changes.reverse();return this.m_changes}};LcsDiff=class{constructor(originalSequence,modifiedSequence,continueProcessingPredicate=null){this.ContinueProcessingPredicate=continueProcessingPredicate;this._originalSequence=originalSequence;this._modifiedSequence=modifiedSequence;const[originalStringElements,originalElementsOrHash,originalHasStrings]=LcsDiff._getElements(originalSequence);const[modifiedStringElements,modifiedElementsOrHash,modifiedHasStrings]=LcsDiff._getElements(modifiedSequence);this._hasStrings=originalHasStrings&&modifiedHasStrings;this._originalStringElements=originalStringElements;this._originalElementsOrHash=originalElementsOrHash;this._modifiedStringElements=modifiedStringElements;this._modifiedElementsOrHash=modifiedElementsOrHash;this.m_forwardHistory=[];this.m_reverseHistory=[]}static _isStringArray(arr){return arr.length>0&&typeof arr[0]==="string"}static _getElements(sequence){const elements=sequence.getElements();if(LcsDiff._isStringArray(elements)){const hashes=new Int32Array(elements.length);for(let i=0,len=elements.length;i=originalStart&&modifiedEnd>=modifiedStart&&this.ElementsAreEqual(originalEnd,modifiedEnd)){originalEnd--;modifiedEnd--}if(originalStart>originalEnd||modifiedStart>modifiedEnd){let changes;if(modifiedStart<=modifiedEnd){Debug.Assert(originalStart===originalEnd+1,"originalStart should only be one more than originalEnd");changes=[new DiffChange(originalStart,0,modifiedStart,modifiedEnd-modifiedStart+1)]}else if(originalStart<=originalEnd){Debug.Assert(modifiedStart===modifiedEnd+1,"modifiedStart should only be one more than modifiedEnd");changes=[new DiffChange(originalStart,originalEnd-originalStart+1,modifiedStart,0)]}else{Debug.Assert(originalStart===originalEnd+1,"originalStart should only be one more than originalEnd");Debug.Assert(modifiedStart===modifiedEnd+1,"modifiedStart should only be one more than modifiedEnd");changes=[]}return changes}const midOriginalArr=[0];const midModifiedArr=[0];const result=this.ComputeRecursionPoint(originalStart,originalEnd,modifiedStart,modifiedEnd,midOriginalArr,midModifiedArr,quitEarlyArr);const midOriginal=midOriginalArr[0];const midModified=midModifiedArr[0];if(result!==null){return result}else if(!quitEarlyArr[0]){const leftChanges=this.ComputeDiffRecursive(originalStart,midOriginal,modifiedStart,midModified,quitEarlyArr);let rightChanges=[];if(!quitEarlyArr[0]){rightChanges=this.ComputeDiffRecursive(midOriginal+1,originalEnd,midModified+1,modifiedEnd,quitEarlyArr)}else{rightChanges=[new DiffChange(midOriginal+1,originalEnd-(midOriginal+1)+1,midModified+1,modifiedEnd-(midModified+1)+1)]}return this.ConcatenateChanges(leftChanges,rightChanges)}return[new DiffChange(originalStart,originalEnd-originalStart+1,modifiedStart,modifiedEnd-modifiedStart+1)]}WALKTRACE(diagonalForwardBase,diagonalForwardStart,diagonalForwardEnd,diagonalForwardOffset,diagonalReverseBase,diagonalReverseStart,diagonalReverseEnd,diagonalReverseOffset,forwardPoints,reversePoints,originalIndex,originalEnd,midOriginalArr,modifiedIndex,modifiedEnd,midModifiedArr,deltaIsEven,quitEarlyArr){let forwardChanges=null;let reverseChanges=null;let changeHelper=new DiffChangeHelper;let diagonalMin=diagonalForwardStart;let diagonalMax=diagonalForwardEnd;let diagonalRelative=midOriginalArr[0]-midModifiedArr[0]-diagonalForwardOffset;let lastOriginalIndex=-1073741824;let historyIndex=this.m_forwardHistory.length-1;do{const diagonal=diagonalRelative+diagonalForwardBase;if(diagonal===diagonalMin||diagonal=0){forwardPoints=this.m_forwardHistory[historyIndex];diagonalForwardBase=forwardPoints[0];diagonalMin=1;diagonalMax=forwardPoints.length-1}}while(--historyIndex>=-1);forwardChanges=changeHelper.getReverseChanges();if(quitEarlyArr[0]){let originalStartPoint=midOriginalArr[0]+1;let modifiedStartPoint=midModifiedArr[0]+1;if(forwardChanges!==null&&forwardChanges.length>0){const lastForwardChange=forwardChanges[forwardChanges.length-1];originalStartPoint=Math.max(originalStartPoint,lastForwardChange.getOriginalEnd());modifiedStartPoint=Math.max(modifiedStartPoint,lastForwardChange.getModifiedEnd())}reverseChanges=[new DiffChange(originalStartPoint,originalEnd-originalStartPoint+1,modifiedStartPoint,modifiedEnd-modifiedStartPoint+1)]}else{changeHelper=new DiffChangeHelper;diagonalMin=diagonalReverseStart;diagonalMax=diagonalReverseEnd;diagonalRelative=midOriginalArr[0]-midModifiedArr[0]-diagonalReverseOffset;lastOriginalIndex=1073741824;historyIndex=deltaIsEven?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const diagonal=diagonalRelative+diagonalReverseBase;if(diagonal===diagonalMin||diagonal=reversePoints[diagonal+1]){originalIndex=reversePoints[diagonal+1]-1;modifiedIndex=originalIndex-diagonalRelative-diagonalReverseOffset;if(originalIndex>lastOriginalIndex){changeHelper.MarkNextChange()}lastOriginalIndex=originalIndex+1;changeHelper.AddOriginalElement(originalIndex+1,modifiedIndex+1);diagonalRelative=diagonal+1-diagonalReverseBase}else{originalIndex=reversePoints[diagonal-1];modifiedIndex=originalIndex-diagonalRelative-diagonalReverseOffset;if(originalIndex>lastOriginalIndex){changeHelper.MarkNextChange()}lastOriginalIndex=originalIndex;changeHelper.AddModifiedElement(originalIndex+1,modifiedIndex+1);diagonalRelative=diagonal-1-diagonalReverseBase}if(historyIndex>=0){reversePoints=this.m_reverseHistory[historyIndex];diagonalReverseBase=reversePoints[0];diagonalMin=1;diagonalMax=reversePoints.length-1}}while(--historyIndex>=-1);reverseChanges=changeHelper.getChanges()}return this.ConcatenateChanges(forwardChanges,reverseChanges)}ComputeRecursionPoint(originalStart,originalEnd,modifiedStart,modifiedEnd,midOriginalArr,midModifiedArr,quitEarlyArr){let originalIndex=0,modifiedIndex=0;let diagonalForwardStart=0,diagonalForwardEnd=0;let diagonalReverseStart=0,diagonalReverseEnd=0;originalStart--;modifiedStart--;midOriginalArr[0]=0;midModifiedArr[0]=0;this.m_forwardHistory=[];this.m_reverseHistory=[];const maxDifferences=originalEnd-originalStart+(modifiedEnd-modifiedStart);const numDiagonals=maxDifferences+1;const forwardPoints=new Int32Array(numDiagonals);const reversePoints=new Int32Array(numDiagonals);const diagonalForwardBase=modifiedEnd-modifiedStart;const diagonalReverseBase=originalEnd-originalStart;const diagonalForwardOffset=originalStart-modifiedStart;const diagonalReverseOffset=originalEnd-modifiedEnd;const delta=diagonalReverseBase-diagonalForwardBase;const deltaIsEven=delta%2===0;forwardPoints[diagonalForwardBase]=originalStart;reversePoints[diagonalReverseBase]=originalEnd;quitEarlyArr[0]=false;for(let numDifferences=1;numDifferences<=maxDifferences/2+1;numDifferences++){let furthestOriginalIndex=0;let furthestModifiedIndex=0;diagonalForwardStart=this.ClipDiagonalBound(diagonalForwardBase-numDifferences,numDifferences,diagonalForwardBase,numDiagonals);diagonalForwardEnd=this.ClipDiagonalBound(diagonalForwardBase+numDifferences,numDifferences,diagonalForwardBase,numDiagonals);for(let diagonal=diagonalForwardStart;diagonal<=diagonalForwardEnd;diagonal+=2){if(diagonal===diagonalForwardStart||diagonalfurthestOriginalIndex+furthestModifiedIndex){furthestOriginalIndex=originalIndex;furthestModifiedIndex=modifiedIndex}if(!deltaIsEven&&Math.abs(diagonal-diagonalReverseBase)<=numDifferences-1){if(originalIndex>=reversePoints[diagonal]){midOriginalArr[0]=originalIndex;midModifiedArr[0]=modifiedIndex;if(tempOriginalIndex<=reversePoints[diagonal]&&1447>0&&numDifferences<=1447+1){return this.WALKTRACE(diagonalForwardBase,diagonalForwardStart,diagonalForwardEnd,diagonalForwardOffset,diagonalReverseBase,diagonalReverseStart,diagonalReverseEnd,diagonalReverseOffset,forwardPoints,reversePoints,originalIndex,originalEnd,midOriginalArr,modifiedIndex,modifiedEnd,midModifiedArr,deltaIsEven,quitEarlyArr)}else{return null}}}}const matchLengthOfLongest=(furthestOriginalIndex-originalStart+(furthestModifiedIndex-modifiedStart)-numDifferences)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(furthestOriginalIndex,matchLengthOfLongest)){quitEarlyArr[0]=true;midOriginalArr[0]=furthestOriginalIndex;midModifiedArr[0]=furthestModifiedIndex;if(matchLengthOfLongest>0&&1447>0&&numDifferences<=1447+1){return this.WALKTRACE(diagonalForwardBase,diagonalForwardStart,diagonalForwardEnd,diagonalForwardOffset,diagonalReverseBase,diagonalReverseStart,diagonalReverseEnd,diagonalReverseOffset,forwardPoints,reversePoints,originalIndex,originalEnd,midOriginalArr,modifiedIndex,modifiedEnd,midModifiedArr,deltaIsEven,quitEarlyArr)}else{originalStart++;modifiedStart++;return[new DiffChange(originalStart,originalEnd-originalStart+1,modifiedStart,modifiedEnd-modifiedStart+1)]}}diagonalReverseStart=this.ClipDiagonalBound(diagonalReverseBase-numDifferences,numDifferences,diagonalReverseBase,numDiagonals);diagonalReverseEnd=this.ClipDiagonalBound(diagonalReverseBase+numDifferences,numDifferences,diagonalReverseBase,numDiagonals);for(let diagonal=diagonalReverseStart;diagonal<=diagonalReverseEnd;diagonal+=2){if(diagonal===diagonalReverseStart||diagonal=reversePoints[diagonal+1]){originalIndex=reversePoints[diagonal+1]-1}else{originalIndex=reversePoints[diagonal-1]}modifiedIndex=originalIndex-(diagonal-diagonalReverseBase)-diagonalReverseOffset;const tempOriginalIndex=originalIndex;while(originalIndex>originalStart&&modifiedIndex>modifiedStart&&this.ElementsAreEqual(originalIndex,modifiedIndex)){originalIndex--;modifiedIndex--}reversePoints[diagonal]=originalIndex;if(deltaIsEven&&Math.abs(diagonal-diagonalForwardBase)<=numDifferences){if(originalIndex<=forwardPoints[diagonal]){midOriginalArr[0]=originalIndex;midModifiedArr[0]=modifiedIndex;if(tempOriginalIndex>=forwardPoints[diagonal]&&1447>0&&numDifferences<=1447+1){return this.WALKTRACE(diagonalForwardBase,diagonalForwardStart,diagonalForwardEnd,diagonalForwardOffset,diagonalReverseBase,diagonalReverseStart,diagonalReverseEnd,diagonalReverseOffset,forwardPoints,reversePoints,originalIndex,originalEnd,midOriginalArr,modifiedIndex,modifiedEnd,midModifiedArr,deltaIsEven,quitEarlyArr)}else{return null}}}}if(numDifferences<=1447){let temp=new Int32Array(diagonalForwardEnd-diagonalForwardStart+2);temp[0]=diagonalForwardBase-diagonalForwardStart+1;MyArray.Copy2(forwardPoints,diagonalForwardStart,temp,1,diagonalForwardEnd-diagonalForwardStart+1);this.m_forwardHistory.push(temp);temp=new Int32Array(diagonalReverseEnd-diagonalReverseStart+2);temp[0]=diagonalReverseBase-diagonalReverseStart+1;MyArray.Copy2(reversePoints,diagonalReverseStart,temp,1,diagonalReverseEnd-diagonalReverseStart+1);this.m_reverseHistory.push(temp)}}return this.WALKTRACE(diagonalForwardBase,diagonalForwardStart,diagonalForwardEnd,diagonalForwardOffset,diagonalReverseBase,diagonalReverseStart,diagonalReverseEnd,diagonalReverseOffset,forwardPoints,reversePoints,originalIndex,originalEnd,midOriginalArr,modifiedIndex,modifiedEnd,midModifiedArr,deltaIsEven,quitEarlyArr)}PrettifyChanges(changes){for(let i=0;i0;const checkModified=change.modifiedLength>0;while(change.originalStart+change.originalLength=0;i--){const change=changes[i];let originalStop=0;let modifiedStop=0;if(i>0){const prevChange=changes[i-1];originalStop=prevChange.originalStart+prevChange.originalLength;modifiedStop=prevChange.modifiedStart+prevChange.modifiedLength}const checkOriginal=change.originalLength>0;const checkModified=change.modifiedLength>0;let bestDelta=0;let bestScore=this._boundaryScore(change.originalStart,change.originalLength,change.modifiedStart,change.modifiedLength);for(let delta=1;;delta++){const originalStart=change.originalStart-delta;const modifiedStart=change.modifiedStart-delta;if(originalStartbestScore){bestScore=score3;bestDelta=delta}}change.originalStart-=bestDelta;change.modifiedStart-=bestDelta;const mergedChangeArr=[null];if(i>0&&this.ChangesOverlap(changes[i-1],changes[i],mergedChangeArr)){changes[i-1]=mergedChangeArr[0];changes.splice(i,1);i++;continue}}if(this._hasStrings){for(let i=1,len=changes.length;i0&&score3>bestScore){bestScore=score3;bestOriginalStart=i;bestModifiedStart=j}}}if(bestScore>0){return[bestOriginalStart,bestModifiedStart]}return null}_contiguousSequenceScore(originalStart,modifiedStart,length2){let score3=0;for(let l=0;l=this._originalElementsOrHash.length-1){return true}return this._hasStrings&&/^\s*$/.test(this._originalStringElements[index])}_OriginalRegionIsBoundary(originalStart,originalLength){if(this._OriginalIsBoundary(originalStart)||this._OriginalIsBoundary(originalStart-1)){return true}if(originalLength>0){const originalEnd=originalStart+originalLength;if(this._OriginalIsBoundary(originalEnd-1)||this._OriginalIsBoundary(originalEnd)){return true}}return false}_ModifiedIsBoundary(index){if(index<=0||index>=this._modifiedElementsOrHash.length-1){return true}return this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[index])}_ModifiedRegionIsBoundary(modifiedStart,modifiedLength){if(this._ModifiedIsBoundary(modifiedStart)||this._ModifiedIsBoundary(modifiedStart-1)){return true}if(modifiedLength>0){const modifiedEnd=modifiedStart+modifiedLength;if(this._ModifiedIsBoundary(modifiedEnd-1)||this._ModifiedIsBoundary(modifiedEnd)){return true}}return false}_boundaryScore(originalStart,originalLength,modifiedStart,modifiedLength){const originalScore=this._OriginalRegionIsBoundary(originalStart,originalLength)?1:0;const modifiedScore=this._ModifiedRegionIsBoundary(modifiedStart,modifiedLength)?1:0;return originalScore+modifiedScore}ConcatenateChanges(left,right){const mergedChangeArr=[];if(left.length===0||right.length===0){return right.length>0?right:left}else if(this.ChangesOverlap(left[left.length-1],right[0],mergedChangeArr)){const result=new Array(left.length+right.length-1);MyArray.Copy(left,0,result,0,left.length-1);result[left.length-1]=mergedChangeArr[0];MyArray.Copy(right,1,result,left.length,right.length-1);return result}else{const result=new Array(left.length+right.length);MyArray.Copy(left,0,result,0,left.length);MyArray.Copy(right,0,result,left.length,right.length);return result}}ChangesOverlap(left,right,mergedChangeArr){Debug.Assert(left.originalStart<=right.originalStart,"Left change is not less than or equal to right change");Debug.Assert(left.modifiedStart<=right.modifiedStart,"Left change is not less than or equal to right change");if(left.originalStart+left.originalLength>=right.originalStart||left.modifiedStart+left.modifiedLength>=right.modifiedStart){const originalStart=left.originalStart;let originalLength=left.originalLength;const modifiedStart=left.modifiedStart;let modifiedLength=left.modifiedLength;if(left.originalStart+left.originalLength>=right.originalStart){originalLength=right.originalStart+right.originalLength-left.originalStart}if(left.modifiedStart+left.modifiedLength>=right.modifiedStart){modifiedLength=right.modifiedStart+right.modifiedLength-left.modifiedStart}mergedChangeArr[0]=new DiffChange(originalStart,originalLength,modifiedStart,modifiedLength);return true}else{mergedChangeArr[0]=null;return false}}ClipDiagonalBound(diagonal,numDifferences,diagonalBaseIndex,numDiagonals){if(diagonal>=0&&diagonal255){return 255}return v|0}function toUint32(v){if(v<0){return 0}if(v>4294967295){return 4294967295}return v|0}var init_uint=__esm({"node_modules/monaco-editor/esm/vs/base/common/uint.js"(){}});var PrefixSumComputer,ConstantTimePrefixSumComputer,PrefixSumIndexOfResult;var init_prefixSumComputer=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/prefixSumComputer.js"(){init_arrays();init_uint();PrefixSumComputer=class{constructor(values){this.values=values;this.prefixSum=new Uint32Array(values.length);this.prefixSumValidIndex=new Int32Array(1);this.prefixSumValidIndex[0]=-1}insertValues(insertIndex,insertValues){insertIndex=toUint32(insertIndex);const oldValues=this.values;const oldPrefixSum=this.prefixSum;const insertValuesLen=insertValues.length;if(insertValuesLen===0){return false}this.values=new Uint32Array(oldValues.length+insertValuesLen);this.values.set(oldValues.subarray(0,insertIndex),0);this.values.set(oldValues.subarray(insertIndex),insertIndex+insertValuesLen);this.values.set(insertValues,insertIndex);if(insertIndex-1=0){this.prefixSum.set(oldPrefixSum.subarray(0,this.prefixSumValidIndex[0]+1))}return true}setValue(index,value){index=toUint32(index);value=toUint32(value);if(this.values[index]===value){return false}this.values[index]=value;if(index-1=oldValues.length){return false}const maxCount=oldValues.length-startIndex;if(count>=maxCount){count=maxCount}if(count===0){return false}this.values=new Uint32Array(oldValues.length-count);this.values.set(oldValues.subarray(0,startIndex),0);this.values.set(oldValues.subarray(startIndex+count),startIndex);this.prefixSum=new Uint32Array(this.values.length);if(startIndex-1=0){this.prefixSum.set(oldPrefixSum.subarray(0,this.prefixSumValidIndex[0]+1))}return true}getTotalSum(){if(this.values.length===0){return 0}return this._getPrefixSum(this.values.length-1)}getPrefixSum(index){if(index<0){return 0}index=toUint32(index);return this._getPrefixSum(index)}_getPrefixSum(index){if(index<=this.prefixSumValidIndex[0]){return this.prefixSum[index]}let startIndex=this.prefixSumValidIndex[0]+1;if(startIndex===0){this.prefixSum[0]=this.values[0];startIndex++}if(index>=this.values.length){index=this.values.length-1}for(let i=startIndex;i<=index;i++){this.prefixSum[i]=this.prefixSum[i-1]+this.values[i]}this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],index);return this.prefixSum[index]}getIndexOf(sum){sum=Math.floor(sum);this.getTotalSum();let low=0;let high=this.values.length-1;let mid=0;let midStop=0;let midStart=0;while(low<=high){mid=low+(high-low)/2|0;midStop=this.prefixSum[mid];midStart=midStop-this.values[mid];if(sum=midStop){low=mid+1}else{break}}return new PrefixSumIndexOfResult(mid,sum-midStart)}};ConstantTimePrefixSumComputer=class{constructor(values){this._values=values;this._isValid=false;this._validEndIndex=-1;this._prefixSum=[];this._indexBySum=[]}getTotalSum(){this._ensureValid();return this._indexBySum.length}getPrefixSum(count){this._ensureValid();if(count===0){return 0}return this._prefixSum[count-1]}getIndexOf(sum){this._ensureValid();const idx=this._indexBySum[sum];const viewLinesAbove=idx>0?this._prefixSum[idx-1]:0;return new PrefixSumIndexOfResult(idx,sum-viewLinesAbove)}removeValues(start,deleteCount){this._values.splice(start,deleteCount);this._invalidate(start)}insertValues(insertIndex,insertArr){this._values=arrayInsert(this._values,insertIndex,insertArr);this._invalidate(insertIndex)}_invalidate(index){this._isValid=false;this._validEndIndex=Math.min(this._validEndIndex,index-1)}_ensureValid(){if(this._isValid){return}for(let i=this._validEndIndex+1,len=this._values.length;i0?this._prefixSum[i-1]:0;this._prefixSum[i]=sumAbove+value;for(let j=0;j=0&&charCode<256){this._asciiMap[charCode]=value}else{this._map.set(charCode,value)}}get(charCode){if(charCode>=0&&charCode<256){return this._asciiMap[charCode]}else{return this._map.get(charCode)||this._defaultValue}}clear(){this._asciiMap.fill(this._defaultValue);this._map.clear()}};CharacterSet=class{constructor(){this._actual=new CharacterClassifier(0)}add(charCode){this._actual.set(charCode,1)}has(charCode){return this._actual.get(charCode)===1}clear(){return this._actual.clear()}}}});function getStateMachine(){if(_stateMachine===null){_stateMachine=new StateMachine([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])}return _stateMachine}function getClassifier(){if(_classifier===null){_classifier=new CharacterClassifier(0);const FORCE_TERMINATION_CHARACTERS=` \t<>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…`;for(let i=0;imaxCharCode){maxCharCode=chCode}if(from>maxState){maxState=from}if(to>maxState){maxState=to}}maxCharCode++;maxState++;const states=new Uint8Matrix(maxState,maxCharCode,0);for(let i=0,len=edges.length;i=this._maxCharCode){return 0}return this._states.get(currentState,chCode)}};_stateMachine=null;_classifier=null;LinkComputer=class{static _createLink(classifier,line,lineNumber,linkBeginIndex,linkEndIndex){let lastIncludedCharIndex=linkEndIndex-1;do{const chCode=line.charCodeAt(lastIncludedCharIndex);const chClass=classifier.get(chCode);if(chClass!==2){break}lastIncludedCharIndex--}while(lastIncludedCharIndex>linkBeginIndex);if(linkBeginIndex>0){const charCodeBeforeLink=line.charCodeAt(linkBeginIndex-1);const lastCharCodeInLink=line.charCodeAt(lastIncludedCharIndex);if(charCodeBeforeLink===40&&lastCharCodeInLink===41||charCodeBeforeLink===91&&lastCharCodeInLink===93||charCodeBeforeLink===123&&lastCharCodeInLink===125){lastIncludedCharIndex--}}return{range:{startLineNumber:lineNumber,startColumn:linkBeginIndex+1,endLineNumber:lineNumber,endColumn:lastIncludedCharIndex+2},url:line.substring(linkBeginIndex,lastIncludedCharIndex+1)}}static computeLinks(model,stateMachine=getStateMachine()){const classifier=getClassifier();const result=[];for(let i=1,lineCount=model.getLineCount();i<=lineCount;i++){const line=model.getLineContent(i);const len=line.length;let j=0;let linkBeginIndex=0;let linkBeginChCode=0;let state=1;let hasOpenParens=false;let hasOpenSquareBracket=false;let inSquareBrackets=false;let hasOpenCurlyBracket=false;while(j=0){idx+=up?1:-1;if(idx<0){idx=valueSet.length-1}else{idx%=valueSet.length}return valueSet[idx]}return null}};BasicInplaceReplace.INSTANCE=new BasicInplaceReplace}});function once2(computeFn){const cache={};return input=>{if(!cache.hasOwnProperty(input)){cache[input]=computeFn(input)}return cache[input]}}var WordCharacterClassifier,getMapForWordSeparators;var init_wordCharacterClassifier=__esm({"node_modules/monaco-editor/esm/vs/editor/common/core/wordCharacterClassifier.js"(){init_characterClassifier();WordCharacterClassifier=class extends CharacterClassifier{constructor(wordSeparators2){super(0);for(let i=0,len=wordSeparators2.length;inew WordCharacterClassifier(input)))}});function isMultilineRegexSource(searchString){if(!searchString||searchString.length===0){return false}for(let i=0,len=searchString.length;i=len){break}const nextChCode=searchString.charCodeAt(i);if(nextChCode===110||nextChCode===114||nextChCode===87){return true}}}return false}function createFindMatch(range2,rawMatches,captureMatches){if(!captureMatches){return new FindMatch(range2,null)}const matches=[];for(let i=0,len=rawMatches.length;i0){const firstCharInMatch=text2.charCodeAt(matchStartIndex);if(wordSeparators2.get(firstCharInMatch)!==0){return true}}return false}function rightIsWordBounday(wordSeparators2,text2,textLength,matchStartIndex,matchLength){if(matchStartIndex+matchLength===textLength){return true}const charAfter=text2.charCodeAt(matchStartIndex+matchLength);if(wordSeparators2.get(charAfter)!==0){return true}if(charAfter===13||charAfter===10){return true}if(matchLength>0){const lastCharInMatch=text2.charCodeAt(matchStartIndex+matchLength-1);if(wordSeparators2.get(lastCharInMatch)!==0){return true}}return false}function isValidMatch(wordSeparators2,text2,textLength,matchStartIndex,matchLength){return leftIsWordBounday(wordSeparators2,text2,textLength,matchStartIndex,matchLength)&&rightIsWordBounday(wordSeparators2,text2,textLength,matchStartIndex,matchLength)}var LIMIT_FIND_COUNT,SearchParams,LineFeedCounter,TextModelSearch,Searcher;var init_textModelSearch=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/textModelSearch.js"(){init_strings();init_wordCharacterClassifier();init_position();init_range();init_model();LIMIT_FIND_COUNT=999;SearchParams=class{constructor(searchString,isRegex,matchCase,wordSeparators2){this.searchString=searchString;this.isRegex=isRegex;this.matchCase=matchCase;this.wordSeparators=wordSeparators2}parseSearchRequest(){if(this.searchString===""){return null}let multiline;if(this.isRegex){multiline=isMultilineRegexSource(this.searchString)}else{multiline=this.searchString.indexOf("\n")>=0}let regex=null;try{regex=createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:false,multiline:multiline,global:true,unicode:true})}catch(err){return null}if(!regex){return null}let canUseSimpleSearch=!this.isRegex&&!multiline;if(canUseSimpleSearch&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()){canUseSimpleSearch=this.matchCase}return new SearchData(regex,this.wordSeparators?getMapForWordSeparators(this.wordSeparators):null,canUseSimpleSearch?this.searchString:null)}};LineFeedCounter=class{constructor(text2){const lineFeedsOffsets=[];let lineFeedsOffsetsLen=0;for(let i=0,textLen=text2.length;i>0);if(lineFeedsOffsets[mid]>=offset){max=mid-1}else{if(lineFeedsOffsets[mid+1]>=offset){min=mid;max=mid}else{min=mid+1}}}return min+1}};TextModelSearch=class{static findMatches(model,searchParams,searchRange,captureMatches,limitResultCount){const searchData=searchParams.parseSearchRequest();if(!searchData){return[]}if(searchData.regex.multiline){return this._doFindMatchesMultiline(model,searchRange,new Searcher(searchData.wordSeparators,searchData.regex),captureMatches,limitResultCount)}return this._doFindMatchesLineByLine(model,searchRange,searchData,captureMatches,limitResultCount)}static _getMultilineMatchRange(model,deltaOffset,text2,lfCounter,matchIndex,match0){let startOffset;let lineFeedCountBeforeMatch=0;if(lfCounter){lineFeedCountBeforeMatch=lfCounter.findLineFeedCountBeforeOffset(matchIndex);startOffset=deltaOffset+matchIndex+lineFeedCountBeforeMatch}else{startOffset=deltaOffset+matchIndex}let endOffset;if(lfCounter){const lineFeedCountBeforeEndOfMatch=lfCounter.findLineFeedCountBeforeOffset(matchIndex+match0.length);const lineFeedCountInMatch=lineFeedCountBeforeEndOfMatch-lineFeedCountBeforeMatch;endOffset=startOffset+match0.length+lineFeedCountInMatch}else{endOffset=startOffset+match0.length}const startPosition=model.getPositionAt(startOffset);const endPosition=model.getPositionAt(endOffset);return new Range(startPosition.lineNumber,startPosition.column,endPosition.lineNumber,endPosition.column)}static _doFindMatchesMultiline(model,searchRange,searcher,captureMatches,limitResultCount){const deltaOffset=model.getOffsetAt(searchRange.getStartPosition());const text2=model.getValueInRange(searchRange,1);const lfCounter=model.getEOL()==="\r\n"?new LineFeedCounter(text2):null;const result=[];let counter=0;let m;searcher.reset(0);while(m=searcher.next(text2)){result[counter++]=createFindMatch(this._getMultilineMatchRange(model,deltaOffset,text2,lfCounter,m.index,m[0]),m,captureMatches);if(counter>=limitResultCount){return result}}return result}static _doFindMatchesLineByLine(model,searchRange,searchData,captureMatches,limitResultCount){const result=[];let resultLen=0;if(searchRange.startLineNumber===searchRange.endLineNumber){const text3=model.getLineContent(searchRange.startLineNumber).substring(searchRange.startColumn-1,searchRange.endColumn-1);resultLen=this._findMatchesInLine(searchData,text3,searchRange.startLineNumber,searchRange.startColumn-1,resultLen,result,captureMatches,limitResultCount);return result}const text2=model.getLineContent(searchRange.startLineNumber).substring(searchRange.startColumn-1);resultLen=this._findMatchesInLine(searchData,text2,searchRange.startLineNumber,searchRange.startColumn-1,resultLen,result,captureMatches,limitResultCount);for(let lineNumber=searchRange.startLineNumber+1;lineNumber=limitResultCount){return resultLen}}}return resultLen}const searcher=new Searcher(searchData.wordSeparators,searchData.regex);let m;searcher.reset(0);do{m=searcher.next(text2);if(m){result[resultLen++]=createFindMatch(new Range(lineNumber,m.index+1+deltaOffset,lineNumber,m.index+1+m[0].length+deltaOffset),m,captureMatches);if(resultLen>=limitResultCount){return resultLen}}}while(m);return resultLen}static findNextMatch(model,searchParams,searchStart,captureMatches){const searchData=searchParams.parseSearchRequest();if(!searchData){return null}const searcher=new Searcher(searchData.wordSeparators,searchData.regex);if(searchData.regex.multiline){return this._doFindNextMatchMultiline(model,searchStart,searcher,captureMatches)}return this._doFindNextMatchLineByLine(model,searchStart,searcher,captureMatches)}static _doFindNextMatchMultiline(model,searchStart,searcher,captureMatches){const searchTextStart=new Position(searchStart.lineNumber,1);const deltaOffset=model.getOffsetAt(searchTextStart);const lineCount=model.getLineCount();const text2=model.getValueInRange(new Range(searchTextStart.lineNumber,searchTextStart.column,lineCount,model.getLineMaxColumn(lineCount)),1);const lfCounter=model.getEOL()==="\r\n"?new LineFeedCounter(text2):null;searcher.reset(searchStart.column-1);const m=searcher.next(text2);if(m){return createFindMatch(this._getMultilineMatchRange(model,deltaOffset,text2,lfCounter,m.index,m[0]),m,captureMatches)}if(searchStart.lineNumber!==1||searchStart.column!==1){return this._doFindNextMatchMultiline(model,new Position(1,1),searcher,captureMatches)}return null}static _doFindNextMatchLineByLine(model,searchStart,searcher,captureMatches){const lineCount=model.getLineCount();const startLineNumber=searchStart.lineNumber;const text2=model.getLineContent(startLineNumber);const r=this._findFirstMatchInLine(searcher,text2,startLineNumber,searchStart.column,captureMatches);if(r){return r}for(let i=1;i<=lineCount;i++){const lineIndex=(startLineNumber+i-1)%lineCount;const text3=model.getLineContent(lineIndex+1);const r2=this._findFirstMatchInLine(searcher,text3,lineIndex+1,1,captureMatches);if(r2){return r2}}return null}static _findFirstMatchInLine(searcher,text2,lineNumber,fromColumn,captureMatches){searcher.reset(fromColumn-1);const m=searcher.next(text2);if(m){return createFindMatch(new Range(lineNumber,m.index+1,lineNumber,m.index+1+m[0].length),m,captureMatches)}return null}static findPreviousMatch(model,searchParams,searchStart,captureMatches){const searchData=searchParams.parseSearchRequest();if(!searchData){return null}const searcher=new Searcher(searchData.wordSeparators,searchData.regex);if(searchData.regex.multiline){return this._doFindPreviousMatchMultiline(model,searchStart,searcher,captureMatches)}return this._doFindPreviousMatchLineByLine(model,searchStart,searcher,captureMatches)}static _doFindPreviousMatchMultiline(model,searchStart,searcher,captureMatches){const matches=this._doFindMatchesMultiline(model,new Range(1,1,searchStart.lineNumber,searchStart.column),searcher,captureMatches,10*LIMIT_FIND_COUNT);if(matches.length>0){return matches[matches.length-1]}const lineCount=model.getLineCount();if(searchStart.lineNumber!==lineCount||searchStart.column!==model.getLineMaxColumn(lineCount)){return this._doFindPreviousMatchMultiline(model,new Position(lineCount,model.getLineMaxColumn(lineCount)),searcher,captureMatches)}return null}static _doFindPreviousMatchLineByLine(model,searchStart,searcher,captureMatches){const lineCount=model.getLineCount();const startLineNumber=searchStart.lineNumber;const text2=model.getLineContent(startLineNumber).substring(0,searchStart.column-1);const r=this._findLastMatchInLine(searcher,text2,startLineNumber,captureMatches);if(r){return r}for(let i=1;i<=lineCount;i++){const lineIndex=(lineCount+startLineNumber-i-1)%lineCount;const text3=model.getLineContent(lineIndex+1);const r2=this._findLastMatchInLine(searcher,text3,lineIndex+1,captureMatches);if(r2){return r2}}return null}static _findLastMatchInLine(searcher,text2,lineNumber,captureMatches){let bestResult=null;let m;searcher.reset(0);while(m=searcher.next(text2)){bestResult=createFindMatch(new Range(lineNumber,m.index+1,lineNumber,m.index+1+m[0].length),m,captureMatches)}return bestResult}};Searcher=class{constructor(wordSeparators2,searchRegex){this._wordSeparators=wordSeparators2;this._searchRegex=searchRegex;this._prevMatchStartIndex=-1;this._prevMatchLength=0}reset(lastIndex){this._searchRegex.lastIndex=lastIndex;this._prevMatchStartIndex=-1;this._prevMatchLength=0}next(text2){const textLength=text2.length;let m;do{if(this._prevMatchStartIndex+this._prevMatchLength===textLength){return null}m=this._searchRegex.exec(text2);if(!m){return null}const matchStartIndex=m.index;const matchLength=m[0].length;if(matchStartIndex===this._prevMatchStartIndex&&matchLength===this._prevMatchLength){if(matchLength===0){if(getNextCodePoint(text2,textLength,this._searchRegex.lastIndex)>65535){this._searchRegex.lastIndex+=2}else{this._searchRegex.lastIndex+=1}continue}return null}this._prevMatchStartIndex=matchStartIndex;this._prevMatchLength=matchLength;if(!this._wordSeparators||isValidMatch(this._wordSeparators,text2,textLength,matchStartIndex,matchLength)){return m}}while(m);return null}}}});function buildRegExpCharClassExpr(codePoints,flags){const src=`[${escapeRegExpCharacters(codePoints.map((i=>String.fromCodePoint(i))).join(""))}]`;return src}function isAllowedInvisibleCharacter(character){return character===" "||character==="\n"||character==="\t"}var UnicodeTextModelHighlighter,CodePointHighlighter;var init_unicodeTextModelHighlighter=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/unicodeTextModelHighlighter.js"(){init_range();init_textModelSearch();init_strings();init_assert();init_wordHelper();UnicodeTextModelHighlighter=class{static computeUnicodeHighlights(model,options2,range2){const startLine=range2?range2.startLineNumber:1;const endLine=range2?range2.endLineNumber:model.getLineCount();const codePointHighlighter=new CodePointHighlighter(options2);const candidates=codePointHighlighter.getCandidateCodePoints();let regex;if(candidates==="allNonBasicAscii"){regex=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g")}else{regex=new RegExp(`${buildRegExpCharClassExpr(Array.from(candidates))}`,"g")}const searcher=new Searcher(null,regex);const ranges=[];let hasMore=false;let m;let ambiguousCharacterCount=0;let invisibleCharacterCount=0;let nonBasicAsciiCharacterCount=0;forLoop:for(let lineNumber=startLine,lineCount=endLine;lineNumber<=lineCount;lineNumber++){const lineContent=model.getLineContent(lineNumber);const lineLength=lineContent.length;searcher.reset(0);do{m=searcher.next(lineContent);if(m){let startIndex=m.index;let endIndex=m.index+m[0].length;if(startIndex>0){const charCodeBefore=lineContent.charCodeAt(startIndex-1);if(isHighSurrogate(charCodeBefore)){startIndex--}}if(endIndex+1=MAX_RESULT_LENGTH){hasMore=true;break forLoop}ranges.push(new Range(lineNumber,startIndex+1,lineNumber,endIndex+1))}}}while(m)}return{ranges:ranges,hasMore:hasMore,ambiguousCharacterCount:ambiguousCharacterCount,invisibleCharacterCount:invisibleCharacterCount,nonBasicAsciiCharacterCount:nonBasicAsciiCharacterCount}}static computeUnicodeHighlightReason(char,options2){const codePointHighlighter=new CodePointHighlighter(options2);const reason=codePointHighlighter.shouldHighlightNonBasicASCII(char,null);switch(reason){case 0:return null;case 2:return{kind:1};case 3:{const codePoint=char.codePointAt(0);const primaryConfusable=codePointHighlighter.ambiguousCharacters.getPrimaryConfusable(codePoint);const notAmbiguousInLocales=AmbiguousCharacters.getLocales().filter((l=>!AmbiguousCharacters.getInstance(new Set([...options2.allowedLocales,l])).isAmbiguous(codePoint)));return{kind:0,confusableWith:String.fromCodePoint(primaryConfusable),notAmbiguousInLocales:notAmbiguousInLocales}}case 1:return{kind:2}}}};CodePointHighlighter=class{constructor(options2){this.options=options2;this.allowedCodePoints=new Set(options2.allowedCodePoints);this.ambiguousCharacters=AmbiguousCharacters.getInstance(new Set(options2.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII){return"allNonBasicAscii"}const set=new Set;if(this.options.invisibleCharacters){for(const cp of InvisibleCharacters.codePoints){if(!isAllowedInvisibleCharacter(String.fromCodePoint(cp))){set.add(cp)}}}if(this.options.ambiguousCharacters){for(const cp of this.ambiguousCharacters.getConfusableCodePoints()){set.add(cp)}}for(const cp of this.allowedCodePoints){set.delete(cp)}return set}shouldHighlightNonBasicASCII(character,wordContext){const codePoint=character.codePointAt(0);if(this.allowedCodePoints.has(codePoint)){return 0}if(this.options.nonBasicASCII){return 1}let hasBasicASCIICharacters=false;let hasNonConfusableNonBasicAsciiCharacter=false;if(wordContext){for(const char of wordContext){const codePoint2=char.codePointAt(0);const isBasicASCII2=isBasicASCII(char);hasBasicASCIICharacters=hasBasicASCIICharacters||isBasicASCII2;if(!isBasicASCII2&&!this.ambiguousCharacters.isAmbiguous(codePoint2)&&!InvisibleCharacters.isInvisibleCharacter(codePoint2)){hasNonConfusableNonBasicAsciiCharacter=true}}}if(!hasBasicASCIICharacters&&hasNonConfusableNonBasicAsciiCharacter){return 0}if(this.options.invisibleCharacters){if(!isAllowedInvisibleCharacter(character)&&InvisibleCharacters.isInvisibleCharacter(codePoint)){return 2}}if(this.options.ambiguousCharacters){if(this.ambiguousCharacters.isAmbiguous(codePoint)){return 3}}return 0}}}});var OffsetRange,OffsetRangeSet;var init_offsetRange=__esm({"node_modules/monaco-editor/esm/vs/editor/common/core/offsetRange.js"(){init_errors();OffsetRange=class{static addRange(range2,sortedRanges){let i=0;while(iendExclusive){return void 0}return new OffsetRange(start,endExclusive)}static ofLength(length2){return new OffsetRange(0,length2)}constructor(start,endExclusive){this.start=start;this.endExclusive=endExclusive;if(start>endExclusive){throw new BugIndicatingError(`Invalid range: ${this.toString()}`)}}get isEmpty(){return this.start===this.endExclusive}delta(offset){return new OffsetRange(this.start+offset,this.endExclusive+offset)}deltaStart(offset){return new OffsetRange(this.start+offset,this.endExclusive)}deltaEnd(offset){return new OffsetRange(this.start,this.endExclusive+offset)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(other){return this.start===other.start&&this.endExclusive===other.endExclusive}containsRange(other){return this.start<=other.start&&other.endExclusive<=this.endExclusive}contains(offset){return this.start<=offset&&offset=this.endExclusive){return this.start+(value-this.start)%this.length}return value}};OffsetRangeSet=class{constructor(){this._sortedRanges=[]}addRange(range2){let i=0;while(ir.toString())).join(", ")}intersectsStrict(other){let i=0;while(iprev+cur.length),0)}}}});var LineRange;var init_lineRange=__esm({"node_modules/monaco-editor/esm/vs/editor/common/core/lineRange.js"(){init_errors();init_offsetRange();init_range();LineRange=class{static fromRange(range2){return new LineRange(range2.startLineNumber,range2.endLineNumber)}static subtract(a,b){if(!b){return[a]}if(a.startLineNumber=next.startLineNumber){current=new LineRange(current.startLineNumber,Math.max(current.endLineNumberExclusive,next.endLineNumberExclusive))}else{result.push(current);current=next}}}if(current!==null){result.push(current)}return result}static ofLength(startLineNumber,length2){return new LineRange(startLineNumber,startLineNumber+length2)}static deserialize(lineRange){return new LineRange(lineRange[0],lineRange[1])}constructor(startLineNumber,endLineNumberExclusive){if(startLineNumber>endLineNumberExclusive){throw new BugIndicatingError(`startLineNumber ${startLineNumber} cannot be after endLineNumberExclusive ${endLineNumberExclusive}`)}this.startLineNumber=startLineNumber;this.endLineNumberExclusive=endLineNumberExclusive}contains(lineNumber){return this.startLineNumber<=lineNumber&&lineNumber${this.modifiedRange.toString()}}`}get changedLineCount(){return Math.max(this.originalRange.length,this.modifiedRange.length)}flip(){var _a6;return new LineRangeMapping(this.modifiedRange,this.originalRange,(_a6=this.innerChanges)===null||_a6===void 0?void 0:_a6.map((c=>c.flip())))}};RangeMapping=class{constructor(originalRange,modifiedRange){this.originalRange=originalRange;this.modifiedRange=modifiedRange}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new RangeMapping(this.modifiedRange,this.originalRange)}};SimpleLineRangeMapping=class{constructor(original,modified){this.original=original;this.modified=modified}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new SimpleLineRangeMapping(this.modified,this.original)}join(other){return new SimpleLineRangeMapping(this.original.join(other.original),this.modified.join(other.modified))}};MovedText=class{constructor(lineRangeMapping,changes){this.lineRangeMapping=lineRangeMapping;this.changes=changes}flip(){return new MovedText(this.lineRangeMapping.flip(),this.changes.map((c=>c.flip())))}}}});function computeDiff(originalSequence,modifiedSequence,continueProcessingPredicate,pretty){const diffAlgo=new LcsDiff(originalSequence,modifiedSequence,continueProcessingPredicate);return diffAlgo.ComputeDiff(pretty)}function postProcessCharChanges(rawChanges){if(rawChanges.length<=1){return rawChanges}const result=[rawChanges[0]];let prevChange=result[0];for(let i=1,len=rawChanges.length;itrue}const startTime=Date.now();return()=>Date.now()-startTimenew RangeMapping(new Range(c2.originalStartLineNumber,c2.originalStartColumn,c2.originalEndLineNumber,c2.originalEndColumn),new Range(c2.modifiedStartLineNumber,c2.modifiedStartColumn,c2.modifiedEndLineNumber,c2.modifiedEndColumn)))));if(lastChange){if(lastChange.modifiedRange.endLineNumberExclusive===change.modifiedRange.startLineNumber||lastChange.originalRange.endLineNumberExclusive===change.originalRange.startLineNumber){change=new LineRangeMapping(lastChange.originalRange.join(change.originalRange),lastChange.modifiedRange.join(change.modifiedRange),lastChange.innerChanges&&change.innerChanges?lastChange.innerChanges.concat(change.innerChanges):void 0);changes.pop()}}changes.push(change);lastChange=change}assertFn((()=>checkAdjacentItems(changes,((m1,m2)=>m2.originalRange.startLineNumber-m1.originalRange.endLineNumberExclusive===m2.modifiedRange.startLineNumber-m1.modifiedRange.endLineNumberExclusive&&m1.originalRange.endLineNumberExclusive(s===10?"\\n":String.fromCharCode(s))+`-(${this._lineNumbers[idx]},${this._columns[idx]})`)).join(", ")+"]"}_assertIndex(index,arr){if(index<0||index>=arr.length){throw new Error(`Illegal index`)}}getElements(){return this._charCodes}getStartLineNumber(i){if(i>0&&i===this._lineNumbers.length){return this.getEndLineNumber(i-1)}this._assertIndex(i,this._lineNumbers);return this._lineNumbers[i]}getEndLineNumber(i){if(i===-1){return this.getStartLineNumber(i+1)}this._assertIndex(i,this._lineNumbers);if(this._charCodes[i]===10){return this._lineNumbers[i]+1}return this._lineNumbers[i]}getStartColumn(i){if(i>0&&i===this._columns.length){return this.getEndColumn(i-1)}this._assertIndex(i,this._columns);return this._columns[i]}getEndColumn(i){if(i===-1){return this.getStartColumn(i+1)}this._assertIndex(i,this._columns);if(this._charCodes[i]===10){return 1}return this._columns[i]+1}};CharChange=class{constructor(originalStartLineNumber,originalStartColumn,originalEndLineNumber,originalEndColumn,modifiedStartLineNumber,modifiedStartColumn,modifiedEndLineNumber,modifiedEndColumn){this.originalStartLineNumber=originalStartLineNumber;this.originalStartColumn=originalStartColumn;this.originalEndLineNumber=originalEndLineNumber;this.originalEndColumn=originalEndColumn;this.modifiedStartLineNumber=modifiedStartLineNumber;this.modifiedStartColumn=modifiedStartColumn;this.modifiedEndLineNumber=modifiedEndLineNumber;this.modifiedEndColumn=modifiedEndColumn}static createFromDiffChange(diffChange,originalCharSequence,modifiedCharSequence){const originalStartLineNumber=originalCharSequence.getStartLineNumber(diffChange.originalStart);const originalStartColumn=originalCharSequence.getStartColumn(diffChange.originalStart);const originalEndLineNumber=originalCharSequence.getEndLineNumber(diffChange.originalStart+diffChange.originalLength-1);const originalEndColumn=originalCharSequence.getEndColumn(diffChange.originalStart+diffChange.originalLength-1);const modifiedStartLineNumber=modifiedCharSequence.getStartLineNumber(diffChange.modifiedStart);const modifiedStartColumn=modifiedCharSequence.getStartColumn(diffChange.modifiedStart);const modifiedEndLineNumber=modifiedCharSequence.getEndLineNumber(diffChange.modifiedStart+diffChange.modifiedLength-1);const modifiedEndColumn=modifiedCharSequence.getEndColumn(diffChange.modifiedStart+diffChange.modifiedLength-1);return new CharChange(originalStartLineNumber,originalStartColumn,originalEndLineNumber,originalEndColumn,modifiedStartLineNumber,modifiedStartColumn,modifiedEndLineNumber,modifiedEndColumn)}};LineChange=class{constructor(originalStartLineNumber,originalEndLineNumber,modifiedStartLineNumber,modifiedEndLineNumber,charChanges){this.originalStartLineNumber=originalStartLineNumber;this.originalEndLineNumber=originalEndLineNumber;this.modifiedStartLineNumber=modifiedStartLineNumber;this.modifiedEndLineNumber=modifiedEndLineNumber;this.charChanges=charChanges}static createFromDiffResult(shouldIgnoreTrimWhitespace,diffChange,originalLineSequence,modifiedLineSequence,continueCharDiff,shouldComputeCharChanges,shouldPostProcessCharChanges){let originalStartLineNumber;let originalEndLineNumber;let modifiedStartLineNumber;let modifiedEndLineNumber;let charChanges=void 0;if(diffChange.originalLength===0){originalStartLineNumber=originalLineSequence.getStartLineNumber(diffChange.originalStart)-1;originalEndLineNumber=0}else{originalStartLineNumber=originalLineSequence.getStartLineNumber(diffChange.originalStart);originalEndLineNumber=originalLineSequence.getEndLineNumber(diffChange.originalStart+diffChange.originalLength-1)}if(diffChange.modifiedLength===0){modifiedStartLineNumber=modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart)-1;modifiedEndLineNumber=0}else{modifiedStartLineNumber=modifiedLineSequence.getStartLineNumber(diffChange.modifiedStart);modifiedEndLineNumber=modifiedLineSequence.getEndLineNumber(diffChange.modifiedStart+diffChange.modifiedLength-1)}if(shouldComputeCharChanges&&diffChange.originalLength>0&&diffChange.originalLength<20&&diffChange.modifiedLength>0&&diffChange.modifiedLength<20&&continueCharDiff()){const originalCharSequence=originalLineSequence.createCharSequence(shouldIgnoreTrimWhitespace,diffChange.originalStart,diffChange.originalStart+diffChange.originalLength-1);const modifiedCharSequence=modifiedLineSequence.createCharSequence(shouldIgnoreTrimWhitespace,diffChange.modifiedStart,diffChange.modifiedStart+diffChange.modifiedLength-1);if(originalCharSequence.getElements().length>0&&modifiedCharSequence.getElements().length>0){let rawChanges=computeDiff(originalCharSequence,modifiedCharSequence,continueCharDiff,true).changes;if(shouldPostProcessCharChanges){rawChanges=postProcessCharChanges(rawChanges)}charChanges=[];for(let i=0,length2=rawChanges.length;i1&&modifiedStartColumn>1){const originalChar=originalLine.charCodeAt(originalStartColumn-2);const modifiedChar=modifiedLine.charCodeAt(modifiedStartColumn-2);if(originalChar!==modifiedChar){break}originalStartColumn--;modifiedStartColumn--}if(originalStartColumn>1||modifiedStartColumn>1){this._pushTrimWhitespaceCharChange(result,originalLineIndex+1,1,originalStartColumn,modifiedLineIndex+1,1,modifiedStartColumn)}}{let originalEndColumn=getLastNonBlankColumn(originalLine,1);let modifiedEndColumn=getLastNonBlankColumn(modifiedLine,1);const originalMaxColumn=originalLine.length+1;const modifiedMaxColumn=modifiedLine.length+1;while(originalEndColumn ${this.seq2Range}`}join(other){return new SequenceDiff(this.seq1Range.join(other.seq1Range),this.seq2Range.join(other.seq2Range))}delta(offset){if(offset===0){return this}return new SequenceDiff(this.seq1Range.delta(offset),this.seq2Range.delta(offset))}};InfiniteTimeout=class{isValid(){return true}};InfiniteTimeout.instance=new InfiniteTimeout;DateTimeout=class{constructor(timeout2){this.timeout=timeout2;this.startTime=Date.now();this.valid=true;if(timeout2<=0){throw new BugIndicatingError("timeout must be positive")}}isValid(){const valid=Date.now()-this.startTime0&&s22>0&&directions.get(s12-1,s22-1)===3){extendedSeqScore+=lengths.get(s12-1,s22-1)}extendedSeqScore+=equalityScore?equalityScore(s12,s22):1}else{extendedSeqScore=-1}const newValue=Math.max(horizontalLen,verticalLen,extendedSeqScore);if(newValue===extendedSeqScore){const prevLen=s12>0&&s22>0?lengths.get(s12-1,s22-1):0;lengths.set(s12,s22,prevLen+1);directions.set(s12,s22,3)}else if(newValue===horizontalLen){lengths.set(s12,s22,0);directions.set(s12,s22,1)}else if(newValue===verticalLen){lengths.set(s12,s22,0);directions.set(s12,s22,2)}lcsLengths.set(s12,s22,newValue)}}const result=[];let lastAligningPosS1=sequence1.length;let lastAligningPosS2=sequence2.length;function reportDecreasingAligningPositions(s12,s22){if(s12+1!==lastAligningPosS1||s22+1!==lastAligningPosS2){result.push(new SequenceDiff(new OffsetRange(s12+1,lastAligningPosS1),new OffsetRange(s22+1,lastAligningPosS2)))}lastAligningPosS1=s12;lastAligningPosS2=s22}let s1=sequence1.length-1;let s2=sequence2.length-1;while(s1>=0&&s2>=0){if(directions.get(s1,s2)===3){reportDecreasingAligningPositions(s1,s2);s1--;s2--}else{if(directions.get(s1,s2)===1){s1--}else{s2--}}}reportDecreasingAligningPositions(-1,-1);result.reverse();return new DiffAlgorithmResult(result,false)}}}});function optimizeSequenceDiffs(sequence1,sequence2,sequenceDiffs){let result=sequenceDiffs;result=joinSequenceDiffs(sequence1,sequence2,result);result=shiftSequenceDiffs(sequence1,sequence2,result);return result}function smoothenSequenceDiffs(sequence1,sequence2,sequenceDiffs){const result=[];for(const s of sequenceDiffs){const last=result[result.length-1];if(!last){result.push(s);continue}if(s.seq1Range.start-last.seq1Range.endExclusive<=2||s.seq2Range.start-last.seq2Range.endExclusive<=2){result[result.length-1]=new SequenceDiff(last.seq1Range.join(s.seq1Range),last.seq2Range.join(s.seq2Range))}else{result.push(s)}}return result}function removeRandomLineMatches(sequence1,_sequence2,sequenceDiffs){let diffs=sequenceDiffs;if(diffs.length===0){return diffs}let counter=0;let shouldRepeat;do{shouldRepeat=false;const result=[diffs[0]];for(let i=1;i5||after.seq1Range.length+after.seq2Range.length>5)){return true}return false};const cur=diffs[i];const lastResult=result[result.length-1];const shouldJoin=shouldJoinDiffs(lastResult,cur);if(shouldJoin){shouldRepeat=true;result[result.length-1]=result[result.length-1].join(cur)}else{result.push(cur)}}diffs=result}while(counter++<10&&shouldRepeat);return diffs}function removeRandomMatches(sequence1,sequence2,sequenceDiffs){let diffs=sequenceDiffs;if(diffs.length===0){return diffs}let counter=0;let shouldRepeat;do{shouldRepeat=false;const result=[diffs[0]];for(let i=1;i5||unchangedRange.length>500){return false}const unchangedText=sequence1.getText(unchangedRange).trim();if(unchangedText.length>20||unchangedText.split(/\r\n|\r|\n/).length>1){return false}const beforeLineCount1=sequence1.countLinesIn(before.seq1Range);const beforeSeq1Length=before.seq1Range.length;const beforeLineCount2=sequence2.countLinesIn(before.seq2Range);const beforeSeq2Length=before.seq2Range.length;const afterLineCount1=sequence1.countLinesIn(after.seq1Range);const afterSeq1Length=after.seq1Range.length;const afterLineCount2=sequence2.countLinesIn(after.seq2Range);const afterSeq2Length=after.seq2Range.length;const max=2*40+50;function cap(v){return Math.min(v,max)}if(Math.pow(Math.pow(cap(beforeLineCount1*40+beforeSeq1Length),1.5)+Math.pow(cap(beforeLineCount2*40+beforeSeq2Length),1.5),1.5)+Math.pow(Math.pow(cap(afterLineCount1*40+afterSeq1Length),1.5)+Math.pow(cap(afterLineCount2*40+afterSeq2Length),1.5),1.5)>Math.pow(Math.pow(max,1.5),1.5)*1.3){return true}return false};const cur=diffs[i];const lastResult=result[result.length-1];const shouldJoin=shouldJoinDiffs(lastResult,cur);if(shouldJoin){shouldRepeat=true;result[result.length-1]=result[result.length-1].join(cur)}else{result.push(cur)}}diffs=result}while(counter++<10&&shouldRepeat);for(let i=0;i0&&prefix.trim().length<=3&&cur.seq1Range.length+cur.seq2Range.length>100){range1=cur.seq1Range.deltaStart(-prefix.length);range2=cur.seq2Range.deltaStart(-prefix.length)}const suffix=sequence1.getText(new OffsetRange(cur.seq1Range.endExclusive,fullRange1.endExclusive));if(suffix.length>0&&(suffix.trim().length<=3&&cur.seq1Range.length+cur.seq2Range.length>150)){range1=range1.deltaEnd(suffix.length);range2=range2.deltaEnd(suffix.length)}diffs[i]=new SequenceDiff(range1,range2)}return diffs}function joinSequenceDiffs(sequence1,sequence2,sequenceDiffs){if(sequenceDiffs.length===0){return sequenceDiffs}const result=[];result.push(sequenceDiffs[0]);for(let i=1;i0){cur=cur.delta(d)}}result2.push(cur)}if(result.length>0){result2.push(result[result.length-1])}return result2}function shiftSequenceDiffs(sequence1,sequence2,sequenceDiffs){if(!sequence1.getBoundaryScore||!sequence2.getBoundaryScore){return sequenceDiffs}for(let i=0;i0?sequenceDiffs[i-1]:void 0;const diff=sequenceDiffs[i];const nextDiff=i+1=seq1ValidRange.start&&diff.seq2Range.start-deltaBefore>=seq2ValidRange.start&&sequence2.isStronglyEqual(diff.seq2Range.start-deltaBefore,diff.seq2Range.endExclusive-deltaBefore)&&deltaBeforebestScore){bestScore=score3;bestDelta=delta}}return diff.delta(bestDelta)}var init_joinSequenceDiffs=__esm({"node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/joinSequenceDiffs.js"(){init_offsetRange();init_diffAlgorithm()}});var MyersDiffAlgorithm,SnakePath,FastInt32Array,FastArrayNegativeIndices;var init_myersDiffAlgorithm=__esm({"node_modules/monaco-editor/esm/vs/editor/common/diff/algorithms/myersDiffAlgorithm.js"(){init_offsetRange();init_diffAlgorithm();MyersDiffAlgorithm=class{compute(seq1,seq2,timeout2=InfiniteTimeout.instance){if(seq1.length===0||seq2.length===0){return DiffAlgorithmResult.trivial(seq1,seq2)}function getXAfterSnake(x,y){while(xseq1.length||y>seq2.length){continue}const newMaxX=getXAfterSnake(x,y);V.set(k,newMaxX);const lastPath=x===maxXofDLineTop?paths.get(k+1):paths.get(k-1);paths.set(k,newMaxX!==x?new SnakePath(lastPath,x,y,newMaxX-x):lastPath);if(V.get(k)===seq1.length&&V.get(k)-k===seq2.length){break loop}}}let path=paths.get(k);const result=[];let lastAligningPosS1=seq1.length;let lastAligningPosS2=seq2.length;while(true){const endX=path?path.x+path.length:0;const endY=path?path.y+path.length:0;if(endX!==lastAligningPosS1||endY!==lastAligningPosS2){result.push(new SequenceDiff(new OffsetRange(endX,lastAligningPosS1),new OffsetRange(endY,lastAligningPosS2)))}if(!path){break}lastAligningPosS1=path.x;lastAligningPosS2=path.y;path=path.prev}result.reverse();return new DiffAlgorithmResult(result,false)}};SnakePath=class{constructor(prev,x,y,length2){this.prev=prev;this.x=x;this.y=y;this.length=length2}};FastInt32Array=class{constructor(){this.positiveArr=new Int32Array(10);this.negativeArr=new Int32Array(10)}get(idx){if(idx<0){idx=-idx-1;return this.negativeArr[idx]}else{return this.positiveArr[idx]}}set(idx,value){if(idx<0){idx=-idx-1;if(idx>=this.negativeArr.length){const arr=this.negativeArr;this.negativeArr=new Int32Array(arr.length*2);this.negativeArr.set(arr)}this.negativeArr[idx]=value}else{if(idx>=this.positiveArr.length){const arr=this.positiveArr;this.positiveArr=new Int32Array(arr.length*2);this.positiveArr.set(arr)}this.positiveArr[idx]=value}}};FastArrayNegativeIndices=class{constructor(){this.positiveArr=[];this.negativeArr=[]}get(idx){if(idx<0){idx=-idx-1;return this.negativeArr[idx]}else{return this.positiveArr[idx]}}set(idx,value){if(idx<0){idx=-idx-1;this.negativeArr[idx]=value}else{this.positiveArr[idx]=value}}}}});function intersectRanges(ranges1,ranges2){const result=[];let i1=0;let i2=0;while(i1originalLength1){additional.push(new SequenceDiff(lastModifiedWord.s1Range,lastModifiedWord.s2Range))}lastModifiedWord=void 0}for(const s of sequenceDiffs){let processWord=function(s1Range,s2Range){var _a6,_b3,_c2,_d2;if(!lastModifiedWord||!lastModifiedWord.s1Range.containsRange(s1Range)||!lastModifiedWord.s2Range.containsRange(s2Range)){if(lastModifiedWord&&!(lastModifiedWord.s1Range.endExclusive0||sequenceDiffs2.length>0){const sd1=sequenceDiffs1[0];const sd2=sequenceDiffs2[0];let next;if(sd1&&(!sd2||sd1.seq1Range.start0&&result[result.length-1].seq1Range.endExclusive>=next.seq1Range.start){result[result.length-1]=result[result.length-1].join(next)}else{result.push(next)}}return result}function lineRangeMappingFromRangeMappings(alignments,originalLines,modifiedLines,dontAssertStartLine=false){const changes=[];for(const g of group(alignments.map((a=>getLineRangeMapping(a,originalLines,modifiedLines))),((a1,a2)=>a1.originalRange.overlapOrTouch(a2.originalRange)||a1.modifiedRange.overlapOrTouch(a2.modifiedRange)))){const first2=g[0];const last=g[g.length-1];changes.push(new LineRangeMapping(first2.originalRange.join(last.originalRange),first2.modifiedRange.join(last.modifiedRange),g.map((a=>a.innerChanges[0]))))}assertFn((()=>{if(!dontAssertStartLine){if(changes.length>0&&changes[0].originalRange.startLineNumber!==changes[0].modifiedRange.startLineNumber){return false}}return checkAdjacentItems(changes,((m1,m2)=>m2.originalRange.startLineNumber-m1.originalRange.endLineNumberExclusive===m2.modifiedRange.startLineNumber-m1.modifiedRange.endLineNumberExclusive&&m1.originalRange.endLineNumberExclusive=modifiedLines[rangeMapping.modifiedRange.startLineNumber-1].length&&rangeMapping.originalRange.startColumn-1>=originalLines[rangeMapping.originalRange.startLineNumber-1].length&&rangeMapping.originalRange.startLineNumber<=rangeMapping.originalRange.endLineNumber+lineEndDelta&&rangeMapping.modifiedRange.startLineNumber<=rangeMapping.modifiedRange.endLineNumber+lineEndDelta){lineStartDelta=1}const originalLineRange=new LineRange(rangeMapping.originalRange.startLineNumber+lineStartDelta,rangeMapping.originalRange.endLineNumber+1+lineEndDelta);const modifiedLineRange=new LineRange(rangeMapping.modifiedRange.startLineNumber+lineStartDelta,rangeMapping.modifiedRange.endLineNumber+1+lineEndDelta);return new LineRangeMapping(originalLineRange,modifiedLineRange,[rangeMapping])}function*group(items,shouldBeGrouped){let currentGroup;let last;for(const item of items){if(last!==void 0&&shouldBeGrouped(last,item)){currentGroup.push(item)}else{if(currentGroup){yield currentGroup}currentGroup=[item]}last=item}if(currentGroup){yield currentGroup}}function getIndentation(str){let i=0;while(i=97&&charCode<=122||charCode>=65&&charCode<=90||charCode>=48&&charCode<=57}function getCategoryBoundaryScore(category){return score[category]}function getCategory(charCode){if(charCode===10){return 7}else if(charCode===13){return 6}else if(isSpace(charCode)){return 5}else if(charCode>=97&&charCode<=122){return 0}else if(charCode>=65&&charCode<=90){return 1}else if(charCode>=48&&charCode<=57){return 2}else if(charCode===-1){return 3}else{return 4}}function isSpace(charCode){return charCode===32||charCode===9}function getKey(chr){let key=chrKeys.get(chr);if(key===void 0){key=chrKeys.size;chrKeys.set(chr,key)}return key}var AdvancedLinesDiffComputer,MonotonousFinder,LineRangeSet,LineSequence2,LinesSliceCharSequence,score,chrKeys,LineRangeFragment;var init_advancedLinesDiffComputer=__esm({"node_modules/monaco-editor/esm/vs/editor/common/diff/advancedLinesDiffComputer.js"(){init_arrays();init_assert();init_collections();init_errors();init_lineRange();init_offsetRange();init_position();init_range();init_diffAlgorithm();init_dynamicProgrammingDiffing();init_joinSequenceDiffs();init_myersDiffAlgorithm();init_linesDiffComputer();AdvancedLinesDiffComputer=class{constructor(){this.dynamicProgrammingDiffing=new DynamicProgrammingDiffing;this.myersDiffingAlgorithm=new MyersDiffAlgorithm}computeDiff(originalLines,modifiedLines,options2){if(originalLines.length<=1&&equals(originalLines,modifiedLines,((a,b)=>a===b))){return new LinesDiff([],[],false)}if(originalLines.length===1&&originalLines[0].length===0||modifiedLines.length===1&&modifiedLines[0].length===0){return new LinesDiff([new LineRangeMapping(new LineRange(1,originalLines.length+1),new LineRange(1,modifiedLines.length+1),[new RangeMapping(new Range(1,1,originalLines.length,originalLines[0].length+1),new Range(1,1,modifiedLines.length,modifiedLines[0].length+1))])],[],false)}const timeout2=options2.maxComputationTimeMs===0?InfiniteTimeout.instance:new DateTimeout(options2.maxComputationTimeMs);const considerWhitespaceChanges=!options2.ignoreTrimWhitespace;const perfectHashes=new Map;function getOrCreateHash(text2){let hash2=perfectHashes.get(text2);if(hash2===void 0){hash2=perfectHashes.size;perfectHashes.set(text2,hash2)}return hash2}const srcDocLines=originalLines.map((l=>getOrCreateHash(l.trim())));const tgtDocLines=modifiedLines.map((l=>getOrCreateHash(l.trim())));const sequence1=new LineSequence2(srcDocLines,originalLines);const sequence2=new LineSequence2(tgtDocLines,modifiedLines);const lineAlignmentResult=(()=>{if(sequence1.length+sequence2.length<1700){return this.dynamicProgrammingDiffing.compute(sequence1,sequence2,timeout2,((offset1,offset2)=>originalLines[offset1]===modifiedLines[offset2]?modifiedLines[offset2].length===0?.1:1+Math.log(1+modifiedLines[offset2].length):.99))}return this.myersDiffingAlgorithm.compute(sequence1,sequence2)})();let lineAlignments=lineAlignmentResult.diffs;let hitTimeout=lineAlignmentResult.hitTimeout;lineAlignments=optimizeSequenceDiffs(sequence1,sequence2,lineAlignments);lineAlignments=removeRandomLineMatches(sequence1,sequence2,lineAlignments);const alignments=[];const scanForWhitespaceChanges=equalLinesCount=>{if(!considerWhitespaceChanges){return}for(let i=0;idiff.seq1Range.start-seq1LastStart===diff.seq2Range.start-seq2LastStart));const equalLinesCount=diff.seq1Range.start-seq1LastStart;scanForWhitespaceChanges(equalLinesCount);seq1LastStart=diff.seq1Range.endExclusive;seq2LastStart=diff.seq2Range.endExclusive;const characterDiffs=this.refineDiff(originalLines,modifiedLines,diff,timeout2,considerWhitespaceChanges);if(characterDiffs.hitTimeout){hitTimeout=true}for(const a of characterDiffs.mappings){alignments.push(a)}}scanForWhitespaceChanges(originalLines.length-seq1LastStart);const changes=lineRangeMappingFromRangeMappings(alignments,originalLines,modifiedLines);let moves=[];if(options2.computeMoves){moves=this.computeMoves(changes,originalLines,modifiedLines,srcDocLines,tgtDocLines,timeout2,considerWhitespaceChanges)}assertFn((()=>{function validatePosition(pos,lines){if(pos.lineNumber<1||pos.lineNumber>lines.length){return false}const line=lines[pos.lineNumber-1];if(pos.column<1||pos.column>line.length+1){return false}return true}function validateRange(range2,lines){if(range2.startLineNumber<1||range2.startLineNumber>lines.length+1){return false}if(range2.endLineNumberExclusive<1||range2.endLineNumberExclusive>lines.length+1){return false}return true}for(const c of changes){if(!c.innerChanges){return false}for(const ic of c.innerChanges){const valid=validatePosition(ic.modifiedRange.getStartPosition(),modifiedLines)&&validatePosition(ic.modifiedRange.getEndPosition(),modifiedLines)&&validatePosition(ic.originalRange.getStartPosition(),originalLines)&&validatePosition(ic.originalRange.getEndPosition(),originalLines);if(!valid){return false}}if(!validateRange(c.modifiedRange,modifiedLines)||!validateRange(c.originalRange,originalLines)){return false}}return true}));return new LinesDiff(changes,moves,hitTimeout)}computeMoves(changes,originalLines,modifiedLines,hashedOriginalLines,hashedModifiedLines,timeout2,considerWhitespaceChanges){const moves=[];const deletions=changes.filter((c=>c.modifiedRange.isEmpty&&c.originalRange.length>=3)).map((d=>new LineRangeFragment(d.originalRange,originalLines,d)));const insertions=new Set(changes.filter((c=>c.originalRange.isEmpty&&c.modifiedRange.length>=3)).map((d=>new LineRangeFragment(d.modifiedRange,modifiedLines,d))));const excludedChanges=new Set;for(const deletion of deletions){let highestSimilarity=-1;let best;for(const insertion of insertions){const similarity=deletion.computeSimilarity(insertion);if(similarity>highestSimilarity){highestSimilarity=similarity;best=insertion}}if(highestSimilarity>.9&&best){insertions.delete(best);moves.push(new SimpleLineRangeMapping(deletion.range,best.range));excludedChanges.add(deletion.source);excludedChanges.add(best.source)}if(!timeout2.isValid()){return[]}}const original3LineHashes=new SetMap;for(const change of changes){if(excludedChanges.has(change)){continue}for(let i=change.originalRange.startLineNumber;ic.modifiedRange.startLineNumber),numberComparator));for(const change of changes){if(excludedChanges.has(change)){continue}let lastMappings=[];for(let i=change.modifiedRange.startLineNumber;i{for(const lastMapping of lastMappings){if(lastMapping.originalLineRange.endLineNumberExclusive+1===range2.endLineNumberExclusive&&lastMapping.modifiedLineRange.endLineNumberExclusive+1===currentModifiedRange.endLineNumberExclusive){lastMapping.originalLineRange=new LineRange(lastMapping.originalLineRange.startLineNumber,range2.endLineNumberExclusive);lastMapping.modifiedLineRange=new LineRange(lastMapping.modifiedLineRange.startLineNumber,currentModifiedRange.endLineNumberExclusive);nextMappings.push(lastMapping);return}}const mapping={modifiedLineRange:currentModifiedRange,originalLineRange:range2};possibleMappings.push(mapping);nextMappings.push(mapping)}));lastMappings=nextMappings}if(!timeout2.isValid()){return[]}}possibleMappings.sort(reverseOrder(compareBy((m=>m.modifiedLineRange.length),numberComparator)));const modifiedSet=new LineRangeSet;const originalSet=new LineRangeSet;for(const mapping of possibleMappings){const diffOrigToMod=mapping.modifiedLineRange.startLineNumber-mapping.originalLineRange.startLineNumber;const modifiedSections=modifiedSet.subtractFrom(mapping.modifiedLineRange);const originalTranslatedSections=originalSet.subtractFrom(mapping.originalLineRange).map((r=>r.delta(diffOrigToMod)));const modifiedIntersectedSections=intersectRanges(modifiedSections,originalTranslatedSections);for(const s of modifiedIntersectedSections){if(s.length<3){continue}const modifiedLineRange=s;const originalLineRange=s.delta(-diffOrigToMod);moves.push(new SimpleLineRangeMapping(originalLineRange,modifiedLineRange));modifiedSet.addRange(modifiedLineRange);originalSet.addRange(originalLineRange)}}moves.sort(compareBy((m=>m.original.startLineNumber),numberComparator));if(moves.length===0){return[]}let joinedMoves=[moves[0]];for(let i=1;i=0&&modifiedDist>=0;if(currentMoveAfterLast&&originalDist+modifiedDist<=2){joinedMoves[joinedMoves.length-1]=last.join(current);continue}const originalText=current.original.toOffsetRange().slice(originalLines).map((l=>l.trim())).join("\n");if(originalText.length<=10){continue}joinedMoves.push(current)}const originalChanges=MonotonousFinder.createOfSorted(changes,(c=>c.originalRange.endLineNumberExclusive),numberComparator);joinedMoves=joinedMoves.filter((m=>{const diffBeforeOriginalMove=originalChanges.findLastItemBeforeOrEqual(m.original.startLineNumber)||new LineRangeMapping(new LineRange(1,1),new LineRange(1,1),[]);const modifiedDistToPrevDiff=m.modified.startLineNumber-diffBeforeOriginalMove.modifiedRange.endLineNumberExclusive;const originalDistToPrevDiff=m.original.startLineNumber-diffBeforeOriginalMove.originalRange.endLineNumberExclusive;const differentDistances=modifiedDistToPrevDiff!==originalDistToPrevDiff;return differentDistances}));const fullMoves=joinedMoves.map((m=>{const moveChanges=this.refineDiff(originalLines,modifiedLines,new SequenceDiff(m.original.toOffsetRange(),m.modified.toOffsetRange()),timeout2,considerWhitespaceChanges);const mappings=lineRangeMappingFromRangeMappings(moveChanges.mappings,originalLines,modifiedLines,true);return new MovedText(m,mappings)}));return fullMoves}refineDiff(originalLines,modifiedLines,diff,timeout2,considerWhitespaceChanges){const slice1=new LinesSliceCharSequence(originalLines,diff.seq1Range,considerWhitespaceChanges);const slice2=new LinesSliceCharSequence(modifiedLines,diff.seq2Range,considerWhitespaceChanges);const diffResult=slice1.length+slice2.length<500?this.dynamicProgrammingDiffing.compute(slice1,slice2,timeout2):this.myersDiffingAlgorithm.compute(slice1,slice2,timeout2);let diffs=diffResult.diffs;diffs=optimizeSequenceDiffs(slice1,slice2,diffs);diffs=coverFullWords(slice1,slice2,diffs);diffs=smoothenSequenceDiffs(slice1,slice2,diffs);diffs=removeRandomMatches(slice1,slice2,diffs);const result=diffs.map((d=>new RangeMapping(slice1.translateRange(d.seq1Range),slice2.translateRange(d.seq2Range))));return{mappings:result,hitTimeout:diffResult.hitTimeout}}};MonotonousFinder=class{static createOfSorted(items,itemToDomain,domainComparator){return new MonotonousFinder(items,itemToDomain,domainComparator)}constructor(_items,_itemToDomain,_domainComparator){this._items=_items;this._itemToDomain=_itemToDomain;this._domainComparator=_domainComparator;this._currentIdx=0;this._lastValue=void 0;this._hasLastValue=false}findLastItemBeforeOrEqual(value){if(this._hasLastValue&&CompareResult.isLessThan(this._domainComparator(value,this._lastValue))){throw new BugIndicatingError}this._lastValue=value;this._hasLastValue=true;while(this._currentIdxr.endLineNumberExclusive>=range2.startLineNumber)),this._normalizedRanges.length);const joinRangeEndIdxExclusive=findLastIndex(this._normalizedRanges,(r=>r.startLineNumber<=range2.endLineNumberExclusive))+1;if(joinRangeStartIdx===joinRangeEndIdxExclusive){this._normalizedRanges.splice(joinRangeStartIdx,0,range2)}else if(joinRangeStartIdx===joinRangeEndIdxExclusive-1){const joinRange=this._normalizedRanges[joinRangeStartIdx];this._normalizedRanges[joinRangeStartIdx]=joinRange.join(range2)}else{const joinRange=this._normalizedRanges[joinRangeStartIdx].join(this._normalizedRanges[joinRangeEndIdxExclusive-1]).join(range2);this._normalizedRanges.splice(joinRangeStartIdx,joinRangeEndIdxExclusive-joinRangeStartIdx,joinRange)}}subtractFrom(range2){const joinRangeStartIdx=mapMinusOne(this._normalizedRanges.findIndex((r=>r.endLineNumberExclusive>=range2.startLineNumber)),this._normalizedRanges.length);const joinRangeEndIdxExclusive=findLastIndex(this._normalizedRanges,(r=>r.startLineNumber<=range2.endLineNumberExclusive))+1;if(joinRangeStartIdx===joinRangeEndIdxExclusive){return[range2]}const result=[];let startLineNumber=range2.startLineNumber;for(let i=joinRangeStartIdx;istartLineNumber){result.push(new LineRange(startLineNumber,r.startLineNumber))}startLineNumber=r.endLineNumberExclusive}if(startLineNumber0&&lineRange.endExclusive>=lines.length){lineRange=new OffsetRange(lineRange.start-1,lineRange.endExclusive);trimFirstLineFully=true}this.lineRange=lineRange;for(let i=this.lineRange.start;iString.fromCharCode(e))).join("")}getElement(offset){return this.elements[offset]}get length(){return this.elements.length}getBoundaryScore(length2){const prevCategory=getCategory(length2>0?this.elements[length2-1]:-1);const nextCategory=getCategory(length2offset){j=k}else{i=k+1}}const offsetOfFirstCharInLine=i===0?0:this.firstCharOffsetByLineMinusOne[i-1];return new Position(this.lineRange.start+i+1,offset-offsetOfFirstCharInLine+1+this.additionalOffsetByLine[i])}translateRange(range2){return Range.fromPositions(this.translateOffset(range2.start),this.translateOffset(range2.endExclusive))}findWordContaining(offset){if(offset<0||offset>=this.elements.length){return void 0}if(!isWordChar(this.elements[offset])){return void 0}let start=offset;while(start>0&&isWordChar(this.elements[start-1])){start--}let end=offset;while(endx<=range2.start)))!==null&&_a6!==void 0?_a6:0;const end=(_b3=findFirstMonotonous(this.firstCharOffsetByLineMinusOne,(x=>range2.endExclusive<=x)))!==null&&_b3!==void 0?_b3:this.elements.length;return new OffsetRange(start,end)}};score={[0]:0,[1]:0,[2]:0,[3]:10,[4]:2,[5]:3,[6]:10,[7]:10};chrKeys=new Map;LineRangeFragment=class{constructor(range2,lines,source){this.range=range2;this.lines=lines;this.source=source;this.histogram=[];let counter=0;for(let i=range2.startLineNumber-1;inew LegacyLinesDiffComputer,getAdvanced:()=>new AdvancedLinesDiffComputer}}});function roundFloat(number,decimalPoints){const decimal=Math.pow(10,decimalPoints);return Math.round(number*decimal)/decimal}var RGBA,HSLA,HSVA,Color;var init_color=__esm({"node_modules/monaco-editor/esm/vs/base/common/color.js"(){RGBA=class{constructor(r,g,b,a=1){this._rgbaBrand=void 0;this.r=Math.min(255,Math.max(0,r))|0;this.g=Math.min(255,Math.max(0,g))|0;this.b=Math.min(255,Math.max(0,b))|0;this.a=roundFloat(Math.max(Math.min(1,a),0),3)}static equals(a,b){return a.r===b.r&&a.g===b.g&&a.b===b.b&&a.a===b.a}};HSLA=class{constructor(h2,s,l,a){this._hslaBrand=void 0;this.h=Math.max(Math.min(360,h2),0)|0;this.s=roundFloat(Math.max(Math.min(1,s),0),3);this.l=roundFloat(Math.max(Math.min(1,l),0),3);this.a=roundFloat(Math.max(Math.min(1,a),0),3)}static equals(a,b){return a.h===b.h&&a.s===b.s&&a.l===b.l&&a.a===b.a}static fromRGBA(rgba){const r=rgba.r/255;const g=rgba.g/255;const b=rgba.b/255;const a=rgba.a;const max=Math.max(r,g,b);const min=Math.min(r,g,b);let h2=0;let s=0;const l=(min+max)/2;const chroma=max-min;if(chroma>0){s=Math.min(l<=.5?chroma/(2*l):chroma/(2-2*l),1);switch(max){case r:h2=(g-b)/chroma+(g1){t2-=1}if(t2<1/6){return p+(q-p)*6*t2}if(t2<1/2){return q}if(t2<2/3){return p+(q-p)*(2/3-t2)*6}return p}static toRGBA(hsla){const h2=hsla.h/360;const{s:s,l:l,a:a}=hsla;let r,g,b;if(s===0){r=g=b=l}else{const q=l<.5?l*(1+s):l+s-l*s;const p=2*l-q;r=HSLA._hue2rgb(p,q,h2+1/3);g=HSLA._hue2rgb(p,q,h2);b=HSLA._hue2rgb(p,q,h2-1/3)}return new RGBA(Math.round(r*255),Math.round(g*255),Math.round(b*255),a)}};HSVA=class{constructor(h2,s,v,a){this._hsvaBrand=void 0;this.h=Math.max(Math.min(360,h2),0)|0;this.s=roundFloat(Math.max(Math.min(1,s),0),3);this.v=roundFloat(Math.max(Math.min(1,v),0),3);this.a=roundFloat(Math.max(Math.min(1,a),0),3)}static equals(a,b){return a.h===b.h&&a.s===b.s&&a.v===b.v&&a.a===b.a}static fromRGBA(rgba){const r=rgba.r/255;const g=rgba.g/255;const b=rgba.b/255;const cmax=Math.max(r,g,b);const cmin=Math.min(r,g,b);const delta=cmax-cmin;const s=cmax===0?0:delta/cmax;let m;if(delta===0){m=0}else if(cmax===r){m=((g-b)/delta%6+6)%6}else if(cmax===g){m=(b-r)/delta+2}else{m=(r-g)/delta+4}return new HSVA(Math.round(m*60),s,cmax,rgba.a)}static toRGBA(hsva){const{h:h2,s:s,v:v,a:a}=hsva;const c=v*s;const x=c*(1-Math.abs(h2/60%2-1));const m=v-c;let[r,g,b]=[0,0,0];if(h2<60){r=c;g=x}else if(h2<120){r=x;g=c}else if(h2<180){g=c;b=x}else if(h2<240){g=x;b=c}else if(h2<300){r=x;b=c}else if(h2<=360){r=c;b=x}r=Math.round((r+m)*255);g=Math.round((g+m)*255);b=Math.round((b+m)*255);return new RGBA(r,g,b,a)}};Color=class{static fromHex(hex){return Color.Format.CSS.parseHex(hex)||Color.red}static equals(a,b){if(!a&&!b){return true}if(!a||!b){return false}return a.equals(b)}get hsla(){if(this._hsla){return this._hsla}else{return HSLA.fromRGBA(this.rgba)}}get hsva(){if(this._hsva){return this._hsva}return HSVA.fromRGBA(this.rgba)}constructor(arg){if(!arg){throw new Error("Color needs a value")}else if(arg instanceof RGBA){this.rgba=arg}else if(arg instanceof HSLA){this._hsla=arg;this.rgba=HSLA.toRGBA(arg)}else if(arg instanceof HSVA){this._hsva=arg;this.rgba=HSVA.toRGBA(arg)}else{throw new Error("Invalid color ctor argument")}}equals(other){return!!other&&RGBA.equals(this.rgba,other.rgba)&&HSLA.equals(this.hsla,other.hsla)&&HSVA.equals(this.hsva,other.hsva)}getRelativeLuminance(){const R=Color._relativeLuminanceForComponent(this.rgba.r);const G=Color._relativeLuminanceForComponent(this.rgba.g);const B=Color._relativeLuminanceForComponent(this.rgba.b);const luminance=.2126*R+.7152*G+.0722*B;return roundFloat(luminance,4)}static _relativeLuminanceForComponent(color){const c=color/255;return c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4)}isLighter(){const yiq=(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3;return yiq>=128}isLighterThan(another){const lum1=this.getRelativeLuminance();const lum2=another.getRelativeLuminance();return lum1>lum2}isDarkerThan(another){const lum1=this.getRelativeLuminance();const lum2=another.getRelativeLuminance();return lum10){for(const initialMatch of initialValidationMatches){const initialCaptureGroups=initialMatch.filter((captureGroup=>captureGroup!==void 0));const colorScheme=initialCaptureGroups[1];const colorParameters=initialCaptureGroups[2];if(!colorParameters){continue}let colorInformation;if(colorScheme==="rgb"){const regexParameters=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;colorInformation=_findRGBColorInformation(_findRange(model,initialMatch),_findMatches(colorParameters,regexParameters),false)}else if(colorScheme==="rgba"){const regexParameters=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;colorInformation=_findRGBColorInformation(_findRange(model,initialMatch),_findMatches(colorParameters,regexParameters),true)}else if(colorScheme==="hsl"){const regexParameters=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;colorInformation=_findHSLColorInformation(_findRange(model,initialMatch),_findMatches(colorParameters,regexParameters),false)}else if(colorScheme==="hsla"){const regexParameters=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;colorInformation=_findHSLColorInformation(_findRange(model,initialMatch),_findMatches(colorParameters,regexParameters),true)}else if(colorScheme==="#"){colorInformation=_findHexColorInformation(_findRange(model,initialMatch),colorScheme+colorParameters)}if(colorInformation){result.push(colorInformation)}}}return result}function computeDefaultDocumentColors(model){if(!model||typeof model.getValue!=="function"||typeof model.positionAt!=="function"){return[]}return computeColors(model)}var init_defaultDocumentColorsComputer=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages/defaultDocumentColorsComputer.js"(){init_color()}});var __awaiter3,MirrorModel,EditorSimpleWorker;var init_editorSimpleWorker=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/editorSimpleWorker.js"(){init_diff();init_uri();init_position();init_range();init_mirrorTextModel();init_wordHelper();init_linkComputer();init_inplaceReplaceSupport();init_editorBaseApi();init_stopwatch();init_unicodeTextModelHighlighter();init_linesDiffComputers();init_objects();init_defaultDocumentColorsComputer();__awaiter3=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};MirrorModel=class extends MirrorTextModel{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(regex){const matches=[];for(let i=0;ithis._lines.length){lineNumber=this._lines.length;column=this._lines[lineNumber-1].length+1;hasChanged=true}else{const maxCharacter=this._lines[lineNumber-1].length+1;if(column<1){column=1;hasChanged=true}else if(column>maxCharacter){column=maxCharacter;hasChanged=true}}if(!hasChanged){return position}else{return{lineNumber:lineNumber,column:column}}}};EditorSimpleWorker=class{constructor(host,foreignModuleFactory){this._host=host;this._models=Object.create(null);this._foreignModuleFactory=foreignModuleFactory;this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(uri){return this._models[uri]}_getModels(){const all=[];Object.keys(this._models).forEach((key=>all.push(this._models[key])));return all}acceptNewModel(data){this._models[data.url]=new MirrorModel(URI.parse(data.url),data.lines,data.EOL,data.versionId)}acceptModelChanged(strURL,e){if(!this._models[strURL]){return}const model=this._models[strURL];model.onEvents(e)}acceptRemovedModel(strURL){if(!this._models[strURL]){return}delete this._models[strURL]}computeUnicodeHighlights(url,options2,range2){return __awaiter3(this,void 0,void 0,(function*(){const model=this._getModel(url);if(!model){return{ranges:[],hasMore:false,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}return UnicodeTextModelHighlighter.computeUnicodeHighlights(model,options2,range2)}))}computeDiff(originalUrl,modifiedUrl,options2,algorithm){return __awaiter3(this,void 0,void 0,(function*(){const original=this._getModel(originalUrl);const modified=this._getModel(modifiedUrl);if(!original||!modified){return null}return EditorSimpleWorker.computeDiff(original,modified,options2,algorithm)}))}static computeDiff(originalTextModel,modifiedTextModel,options2,algorithm){const diffAlgorithm=algorithm==="advanced"?linesDiffComputers.getAdvanced():linesDiffComputers.getLegacy();const originalLines=originalTextModel.getLinesContent();const modifiedLines=modifiedTextModel.getLinesContent();const result=diffAlgorithm.computeDiff(originalLines,modifiedLines,options2);const identical=result.changes.length>0?false:this._modelsAreIdentical(originalTextModel,modifiedTextModel);function getLineChanges(changes){return changes.map((m=>{var _a6;return[m.originalRange.startLineNumber,m.originalRange.endLineNumberExclusive,m.modifiedRange.startLineNumber,m.modifiedRange.endLineNumberExclusive,(_a6=m.innerChanges)===null||_a6===void 0?void 0:_a6.map((m2=>[m2.originalRange.startLineNumber,m2.originalRange.startColumn,m2.originalRange.endLineNumber,m2.originalRange.endColumn,m2.modifiedRange.startLineNumber,m2.modifiedRange.startColumn,m2.modifiedRange.endLineNumber,m2.modifiedRange.endColumn]))]}))}return{identical:identical,quitEarly:result.hitTimeout,changes:getLineChanges(result.changes),moves:result.moves.map((m=>[m.lineRangeMapping.original.startLineNumber,m.lineRangeMapping.original.endLineNumberExclusive,m.lineRangeMapping.modified.startLineNumber,m.lineRangeMapping.modified.endLineNumberExclusive,getLineChanges(m.changes)]))}}static _modelsAreIdentical(original,modified){const originalLineCount=original.getLineCount();const modifiedLineCount=modified.getLineCount();if(originalLineCount!==modifiedLineCount){return false}for(let line=1;line<=originalLineCount;line++){const originalLine=original.getLineContent(line);const modifiedLine=modified.getLineContent(line);if(originalLine!==modifiedLine){return false}}return true}computeMoreMinimalEdits(modelUrl,edits,pretty){return __awaiter3(this,void 0,void 0,(function*(){const model=this._getModel(modelUrl);if(!model){return edits}const result=[];let lastEol=void 0;edits=edits.slice(0).sort(((a,b)=>{if(a.range&&b.range){return Range.compareRangesUsingStarts(a.range,b.range)}const aRng=a.range?0:1;const bRng=b.range?0:1;return aRng-bRng}));for(let{range:range2,text:text2,eol:eol}of edits){if(typeof eol==="number"){lastEol=eol}if(Range.isEmpty(range2)&&!text2){continue}const original=model.getValueInRange(range2);text2=text2.replace(/\r\n|\n|\r/g,model.eol);if(original===text2){continue}if(Math.max(text2.length,original.length)>EditorSimpleWorker._diffLimit){result.push({range:range2,text:text2});continue}const changes=stringDiff(original,text2,pretty);const editOffset=model.offsetAt(Range.lift(range2).getStartPosition());for(const change of changes){const start=model.positionAt(editOffset+change.originalStart);const end=model.positionAt(editOffset+change.originalStart+change.originalLength);const newEdit={text:text2.substr(change.modifiedStart,change.modifiedLength),range:{startLineNumber:start.lineNumber,startColumn:start.column,endLineNumber:end.lineNumber,endColumn:end.column}};if(model.getValueInRange(newEdit.range)!==newEdit.text){result.push(newEdit)}}}if(typeof lastEol==="number"){result.push({eol:lastEol,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}})}return result}))}computeLinks(modelUrl){return __awaiter3(this,void 0,void 0,(function*(){const model=this._getModel(modelUrl);if(!model){return null}return computeLinks(model)}))}computeDefaultDocumentColors(modelUrl){return __awaiter3(this,void 0,void 0,(function*(){const model=this._getModel(modelUrl);if(!model){return null}return computeDefaultDocumentColors(model)}))}textualSuggest(modelUrls,leadingWord,wordDef,wordDefFlags){return __awaiter3(this,void 0,void 0,(function*(){const sw=new StopWatch;const wordDefRegExp=new RegExp(wordDef,wordDefFlags);const seen=new Set;outer:for(const url of modelUrls){const model=this._getModel(url);if(!model){continue}for(const word of model.words(wordDefRegExp)){if(word===leadingWord||!isNaN(Number(word))){continue}seen.add(word);if(seen.size>EditorSimpleWorker._suggestionsLimit){break outer}}}return{words:Array.from(seen),duration:sw.elapsed()}}))}computeWordRanges(modelUrl,range2,wordDef,wordDefFlags){return __awaiter3(this,void 0,void 0,(function*(){const model=this._getModel(modelUrl);if(!model){return Object.create(null)}const wordDefRegExp=new RegExp(wordDef,wordDefFlags);const result=Object.create(null);for(let line=range2.startLineNumber;linethis._host.fhr(method,args);const foreignHost=createProxyObject(foreignHostMethods,proxyMethodRequest);const ctx={host:foreignHost,getMirrorModels:()=>this._getModels()};if(this._foreignModuleFactory){this._foreignModule=this._foreignModuleFactory(ctx,createData);return Promise.resolve(getAllMethodNames(this._foreignModule))}return Promise.reject(new Error(`Unexpected usage`))}fmr(method,args){if(!this._foreignModule||typeof this._foreignModule[method]!=="function"){return Promise.reject(new Error("Missing requestHandler or method: "+method))}try{return Promise.resolve(this._foreignModule[method].apply(this._foreignModule,args))}catch(e){return Promise.reject(e)}}};EditorSimpleWorker._diffLimit=1e5;EditorSimpleWorker._suggestionsLimit=1e4;if(typeof importScripts==="function"){globalThis.monaco=createMonacoBaseAPI()}}});var ITextResourceConfigurationService,ITextResourcePropertiesService;var init_textResourceConfiguration=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js"(){init_instantiation();ITextResourceConfigurationService=createDecorator("textResourceConfigurationService");ITextResourcePropertiesService=createDecorator("textResourcePropertiesService")}});function LogLevelToString(logLevel){switch(logLevel){case LogLevel.Trace:return"trace";case LogLevel.Debug:return"debug";case LogLevel.Info:return"info";case LogLevel.Warning:return"warn";case LogLevel.Error:return"error";case LogLevel.Off:return"off"}}var ILogService,LogLevel,DEFAULT_LOG_LEVEL,AbstractLogger,ConsoleLogger,MultiplexLogger,CONTEXT_LOG_LEVEL;var init_log=__esm({"node_modules/monaco-editor/esm/vs/platform/log/common/log.js"(){init_event();init_lifecycle();init_contextkey();init_instantiation();ILogService=createDecorator("logService");(function(LogLevel2){LogLevel2[LogLevel2["Off"]=0]="Off";LogLevel2[LogLevel2["Trace"]=1]="Trace";LogLevel2[LogLevel2["Debug"]=2]="Debug";LogLevel2[LogLevel2["Info"]=3]="Info";LogLevel2[LogLevel2["Warning"]=4]="Warning";LogLevel2[LogLevel2["Error"]=5]="Error"})(LogLevel||(LogLevel={}));DEFAULT_LOG_LEVEL=LogLevel.Info;AbstractLogger=class extends Disposable{constructor(){super(...arguments);this.level=DEFAULT_LOG_LEVEL;this._onDidChangeLogLevel=this._register(new Emitter);this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(level){if(this.level!==level){this.level=level;this._onDidChangeLogLevel.fire(this.level)}}getLevel(){return this.level}checkLogLevel(level){return this.level!==LogLevel.Off&&this.level<=level}};ConsoleLogger=class extends AbstractLogger{constructor(logLevel=DEFAULT_LOG_LEVEL,useColors=true){super();this.useColors=useColors;this.setLevel(logLevel)}trace(message,...args){if(this.checkLogLevel(LogLevel.Trace)){if(this.useColors){console.log("%cTRACE","color: #888",message,...args)}else{console.log(message,...args)}}}debug(message,...args){if(this.checkLogLevel(LogLevel.Debug)){if(this.useColors){console.log("%cDEBUG","background: #eee; color: #888",message,...args)}else{console.log(message,...args)}}}info(message,...args){if(this.checkLogLevel(LogLevel.Info)){if(this.useColors){console.log("%c INFO","color: #33f",message,...args)}else{console.log(message,...args)}}}warn(message,...args){if(this.checkLogLevel(LogLevel.Warning)){if(this.useColors){console.log("%c WARN","color: #993",message,...args)}else{console.log(message,...args)}}}error(message,...args){if(this.checkLogLevel(LogLevel.Error)){if(this.useColors){console.log("%c ERR","color: #f33",message,...args)}else{console.error(message,...args)}}}dispose(){}};MultiplexLogger=class extends AbstractLogger{constructor(loggers){super();this.loggers=loggers;if(loggers.length){this.setLevel(loggers[0].getLevel())}}setLevel(level){for(const logger of this.loggers){logger.setLevel(level)}super.setLevel(level)}trace(message,...args){for(const logger of this.loggers){logger.trace(message,...args)}}debug(message,...args){for(const logger of this.loggers){logger.debug(message,...args)}}info(message,...args){for(const logger of this.loggers){logger.info(message,...args)}}warn(message,...args){for(const logger of this.loggers){logger.warn(message,...args)}}error(message,...args){for(const logger of this.loggers){logger.error(message,...args)}}dispose(){for(const logger of this.loggers){logger.dispose()}}};CONTEXT_LOG_LEVEL=new RawContextKey("logLevel",LogLevelToString(LogLevel.Info))}});var ILanguageFeaturesService;var init_languageFeatures=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/languageFeatures.js"(){init_instantiation();ILanguageFeaturesService=createDecorator("ILanguageFeaturesService")}});function canSyncModel(modelService,resource){const model=modelService.getModel(resource);if(!model){return false}if(model.isTooLargeForSyncing()){return false}return true}var __decorate3,__param3,__awaiter4,STOP_SYNC_MODEL_DELTA_TIME_MS,STOP_WORKER_DELTA_TIME_MS,EditorWorkerService,WordBasedCompletionItemProvider,WorkerManager,EditorModelManager,SynchronousWorkerClient,EditorWorkerHost,EditorWorkerClient;var init_editorWorkerService=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/services/editorWorkerService.js"(){init_async();init_lifecycle();init_simpleWorker();init_defaultWorkerFactory();init_range();init_languageConfigurationRegistry();init_editorSimpleWorker();init_model2();init_textResourceConfiguration();init_arrays();init_log();init_stopwatch();init_errors();init_languageFeatures();init_linesDiffComputer();init_lineRange();__decorate3=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param3=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter4=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};STOP_SYNC_MODEL_DELTA_TIME_MS=60*1e3;STOP_WORKER_DELTA_TIME_MS=5*60*1e3;EditorWorkerService=class EditorWorkerService2 extends Disposable{constructor(modelService,configurationService,logService,languageConfigurationService,languageFeaturesService){super();this._modelService=modelService;this._workerManager=this._register(new WorkerManager(this._modelService,languageConfigurationService));this._logService=logService;this._register(languageFeaturesService.linkProvider.register({language:"*",hasAccessToAllModels:true},{provideLinks:(model,token)=>{if(!canSyncModel(this._modelService,model.uri)){return Promise.resolve({links:[]})}return this._workerManager.withWorker().then((client=>client.computeLinks(model.uri))).then((links=>links&&{links:links}))}}));this._register(languageFeaturesService.completionProvider.register("*",new WordBasedCompletionItemProvider(this._workerManager,configurationService,this._modelService,languageConfigurationService)))}dispose(){super.dispose()}canComputeUnicodeHighlights(uri){return canSyncModel(this._modelService,uri)}computedUnicodeHighlights(uri,options2,range2){return this._workerManager.withWorker().then((client=>client.computedUnicodeHighlights(uri,options2,range2)))}computeDiff(original,modified,options2,algorithm){return __awaiter4(this,void 0,void 0,(function*(){const result=yield this._workerManager.withWorker().then((client=>client.computeDiff(original,modified,options2,algorithm)));if(!result){return null}const diff={identical:result.identical,quitEarly:result.quitEarly,changes:toLineRangeMappings(result.changes),moves:result.moves.map((m=>new MovedText(new SimpleLineRangeMapping(new LineRange(m[0],m[1]),new LineRange(m[2],m[3])),toLineRangeMappings(m[4]))))};return diff;function toLineRangeMappings(changes){return changes.map((c=>{var _a6;return new LineRangeMapping(new LineRange(c[0],c[1]),new LineRange(c[2],c[3]),(_a6=c[4])===null||_a6===void 0?void 0:_a6.map((c2=>new RangeMapping(new Range(c2[0],c2[1],c2[2],c2[3]),new Range(c2[4],c2[5],c2[6],c2[7])))))}))}}))}computeMoreMinimalEdits(resource,edits,pretty=false){if(isNonEmptyArray(edits)){if(!canSyncModel(this._modelService,resource)){return Promise.resolve(edits)}const sw=StopWatch.create();const result=this._workerManager.withWorker().then((client=>client.computeMoreMinimalEdits(resource,edits,pretty)));result.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",resource.toString(true),sw.elapsed())));return Promise.race([result,timeout(1e3).then((()=>edits))])}else{return Promise.resolve(void 0)}}canNavigateValueSet(resource){return canSyncModel(this._modelService,resource)}navigateValueSet(resource,range2,up){return this._workerManager.withWorker().then((client=>client.navigateValueSet(resource,range2,up)))}canComputeWordRanges(resource){return canSyncModel(this._modelService,resource)}computeWordRanges(resource,range2){return this._workerManager.withWorker().then((client=>client.computeWordRanges(resource,range2)))}};EditorWorkerService=__decorate3([__param3(0,IModelService),__param3(1,ITextResourceConfigurationService),__param3(2,ILogService),__param3(3,ILanguageConfigurationService),__param3(4,ILanguageFeaturesService)],EditorWorkerService);WordBasedCompletionItemProvider=class{constructor(workerManager,configurationService,modelService,languageConfigurationService){this.languageConfigurationService=languageConfigurationService;this._debugDisplayName="wordbasedCompletions";this._workerManager=workerManager;this._configurationService=configurationService;this._modelService=modelService}provideCompletionItems(model,position){return __awaiter4(this,void 0,void 0,(function*(){const config=this._configurationService.getValue(model.uri,position,"editor");if(!config.wordBasedSuggestions){return void 0}const models=[];if(config.wordBasedSuggestionsMode==="currentDocument"){if(canSyncModel(this._modelService,model.uri)){models.push(model.uri)}}else{for(const candidate of this._modelService.getModels()){if(!canSyncModel(this._modelService,candidate.uri)){continue}if(candidate===model){models.unshift(candidate.uri)}else if(config.wordBasedSuggestionsMode==="allDocuments"||candidate.getLanguageId()===model.getLanguageId()){models.push(candidate.uri)}}}if(models.length===0){return void 0}const wordDefRegExp=this.languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).getWordDefinition();const word=model.getWordAtPosition(position);const replace=!word?Range.fromPositions(position):new Range(position.lineNumber,word.startColumn,position.lineNumber,word.endColumn);const insert=replace.setEndPosition(position.lineNumber,position.column);const client=yield this._workerManager.withWorker();const data=yield client.textualSuggest(models,word===null||word===void 0?void 0:word.word,wordDefRegExp);if(!data){return void 0}return{duration:data.duration,suggestions:data.words.map((word2=>({kind:18,label:word2,insertText:word2,range:{insert:insert,replace:replace}})))}}))}};WorkerManager=class extends Disposable{constructor(modelService,languageConfigurationService){super();this.languageConfigurationService=languageConfigurationService;this._modelService=modelService;this._editorWorkerClient=null;this._lastWorkerUsedTime=(new Date).getTime();const stopWorkerInterval=this._register(new IntervalTimer);stopWorkerInterval.cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(STOP_WORKER_DELTA_TIME_MS/2));this._register(this._modelService.onModelRemoved((_=>this._checkStopEmptyWorker())))}dispose(){if(this._editorWorkerClient){this._editorWorkerClient.dispose();this._editorWorkerClient=null}super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient){return}const models=this._modelService.getModels();if(models.length===0){this._editorWorkerClient.dispose();this._editorWorkerClient=null}}_checkStopIdleWorker(){if(!this._editorWorkerClient){return}const timeSinceLastWorkerUsedTime=(new Date).getTime()-this._lastWorkerUsedTime;if(timeSinceLastWorkerUsedTime>STOP_WORKER_DELTA_TIME_MS){this._editorWorkerClient.dispose();this._editorWorkerClient=null}}withWorker(){this._lastWorkerUsedTime=(new Date).getTime();if(!this._editorWorkerClient){this._editorWorkerClient=new EditorWorkerClient(this._modelService,false,"editorWorkerService",this.languageConfigurationService)}return Promise.resolve(this._editorWorkerClient)}};EditorModelManager=class extends Disposable{constructor(proxy,modelService,keepIdleModels){super();this._syncedModels=Object.create(null);this._syncedModelsLastUsedTime=Object.create(null);this._proxy=proxy;this._modelService=modelService;if(!keepIdleModels){const timer=new IntervalTimer;timer.cancelAndSet((()=>this._checkStopModelSync()),Math.round(STOP_SYNC_MODEL_DELTA_TIME_MS/2));this._register(timer)}}dispose(){for(const modelUrl in this._syncedModels){dispose(this._syncedModels[modelUrl])}this._syncedModels=Object.create(null);this._syncedModelsLastUsedTime=Object.create(null);super.dispose()}ensureSyncedResources(resources,forceLargeModels){for(const resource of resources){const resourceStr=resource.toString();if(!this._syncedModels[resourceStr]){this._beginModelSync(resource,forceLargeModels)}if(this._syncedModels[resourceStr]){this._syncedModelsLastUsedTime[resourceStr]=(new Date).getTime()}}}_checkStopModelSync(){const currentTime=(new Date).getTime();const toRemove=[];for(const modelUrl in this._syncedModelsLastUsedTime){const elapsedTime=currentTime-this._syncedModelsLastUsedTime[modelUrl];if(elapsedTime>STOP_SYNC_MODEL_DELTA_TIME_MS){toRemove.push(modelUrl)}}for(const e of toRemove){this._stopModelSync(e)}}_beginModelSync(resource,forceLargeModels){const model=this._modelService.getModel(resource);if(!model){return}if(!forceLargeModels&&model.isTooLargeForSyncing()){return}const modelUrl=resource.toString();this._proxy.acceptNewModel({url:model.uri.toString(),lines:model.getLinesContent(),EOL:model.getEOL(),versionId:model.getVersionId()});const toDispose=new DisposableStore;toDispose.add(model.onDidChangeContent((e=>{this._proxy.acceptModelChanged(modelUrl.toString(),e)})));toDispose.add(model.onWillDispose((()=>{this._stopModelSync(modelUrl)})));toDispose.add(toDisposable((()=>{this._proxy.acceptRemovedModel(modelUrl)})));this._syncedModels[modelUrl]=toDispose}_stopModelSync(modelUrl){const toDispose=this._syncedModels[modelUrl];delete this._syncedModels[modelUrl];delete this._syncedModelsLastUsedTime[modelUrl];dispose(toDispose)}};SynchronousWorkerClient=class{constructor(instance){this._instance=instance;this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}};EditorWorkerHost=class{constructor(workerClient){this._workerClient=workerClient}fhr(method,args){return this._workerClient.fhr(method,args)}};EditorWorkerClient=class extends Disposable{constructor(modelService,keepIdleModels,label,languageConfigurationService){super();this.languageConfigurationService=languageConfigurationService;this._disposed=false;this._modelService=modelService;this._keepIdleModels=keepIdleModels;this._workerFactory=new DefaultWorkerFactory(label);this._worker=null;this._modelManager=null}fhr(method,args){throw new Error(`Not implemented!`)}_getOrCreateWorker(){if(!this._worker){try{this._worker=this._register(new SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new EditorWorkerHost(this)))}catch(err){logOnceWebWorkerWarning(err);this._worker=new SynchronousWorkerClient(new EditorSimpleWorker(new EditorWorkerHost(this),null))}}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(err=>{logOnceWebWorkerWarning(err);this._worker=new SynchronousWorkerClient(new EditorSimpleWorker(new EditorWorkerHost(this),null));return this._getOrCreateWorker().getProxyObject()}))}_getOrCreateModelManager(proxy){if(!this._modelManager){this._modelManager=this._register(new EditorModelManager(proxy,this._modelService,this._keepIdleModels))}return this._modelManager}_withSyncedResources(resources,forceLargeModels=false){return __awaiter4(this,void 0,void 0,(function*(){if(this._disposed){return Promise.reject(canceled())}return this._getProxy().then((proxy=>{this._getOrCreateModelManager(proxy).ensureSyncedResources(resources,forceLargeModels);return proxy}))}))}computedUnicodeHighlights(uri,options2,range2){return this._withSyncedResources([uri]).then((proxy=>proxy.computeUnicodeHighlights(uri.toString(),options2,range2)))}computeDiff(original,modified,options2,algorithm){return this._withSyncedResources([original,modified],true).then((proxy=>proxy.computeDiff(original.toString(),modified.toString(),options2,algorithm)))}computeMoreMinimalEdits(resource,edits,pretty){return this._withSyncedResources([resource]).then((proxy=>proxy.computeMoreMinimalEdits(resource.toString(),edits,pretty)))}computeLinks(resource){return this._withSyncedResources([resource]).then((proxy=>proxy.computeLinks(resource.toString())))}computeDefaultDocumentColors(resource){return this._withSyncedResources([resource]).then((proxy=>proxy.computeDefaultDocumentColors(resource.toString())))}textualSuggest(resources,leadingWord,wordDefRegExp){return __awaiter4(this,void 0,void 0,(function*(){const proxy=yield this._withSyncedResources(resources);const wordDef=wordDefRegExp.source;const wordDefFlags=wordDefRegExp.flags;return proxy.textualSuggest(resources.map((r=>r.toString())),leadingWord,wordDef,wordDefFlags)}))}computeWordRanges(resource,range2){return this._withSyncedResources([resource]).then((proxy=>{const model=this._modelService.getModel(resource);if(!model){return Promise.resolve(null)}const wordDefRegExp=this.languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).getWordDefinition();const wordDef=wordDefRegExp.source;const wordDefFlags=wordDefRegExp.flags;return proxy.computeWordRanges(resource.toString(),range2,wordDef,wordDefFlags)}))}navigateValueSet(resource,range2,up){return this._withSyncedResources([resource]).then((proxy=>{const model=this._modelService.getModel(resource);if(!model){return null}const wordDefRegExp=this.languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).getWordDefinition();const wordDef=wordDefRegExp.source;const wordDefFlags=wordDefRegExp.flags;return proxy.navigateValueSet(resource.toString(),range2,up,wordDef,wordDefFlags)}))}dispose(){super.dispose();this._disposed=true}}}});function createWebWorker(modelService,languageConfigurationService,opts){return new MonacoWebWorkerImpl(modelService,languageConfigurationService,opts)}var MonacoWebWorkerImpl;var init_webWorker=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/services/webWorker.js"(){init_objects();init_editorWorkerService();MonacoWebWorkerImpl=class extends EditorWorkerClient{constructor(modelService,languageConfigurationService,opts){super(modelService,opts.keepIdleModels||false,opts.label,languageConfigurationService);this._foreignModuleId=opts.moduleId;this._foreignModuleCreateData=opts.createData||null;this._foreignModuleHost=opts.host||null;this._foreignProxy=null}fhr(method,args){if(!this._foreignModuleHost||typeof this._foreignModuleHost[method]!=="function"){return Promise.reject(new Error("Missing method "+method+" or missing main thread foreign host."))}try{return Promise.resolve(this._foreignModuleHost[method].apply(this._foreignModuleHost,args))}catch(e){return Promise.reject(e)}}_getForeignProxy(){if(!this._foreignProxy){this._foreignProxy=this._getProxy().then((proxy=>{const foreignHostMethods=this._foreignModuleHost?getAllMethodNames(this._foreignModuleHost):[];return proxy.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,foreignHostMethods).then((foreignMethods=>{this._foreignModuleCreateData=null;const proxyMethodRequest=(method,args)=>proxy.fmr(method,args);const createProxyMethod=(method,proxyMethodRequest2)=>function(){const args=Array.prototype.slice.call(arguments,0);return proxyMethodRequest2(method,args)};const foreignProxy={};for(const foreignMethod of foreignMethods){foreignProxy[foreignMethod]=createProxyMethod(foreignMethod,proxyMethodRequest)}return foreignProxy}))}))}return this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(resources){return this._withSyncedResources(resources).then((_=>this.getProxy()))}}}});var TokenMetadata;var init_encodedTokenAttributes=__esm({"node_modules/monaco-editor/esm/vs/editor/common/encodedTokenAttributes.js"(){TokenMetadata=class{static getLanguageId(metadata){return(metadata&255)>>>0}static getTokenType(metadata){return(metadata&768)>>>8}static containsBalancedBrackets(metadata){return(metadata&1024)!==0}static getFontStyle(metadata){return(metadata&30720)>>>11}static getForeground(metadata){return(metadata&16744448)>>>15}static getBackground(metadata){return(metadata&4278190080)>>>24}static getClassNameFromMetadata(metadata){const foreground2=this.getForeground(metadata);let className="mtk"+foreground2;const fontStyle=this.getFontStyle(metadata);if(fontStyle&1){className+=" mtki"}if(fontStyle&2){className+=" mtkb"}if(fontStyle&4){className+=" mtku"}if(fontStyle&8){className+=" mtks"}return className}static getInlineStyleFromMetadata(metadata,colorMap){const foreground2=this.getForeground(metadata);const fontStyle=this.getFontStyle(metadata);let result=`color: ${colorMap[foreground2]};`;if(fontStyle&1){result+="font-style: italic;"}if(fontStyle&2){result+="font-weight: bold;"}let textDecoration="";if(fontStyle&4){textDecoration+=" underline"}if(fontStyle&8){textDecoration+=" line-through"}if(textDecoration){result+=`text-decoration:${textDecoration};`}return result}static getPresentationFromMetadata(metadata){const foreground2=this.getForeground(metadata);const fontStyle=this.getFontStyle(metadata);return{foreground:foreground2,italic:Boolean(fontStyle&1),bold:Boolean(fontStyle&2),underline:Boolean(fontStyle&4),strikethrough:Boolean(fontStyle&8)}}}}});var LineTokens,SliceLineTokens;var init_lineTokens=__esm({"node_modules/monaco-editor/esm/vs/editor/common/tokens/lineTokens.js"(){init_encodedTokenAttributes();LineTokens=class{static createEmpty(lineContent,decoder){const defaultMetadata=LineTokens.defaultTokenMetadata;const tokens=new Uint32Array(2);tokens[0]=lineContent.length;tokens[1]=defaultMetadata;return new LineTokens(tokens,lineContent,decoder)}constructor(tokens,text2,decoder){this._lineTokensBrand=void 0;this._tokens=tokens;this._tokensCount=this._tokens.length>>>1;this._text=text2;this._languageIdCodec=decoder}equals(other){if(other instanceof LineTokens){return this.slicedEquals(other,0,this._tokensCount)}return false}slicedEquals(other,sliceFromTokenIndex,sliceTokenCount){if(this._text!==other._text){return false}if(this._tokensCount!==other._tokensCount){return false}const from=sliceFromTokenIndex<<1;const to=from+(sliceTokenCount<<1);for(let i=from;i0){return this._tokens[tokenIndex-1<<1]}return 0}getMetadata(tokenIndex){const metadata=this._tokens[(tokenIndex<<1)+1];return metadata}getLanguageId(tokenIndex){const metadata=this._tokens[(tokenIndex<<1)+1];const languageId=TokenMetadata.getLanguageId(metadata);return this._languageIdCodec.decodeLanguageId(languageId)}getStandardTokenType(tokenIndex){const metadata=this._tokens[(tokenIndex<<1)+1];return TokenMetadata.getTokenType(metadata)}getForeground(tokenIndex){const metadata=this._tokens[(tokenIndex<<1)+1];return TokenMetadata.getForeground(metadata)}getClassName(tokenIndex){const metadata=this._tokens[(tokenIndex<<1)+1];return TokenMetadata.getClassNameFromMetadata(metadata)}getInlineStyle(tokenIndex,colorMap){const metadata=this._tokens[(tokenIndex<<1)+1];return TokenMetadata.getInlineStyleFromMetadata(metadata,colorMap)}getPresentation(tokenIndex){const metadata=this._tokens[(tokenIndex<<1)+1];return TokenMetadata.getPresentationFromMetadata(metadata)}getEndOffset(tokenIndex){return this._tokens[tokenIndex<<1]}findTokenIndexAtOffset(offset){return LineTokens.findIndexInTokensArray(this._tokens,offset)}inflate(){return this}sliceAndInflate(startOffset,endOffset,deltaOffset){return new SliceLineTokens(this,startOffset,endOffset,deltaOffset)}static convertToEndOffset(tokens,lineTextLength){const tokenCount=tokens.length>>>1;const lastTokenIndex=tokenCount-1;for(let tokenIndex=0;tokenIndex>>1)-1;while(lowdesiredIndex){high=mid}}return low}withInserted(insertTokens){if(insertTokens.length===0){return this}let nextOriginalTokenIdx=0;let nextInsertTokenIdx=0;let text2="";const newTokens=new Array;let originalEndOffset=0;while(true){const nextOriginalTokenEndOffset=nextOriginalTokenIdxoriginalEndOffset){text2+=this._text.substring(originalEndOffset,nextInsertToken.offset);const metadata=this._tokens[(nextOriginalTokenIdx<<1)+1];newTokens.push(text2.length,metadata);originalEndOffset=nextInsertToken.offset}text2+=nextInsertToken.text;newTokens.push(text2.length,nextInsertToken.tokenMetadata);nextInsertTokenIdx++}else{break}}return new LineTokens(new Uint32Array(newTokens),text2,this._languageIdCodec)}};LineTokens.defaultTokenMetadata=(0<<11|1<<15|2<<24)>>>0;SliceLineTokens=class{constructor(source,startOffset,endOffset,deltaOffset){this._source=source;this._startOffset=startOffset;this._endOffset=endOffset;this._deltaOffset=deltaOffset;this._firstTokenIndex=source.findTokenIndexAtOffset(startOffset);this._tokensCount=0;for(let i=this._firstTokenIndex,len=source.getCount();i=endOffset){break}this._tokensCount++}}getMetadata(tokenIndex){return this._source.getMetadata(this._firstTokenIndex+tokenIndex)}getLanguageId(tokenIndex){return this._source.getLanguageId(this._firstTokenIndex+tokenIndex)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(other){if(other instanceof SliceLineTokens){return this._startOffset===other._startOffset&&this._endOffset===other._endOffset&&this._deltaOffset===other._deltaOffset&&this._source.slicedEquals(other._source,this._firstTokenIndex,this._tokensCount)}return false}getCount(){return this._tokensCount}getForeground(tokenIndex){return this._source.getForeground(this._firstTokenIndex+tokenIndex)}getEndOffset(tokenIndex){const tokenEndOffset=this._source.getEndOffset(this._firstTokenIndex+tokenIndex);return Math.min(this._endOffset,tokenEndOffset)-this._startOffset+this._deltaOffset}getClassName(tokenIndex){return this._source.getClassName(this._firstTokenIndex+tokenIndex)}getInlineStyle(tokenIndex,colorMap){return this._source.getInlineStyle(this._firstTokenIndex+tokenIndex,colorMap)}getPresentation(tokenIndex){return this._source.getPresentation(this._firstTokenIndex+tokenIndex)}findTokenIndexAtOffset(offset){return this._source.findTokenIndexAtOffset(offset+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}}});var LineDecoration,DecorationSegment,Stack,LineDecorationsNormalizer;var init_lineDecorations=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewLayout/lineDecorations.js"(){init_strings();LineDecoration=class{constructor(startColumn,endColumn,className,type){this.startColumn=startColumn;this.endColumn=endColumn;this.className=className;this.type=type;this._lineDecorationBrand=void 0}static _equals(a,b){return a.startColumn===b.startColumn&&a.endColumn===b.endColumn&&a.className===b.className&&a.type===b.type}static equalsArr(a,b){const aLen=a.length;const bLen=b.length;if(aLen!==bLen){return false}for(let i=0;i=endColumn){continue}r[rLength++]=new LineDecoration(Math.max(1,dec.startColumn-startColumn+1),Math.min(lineLength+1,dec.endColumn-startColumn+1),dec.className,dec.type)}return r}static filter(lineDecorations,lineNumber,minLineColumn,maxLineColumn){if(lineDecorations.length===0){return[]}const result=[];let resultLen=0;for(let i=0,len=lineDecorations.length;ilineNumber){continue}if(range2.isEmpty()&&(d.type===0||d.type===3)){continue}const startColumn=range2.startLineNumber===lineNumber?range2.startColumn:minLineColumn;const endColumn=range2.endLineNumber===lineNumber?range2.endColumn:maxLineColumn;result[resultLen++]=new LineDecoration(startColumn,endColumn,d.inlineClassName,d.type)}return result}static _typeCompare(a,b){const ORDER=[2,0,1,3];return ORDER[a]-ORDER[b]}static compare(a,b){if(a.startColumn!==b.startColumn){return a.startColumn-b.startColumn}if(a.endColumn!==b.endColumn){return a.endColumn-b.endColumn}const typeCmp=LineDecoration._typeCompare(a.type,b.type);if(typeCmp!==0){return typeCmp}if(a.className!==b.className){return a.className0&&this.stopOffsets[0]0&&nextStartOffset=stopOffset){this.stopOffsets.splice(i,0,stopOffset);this.classNames.splice(i,0,className);this.metadata.splice(i,0,metadata);break}}}this.count++;return}};LineDecorationsNormalizer=class{static normalize(lineContent,lineDecorations){if(lineDecorations.length===0){return[]}const result=[];const stack=new Stack;let nextStartOffset=0;for(let i=0,len=lineDecorations.length;i1){const charCodeBefore=lineContent.charCodeAt(startColumn-2);if(isHighSurrogate(charCodeBefore)){startColumn--}}if(endColumn>1){const charCodeBefore=lineContent.charCodeAt(endColumn-2);if(isHighSurrogate(charCodeBefore)){endColumn--}}const currentStartOffset=startColumn-1;const currentEndOffset=endColumn-2;nextStartOffset=stack.consumeLowerThan(currentStartOffset,nextStartOffset,result);if(stack.count===0){nextStartOffset=currentStartOffset}stack.insert(currentEndOffset,className,metadata)}stack.consumeLowerThan(1073741824,nextStartOffset,result);return result}}}});var LinePart;var init_linePart=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewLayout/linePart.js"(){LinePart=class{constructor(endIndex,type,metadata,containsRTL2){this.endIndex=endIndex;this.type=type;this.metadata=metadata;this.containsRTL=containsRTL2;this._linePartBrand=void 0}isWhitespace(){return this.metadata&1?true:false}isPseudoAfter(){return this.metadata&4?true:false}}}});function renderViewLine(input,sb){if(input.lineContent.length===0){if(input.lineDecorations.length>0){sb.appendString(``);let beforeCount=0;let afterCount=0;let containsForeignElements=0;for(const lineDecoration of input.lineDecorations){if(lineDecoration.type===1||lineDecoration.type===2){sb.appendString(``);if(lineDecoration.type===1){containsForeignElements|=1;beforeCount++}if(lineDecoration.type===2){containsForeignElements|=2;afterCount++}}}sb.appendString(``);const characterMapping=new CharacterMapping(1,beforeCount+afterCount);characterMapping.setColumnInfo(1,beforeCount,0,0);return new RenderLineOutput(characterMapping,false,containsForeignElements)}sb.appendString("");return new RenderLineOutput(new CharacterMapping(0,0),false,0)}return _renderLine(resolveRenderLineInput(input),sb)}function renderViewLine2(input){const sb=new StringBuilder(1e4);const out=renderViewLine(input,sb);return new RenderLineOutput2(out.characterMapping,sb.build(),out.containsRTL,out.containsForeignElements)}function resolveRenderLineInput(input){const lineContent=input.lineContent;let isOverflowing;let overflowingCharCount;let len;if(input.stopRenderingLineAfter!==-1&&input.stopRenderingLineAfter0){for(let i=0,len2=input.lineDecorations.length;i0){result[resultLen++]=new LinePart(fauxIndentLength,"",0,false)}let startOffset=fauxIndentLength;for(let tokenIndex=0,tokensLen=tokens.getCount();tokenIndex=len){const tokenContainsRTL2=lineContainsRTL?containsRTL(lineContent.substring(startOffset,len)):false;result[resultLen++]=new LinePart(len,type,0,tokenContainsRTL2);break}const tokenContainsRTL=lineContainsRTL?containsRTL(lineContent.substring(startOffset,endIndex)):false;result[resultLen++]=new LinePart(endIndex,type,0,tokenContainsRTL);startOffset=endIndex}return result}function splitLargeTokens(lineContent,tokens,onlyAtSpaces){let lastTokenEndIndex=0;const result=[];let resultLen=0;if(onlyAtSpaces){for(let i=0,len=tokens.length;i=50){result[resultLen++]=new LinePart(lastSpaceOffset+1,tokenType,tokenMetadata,tokenContainsRTL);currTokenStart=lastSpaceOffset+1;lastSpaceOffset=-1}}if(currTokenStart!==tokenEndIndex){result[resultLen++]=new LinePart(tokenEndIndex,tokenType,tokenMetadata,tokenContainsRTL)}}else{result[resultLen++]=token}lastTokenEndIndex=tokenEndIndex}}else{for(let i=0,len=tokens.length;i50){const tokenType=token.type;const tokenMetadata=token.metadata;const tokenContainsRTL=token.containsRTL;const piecesCount=Math.ceil(diff/50);for(let j=1;j=8234&&charCode<=8238||charCode>=8294&&charCode<=8297||charCode>=8206&&charCode<=8207||charCode===1564){return true}return false}function extractControlCharacters(lineContent,tokens){const result=[];let lastLinePart=new LinePart(0,"",0,false);let charOffset=0;for(const token of tokens){const tokenEndIndex=token.endIndex;for(;charOffsetlastLinePart.endIndex){lastLinePart=new LinePart(charOffset,token.type,token.metadata,token.containsRTL);result.push(lastLinePart)}lastLinePart=new LinePart(charOffset+1,"mtkcontrol",token.metadata,false);result.push(lastLinePart)}}if(charOffset>lastLinePart.endIndex){lastLinePart=new LinePart(tokenEndIndex,token.type,token.metadata,token.containsRTL);result.push(lastLinePart)}}return result}function _applyRenderWhitespace(input,lineContent,len,tokens){const continuesWithWrappedLine=input.continuesWithWrappedLine;const fauxIndentLength=input.fauxIndentLength;const tabSize=input.tabSize;const startVisibleColumn=input.startVisibleColumn;const useMonospaceOptimizations=input.useMonospaceOptimizations;const selections=input.selectionsOnLine;const onlyBoundary=input.renderWhitespace===1;const onlyTrailing=input.renderWhitespace===3;const generateLinePartForEachWhitespace=input.renderSpaceWidth!==input.spaceWidth;const result=[];let resultLen=0;let tokenIndex=0;let tokenType=tokens[tokenIndex].type;let tokenContainsRTL=tokens[tokenIndex].containsRTL;let tokenEndIndex=tokens[tokenIndex].endIndex;const tokensLength=tokens.length;let lineIsEmptyOrWhitespace=false;let firstNonWhitespaceIndex2=firstNonWhitespaceIndex(lineContent);let lastNonWhitespaceIndex2;if(firstNonWhitespaceIndex2===-1){lineIsEmptyOrWhitespace=true;firstNonWhitespaceIndex2=len;lastNonWhitespaceIndex2=len}else{lastNonWhitespaceIndex2=lastNonWhitespaceIndex(lineContent)}let wasInWhitespace=false;let currentSelectionIndex=0;let currentSelection=selections&&selections[currentSelectionIndex];let tmpIndent=startVisibleColumn%tabSize;for(let charIndex=fauxIndentLength;charIndex=currentSelection.endOffset){currentSelectionIndex++;currentSelection=selections&&selections[currentSelectionIndex]}let isInWhitespace;if(charIndexlastNonWhitespaceIndex2){isInWhitespace=true}else if(chCode===9){isInWhitespace=true}else if(chCode===32){if(onlyBoundary){if(wasInWhitespace){isInWhitespace=true}else{const nextChCode=charIndex+1charIndex}if(isInWhitespace&&onlyTrailing){isInWhitespace=lineIsEmptyOrWhitespace||charIndex>lastNonWhitespaceIndex2}if(isInWhitespace&&tokenContainsRTL){if(charIndex>=firstNonWhitespaceIndex2&&charIndex<=lastNonWhitespaceIndex2){isInWhitespace=false}}if(wasInWhitespace){if(!isInWhitespace||!useMonospaceOptimizations&&tmpIndent>=tabSize){if(generateLinePartForEachWhitespace){const lastEndIndex=resultLen>0?result[resultLen-1].endIndex:fauxIndentLength;for(let i=lastEndIndex+1;i<=charIndex;i++){result[resultLen++]=new LinePart(i,"mtkw",1,false)}}else{result[resultLen++]=new LinePart(charIndex,"mtkw",1,false)}tmpIndent=tmpIndent%tabSize}}else{if(charIndex===tokenEndIndex||isInWhitespace&&charIndex>fauxIndentLength){result[resultLen++]=new LinePart(charIndex,tokenType,0,tokenContainsRTL);tmpIndent=tmpIndent%tabSize}}if(chCode===9){tmpIndent=tabSize}else if(isFullWidthCharacter(chCode)){tmpIndent+=2}else{tmpIndent++}wasInWhitespace=isInWhitespace;while(charIndex===tokenEndIndex){tokenIndex++;if(tokenIndex0?lineContent.charCodeAt(len-1):0;const prevCharCode=len>1?lineContent.charCodeAt(len-2):0;const isSingleTrailingSpace=lastCharCode===32&&(prevCharCode!==32&&prevCharCode!==9);if(!isSingleTrailingSpace){generateWhitespace=true}}else{generateWhitespace=true}}if(generateWhitespace){if(generateLinePartForEachWhitespace){const lastEndIndex=resultLen>0?result[resultLen-1].endIndex:fauxIndentLength;for(let i=lastEndIndex+1;i<=len;i++){result[resultLen++]=new LinePart(i,"mtkw",1,false)}}else{result[resultLen++]=new LinePart(len,"mtkw",1,false)}}else{result[resultLen++]=new LinePart(len,tokenType,0,tokenContainsRTL)}return result}function _applyInlineDecorations(lineContent,len,tokens,_lineDecorations){_lineDecorations.sort(LineDecoration.compare);const lineDecorations=LineDecorationsNormalizer.normalize(lineContent,_lineDecorations);const lineDecorationsLen=lineDecorations.length;let lineDecorationIndex=0;const result=[];let resultLen=0;let lastResultEndIndex=0;for(let tokenIndex=0,len2=tokens.length;tokenIndexlastResultEndIndex){lastResultEndIndex=lineDecoration.startOffset;result[resultLen++]=new LinePart(lastResultEndIndex,tokenType,tokenMetadata,tokenContainsRTL)}if(lineDecoration.endOffset+1<=tokenEndIndex){lastResultEndIndex=lineDecoration.endOffset+1;result[resultLen++]=new LinePart(lastResultEndIndex,tokenType+" "+lineDecoration.className,tokenMetadata|lineDecoration.metadata,tokenContainsRTL);lineDecorationIndex++}else{lastResultEndIndex=tokenEndIndex;result[resultLen++]=new LinePart(lastResultEndIndex,tokenType+" "+lineDecoration.className,tokenMetadata|lineDecoration.metadata,tokenContainsRTL);break}}if(tokenEndIndex>lastResultEndIndex){lastResultEndIndex=tokenEndIndex;result[resultLen++]=new LinePart(lastResultEndIndex,tokenType,tokenMetadata,tokenContainsRTL)}}const lastTokenEndIndex=tokens[tokens.length-1].endIndex;if(lineDecorationIndex')}else{sb.appendString("")}for(let partIndex=0,tokensLen=parts.length;partIndex=fauxIndentLength){_visibleColumn+=charWidth}}}if(partRendersWhitespaceWithWidth){sb.appendString(' style="width:');sb.appendString(String(spaceWidth*partWidth));sb.appendString('px"')}sb.appendASCIICharCode(62);for(;charIndex1){sb.appendCharCode(8594)}else{sb.appendCharCode(65515)}for(let space=2;space<=charWidth;space++){sb.appendCharCode(160)}}else{producedCharacters=2;charWidth=1;sb.appendCharCode(renderSpaceCharCode);sb.appendCharCode(8204)}charOffsetInPart+=producedCharacters;charHorizontalOffset+=charWidth;if(charIndex>=fauxIndentLength){visibleColumn+=charWidth}}}else{sb.appendASCIICharCode(62);for(;charIndex=fauxIndentLength){visibleColumn+=charWidth}}}if(partIsEmptyAndHasPseudoAfter){partDisplacement++}else{partDisplacement=0}if(charIndex>=len&&!lastCharacterMappingDefined&&part.isPseudoAfter()){lastCharacterMappingDefined=true;characterMapping.setColumnInfo(charIndex+1,partIndex,charOffsetInPart,charHorizontalOffset)}sb.appendString("")}if(!lastCharacterMappingDefined){characterMapping.setColumnInfo(len+1,parts.length-1,charOffsetInPart,charHorizontalOffset)}if(isOverflowing){sb.appendString('');sb.appendString(localize("showMore","Show more ({0})",renderOverflowingCharCount(overflowingCharCount)));sb.appendString("")}sb.appendString("");return new RenderLineOutput(characterMapping,containsRTL2,containsForeignElements)}function to4CharHex(n){return n.toString(16).toUpperCase().padStart(4,"0")}function renderOverflowingCharCount(n){if(n<1024){return localize("overflow.chars","{0} chars",n)}if(n<1024*1024){return`${(n/1024).toFixed(1)} KB`}return`${(n/1024/1024).toFixed(1)} MB`}var LineRange2,RenderLineInput,DomPosition,CharacterMapping,RenderLineOutput,RenderLineOutput2,ResolvedRenderLineInput;var init_viewLineRenderer=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLineRenderer.js"(){init_nls();init_strings();init_stringBuilder();init_lineDecorations();init_linePart();LineRange2=class{constructor(startIndex,endIndex){this.startOffset=startIndex;this.endOffset=endIndex}equals(otherLineRange){return this.startOffset===otherLineRange.startOffset&&this.endOffset===otherLineRange.endOffset}};RenderLineInput=class{constructor(useMonospaceOptimizations,canUseHalfwidthRightwardsArrow,lineContent,continuesWithWrappedLine,isBasicASCII2,containsRTL2,fauxIndentLength,lineTokens,lineDecorations,tabSize,startVisibleColumn,spaceWidth,middotWidth,wsmiddotWidth,stopRenderingLineAfter,renderWhitespace,renderControlCharacters,fontLigatures,selectionsOnLine){this.useMonospaceOptimizations=useMonospaceOptimizations;this.canUseHalfwidthRightwardsArrow=canUseHalfwidthRightwardsArrow;this.lineContent=lineContent;this.continuesWithWrappedLine=continuesWithWrappedLine;this.isBasicASCII=isBasicASCII2;this.containsRTL=containsRTL2;this.fauxIndentLength=fauxIndentLength;this.lineTokens=lineTokens;this.lineDecorations=lineDecorations.sort(LineDecoration.compare);this.tabSize=tabSize;this.startVisibleColumn=startVisibleColumn;this.spaceWidth=spaceWidth;this.stopRenderingLineAfter=stopRenderingLineAfter;this.renderWhitespace=renderWhitespace==="all"?4:renderWhitespace==="boundary"?1:renderWhitespace==="selection"?2:renderWhitespace==="trailing"?3:0;this.renderControlCharacters=renderControlCharacters;this.fontLigatures=fontLigatures;this.selectionsOnLine=selectionsOnLine&&selectionsOnLine.sort(((a,b)=>a.startOffset>>16}static getCharIndex(partData){return(partData&65535)>>>0}constructor(length2,partCount){this.length=length2;this._data=new Uint32Array(this.length);this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(column,partIndex,charIndex,horizontalOffset){const partData=(partIndex<<16|charIndex<<0)>>>0;this._data[column-1]=partData;this._horizontalOffset[column-1]=horizontalOffset}getHorizontalOffset(column){if(this._horizontalOffset.length===0){return 0}return this._horizontalOffset[column-1]}charOffsetToPartData(charOffset){if(this.length===0){return 0}if(charOffset<0){return this._data[0]}if(charOffset>=this.length){return this._data[this.length-1]}return this._data[charOffset]}getDomPosition(column){const partData=this.charOffsetToPartData(column-1);const partIndex=CharacterMapping.getPartIndex(partData);const charIndex=CharacterMapping.getCharIndex(partData);return new DomPosition(partIndex,charIndex)}getColumn(domPosition,partLength){const charOffset=this.partDataToCharOffset(domPosition.partIndex,partLength,domPosition.charIndex);return charOffset+1}partDataToCharOffset(partIndex,partLength,charIndex){if(this.length===0){return 0}const searchEntry=(partIndex<<16|charIndex<<0)>>>0;let min=0;let max=this.length-1;while(min+1>>1;const midEntry=this._data[mid];if(midEntry===searchEntry){return mid}else if(midEntry>searchEntry){max=mid}else{min=mid}}if(min===max){return min}const minEntry=this._data[min];const maxEntry=this._data[max];if(minEntry===searchEntry){return min}if(maxEntry===searchEntry){return max}const minPartIndex=CharacterMapping.getPartIndex(minEntry);const minCharIndex=CharacterMapping.getCharIndex(minEntry);const maxPartIndex=CharacterMapping.getPartIndex(maxEntry);let maxCharIndex;if(minPartIndex!==maxPartIndex){maxCharIndex=partLength}else{maxCharIndex=CharacterMapping.getCharIndex(maxEntry)}const minEntryDistance=charIndex-minCharIndex;const maxEntryDistance=maxCharIndex-charIndex;if(minEntryDistance<=maxEntryDistance){return min}return max}};RenderLineOutput=class{constructor(characterMapping,containsRTL2,containsForeignElements){this._renderLineOutputBrand=void 0;this.characterMapping=characterMapping;this.containsRTL=containsRTL2;this.containsForeignElements=containsForeignElements}};RenderLineOutput2=class{constructor(characterMapping,html2,containsRTL2,containsForeignElements){this.characterMapping=characterMapping;this.html=html2;this.containsRTL=containsRTL2;this.containsForeignElements=containsForeignElements}};ResolvedRenderLineInput=class{constructor(fontIsMonospace,canUseHalfwidthRightwardsArrow,lineContent,len,isOverflowing,overflowingCharCount,parts,containsForeignElements,fauxIndentLength,tabSize,startVisibleColumn,containsRTL2,spaceWidth,renderSpaceCharCode,renderWhitespace,renderControlCharacters){this.fontIsMonospace=fontIsMonospace;this.canUseHalfwidthRightwardsArrow=canUseHalfwidthRightwardsArrow;this.lineContent=lineContent;this.len=len;this.isOverflowing=isOverflowing;this.overflowingCharCount=overflowingCharCount;this.parts=parts;this.containsForeignElements=containsForeignElements;this.fauxIndentLength=fauxIndentLength;this.tabSize=tabSize;this.startVisibleColumn=startVisibleColumn;this.containsRTL=containsRTL2;this.spaceWidth=spaceWidth;this.renderSpaceCharCode=renderSpaceCharCode;this.renderWhitespace=renderWhitespace;this.renderControlCharacters=renderControlCharacters}}}});var Viewport,MinimapLinesRenderingData,ViewLineData,ViewLineRenderingData,InlineDecoration,SingleLineInlineDecoration,ViewModelDecoration,OverviewRulerDecorationsGroup;var init_viewModel=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewModel.js"(){init_strings();init_range();Viewport=class{constructor(top,left,width,height){this._viewportBrand=void 0;this.top=top|0;this.left=left|0;this.width=width|0;this.height=height|0}};MinimapLinesRenderingData=class{constructor(tabSize,data){this.tabSize=tabSize;this.data=data}};ViewLineData=class{constructor(content,continuesWithWrappedLine,minColumn,maxColumn,startVisibleColumn,tokens,inlineDecorations){this._viewLineDataBrand=void 0;this.content=content;this.continuesWithWrappedLine=continuesWithWrappedLine;this.minColumn=minColumn;this.maxColumn=maxColumn;this.startVisibleColumn=startVisibleColumn;this.tokens=tokens;this.inlineDecorations=inlineDecorations}};ViewLineRenderingData=class{constructor(minColumn,maxColumn,content,continuesWithWrappedLine,mightContainRTL,mightContainNonBasicASCII,tokens,inlineDecorations,tabSize,startVisibleColumn){this.minColumn=minColumn;this.maxColumn=maxColumn;this.content=content;this.continuesWithWrappedLine=continuesWithWrappedLine;this.isBasicASCII=ViewLineRenderingData.isBasicASCII(content,mightContainNonBasicASCII);this.containsRTL=ViewLineRenderingData.containsRTL(content,this.isBasicASCII,mightContainRTL);this.tokens=tokens;this.inlineDecorations=inlineDecorations;this.tabSize=tabSize;this.startVisibleColumn=startVisibleColumn}static isBasicASCII(lineContent,mightContainNonBasicASCII){if(mightContainNonBasicASCII){return isBasicASCII(lineContent)}return true}static containsRTL(lineContent,isBasicASCII2,mightContainRTL){if(!isBasicASCII2&&mightContainRTL){return containsRTL(lineContent)}return false}};InlineDecoration=class{constructor(range2,inlineClassName,type){this.range=range2;this.inlineClassName=inlineClassName;this.type=type}};SingleLineInlineDecoration=class{constructor(startOffset,endOffset,inlineClassName,inlineClassNameAffectsLetterSpacing){this.startOffset=startOffset;this.endOffset=endOffset;this.inlineClassName=inlineClassName;this.inlineClassNameAffectsLetterSpacing=inlineClassNameAffectsLetterSpacing}toInlineDecoration(lineNumber){return new InlineDecoration(new Range(lineNumber,this.startOffset+1,lineNumber,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}};ViewModelDecoration=class{constructor(range2,options2){this._viewModelDecorationBrand=void 0;this.range=range2;this.options=options2}};OverviewRulerDecorationsGroup=class{constructor(color,zIndex,data){this.color=color;this.zIndex=zIndex;this.data=data}static cmp(a,b){if(a.zIndex===b.zIndex){if(a.colorb.color){return 1}return 0}return a.zIndex-b.zIndex}}}});function isFuzzyActionArr(what){return Array.isArray(what)}function isFuzzyAction(what){return!isFuzzyActionArr(what)}function isString2(what){return typeof what==="string"}function isIAction(what){return!isString2(what)}function empty(s){return s?false:true}function fixCase(lexer2,str){return lexer2.ignoreCase&&str?str.toLowerCase():str}function sanitize(s){return s.replace(/[&<>'"_]/g,"-")}function log(lexer2,msg){console.log(`${lexer2.languageId}: ${msg}`)}function createError(lexer2,msg){return new Error(`${lexer2.languageId}: ${msg}`)}function substituteMatches(lexer2,str,id,matches,state){const re=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let stateMatches=null;return str.replace(re,(function(full,sub,dollar,hash2,n,s,attr,ofs,total){if(!empty(dollar)){return"$"}if(!empty(hash2)){return fixCase(lexer2,id)}if(!empty(n)&&n0){const rules=lexer2.tokenizer[state];if(rules){return rules}const idx=state.lastIndexOf(".");if(idx<0){state=null}else{state=state.substr(0,idx)}}return null}function stateExists(lexer2,inState){let state=inState;while(state&&state.length>0){const exist=lexer2.stateNames[state];if(exist){return true}const idx=state.lastIndexOf(".");if(idx<0){state=null}else{state=state.substr(0,idx)}}return false}var init_monarchCommon=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCommon.js"(){}});function findBracket(lexer2,matched){if(!matched){return null}matched=fixCase(lexer2,matched);const brackets=lexer2.brackets;for(const bracket of brackets){if(bracket.open===matched){return{token:bracket.token,bracketType:1}}else if(bracket.close===matched){return{token:bracket.token,bracketType:-1}}}return null}var __decorate4,__param4,MonarchTokenizer_1,CACHE_STACK_DEPTH,MonarchStackElementFactory,MonarchStackElement,EmbeddedLanguageData,MonarchLineStateFactory,MonarchLineState,MonarchClassicTokensCollector,MonarchModernTokensCollector,MonarchTokenizer;var init_monarchLexer=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchLexer.js"(){init_languages();init_nullTokenize();init_monarchCommon();init_configuration();__decorate4=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param4=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};CACHE_STACK_DEPTH=5;MonarchStackElementFactory=class{static create(parent,state){return this._INSTANCE.create(parent,state)}constructor(maxCacheDepth){this._maxCacheDepth=maxCacheDepth;this._entries=Object.create(null)}create(parent,state){if(parent!==null&&parent.depth>=this._maxCacheDepth){return new MonarchStackElement(parent,state)}let stackElementId=MonarchStackElement.getStackElementId(parent);if(stackElementId.length>0){stackElementId+="|"}stackElementId+=state;let result=this._entries[stackElementId];if(result){return result}result=new MonarchStackElement(parent,state);this._entries[stackElementId]=result;return result}};MonarchStackElementFactory._INSTANCE=new MonarchStackElementFactory(CACHE_STACK_DEPTH);MonarchStackElement=class{constructor(parent,state){this.parent=parent;this.state=state;this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(element){let result="";while(element!==null){if(result.length>0){result+="|"}result+=element.state;element=element.parent}return result}static _equals(a,b){while(a!==null&&b!==null){if(a===b){return true}if(a.state!==b.state){return false}a=a.parent;b=b.parent}if(a===null&&b===null){return true}return false}equals(other){return MonarchStackElement._equals(this,other)}push(state){return MonarchStackElementFactory.create(this,state)}pop(){return this.parent}popall(){let result=this;while(result.parent){result=result.parent}return result}switchTo(state){return MonarchStackElementFactory.create(this.parent,state)}};EmbeddedLanguageData=class{constructor(languageId,state){this.languageId=languageId;this.state=state}equals(other){return this.languageId===other.languageId&&this.state.equals(other.state)}clone(){const stateClone=this.state.clone();if(stateClone===this.state){return this}return new EmbeddedLanguageData(this.languageId,this.state)}};MonarchLineStateFactory=class{static create(stack,embeddedLanguageData){return this._INSTANCE.create(stack,embeddedLanguageData)}constructor(maxCacheDepth){this._maxCacheDepth=maxCacheDepth;this._entries=Object.create(null)}create(stack,embeddedLanguageData){if(embeddedLanguageData!==null){return new MonarchLineState(stack,embeddedLanguageData)}if(stack!==null&&stack.depth>=this._maxCacheDepth){return new MonarchLineState(stack,embeddedLanguageData)}const stackElementId=MonarchStackElement.getStackElementId(stack);let result=this._entries[stackElementId];if(result){return result}result=new MonarchLineState(stack,null);this._entries[stackElementId]=result;return result}};MonarchLineStateFactory._INSTANCE=new MonarchLineStateFactory(CACHE_STACK_DEPTH);MonarchLineState=class{constructor(stack,embeddedLanguageData){this.stack=stack;this.embeddedLanguageData=embeddedLanguageData}clone(){const embeddedlanguageDataClone=this.embeddedLanguageData?this.embeddedLanguageData.clone():null;if(embeddedlanguageDataClone===this.embeddedLanguageData){return this}return MonarchLineStateFactory.create(this.stack,this.embeddedLanguageData)}equals(other){if(!(other instanceof MonarchLineState)){return false}if(!this.stack.equals(other.stack)){return false}if(this.embeddedLanguageData===null&&other.embeddedLanguageData===null){return true}if(this.embeddedLanguageData===null||other.embeddedLanguageData===null){return false}return this.embeddedLanguageData.equals(other.embeddedLanguageData)}};MonarchClassicTokensCollector=class{constructor(){this._tokens=[];this._languageId=null;this._lastTokenType=null;this._lastTokenLanguage=null}enterLanguage(languageId){this._languageId=languageId}emit(startOffset,type){if(this._lastTokenType===type&&this._lastTokenLanguage===this._languageId){return}this._lastTokenType=type;this._lastTokenLanguage=this._languageId;this._tokens.push(new Token(startOffset,type,this._languageId))}nestedLanguageTokenize(embeddedLanguageLine,hasEOL,embeddedLanguageData,offsetDelta){const nestedLanguageId=embeddedLanguageData.languageId;const embeddedModeState=embeddedLanguageData.state;const nestedLanguageTokenizationSupport=TokenizationRegistry2.get(nestedLanguageId);if(!nestedLanguageTokenizationSupport){this.enterLanguage(nestedLanguageId);this.emit(offsetDelta,"");return embeddedModeState}const nestedResult=nestedLanguageTokenizationSupport.tokenize(embeddedLanguageLine,hasEOL,embeddedModeState);if(offsetDelta!==0){for(const token of nestedResult.tokens){this._tokens.push(new Token(token.offset+offsetDelta,token.type,token.language))}}else{this._tokens=this._tokens.concat(nestedResult.tokens)}this._lastTokenType=null;this._lastTokenLanguage=null;this._languageId=null;return nestedResult.endState}finalize(endState){return new TokenizationResult(this._tokens,endState)}};MonarchModernTokensCollector=class{constructor(languageService,theme){this._languageService=languageService;this._theme=theme;this._prependTokens=null;this._tokens=[];this._currentLanguageId=0;this._lastTokenMetadata=0}enterLanguage(languageId){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(languageId)}emit(startOffset,type){const metadata=this._theme.match(this._currentLanguageId,type)|1024;if(this._lastTokenMetadata===metadata){return}this._lastTokenMetadata=metadata;this._tokens.push(startOffset);this._tokens.push(metadata)}static _merge(a,b,c){const aLen=a!==null?a.length:0;const bLen=b.length;const cLen=c!==null?c.length:0;if(aLen===0&&bLen===0&&cLen===0){return new Uint32Array(0)}if(aLen===0&&bLen===0){return c}if(bLen===0&&cLen===0){return a}const result=new Uint32Array(aLen+bLen+cLen);if(a!==null){result.set(a)}for(let i=0;i{if(emitting){return}let isOneOfMyEmbeddedModes=false;for(let i=0,len=e.changedLanguages.length;i{if(e.affectsConfiguration("editor.maxTokenizationLineLength")){this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId})}}))}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){const promises=[];for(const nestedLanguageId in this._embeddedLanguages){const tokenizationSupport=TokenizationRegistry2.get(nestedLanguageId);if(tokenizationSupport){if(tokenizationSupport instanceof MonarchTokenizer_1){const nestedModeStatus=tokenizationSupport.getLoadStatus();if(nestedModeStatus.loaded===false){promises.push(nestedModeStatus.promise)}}continue}if(!TokenizationRegistry2.isResolved(nestedLanguageId)){promises.push(TokenizationRegistry2.getOrCreate(nestedLanguageId))}}if(promises.length===0){return{loaded:true}}return{loaded:false,promise:Promise.all(promises).then((_=>void 0))}}getInitialState(){const rootState=MonarchStackElementFactory.create(null,this._lexer.start);return MonarchLineStateFactory.create(rootState,null)}tokenize(line,hasEOL,lineState){if(line.length>=this._maxTokenizationLineLength){return nullTokenize(this._languageId,lineState)}const tokensCollector=new MonarchClassicTokensCollector;const endLineState=this._tokenize(line,hasEOL,lineState,tokensCollector);return tokensCollector.finalize(endLineState)}tokenizeEncoded(line,hasEOL,lineState){if(line.length>=this._maxTokenizationLineLength){return nullTokenizeEncoded(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),lineState)}const tokensCollector=new MonarchModernTokensCollector(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme);const endLineState=this._tokenize(line,hasEOL,lineState,tokensCollector);return tokensCollector.finalize(endLineState)}_tokenize(line,hasEOL,lineState,collector){if(lineState.embeddedLanguageData){return this._nestedTokenize(line,hasEOL,lineState,0,collector)}else{return this._myTokenize(line,hasEOL,lineState,0,collector)}}_findLeavingNestedLanguageOffset(line,state){let rules=this._lexer.tokenizer[state.stack.state];if(!rules){rules=findRules(this._lexer,state.stack.state);if(!rules){throw createError(this._lexer,"tokenizer state is not defined: "+state.stack.state)}}let popOffset=-1;let hasEmbeddedPopRule=false;for(const rule of rules){if(!isIAction(rule.action)||rule.action.nextEmbedded!=="@pop"){continue}hasEmbeddedPopRule=true;let regex=rule.regex;const regexSource=rule.regex.source;if(regexSource.substr(0,4)==="^(?:"&®exSource.substr(regexSource.length-1,1)===")"){const flags=(regex.ignoreCase?"i":"")+(regex.unicode?"u":"");regex=new RegExp(regexSource.substr(4,regexSource.length-5),flags)}const result=line.search(regex);if(result===-1||result!==0&&rule.matchOnlyAtLineStart){continue}if(popOffset===-1||result0){tokensCollector.nestedLanguageTokenize(nestedLanguageLine,false,lineState.embeddedLanguageData,offsetDelta)}const restOfTheLine=line.substring(popOffset);return this._myTokenize(restOfTheLine,hasEOL,lineState,offsetDelta+popOffset,tokensCollector)}_safeRuleName(rule){if(rule){return rule.name}return"(unknown)"}_myTokenize(lineWithoutLF,hasEOL,lineState,offsetDelta,tokensCollector){tokensCollector.enterLanguage(this._languageId);const lineWithoutLFLength=lineWithoutLF.length;const line=hasEOL&&this._lexer.includeLF?lineWithoutLF+"\n":lineWithoutLF;const lineLength=line.length;let embeddedLanguageData=lineState.embeddedLanguageData;let stack=lineState.stack;let pos=0;let groupMatching=null;let forceEvaluation=true;while(forceEvaluation||pos=lineLength){break}forceEvaluation=false;let rules=this._lexer.tokenizer[state];if(!rules){rules=findRules(this._lexer,state);if(!rules){throw createError(this._lexer,"tokenizer state is not defined: "+state)}}const restOfLine=line.substr(pos);for(const rule2 of rules){if(pos===0||!rule2.matchOnlyAtLineStart){matches=restOfLine.match(rule2.regex);if(matches){matched=matches[0];action=rule2.action;break}}}}if(!matches){matches=[""];matched=""}if(!action){if(pos=this._lexer.maxStack){throw createError(this._lexer,"maximum tokenizer stack size reached: ["+stack.state+","+stack.parent.state+",...]")}else{stack=stack.push(state)}}else if(action.next==="@pop"){if(stack.depth<=1){throw createError(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(rule))}else{stack=stack.pop()}}else if(action.next==="@popall"){stack=stack.popall()}else{let nextState=substituteMatches(this._lexer,action.next,matched,matches,state);if(nextState[0]==="@"){nextState=nextState.substr(1)}if(!findRules(this._lexer,nextState)){throw createError(this._lexer,"trying to set a next state '"+nextState+"' that is undefined in rule: "+this._safeRuleName(rule))}else{stack=stack.push(nextState)}}}if(action.log&&typeof action.log==="string"){log(this._lexer,this._lexer.languageId+": "+substituteMatches(this._lexer,action.log,matched,matches,state))}}if(result===null){throw createError(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(rule))}const computeNewStateForEmbeddedLanguage=enteringEmbeddedLanguage2=>{const languageId=this._languageService.getLanguageIdByLanguageName(enteringEmbeddedLanguage2)||this._languageService.getLanguageIdByMimeType(enteringEmbeddedLanguage2)||enteringEmbeddedLanguage2;const embeddedLanguageData2=this._getNestedEmbeddedLanguageData(languageId);if(pos0){throw createError(this._lexer,"groups cannot be nested: "+this._safeRuleName(rule))}if(matches.length!==result.length+1){throw createError(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(rule))}let totalLen=0;for(let i=1;i{const execute=()=>{const result=_actualColorize(lines,tabSize,tokenizationSupport,languageIdCodec);if(tokenizationSupport instanceof MonarchTokenizer){const status2=tokenizationSupport.getLoadStatus();if(status2.loaded===false){status2.promise.then(execute,e);return}}c(result)};execute()}))}function _fakeColorize(lines,tabSize,languageIdCodec){let html2=[];const defaultMetadata=(0<<11|1<<15|2<<24)>>>0;const tokens=new Uint32Array(2);tokens[0]=0;tokens[1]=defaultMetadata;for(let i=0,length2=lines.length;i")}return html2.join("")}function _actualColorize(lines,tabSize,tokenizationSupport,languageIdCodec){let html2=[];let state=tokenizationSupport.getInitialState();for(let i=0,length2=lines.length;i");state=tokenizeResult.endState}return html2.join("")}var __awaiter5,ttPolicy2,Colorizer;var init_colorizer=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/browser/colorizer.js"(){init_trustedTypes();init_strings();init_languages();init_lineTokens();init_viewLineRenderer();init_viewModel();init_monarchLexer();__awaiter5=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};ttPolicy2=createTrustedTypesPolicy("standaloneColorizer",{createHTML:value=>value});Colorizer=class{static colorizeElement(themeService,languageService,domNode,options2){options2=options2||{};const theme=options2.theme||"vs";const mimeType=options2.mimeType||domNode.getAttribute("lang")||domNode.getAttribute("data-lang");if(!mimeType){console.error("Mode not detected");return Promise.resolve()}const languageId=languageService.getLanguageIdByMimeType(mimeType)||mimeType;themeService.setTheme(theme);const text2=domNode.firstChild?domNode.firstChild.nodeValue:"";domNode.className+=" "+theme;const render=str=>{var _a6;const trustedhtml=(_a6=ttPolicy2===null||ttPolicy2===void 0?void 0:ttPolicy2.createHTML(str))!==null&&_a6!==void 0?_a6:str;domNode.innerHTML=trustedhtml};return this.colorize(languageService,text2||"",languageId,options2).then(render,(err=>console.error(err)))}static colorize(languageService,text2,languageId,options2){return __awaiter5(this,void 0,void 0,(function*(){const languageIdCodec=languageService.languageIdCodec;let tabSize=4;if(options2&&typeof options2.tabSize==="number"){tabSize=options2.tabSize}if(startsWithUTF8BOM(text2)){text2=text2.substr(1)}const lines=splitLines(text2);if(!languageService.isRegisteredLanguageId(languageId)){return _fakeColorize(lines,tabSize,languageIdCodec)}const tokenizationSupport=yield TokenizationRegistry2.getOrCreate(languageId);if(tokenizationSupport){return _colorize(lines,tabSize,tokenizationSupport,languageIdCodec)}return _fakeColorize(lines,tabSize,languageIdCodec)}))}static colorizeLine(line,mightContainNonBasicASCII,mightContainRTL,tokens,tabSize=4){const isBasicASCII2=ViewLineRenderingData.isBasicASCII(line,mightContainNonBasicASCII);const containsRTL2=ViewLineRenderingData.containsRTL(line,isBasicASCII2,mightContainRTL);const renderResult=renderViewLine2(new RenderLineInput(false,true,line,false,isBasicASCII2,containsRTL2,0,tokens,[],tabSize,0,0,0,0,-1,"none",false,false,null));return renderResult.html}static colorizeModelLine(model,lineNumber,tabSize=4){const content=model.getLineContent(lineNumber);model.tokenization.forceTokenization(lineNumber);const tokens=model.tokenization.getLineTokens(lineNumber);const inflatedTokens=tokens.inflate();return this.colorizeLine(content,model.mightContainNonBasicASCII(),model.mightContainRTL(),inflatedTokens,tabSize)}}}});var BrowserFeatures;var init_canIUse=__esm({"node_modules/monaco-editor/esm/vs/base/browser/canIUse.js"(){init_browser();init_platform();BrowserFeatures={clipboard:{writeText:isNative||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:isNative||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>{if(isNative||isStandalone()){return 0}if(navigator.keyboard||isSafari2){return 1}return 2})(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}}});function decodeKeybinding(keybinding,OS2){if(typeof keybinding==="number"){if(keybinding===0){return null}const firstChord=(keybinding&65535)>>>0;const secondChord=(keybinding&4294901760)>>>16;if(secondChord!==0){return new Keybinding([createSimpleKeybinding(firstChord,OS2),createSimpleKeybinding(secondChord,OS2)])}return new Keybinding([createSimpleKeybinding(firstChord,OS2)])}else{const chords=[];for(let i=0;i1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}return apply(func,thisArg,args)}}function unconstruct(func){return function(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2]}return construct(func,args)}}function addToSet(set,array2,transformCaseFunc){var _transformCaseFunc;transformCaseFunc=(_transformCaseFunc=transformCaseFunc)!==null&&_transformCaseFunc!==void 0?_transformCaseFunc:stringToLowerCase;if(setPrototypeOf){setPrototypeOf(set,null)}let l=array2.length;while(l--){let element=array2[l];if(typeof element==="string"){const lcElement=transformCaseFunc(element);if(lcElement!==element){if(!isFrozen(array2)){array2[l]=lcElement}element=lcElement}}set[element]=true}return set}function clone(object){const newObject=create(null);for(const[property,value]of entries(object)){newObject[property]=value}return newObject}function lookupGetter(object,prop){while(object!==null){const desc=getOwnPropertyDescriptor(object,prop);if(desc){if(desc.get){return unapply(desc.get)}if(typeof desc.value==="function"){return unapply(desc.value)}}object=getPrototypeOf(object)}function fallbackValue(element){console.warn("fallback value for",element);return null}return fallbackValue}function createDOMPurify(){let window2=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal();const DOMPurify=root=>createDOMPurify(root);DOMPurify.version="3.0.5";DOMPurify.removed=[];if(!window2||!window2.document||window2.document.nodeType!==9){DOMPurify.isSupported=false;return DOMPurify}const originalDocument=window2.document;const currentScript=originalDocument.currentScript;let{document:document2}=window2;const{DocumentFragment:DocumentFragment,HTMLTemplateElement:HTMLTemplateElement,Node:Node4,Element:Element2,NodeFilter:NodeFilter,NamedNodeMap:NamedNodeMap=window2.NamedNodeMap||window2.MozNamedAttrMap,HTMLFormElement:HTMLFormElement,DOMParser:DOMParser2,trustedTypes:trustedTypes}=window2;const ElementPrototype=Element2.prototype;const cloneNode=lookupGetter(ElementPrototype,"cloneNode");const getNextSibling=lookupGetter(ElementPrototype,"nextSibling");const getChildNodes=lookupGetter(ElementPrototype,"childNodes");const getParentNode=lookupGetter(ElementPrototype,"parentNode");if(typeof HTMLTemplateElement==="function"){const template=document2.createElement("template");if(template.content&&template.content.ownerDocument){document2=template.content.ownerDocument}}let trustedTypesPolicy;let emptyHTML="";const{implementation:implementation,createNodeIterator:createNodeIterator,createDocumentFragment:createDocumentFragment,getElementsByTagName:getElementsByTagName}=document2;const{importNode:importNode}=originalDocument;let hooks={};DOMPurify.isSupported=typeof entries==="function"&&typeof getParentNode==="function"&&implementation&&implementation.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:MUSTACHE_EXPR2,ERB_EXPR:ERB_EXPR2,TMPLIT_EXPR:TMPLIT_EXPR2,DATA_ATTR:DATA_ATTR2,ARIA_ATTR:ARIA_ATTR2,IS_SCRIPT_OR_DATA:IS_SCRIPT_OR_DATA2,ATTR_WHITESPACE:ATTR_WHITESPACE2}=EXPRESSIONS;let{IS_ALLOWED_URI:IS_ALLOWED_URI$1}=EXPRESSIONS;let ALLOWED_TAGS=null;const DEFAULT_ALLOWED_TAGS=addToSet({},[...html$1,...svg$1,...svgFilters,...mathMl$1,...text]);let ALLOWED_ATTR=null;const DEFAULT_ALLOWED_ATTR=addToSet({},[...html,...svg,...mathMl,...xml]);let CUSTOM_ELEMENT_HANDLING=Object.seal(Object.create(null,{tagNameCheck:{writable:true,configurable:false,enumerable:true,value:null},attributeNameCheck:{writable:true,configurable:false,enumerable:true,value:null},allowCustomizedBuiltInElements:{writable:true,configurable:false,enumerable:true,value:false}}));let FORBID_TAGS=null;let FORBID_ATTR=null;let ALLOW_ARIA_ATTR=true;let ALLOW_DATA_ATTR=true;let ALLOW_UNKNOWN_PROTOCOLS=false;let ALLOW_SELF_CLOSE_IN_ATTR=true;let SAFE_FOR_TEMPLATES=false;let WHOLE_DOCUMENT=false;let SET_CONFIG=false;let FORCE_BODY=false;let RETURN_DOM=false;let RETURN_DOM_FRAGMENT=false;let RETURN_TRUSTED_TYPE=false;let SANITIZE_DOM=true;let SANITIZE_NAMED_PROPS=false;const SANITIZE_NAMED_PROPS_PREFIX="user-content-";let KEEP_CONTENT=true;let IN_PLACE=false;let USE_PROFILES={};let FORBID_CONTENTS=null;const DEFAULT_FORBID_CONTENTS=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let DATA_URI_TAGS=null;const DEFAULT_DATA_URI_TAGS=addToSet({},["audio","video","img","source","image","track"]);let URI_SAFE_ATTRIBUTES=null;const DEFAULT_URI_SAFE_ATTRIBUTES=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]);const MATHML_NAMESPACE="http://www.w3.org/1998/Math/MathML";const SVG_NAMESPACE="http://www.w3.org/2000/svg";const HTML_NAMESPACE="http://www.w3.org/1999/xhtml";let NAMESPACE=HTML_NAMESPACE;let IS_EMPTY_INPUT=false;let ALLOWED_NAMESPACES=null;const DEFAULT_ALLOWED_NAMESPACES=addToSet({},[MATHML_NAMESPACE,SVG_NAMESPACE,HTML_NAMESPACE],stringToString);let PARSER_MEDIA_TYPE;const SUPPORTED_PARSER_MEDIA_TYPES=["application/xhtml+xml","text/html"];const DEFAULT_PARSER_MEDIA_TYPE="text/html";let transformCaseFunc;let CONFIG=null;const formElement=document2.createElement("form");const isRegexOrFunction=function isRegexOrFunction2(testValue){return testValue instanceof RegExp||testValue instanceof Function};const _parseConfig=function _parseConfig2(cfg){if(CONFIG&&CONFIG===cfg){return}if(!cfg||typeof cfg!=="object"){cfg={}}cfg=clone(cfg);PARSER_MEDIA_TYPE=SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE)===-1?PARSER_MEDIA_TYPE=DEFAULT_PARSER_MEDIA_TYPE:PARSER_MEDIA_TYPE=cfg.PARSER_MEDIA_TYPE;transformCaseFunc=PARSER_MEDIA_TYPE==="application/xhtml+xml"?stringToString:stringToLowerCase;ALLOWED_TAGS="ALLOWED_TAGS"in cfg?addToSet({},cfg.ALLOWED_TAGS,transformCaseFunc):DEFAULT_ALLOWED_TAGS;ALLOWED_ATTR="ALLOWED_ATTR"in cfg?addToSet({},cfg.ALLOWED_ATTR,transformCaseFunc):DEFAULT_ALLOWED_ATTR;ALLOWED_NAMESPACES="ALLOWED_NAMESPACES"in cfg?addToSet({},cfg.ALLOWED_NAMESPACES,stringToString):DEFAULT_ALLOWED_NAMESPACES;URI_SAFE_ATTRIBUTES="ADD_URI_SAFE_ATTR"in cfg?addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),cfg.ADD_URI_SAFE_ATTR,transformCaseFunc):DEFAULT_URI_SAFE_ATTRIBUTES;DATA_URI_TAGS="ADD_DATA_URI_TAGS"in cfg?addToSet(clone(DEFAULT_DATA_URI_TAGS),cfg.ADD_DATA_URI_TAGS,transformCaseFunc):DEFAULT_DATA_URI_TAGS;FORBID_CONTENTS="FORBID_CONTENTS"in cfg?addToSet({},cfg.FORBID_CONTENTS,transformCaseFunc):DEFAULT_FORBID_CONTENTS;FORBID_TAGS="FORBID_TAGS"in cfg?addToSet({},cfg.FORBID_TAGS,transformCaseFunc):{};FORBID_ATTR="FORBID_ATTR"in cfg?addToSet({},cfg.FORBID_ATTR,transformCaseFunc):{};USE_PROFILES="USE_PROFILES"in cfg?cfg.USE_PROFILES:false;ALLOW_ARIA_ATTR=cfg.ALLOW_ARIA_ATTR!==false;ALLOW_DATA_ATTR=cfg.ALLOW_DATA_ATTR!==false;ALLOW_UNKNOWN_PROTOCOLS=cfg.ALLOW_UNKNOWN_PROTOCOLS||false;ALLOW_SELF_CLOSE_IN_ATTR=cfg.ALLOW_SELF_CLOSE_IN_ATTR!==false;SAFE_FOR_TEMPLATES=cfg.SAFE_FOR_TEMPLATES||false;WHOLE_DOCUMENT=cfg.WHOLE_DOCUMENT||false;RETURN_DOM=cfg.RETURN_DOM||false;RETURN_DOM_FRAGMENT=cfg.RETURN_DOM_FRAGMENT||false;RETURN_TRUSTED_TYPE=cfg.RETURN_TRUSTED_TYPE||false;FORCE_BODY=cfg.FORCE_BODY||false;SANITIZE_DOM=cfg.SANITIZE_DOM!==false;SANITIZE_NAMED_PROPS=cfg.SANITIZE_NAMED_PROPS||false;KEEP_CONTENT=cfg.KEEP_CONTENT!==false;IN_PLACE=cfg.IN_PLACE||false;IS_ALLOWED_URI$1=cfg.ALLOWED_URI_REGEXP||IS_ALLOWED_URI;NAMESPACE=cfg.NAMESPACE||HTML_NAMESPACE;CUSTOM_ELEMENT_HANDLING=cfg.CUSTOM_ELEMENT_HANDLING||{};if(cfg.CUSTOM_ELEMENT_HANDLING&&isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)){CUSTOM_ELEMENT_HANDLING.tagNameCheck=cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck}if(cfg.CUSTOM_ELEMENT_HANDLING&&isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)){CUSTOM_ELEMENT_HANDLING.attributeNameCheck=cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck}if(cfg.CUSTOM_ELEMENT_HANDLING&&typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==="boolean"){CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements}if(SAFE_FOR_TEMPLATES){ALLOW_DATA_ATTR=false}if(RETURN_DOM_FRAGMENT){RETURN_DOM=true}if(USE_PROFILES){ALLOWED_TAGS=addToSet({},[...text]);ALLOWED_ATTR=[];if(USE_PROFILES.html===true){addToSet(ALLOWED_TAGS,html$1);addToSet(ALLOWED_ATTR,html)}if(USE_PROFILES.svg===true){addToSet(ALLOWED_TAGS,svg$1);addToSet(ALLOWED_ATTR,svg);addToSet(ALLOWED_ATTR,xml)}if(USE_PROFILES.svgFilters===true){addToSet(ALLOWED_TAGS,svgFilters);addToSet(ALLOWED_ATTR,svg);addToSet(ALLOWED_ATTR,xml)}if(USE_PROFILES.mathMl===true){addToSet(ALLOWED_TAGS,mathMl$1);addToSet(ALLOWED_ATTR,mathMl);addToSet(ALLOWED_ATTR,xml)}}if(cfg.ADD_TAGS){if(ALLOWED_TAGS===DEFAULT_ALLOWED_TAGS){ALLOWED_TAGS=clone(ALLOWED_TAGS)}addToSet(ALLOWED_TAGS,cfg.ADD_TAGS,transformCaseFunc)}if(cfg.ADD_ATTR){if(ALLOWED_ATTR===DEFAULT_ALLOWED_ATTR){ALLOWED_ATTR=clone(ALLOWED_ATTR)}addToSet(ALLOWED_ATTR,cfg.ADD_ATTR,transformCaseFunc)}if(cfg.ADD_URI_SAFE_ATTR){addToSet(URI_SAFE_ATTRIBUTES,cfg.ADD_URI_SAFE_ATTR,transformCaseFunc)}if(cfg.FORBID_CONTENTS){if(FORBID_CONTENTS===DEFAULT_FORBID_CONTENTS){FORBID_CONTENTS=clone(FORBID_CONTENTS)}addToSet(FORBID_CONTENTS,cfg.FORBID_CONTENTS,transformCaseFunc)}if(KEEP_CONTENT){ALLOWED_TAGS["#text"]=true}if(WHOLE_DOCUMENT){addToSet(ALLOWED_TAGS,["html","head","body"])}if(ALLOWED_TAGS.table){addToSet(ALLOWED_TAGS,["tbody"]);delete FORBID_TAGS.tbody}if(cfg.TRUSTED_TYPES_POLICY){if(typeof cfg.TRUSTED_TYPES_POLICY.createHTML!=="function"){throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.')}if(typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL!=="function"){throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.')}trustedTypesPolicy=cfg.TRUSTED_TYPES_POLICY;emptyHTML=trustedTypesPolicy.createHTML("")}else{if(trustedTypesPolicy===void 0){trustedTypesPolicy=_createTrustedTypesPolicy(trustedTypes,currentScript)}if(trustedTypesPolicy!==null&&typeof emptyHTML==="string"){emptyHTML=trustedTypesPolicy.createHTML("")}}if(freeze){freeze(cfg)}CONFIG=cfg};const MATHML_TEXT_INTEGRATION_POINTS=addToSet({},["mi","mo","mn","ms","mtext"]);const HTML_INTEGRATION_POINTS=addToSet({},["foreignobject","desc","title","annotation-xml"]);const COMMON_SVG_AND_HTML_ELEMENTS=addToSet({},["title","style","font","a","script"]);const ALL_SVG_TAGS=addToSet({},svg$1);addToSet(ALL_SVG_TAGS,svgFilters);addToSet(ALL_SVG_TAGS,svgDisallowed);const ALL_MATHML_TAGS=addToSet({},mathMl$1);addToSet(ALL_MATHML_TAGS,mathMlDisallowed);const _checkValidNamespace=function _checkValidNamespace2(element){let parent=getParentNode(element);if(!parent||!parent.tagName){parent={namespaceURI:NAMESPACE,tagName:"template"}}const tagName=stringToLowerCase(element.tagName);const parentTagName=stringToLowerCase(parent.tagName);if(!ALLOWED_NAMESPACES[element.namespaceURI]){return false}if(element.namespaceURI===SVG_NAMESPACE){if(parent.namespaceURI===HTML_NAMESPACE){return tagName==="svg"}if(parent.namespaceURI===MATHML_NAMESPACE){return tagName==="svg"&&(parentTagName==="annotation-xml"||MATHML_TEXT_INTEGRATION_POINTS[parentTagName])}return Boolean(ALL_SVG_TAGS[tagName])}if(element.namespaceURI===MATHML_NAMESPACE){if(parent.namespaceURI===HTML_NAMESPACE){return tagName==="math"}if(parent.namespaceURI===SVG_NAMESPACE){return tagName==="math"&&HTML_INTEGRATION_POINTS[parentTagName]}return Boolean(ALL_MATHML_TAGS[tagName])}if(element.namespaceURI===HTML_NAMESPACE){if(parent.namespaceURI===SVG_NAMESPACE&&!HTML_INTEGRATION_POINTS[parentTagName]){return false}if(parent.namespaceURI===MATHML_NAMESPACE&&!MATHML_TEXT_INTEGRATION_POINTS[parentTagName]){return false}return!ALL_MATHML_TAGS[tagName]&&(COMMON_SVG_AND_HTML_ELEMENTS[tagName]||!ALL_SVG_TAGS[tagName])}if(PARSER_MEDIA_TYPE==="application/xhtml+xml"&&ALLOWED_NAMESPACES[element.namespaceURI]){return true}return false};const _forceRemove=function _forceRemove2(node){arrayPush(DOMPurify.removed,{element:node});try{node.parentNode.removeChild(node)}catch(_){node.remove()}};const _removeAttribute=function _removeAttribute2(name,node){try{arrayPush(DOMPurify.removed,{attribute:node.getAttributeNode(name),from:node})}catch(_){arrayPush(DOMPurify.removed,{attribute:null,from:node})}node.removeAttribute(name);if(name==="is"&&!ALLOWED_ATTR[name]){if(RETURN_DOM||RETURN_DOM_FRAGMENT){try{_forceRemove(node)}catch(_){}}else{try{node.setAttribute(name,"")}catch(_){}}}};const _initDocument=function _initDocument2(dirty){let doc;let leadingWhitespace;if(FORCE_BODY){dirty=""+dirty}else{const matches=stringMatch(dirty,/^[\r\n\t ]+/);leadingWhitespace=matches&&matches[0]}if(PARSER_MEDIA_TYPE==="application/xhtml+xml"&&NAMESPACE===HTML_NAMESPACE){dirty=''+dirty+""}const dirtyPayload=trustedTypesPolicy?trustedTypesPolicy.createHTML(dirty):dirty;if(NAMESPACE===HTML_NAMESPACE){try{doc=(new DOMParser2).parseFromString(dirtyPayload,PARSER_MEDIA_TYPE)}catch(_){}}if(!doc||!doc.documentElement){doc=implementation.createDocument(NAMESPACE,"template",null);try{doc.documentElement.innerHTML=IS_EMPTY_INPUT?emptyHTML:dirtyPayload}catch(_){}}const body=doc.body||doc.documentElement;if(dirty&&leadingWhitespace){body.insertBefore(document2.createTextNode(leadingWhitespace),body.childNodes[0]||null)}if(NAMESPACE===HTML_NAMESPACE){return getElementsByTagName.call(doc,WHOLE_DOCUMENT?"html":"body")[0]}return WHOLE_DOCUMENT?doc.documentElement:body};const _createIterator=function _createIterator2(root){return createNodeIterator.call(root.ownerDocument||root,root,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT,null,false)};const _isClobbered=function _isClobbered2(elm){return elm instanceof HTMLFormElement&&(typeof elm.nodeName!=="string"||typeof elm.textContent!=="string"||typeof elm.removeChild!=="function"||!(elm.attributes instanceof NamedNodeMap)||typeof elm.removeAttribute!=="function"||typeof elm.setAttribute!=="function"||typeof elm.namespaceURI!=="string"||typeof elm.insertBefore!=="function"||typeof elm.hasChildNodes!=="function")};const _isNode=function _isNode2(object){return typeof Node4==="object"?object instanceof Node4:object&&typeof object==="object"&&typeof object.nodeType==="number"&&typeof object.nodeName==="string"};const _executeHook=function _executeHook2(entryPoint,currentNode,data){if(!hooks[entryPoint]){return}arrayForEach(hooks[entryPoint],(hook=>{hook.call(DOMPurify,currentNode,data,CONFIG)}))};const _sanitizeElements=function _sanitizeElements2(currentNode){let content;_executeHook("beforeSanitizeElements",currentNode,null);if(_isClobbered(currentNode)){_forceRemove(currentNode);return true}const tagName=transformCaseFunc(currentNode.nodeName);_executeHook("uponSanitizeElement",currentNode,{tagName:tagName,allowedTags:ALLOWED_TAGS});if(currentNode.hasChildNodes()&&!_isNode(currentNode.firstElementChild)&&(!_isNode(currentNode.content)||!_isNode(currentNode.content.firstElementChild))&®ExpTest(/<[/\w]/g,currentNode.innerHTML)&®ExpTest(/<[/\w]/g,currentNode.textContent)){_forceRemove(currentNode);return true}if(!ALLOWED_TAGS[tagName]||FORBID_TAGS[tagName]){if(!FORBID_TAGS[tagName]&&_basicCustomElementTest(tagName)){if(CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp&®ExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck,tagName))return false;if(CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function&&CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName))return false}if(KEEP_CONTENT&&!FORBID_CONTENTS[tagName]){const parentNode=getParentNode(currentNode)||currentNode.parentNode;const childNodes=getChildNodes(currentNode)||currentNode.childNodes;if(childNodes&&parentNode){const childCount=childNodes.length;for(let i=childCount-1;i>=0;--i){parentNode.insertBefore(cloneNode(childNodes[i],true),getNextSibling(currentNode))}}}_forceRemove(currentNode);return true}if(currentNode instanceof Element2&&!_checkValidNamespace(currentNode)){_forceRemove(currentNode);return true}if((tagName==="noscript"||tagName==="noembed"||tagName==="noframes")&®ExpTest(/<\/no(script|embed|frames)/i,currentNode.innerHTML)){_forceRemove(currentNode);return true}if(SAFE_FOR_TEMPLATES&¤tNode.nodeType===3){content=currentNode.textContent;content=stringReplace(content,MUSTACHE_EXPR2," ");content=stringReplace(content,ERB_EXPR2," ");content=stringReplace(content,TMPLIT_EXPR2," ");if(currentNode.textContent!==content){arrayPush(DOMPurify.removed,{element:currentNode.cloneNode()});currentNode.textContent=content}}_executeHook("afterSanitizeElements",currentNode,null);return false};const _isValidAttribute=function _isValidAttribute2(lcTag,lcName,value){if(SANITIZE_DOM&&(lcName==="id"||lcName==="name")&&(value in document2||value in formElement)){return false}if(ALLOW_DATA_ATTR&&!FORBID_ATTR[lcName]&®ExpTest(DATA_ATTR2,lcName));else if(ALLOW_ARIA_ATTR&®ExpTest(ARIA_ATTR2,lcName));else if(!ALLOWED_ATTR[lcName]||FORBID_ATTR[lcName]){if(_basicCustomElementTest(lcTag)&&(CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp&®ExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck,lcTag)||CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function&&CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag))&&(CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp&®ExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck,lcName)||CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function&&CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName))||lcName==="is"&&CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp&®ExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck,value)||CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function&&CUSTOM_ELEMENT_HANDLING.tagNameCheck(value)));else{return false}}else if(URI_SAFE_ATTRIBUTES[lcName]);else if(regExpTest(IS_ALLOWED_URI$1,stringReplace(value,ATTR_WHITESPACE2,"")));else if((lcName==="src"||lcName==="xlink:href"||lcName==="href")&&lcTag!=="script"&&stringIndexOf(value,"data:")===0&&DATA_URI_TAGS[lcTag]);else if(ALLOW_UNKNOWN_PROTOCOLS&&!regExpTest(IS_SCRIPT_OR_DATA2,stringReplace(value,ATTR_WHITESPACE2,"")));else if(value){return false}else;return true};const _basicCustomElementTest=function _basicCustomElementTest2(tagName){return tagName.indexOf("-")>0};const _sanitizeAttributes=function _sanitizeAttributes2(currentNode){let attr;let value;let lcName;let l;_executeHook("beforeSanitizeAttributes",currentNode,null);const{attributes:attributes}=currentNode;if(!attributes){return}const hookEvent={attrName:"",attrValue:"",keepAttr:true,allowedAttributes:ALLOWED_ATTR};l=attributes.length;while(l--){attr=attributes[l];const{name:name,namespaceURI:namespaceURI}=attr;value=name==="value"?attr.value:stringTrim(attr.value);lcName=transformCaseFunc(name);hookEvent.attrName=lcName;hookEvent.attrValue=value;hookEvent.keepAttr=true;hookEvent.forceKeepAttr=void 0;_executeHook("uponSanitizeAttribute",currentNode,hookEvent);value=hookEvent.attrValue;if(hookEvent.forceKeepAttr){continue}_removeAttribute(name,currentNode);if(!hookEvent.keepAttr){continue}if(!ALLOW_SELF_CLOSE_IN_ATTR&®ExpTest(/\/>/i,value)){_removeAttribute(name,currentNode);continue}if(SAFE_FOR_TEMPLATES){value=stringReplace(value,MUSTACHE_EXPR2," ");value=stringReplace(value,ERB_EXPR2," ");value=stringReplace(value,TMPLIT_EXPR2," ")}const lcTag=transformCaseFunc(currentNode.nodeName);if(!_isValidAttribute(lcTag,lcName,value)){continue}if(SANITIZE_NAMED_PROPS&&(lcName==="id"||lcName==="name")){_removeAttribute(name,currentNode);value=SANITIZE_NAMED_PROPS_PREFIX+value}if(trustedTypesPolicy&&typeof trustedTypes==="object"&&typeof trustedTypes.getAttributeType==="function"){if(namespaceURI);else{switch(trustedTypes.getAttributeType(lcTag,lcName)){case"TrustedHTML":{value=trustedTypesPolicy.createHTML(value);break}case"TrustedScriptURL":{value=trustedTypesPolicy.createScriptURL(value);break}}}}try{if(namespaceURI){currentNode.setAttributeNS(namespaceURI,name,value)}else{currentNode.setAttribute(name,value)}arrayPop(DOMPurify.removed)}catch(_){}}_executeHook("afterSanitizeAttributes",currentNode,null)};const _sanitizeShadowDOM=function _sanitizeShadowDOM2(fragment){let shadowNode;const shadowIterator=_createIterator(fragment);_executeHook("beforeSanitizeShadowDOM",fragment,null);while(shadowNode=shadowIterator.nextNode()){_executeHook("uponSanitizeShadowNode",shadowNode,null);if(_sanitizeElements(shadowNode)){continue}if(shadowNode.content instanceof DocumentFragment){_sanitizeShadowDOM2(shadowNode.content)}_sanitizeAttributes(shadowNode)}_executeHook("afterSanitizeShadowDOM",fragment,null)};DOMPurify.sanitize=function(dirty){let cfg=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};let body;let importedNode;let currentNode;let returnNode;IS_EMPTY_INPUT=!dirty;if(IS_EMPTY_INPUT){dirty="\x3c!--\x3e"}if(typeof dirty!=="string"&&!_isNode(dirty)){if(typeof dirty.toString==="function"){dirty=dirty.toString();if(typeof dirty!=="string"){throw typeErrorCreate("dirty is not a string, aborting")}}else{throw typeErrorCreate("toString is not a function")}}if(!DOMPurify.isSupported){return dirty}if(!SET_CONFIG){_parseConfig(cfg)}DOMPurify.removed=[];if(typeof dirty==="string"){IN_PLACE=false}if(IN_PLACE){if(dirty.nodeName){const tagName=transformCaseFunc(dirty.nodeName);if(!ALLOWED_TAGS[tagName]||FORBID_TAGS[tagName]){throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}}}else if(dirty instanceof Node4){body=_initDocument("\x3c!----\x3e");importedNode=body.ownerDocument.importNode(dirty,true);if(importedNode.nodeType===1&&importedNode.nodeName==="BODY"){body=importedNode}else if(importedNode.nodeName==="HTML"){body=importedNode}else{body.appendChild(importedNode)}}else{if(!RETURN_DOM&&!SAFE_FOR_TEMPLATES&&!WHOLE_DOCUMENT&&dirty.indexOf("<")===-1){return trustedTypesPolicy&&RETURN_TRUSTED_TYPE?trustedTypesPolicy.createHTML(dirty):dirty}body=_initDocument(dirty);if(!body){return RETURN_DOM?null:RETURN_TRUSTED_TYPE?emptyHTML:""}}if(body&&FORCE_BODY){_forceRemove(body.firstChild)}const nodeIterator=_createIterator(IN_PLACE?dirty:body);while(currentNode=nodeIterator.nextNode()){if(_sanitizeElements(currentNode)){continue}if(currentNode.content instanceof DocumentFragment){_sanitizeShadowDOM(currentNode.content)}_sanitizeAttributes(currentNode)}if(IN_PLACE){return dirty}if(RETURN_DOM){if(RETURN_DOM_FRAGMENT){returnNode=createDocumentFragment.call(body.ownerDocument);while(body.firstChild){returnNode.appendChild(body.firstChild)}}else{returnNode=body}if(ALLOWED_ATTR.shadowroot||ALLOWED_ATTR.shadowrootmode){returnNode=importNode.call(originalDocument,returnNode,true)}return returnNode}let serializedHTML=WHOLE_DOCUMENT?body.outerHTML:body.innerHTML;if(WHOLE_DOCUMENT&&ALLOWED_TAGS["!doctype"]&&body.ownerDocument&&body.ownerDocument.doctype&&body.ownerDocument.doctype.name&®ExpTest(DOCTYPE_NAME,body.ownerDocument.doctype.name)){serializedHTML="\n"+serializedHTML}if(SAFE_FOR_TEMPLATES){serializedHTML=stringReplace(serializedHTML,MUSTACHE_EXPR2," ");serializedHTML=stringReplace(serializedHTML,ERB_EXPR2," ");serializedHTML=stringReplace(serializedHTML,TMPLIT_EXPR2," ")}return trustedTypesPolicy&&RETURN_TRUSTED_TYPE?trustedTypesPolicy.createHTML(serializedHTML):serializedHTML};DOMPurify.setConfig=function(cfg){_parseConfig(cfg);SET_CONFIG=true};DOMPurify.clearConfig=function(){CONFIG=null;SET_CONFIG=false};DOMPurify.isValidAttribute=function(tag,attr,value){if(!CONFIG){_parseConfig({})}const lcTag=transformCaseFunc(tag);const lcName=transformCaseFunc(attr);return _isValidAttribute(lcTag,lcName,value)};DOMPurify.addHook=function(entryPoint,hookFunction){if(typeof hookFunction!=="function"){return}hooks[entryPoint]=hooks[entryPoint]||[];arrayPush(hooks[entryPoint],hookFunction)};DOMPurify.removeHook=function(entryPoint){if(hooks[entryPoint]){return arrayPop(hooks[entryPoint])}};DOMPurify.removeHooks=function(entryPoint){if(hooks[entryPoint]){hooks[entryPoint]=[]}};DOMPurify.removeAllHooks=function(){hooks={}};return DOMPurify}var entries,setPrototypeOf,isFrozen,getPrototypeOf,getOwnPropertyDescriptor,freeze,seal,create,apply,construct,arrayForEach,arrayPop,arrayPush,stringToLowerCase,stringToString,stringMatch,stringReplace,stringIndexOf,stringTrim,regExpTest,typeErrorCreate,html$1,svg$1,svgFilters,svgDisallowed,mathMl$1,mathMlDisallowed,text,html,svg,mathMl,xml,MUSTACHE_EXPR,ERB_EXPR,TMPLIT_EXPR,DATA_ATTR,ARIA_ATTR,IS_ALLOWED_URI,IS_SCRIPT_OR_DATA,ATTR_WHITESPACE,DOCTYPE_NAME,EXPRESSIONS,getGlobal,_createTrustedTypesPolicy,purify,version,isSupported,sanitize2,setConfig,clearConfig,isValidAttribute,addHook,removeHook,removeHooks,removeAllHooks;var init_dompurify=__esm({"node_modules/monaco-editor/esm/vs/base/browser/dompurify/dompurify.js"(){({entries:entries,setPrototypeOf:setPrototypeOf,isFrozen:isFrozen,getPrototypeOf:getPrototypeOf,getOwnPropertyDescriptor:getOwnPropertyDescriptor}=Object);({freeze:freeze,seal:seal,create:create}=Object);({apply:apply,construct:construct}=typeof Reflect!=="undefined"&&Reflect);if(!apply){apply=function apply2(fun,thisValue,args){return fun.apply(thisValue,args)}}if(!freeze){freeze=function freeze3(x){return x}}if(!seal){seal=function seal2(x){return x}}if(!construct){construct=function construct2(Func,args){return new Func(...args)}}arrayForEach=unapply(Array.prototype.forEach);arrayPop=unapply(Array.prototype.pop);arrayPush=unapply(Array.prototype.push);stringToLowerCase=unapply(String.prototype.toLowerCase);stringToString=unapply(String.prototype.toString);stringMatch=unapply(String.prototype.match);stringReplace=unapply(String.prototype.replace);stringIndexOf=unapply(String.prototype.indexOf);stringTrim=unapply(String.prototype.trim);regExpTest=unapply(RegExp.prototype.test);typeErrorCreate=unconstruct(TypeError);html$1=freeze(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]);svg$1=freeze(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]);svgFilters=freeze(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]);svgDisallowed=freeze(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]);mathMl$1=freeze(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]);mathMlDisallowed=freeze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]);text=freeze(["#text"]);html=freeze(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]);svg=freeze(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]);mathMl=freeze(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]);xml=freeze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]);MUSTACHE_EXPR=seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);ERB_EXPR=seal(/<%[\w\W]*|[\w\W]*%>/gm);TMPLIT_EXPR=seal(/\${[\w\W]*}/gm);DATA_ATTR=seal(/^data-[\-\w.\u00B7-\uFFFF]/);ARIA_ATTR=seal(/^aria-[\-\w]+$/);IS_ALLOWED_URI=seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);IS_SCRIPT_OR_DATA=seal(/^(?:\w+script|data):/i);ATTR_WHITESPACE=seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);DOCTYPE_NAME=seal(/^html$/i);EXPRESSIONS=Object.freeze({__proto__:null,MUSTACHE_EXPR:MUSTACHE_EXPR,ERB_EXPR:ERB_EXPR,TMPLIT_EXPR:TMPLIT_EXPR,DATA_ATTR:DATA_ATTR,ARIA_ATTR:ARIA_ATTR,IS_ALLOWED_URI:IS_ALLOWED_URI,IS_SCRIPT_OR_DATA:IS_SCRIPT_OR_DATA,ATTR_WHITESPACE:ATTR_WHITESPACE,DOCTYPE_NAME:DOCTYPE_NAME});getGlobal=()=>typeof window==="undefined"?null:window;_createTrustedTypesPolicy=function _createTrustedTypesPolicy2(trustedTypes,purifyHostElement){if(typeof trustedTypes!=="object"||typeof trustedTypes.createPolicy!=="function"){return null}let suffix=null;const ATTR_NAME="data-tt-policy-suffix";if(purifyHostElement&&purifyHostElement.hasAttribute(ATTR_NAME)){suffix=purifyHostElement.getAttribute(ATTR_NAME)}const policyName="dompurify"+(suffix?"#"+suffix:"");try{return trustedTypes.createPolicy(policyName,{createHTML(html2){return html2},createScriptURL(scriptUrl){return scriptUrl}})}catch(_){console.warn("TrustedTypes policy "+policyName+" could not be created.");return null}};purify=createDOMPurify();version=purify.version;isSupported=purify.isSupported;sanitize2=purify.sanitize;setConfig=purify.setConfig;clearConfig=purify.clearConfig;isValidAttribute=purify.isValidAttribute;addHook=purify.addHook;removeHook=purify.removeHook;removeHooks=purify.removeHooks;removeAllHooks=purify.removeAllHooks}});var Schemas,connectionTokenQueryName,RemoteAuthoritiesImpl,RemoteAuthorities,FileAccessImpl,FileAccess,COI;var init_network=__esm({"node_modules/monaco-editor/esm/vs/base/common/network.js"(){init_errors();init_platform();init_uri();(function(Schemas2){Schemas2.inMemory="inmemory";Schemas2.vscode="vscode";Schemas2.internal="private";Schemas2.walkThrough="walkThrough";Schemas2.walkThroughSnippet="walkThroughSnippet";Schemas2.http="http";Schemas2.https="https";Schemas2.file="file";Schemas2.mailto="mailto";Schemas2.untitled="untitled";Schemas2.data="data";Schemas2.command="command";Schemas2.vscodeRemote="vscode-remote";Schemas2.vscodeRemoteResource="vscode-remote-resource";Schemas2.vscodeManagedRemoteResource="vscode-managed-remote-resource";Schemas2.vscodeUserData="vscode-userdata";Schemas2.vscodeCustomEditor="vscode-custom-editor";Schemas2.vscodeNotebookCell="vscode-notebook-cell";Schemas2.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata";Schemas2.vscodeNotebookCellOutput="vscode-notebook-cell-output";Schemas2.vscodeInteractiveInput="vscode-interactive-input";Schemas2.vscodeSettings="vscode-settings";Schemas2.vscodeWorkspaceTrust="vscode-workspace-trust";Schemas2.vscodeTerminal="vscode-terminal";Schemas2.vscodeChatSesssion="vscode-chat-editor";Schemas2.webviewPanel="webview-panel";Schemas2.vscodeWebview="vscode-webview";Schemas2.extension="extension";Schemas2.vscodeFileResource="vscode-file";Schemas2.tmp="tmp";Schemas2.vsls="vsls";Schemas2.vscodeSourceControl="vscode-scm"})(Schemas||(Schemas={}));connectionTokenQueryName="tkn";RemoteAuthoritiesImpl=class{constructor(){this._hosts=Object.create(null);this._ports=Object.create(null);this._connectionTokens=Object.create(null);this._preferredWebSchema="http";this._delegate=null;this._remoteResourcesPath=`/${Schemas.vscodeRemoteResource}`}setPreferredWebSchema(schema){this._preferredWebSchema=schema}rewrite(uri){if(this._delegate){try{return this._delegate(uri)}catch(err){onUnexpectedError(err);return uri}}const authority=uri.authority;let host=this._hosts[authority];if(host&&host.indexOf(":")!==-1&&host.indexOf("[")===-1){host=`[${host}]`}const port=this._ports[authority];const connectionToken=this._connectionTokens[authority];let query=`path=${encodeURIComponent(uri.path)}`;if(typeof connectionToken==="string"){query+=`&${connectionTokenQueryName}=${encodeURIComponent(connectionToken)}`}return URI.from({scheme:isWeb?this._preferredWebSchema:Schemas.vscodeRemoteResource,authority:`${host}:${port}`,path:this._remoteResourcesPath,query:query})}};RemoteAuthorities=new RemoteAuthoritiesImpl;FileAccessImpl=class{uriToBrowserUri(uri){if(uri.scheme===Schemas.vscodeRemote){return RemoteAuthorities.rewrite(uri)}if(uri.scheme===Schemas.file&&(isNative||isWebWorker&&globals.origin===`${Schemas.vscodeFileResource}://${FileAccessImpl.FALLBACK_AUTHORITY}`)){return uri.with({scheme:Schemas.vscodeFileResource,authority:uri.authority||FileAccessImpl.FALLBACK_AUTHORITY,query:null,fragment:null})}return uri}};FileAccessImpl.FALLBACK_AUTHORITY="vscode-app";FileAccess=new FileAccessImpl;(function(COI2){const coiHeaders=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);COI2.CoopAndCoep=Object.freeze(coiHeaders.get("3"));const coiSearchParamName="vscode-coi";function getHeadersFromQuery(url){let params;if(typeof url==="string"){params=new URL(url).searchParams}else if(url instanceof URL){params=url.searchParams}else if(URI.isUri(url)){params=new URL(url.toString(true)).searchParams}const value=params===null||params===void 0?void 0:params.get(coiSearchParamName);if(!value){return void 0}return coiHeaders.get(value)}COI2.getHeadersFromQuery=getHeadersFromQuery;function addSearchParam(urlOrSearch,coop,coep){if(!globalThis.crossOriginIsolated){return}const value=coop&&coep?"3":coep?"2":"1";if(urlOrSearch instanceof URLSearchParams){urlOrSearch.set(coiSearchParamName,value)}else{urlOrSearch[coiSearchParamName]=value}}COI2.addSearchParam=addSearchParam})(COI||(COI={}))}});function clearNode(node){while(node.firstChild){node.firstChild.remove()}}function isInDOM(node){var _a6;return(_a6=node===null||node===void 0?void 0:node.isConnected)!==null&&_a6!==void 0?_a6:false}function addDisposableListener(node,type,handler,useCaptureOrOptions){return new DomListener(node,type,handler,useCaptureOrOptions)}function _wrapAsStandardMouseEvent(handler){return function(e){return handler(new StandardMouseEvent(e))}}function _wrapAsStandardKeyboardEvent(handler){return function(e){return handler(new StandardKeyboardEvent(e))}}function addDisposableGenericMouseDownListener(node,handler,useCapture){return addDisposableListener(node,isIOS&&BrowserFeatures.pointerEvents?EventType.POINTER_DOWN:EventType.MOUSE_DOWN,handler,useCapture)}function getComputedStyle2(el){return document.defaultView.getComputedStyle(el,null)}function getClientArea(element){if(element!==document.body){return new Dimension(element.clientWidth,element.clientHeight)}if(isIOS&&window.visualViewport){return new Dimension(window.visualViewport.width,window.visualViewport.height)}if(window.innerWidth&&window.innerHeight){return new Dimension(window.innerWidth,window.innerHeight)}if(document.body&&document.body.clientWidth&&document.body.clientHeight){return new Dimension(document.body.clientWidth,document.body.clientHeight)}if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight){return new Dimension(document.documentElement.clientWidth,document.documentElement.clientHeight)}throw new Error("Unable to figure out browser width and height")}function getTopLeftOffset(element){let offsetParent=element.offsetParent;let top=element.offsetTop;let left=element.offsetLeft;while((element=element.parentNode)!==null&&element!==document.body&&element!==document.documentElement){top-=element.scrollTop;const c=isShadowRoot(element)?null:getComputedStyle2(element);if(c){left-=c.direction!=="rtl"?element.scrollLeft:-element.scrollLeft}if(element===offsetParent){left+=SizeUtils.getBorderLeftWidth(element);top+=SizeUtils.getBorderTopWidth(element);top+=element.offsetTop;left+=element.offsetLeft;offsetParent=element.offsetParent}}return{left:left,top:top}}function size(element,width,height){if(typeof width==="number"){element.style.width=`${width}px`}if(typeof height==="number"){element.style.height=`${height}px`}}function getDomNodePagePosition(domNode){const bb=domNode.getBoundingClientRect();return{left:bb.left+window.scrollX,top:bb.top+window.scrollY,width:bb.width,height:bb.height}}function getDomNodeZoomLevel(domNode){let testElement=domNode;let zoom=1;do{const elementZoomLevel=getComputedStyle2(testElement).zoom;if(elementZoomLevel!==null&&elementZoomLevel!==void 0&&elementZoomLevel!=="1"){zoom*=elementZoomLevel}testElement=testElement.parentElement}while(testElement!==null&&testElement!==document.documentElement);return zoom}function getTotalWidth(element){const margin=SizeUtils.getMarginLeft(element)+SizeUtils.getMarginRight(element);return element.offsetWidth+margin}function getContentWidth(element){const border=SizeUtils.getBorderLeftWidth(element)+SizeUtils.getBorderRightWidth(element);const padding=SizeUtils.getPaddingLeft(element)+SizeUtils.getPaddingRight(element);return element.offsetWidth-border-padding}function getContentHeight(element){const border=SizeUtils.getBorderTopWidth(element)+SizeUtils.getBorderBottomWidth(element);const padding=SizeUtils.getPaddingTop(element)+SizeUtils.getPaddingBottom(element);return element.offsetHeight-border-padding}function getTotalHeight(element){const margin=SizeUtils.getMarginTop(element)+SizeUtils.getMarginBottom(element);return element.offsetHeight+margin}function isAncestor(testChild,testAncestor){while(testChild){if(testChild===testAncestor){return true}testChild=testChild.parentNode}return false}function findParentWithClass(node,clazz,stopAtClazzOrNode){while(node&&node.nodeType===node.ELEMENT_NODE){if(node.classList.contains(clazz)){return node}if(stopAtClazzOrNode){if(typeof stopAtClazzOrNode==="string"){if(node.classList.contains(stopAtClazzOrNode)){return null}}else{if(node===stopAtClazzOrNode){return null}}}node=node.parentNode}return null}function hasParentWithClass(node,clazz,stopAtClazzOrNode){return!!findParentWithClass(node,clazz,stopAtClazzOrNode)}function isShadowRoot(node){return node&&!!node.host&&!!node.mode}function isInShadowDOM(domNode){return!!getShadowRoot(domNode)}function getShadowRoot(domNode){while(domNode.parentNode){if(domNode===document.body){return null}domNode=domNode.parentNode}return isShadowRoot(domNode)?domNode:null}function getActiveElement(){let result=document.activeElement;while(result===null||result===void 0?void 0:result.shadowRoot){result=result.shadowRoot.activeElement}return result}function createStyleSheet(container=document.getElementsByTagName("head")[0],beforeAppend){const style=document.createElement("style");style.type="text/css";style.media="screen";beforeAppend===null||beforeAppend===void 0?void 0:beforeAppend(style);container.appendChild(style);return style}function getSharedStyleSheet(){if(!_sharedStyleSheet){_sharedStyleSheet=createStyleSheet()}return _sharedStyleSheet}function getDynamicStyleSheetRules(style){var _a6,_b3;if((_a6=style===null||style===void 0?void 0:style.sheet)===null||_a6===void 0?void 0:_a6.rules){return style.sheet.rules}if((_b3=style===null||style===void 0?void 0:style.sheet)===null||_b3===void 0?void 0:_b3.cssRules){return style.sheet.cssRules}return[]}function createCSSRule(selector,cssText,style=getSharedStyleSheet()){if(!style||!cssText){return}style.sheet.insertRule(selector+"{"+cssText+"}",0)}function removeCSSRulesContainingSelector(ruleName,style=getSharedStyleSheet()){if(!style){return}const rules=getDynamicStyleSheetRules(style);const toDelete=[];for(let i=0;i=0;i--){style.sheet.deleteRule(toDelete[i])}}function isHTMLElement(o){if(typeof HTMLElement==="object"){return o instanceof HTMLElement}return o&&typeof o==="object"&&o.nodeType===1&&typeof o.nodeName==="string"}function isEventLike(obj){const candidate=obj;return!!(candidate&&typeof candidate.preventDefault==="function"&&typeof candidate.stopPropagation==="function")}function saveParentsScrollTop(node){const r=[];for(let i=0;node&&node.nodeType===node.ELEMENT_NODE;i++){r[i]=node.scrollTop;node=node.parentNode}return r}function restoreParentsScrollTop(node,state){for(let i=0;node&&node.nodeType===node.ELEMENT_NODE;i++){if(node.scrollTop!==state[i]){node.scrollTop=state[i]}node=node.parentNode}}function trackFocus(element){return new FocusTracker(element)}function append(parent,...children){parent.append(...children);if(children.length===1&&typeof children[0]!=="string"){return children[0]}}function prepend(parent,child){parent.insertBefore(child,parent.firstChild);return child}function reset(parent,...children){parent.innerText="";append(parent,...children)}function _$(namespace,description,attrs,...children){const match2=SELECTOR_REGEX.exec(description);if(!match2){throw new Error("Bad use of emmet")}const tagName=match2[1]||"div";let result;if(namespace!==Namespace.HTML){result=document.createElementNS(namespace,tagName)}else{result=document.createElement(tagName)}if(match2[3]){result.id=match2[3]}if(match2[4]){result.className=match2[4].replace(/\./g," ").trim()}if(attrs){Object.entries(attrs).forEach((([name,value])=>{if(typeof value==="undefined"){return}if(/^on\w+$/.test(name)){result[name]=value}else if(name==="selected"){if(value){result.setAttribute(name,"true")}}else{result.setAttribute(name,value)}}))}result.append(...children);return result}function $(description,attrs,...children){return _$(Namespace.HTML,description,attrs,...children)}function setVisibility(visible,...elements){if(visible){show(...elements)}else{hide(...elements)}}function show(...elements){for(const element of elements){element.style.display="";element.removeAttribute("aria-hidden")}}function hide(...elements){for(const element of elements){element.style.display="none";element.setAttribute("aria-hidden","true")}}function computeScreenAwareSize(cssPx){const screenPx=window.devicePixelRatio*cssPx;return Math.max(1,Math.floor(screenPx))/window.devicePixelRatio}function windowOpenNoOpener(url){window.open(url,"_blank","noopener")}function animate(fn){const step=()=>{fn();stepDisposable=scheduleAtNextAnimationFrame(step)};let stepDisposable=scheduleAtNextAnimationFrame(step);return toDisposable((()=>stepDisposable.dispose()))}function asCSSUrl(uri){if(!uri){return`url('')`}return`url('${FileAccess.uriToBrowserUri(uri).toString(true).replace(/'/g,"%27")}')`}function asCSSPropertyValue(value){return`'${value.replace(/'/g,"%27")}'`}function asCssValueWithDefault(cssPropertyValue,dflt){if(cssPropertyValue!==void 0){const variableMatch=cssPropertyValue.match(/^\s*var\((.+)\)$/);if(variableMatch){const varArguments=variableMatch[1].split(",",2);if(varArguments.length===2){dflt=asCssValueWithDefault(varArguments[1].trim(),dflt)}return`var(${varArguments[0]}, ${dflt})`}return cssPropertyValue}return dflt}function hookDomPurifyHrefAndSrcSanitizer(allowedProtocols,allowDataImages=false){const anchor=document.createElement("a");addHook("afterSanitizeAttributes",(node=>{for(const attr of["href","src"]){if(node.hasAttribute(attr)){const attrValue=node.getAttribute(attr);if(attr==="href"&&attrValue.startsWith("#")){continue}anchor.href=attrValue;if(!allowedProtocols.includes(anchor.protocol.replace(/:$/,""))){if(allowDataImages&&attr==="src"&&anchor.href.startsWith("data:")){continue}node.removeAttribute(attr)}}}}));return toDisposable((()=>{removeHook("afterSanitizeAttributes")}))}function h(tag,...args){let attributes;let children;if(Array.isArray(args[0])){attributes={};children=args[0]}else{attributes=args[0]||{};children=args[1]}const match2=H_REGEX.exec(tag);if(!match2||!match2.groups){throw new Error("Bad use of h")}const tagName=match2.groups["tag"]||"div";const el=document.createElement(tagName);if(match2.groups["id"]){el.id=match2.groups["id"]}const classNames=[];if(match2.groups["class"]){for(const className of match2.groups["class"].split(".")){if(className!==""){classNames.push(className)}}}if(attributes.className!==void 0){for(const className of attributes.className.split(".")){if(className!==""){classNames.push(className)}}}if(classNames.length>0){el.className=classNames.join(" ")}const result={};if(match2.groups["name"]){result[match2.groups["name"]]=el}if(children){for(const c of children){if(c instanceof HTMLElement){el.appendChild(c)}else if(typeof c==="string"){el.append(c)}else if("root"in c){Object.assign(result,c);el.appendChild(c.root)}}}for(const[key,value]of Object.entries(attributes)){if(key==="className"){continue}else if(key==="style"){for(const[cssKey,cssValue]of Object.entries(value)){el.style.setProperty(camelCaseToHyphenCase(cssKey),typeof cssValue==="number"?cssValue+"px":""+cssValue)}}else if(key==="tabIndex"){el.tabIndex=value}else{el.setAttribute(camelCaseToHyphenCase(key),value.toString())}}result["root"]=el;return result}function camelCaseToHyphenCase(str){return str.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}var DomListener,addStandardDisposableListener,addStandardDisposableGenericMouseDownListener,runAtThisOrScheduleAtNextAnimationFrame,scheduleAtNextAnimationFrame,AnimationFrameQueueItem,SizeUtils,Dimension,_sharedStyleSheet,EventType,EventHelper,FocusTracker,SELECTOR_REGEX,Namespace,basicMarkupHtmlTags,defaultDomPurifyConfig,ModifierKeyEmitter,DragAndDropObserver,H_REGEX;var init_dom=__esm({"node_modules/monaco-editor/esm/vs/base/browser/dom.js"(){init_browser();init_canIUse();init_keyboardEvent();init_mouseEvent();init_errors();init_event();init_dompurify();init_lifecycle();init_network();init_platform();DomListener=class{constructor(node,type,handler,options2){this._node=node;this._type=type;this._handler=handler;this._options=options2||false;this._node.addEventListener(this._type,this._handler,this._options)}dispose(){if(!this._handler){return}this._node.removeEventListener(this._type,this._handler,this._options);this._node=null;this._handler=null}};addStandardDisposableListener=function addStandardDisposableListener2(node,type,handler,useCapture){let wrapHandler=handler;if(type==="click"||type==="mousedown"){wrapHandler=_wrapAsStandardMouseEvent(handler)}else if(type==="keydown"||type==="keypress"||type==="keyup"){wrapHandler=_wrapAsStandardKeyboardEvent(handler)}return addDisposableListener(node,type,wrapHandler,useCapture)};addStandardDisposableGenericMouseDownListener=function addStandardDisposableListener3(node,handler,useCapture){const wrapHandler=_wrapAsStandardMouseEvent(handler);return addDisposableGenericMouseDownListener(node,wrapHandler,useCapture)};AnimationFrameQueueItem=class{constructor(runner,priority=0){this._runner=runner;this.priority=priority;this._canceled=false}dispose(){this._canceled=true}execute(){if(this._canceled){return}try{this._runner()}catch(e){onUnexpectedError(e)}}static sort(a,b){return b.priority-a.priority}};(function(){let NEXT_QUEUE=[];let CURRENT_QUEUE=null;let animFrameRequested=false;let inAnimationFrameRunner=false;const animationFrameRunner=()=>{animFrameRequested=false;CURRENT_QUEUE=NEXT_QUEUE;NEXT_QUEUE=[];inAnimationFrameRunner=true;while(CURRENT_QUEUE.length>0){CURRENT_QUEUE.sort(AnimationFrameQueueItem.sort);const top=CURRENT_QUEUE.shift();top.execute()}inAnimationFrameRunner=false};scheduleAtNextAnimationFrame=(runner,priority=0)=>{const item=new AnimationFrameQueueItem(runner,priority);NEXT_QUEUE.push(item);if(!animFrameRequested){animFrameRequested=true;requestAnimationFrame(animationFrameRunner)}return item};runAtThisOrScheduleAtNextAnimationFrame=(runner,priority)=>{if(inAnimationFrameRunner){const item=new AnimationFrameQueueItem(runner,priority);CURRENT_QUEUE.push(item);return item}else{return scheduleAtNextAnimationFrame(runner,priority)}}})();SizeUtils=class{static convertToPixels(element,value){return parseFloat(value)||0}static getDimension(element,cssPropertyName,jsPropertyName){const computedStyle=getComputedStyle2(element);const value=computedStyle?computedStyle.getPropertyValue(cssPropertyName):"0";return SizeUtils.convertToPixels(element,value)}static getBorderLeftWidth(element){return SizeUtils.getDimension(element,"border-left-width","borderLeftWidth")}static getBorderRightWidth(element){return SizeUtils.getDimension(element,"border-right-width","borderRightWidth")}static getBorderTopWidth(element){return SizeUtils.getDimension(element,"border-top-width","borderTopWidth")}static getBorderBottomWidth(element){return SizeUtils.getDimension(element,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(element){return SizeUtils.getDimension(element,"padding-left","paddingLeft")}static getPaddingRight(element){return SizeUtils.getDimension(element,"padding-right","paddingRight")}static getPaddingTop(element){return SizeUtils.getDimension(element,"padding-top","paddingTop")}static getPaddingBottom(element){return SizeUtils.getDimension(element,"padding-bottom","paddingBottom")}static getMarginLeft(element){return SizeUtils.getDimension(element,"margin-left","marginLeft")}static getMarginTop(element){return SizeUtils.getDimension(element,"margin-top","marginTop")}static getMarginRight(element){return SizeUtils.getDimension(element,"margin-right","marginRight")}static getMarginBottom(element){return SizeUtils.getDimension(element,"margin-bottom","marginBottom")}};Dimension=class{constructor(width,height){this.width=width;this.height=height}with(width=this.width,height=this.height){if(width!==this.width||height!==this.height){return new Dimension(width,height)}else{return this}}static is(obj){return typeof obj==="object"&&typeof obj.height==="number"&&typeof obj.width==="number"}static lift(obj){if(obj instanceof Dimension){return obj}else{return new Dimension(obj.width,obj.height)}}static equals(a,b){if(a===b){return true}if(!a||!b){return false}return a.width===b.width&&a.height===b.height}};Dimension.None=new Dimension(0,0);_sharedStyleSheet=null;EventType={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:isWebKit?"webkitAnimationIteration":"animationiteration"};EventHelper={stop:(e,cancelBubble)=>{e.preventDefault();if(cancelBubble){e.stopPropagation()}return e}};FocusTracker=class extends Disposable{static hasFocusWithin(element){const shadowRoot=getShadowRoot(element);const activeElement=shadowRoot?shadowRoot.activeElement:document.activeElement;return isAncestor(activeElement,element)}constructor(element){super();this._onDidFocus=this._register(new Emitter);this.onDidFocus=this._onDidFocus.event;this._onDidBlur=this._register(new Emitter);this.onDidBlur=this._onDidBlur.event;let hasFocus=FocusTracker.hasFocusWithin(element);let loosingFocus=false;const onFocus=()=>{loosingFocus=false;if(!hasFocus){hasFocus=true;this._onDidFocus.fire()}};const onBlur=()=>{if(hasFocus){loosingFocus=true;window.setTimeout((()=>{if(loosingFocus){loosingFocus=false;hasFocus=false;this._onDidBlur.fire()}}),0)}};this._refreshStateHandler=()=>{const currentNodeHasFocus=FocusTracker.hasFocusWithin(element);if(currentNodeHasFocus!==hasFocus){if(hasFocus){onBlur()}else{onFocus()}}};this._register(addDisposableListener(element,EventType.FOCUS,onFocus,true));this._register(addDisposableListener(element,EventType.BLUR,onBlur,true));this._register(addDisposableListener(element,EventType.FOCUS_IN,(()=>this._refreshStateHandler())));this._register(addDisposableListener(element,EventType.FOCUS_OUT,(()=>this._refreshStateHandler())))}};SELECTOR_REGEX=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;(function(Namespace2){Namespace2["HTML"]="http://www.w3.org/1999/xhtml";Namespace2["SVG"]="http://www.w3.org/2000/svg"})(Namespace||(Namespace={}));$.SVG=function(description,attrs,...children){return _$(Namespace.SVG,description,attrs,...children)};RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");basicMarkupHtmlTags=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);defaultDomPurifyConfig=Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:false,RETURN_DOM_FRAGMENT:false,RETURN_TRUSTED_TYPE:true});ModifierKeyEmitter=class extends Emitter{constructor(){super();this._subscriptions=new DisposableStore;this._keyStatus={altKey:false,shiftKey:false,ctrlKey:false,metaKey:false};this._subscriptions.add(addDisposableListener(window,"keydown",(e=>{if(e.defaultPrevented){return}const event=new StandardKeyboardEvent(e);if(event.keyCode===6&&e.repeat){return}if(e.altKey&&!this._keyStatus.altKey){this._keyStatus.lastKeyPressed="alt"}else if(e.ctrlKey&&!this._keyStatus.ctrlKey){this._keyStatus.lastKeyPressed="ctrl"}else if(e.metaKey&&!this._keyStatus.metaKey){this._keyStatus.lastKeyPressed="meta"}else if(e.shiftKey&&!this._keyStatus.shiftKey){this._keyStatus.lastKeyPressed="shift"}else if(event.keyCode!==6){this._keyStatus.lastKeyPressed=void 0}else{return}this._keyStatus.altKey=e.altKey;this._keyStatus.ctrlKey=e.ctrlKey;this._keyStatus.metaKey=e.metaKey;this._keyStatus.shiftKey=e.shiftKey;if(this._keyStatus.lastKeyPressed){this._keyStatus.event=e;this.fire(this._keyStatus)}}),true));this._subscriptions.add(addDisposableListener(window,"keyup",(e=>{if(e.defaultPrevented){return}if(!e.altKey&&this._keyStatus.altKey){this._keyStatus.lastKeyReleased="alt"}else if(!e.ctrlKey&&this._keyStatus.ctrlKey){this._keyStatus.lastKeyReleased="ctrl"}else if(!e.metaKey&&this._keyStatus.metaKey){this._keyStatus.lastKeyReleased="meta"}else if(!e.shiftKey&&this._keyStatus.shiftKey){this._keyStatus.lastKeyReleased="shift"}else{this._keyStatus.lastKeyReleased=void 0}if(this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased){this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey;this._keyStatus.ctrlKey=e.ctrlKey;this._keyStatus.metaKey=e.metaKey;this._keyStatus.shiftKey=e.shiftKey;if(this._keyStatus.lastKeyReleased){this._keyStatus.event=e;this.fire(this._keyStatus)}}),true));this._subscriptions.add(addDisposableListener(document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),true));this._subscriptions.add(addDisposableListener(document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),true));this._subscriptions.add(addDisposableListener(document.body,"mousemove",(e=>{if(e.buttons){this._keyStatus.lastKeyPressed=void 0}}),true));this._subscriptions.add(addDisposableListener(window,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus();this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:false,shiftKey:false,ctrlKey:false,metaKey:false}}static getInstance(){if(!ModifierKeyEmitter.instance){ModifierKeyEmitter.instance=new ModifierKeyEmitter}return ModifierKeyEmitter.instance}dispose(){super.dispose();this._subscriptions.dispose()}};DragAndDropObserver=class extends Disposable{constructor(element,callbacks){super();this.element=element;this.callbacks=callbacks;this.counter=0;this.dragStartTime=0;this.registerListeners()}registerListeners(){this._register(addDisposableListener(this.element,EventType.DRAG_ENTER,(e=>{this.counter++;this.dragStartTime=e.timeStamp;this.callbacks.onDragEnter(e)})));this._register(addDisposableListener(this.element,EventType.DRAG_OVER,(e=>{var _a6,_b3;e.preventDefault();(_b3=(_a6=this.callbacks).onDragOver)===null||_b3===void 0?void 0:_b3.call(_a6,e,e.timeStamp-this.dragStartTime)})));this._register(addDisposableListener(this.element,EventType.DRAG_LEAVE,(e=>{this.counter--;if(this.counter===0){this.dragStartTime=0;this.callbacks.onDragLeave(e)}})));this._register(addDisposableListener(this.element,EventType.DRAG_END,(e=>{this.counter=0;this.dragStartTime=0;this.callbacks.onDragEnd(e)})));this._register(addDisposableListener(this.element,EventType.DROP,(e=>{this.counter=0;this.dragStartTime=0;this.callbacks.onDrop(e)})))}};H_REGEX=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/}});var init_2=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.css"(){}});function setARIAContainer(parent){ariaContainer=document.createElement("div");ariaContainer.className="monaco-aria-container";const createAlertContainer=()=>{const element=document.createElement("div");element.className="monaco-alert";element.setAttribute("role","alert");element.setAttribute("aria-atomic","true");ariaContainer.appendChild(element);return element};alertContainer=createAlertContainer();alertContainer2=createAlertContainer();const createStatusContainer=()=>{const element=document.createElement("div");element.className="monaco-status";element.setAttribute("aria-live","polite");element.setAttribute("aria-atomic","true");ariaContainer.appendChild(element);return element};statusContainer=createStatusContainer();statusContainer2=createStatusContainer();parent.appendChild(ariaContainer)}function alert(msg){if(!ariaContainer){return}if(alertContainer.textContent!==msg){clearNode(alertContainer2);insertMessage(alertContainer,msg)}else{clearNode(alertContainer);insertMessage(alertContainer2,msg)}}function status(msg){if(!ariaContainer){return}if(statusContainer.textContent!==msg){clearNode(statusContainer2);insertMessage(statusContainer,msg)}else{clearNode(statusContainer);insertMessage(statusContainer2,msg)}}function insertMessage(target,msg){clearNode(target);if(msg.length>MAX_MESSAGE_LENGTH){msg=msg.substr(0,MAX_MESSAGE_LENGTH)}target.textContent=msg;target.style.visibility="hidden";target.style.visibility="visible"}var MAX_MESSAGE_LENGTH,ariaContainer,alertContainer,alertContainer2,statusContainer,statusContainer2;var init_aria=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/aria/aria.js"(){init_dom();init_2();MAX_MESSAGE_LENGTH=2e4}});var IMarkerDecorationsService;var init_markerDecorations=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/markerDecorations.js"(){init_instantiation();IMarkerDecorationsService=createDecorator("markerDecorationsService")}});var ITextModelService;var init_resolverService=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/resolverService.js"(){init_instantiation();ITextModelService=createDecorator("textModelService")}});function toAction(props){var _a6,_b3;return{id:props.id,label:props.label,class:void 0,enabled:(_a6=props.enabled)!==null&&_a6!==void 0?_a6:true,checked:(_b3=props.checked)!==null&&_b3!==void 0?_b3:false,run:()=>__awaiter6(this,void 0,void 0,(function*(){return props.run()})),tooltip:props.label}}var __awaiter6,Action,ActionRunner,Separator,SubmenuAction,EmptySubmenuAction;var init_actions=__esm({"node_modules/monaco-editor/esm/vs/base/common/actions.js"(){init_event();init_lifecycle();init_nls();__awaiter6=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};Action=class extends Disposable{constructor(id,label="",cssClass="",enabled=true,actionCallback){super();this._onDidChange=this._register(new Emitter);this.onDidChange=this._onDidChange.event;this._enabled=true;this._id=id;this._label=label;this._cssClass=cssClass;this._enabled=enabled;this._actionCallback=actionCallback}get id(){return this._id}get label(){return this._label}set label(value){this._setLabel(value)}_setLabel(value){if(this._label!==value){this._label=value;this._onDidChange.fire({label:value})}}get tooltip(){return this._tooltip||""}set tooltip(value){this._setTooltip(value)}_setTooltip(value){if(this._tooltip!==value){this._tooltip=value;this._onDidChange.fire({tooltip:value})}}get class(){return this._cssClass}set class(value){this._setClass(value)}_setClass(value){if(this._cssClass!==value){this._cssClass=value;this._onDidChange.fire({class:value})}}get enabled(){return this._enabled}set enabled(value){this._setEnabled(value)}_setEnabled(value){if(this._enabled!==value){this._enabled=value;this._onDidChange.fire({enabled:value})}}get checked(){return this._checked}set checked(value){this._setChecked(value)}_setChecked(value){if(this._checked!==value){this._checked=value;this._onDidChange.fire({checked:value})}}run(event,data){return __awaiter6(this,void 0,void 0,(function*(){if(this._actionCallback){yield this._actionCallback(event)}}))}};ActionRunner=class extends Disposable{constructor(){super(...arguments);this._onWillRun=this._register(new Emitter);this.onWillRun=this._onWillRun.event;this._onDidRun=this._register(new Emitter);this.onDidRun=this._onDidRun.event}run(action,context){return __awaiter6(this,void 0,void 0,(function*(){if(!action.enabled){return}this._onWillRun.fire({action:action});let error=void 0;try{yield this.runAction(action,context)}catch(e){error=e}this._onDidRun.fire({action:action,error:error})}))}runAction(action,context){return __awaiter6(this,void 0,void 0,(function*(){yield action.run(context)}))}};Separator=class{constructor(){this.id=Separator.ID;this.label="";this.tooltip="";this.class="separator";this.enabled=false;this.checked=false}static join(...actionLists){let out=[];for(const list of actionLists){if(!list.length){}else if(out.length){out=[...out,new Separator,...list]}else{out=list}}return out}run(){return __awaiter6(this,void 0,void 0,(function*(){}))}};Separator.ID="vs.actions.separator";SubmenuAction=class{get actions(){return this._actions}constructor(id,label,actions,cssClass){this.tooltip="";this.enabled=true;this.checked=void 0;this.id=id;this.label=label;this.class=cssClass;this._actions=actions}run(){return __awaiter6(this,void 0,void 0,(function*(){}))}};EmptySubmenuAction=class extends Action{constructor(){super(EmptySubmenuAction.ID,localize("submenu.empty","(empty)"),void 0,false)}};EmptySubmenuAction.ID="vs.actions.empty"}});var ThemeColor,ThemeIcon;var init_themables=__esm({"node_modules/monaco-editor/esm/vs/base/common/themables.js"(){init_codicons();(function(ThemeColor2){function isThemeColor(obj){return obj&&typeof obj==="object"&&typeof obj.id==="string"}ThemeColor2.isThemeColor=isThemeColor})(ThemeColor||(ThemeColor={}));(function(ThemeIcon2){ThemeIcon2.iconNameSegment="[A-Za-z0-9]+";ThemeIcon2.iconNameExpression="[A-Za-z0-9-]+";ThemeIcon2.iconModifierExpression="~[A-Za-z]+";ThemeIcon2.iconNameCharacter="[A-Za-z0-9~-]";const ThemeIconIdRegex=new RegExp(`^(${ThemeIcon2.iconNameExpression})(${ThemeIcon2.iconModifierExpression})?$`);function asClassNameArray(icon){const match2=ThemeIconIdRegex.exec(icon.id);if(!match2){return asClassNameArray(Codicon.error)}const[,id,modifier]=match2;const classNames=["codicon","codicon-"+id];if(modifier){classNames.push("codicon-modifier-"+modifier.substring(1))}return classNames}ThemeIcon2.asClassNameArray=asClassNameArray;function asClassName(icon){return asClassNameArray(icon).join(" ")}ThemeIcon2.asClassName=asClassName;function asCSSSelector(icon){return"."+asClassNameArray(icon).join(".")}ThemeIcon2.asCSSSelector=asCSSSelector;function isThemeIcon(obj){return obj&&typeof obj==="object"&&typeof obj.id==="string"&&(typeof obj.color==="undefined"||ThemeColor.isThemeColor(obj.color))}ThemeIcon2.isThemeIcon=isThemeIcon;const _regexFromString=new RegExp(`^\\$\\((${ThemeIcon2.iconNameExpression}(?:${ThemeIcon2.iconModifierExpression})?)\\)$`);function fromString(str){const match2=_regexFromString.exec(str);if(!match2){return void 0}const[,name]=match2;return{id:name}}ThemeIcon2.fromString=fromString;function fromId(id){return{id:id}}ThemeIcon2.fromId=fromId;function modify(icon,modifier){let id=icon.id;const tildeIndex=id.lastIndexOf("~");if(tildeIndex!==-1){id=id.substring(0,tildeIndex)}if(modifier){id=`${id}~${modifier}`}return{id:id}}ThemeIcon2.modify=modify;function getModifier(icon){const tildeIndex=icon.id.lastIndexOf("~");if(tildeIndex!==-1){return icon.id.substring(tildeIndex+1)}return void 0}ThemeIcon2.getModifier=getModifier;function isEqual2(ti1,ti2){var _a6,_b3;return ti1.id===ti2.id&&((_a6=ti1.color)===null||_a6===void 0?void 0:_a6.id)===((_b3=ti2.color)===null||_b3===void 0?void 0:_b3.id)}ThemeIcon2.isEqual=isEqual2})(ThemeIcon||(ThemeIcon={}))}});var ICommandService,CommandsRegistry;var init_commands=__esm({"node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js"(){init_event();init_iterator();init_lifecycle();init_linkedList();init_types();init_instantiation();ICommandService=createDecorator("commandService");CommandsRegistry=new class{constructor(){this._commands=new Map;this._onDidRegisterCommand=new Emitter;this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(idOrCommand,handler){if(!idOrCommand){throw new Error(`invalid command`)}if(typeof idOrCommand==="string"){if(!handler){throw new Error(`invalid command`)}return this.registerCommand({id:idOrCommand,handler:handler})}if(idOrCommand.description){const constraints=[];for(const arg of idOrCommand.description.args){constraints.push(arg.constraint)}const actualHandler=idOrCommand.handler;idOrCommand.handler=function(accessor,...args){validateConstraints(args,constraints);return actualHandler(accessor,...args)}}const{id:id}=idOrCommand;let commands=this._commands.get(id);if(!commands){commands=new LinkedList;this._commands.set(id,commands)}const removeFn=commands.unshift(idOrCommand);const ret=toDisposable((()=>{removeFn();const command=this._commands.get(id);if(command===null||command===void 0?void 0:command.isEmpty()){this._commands.delete(id)}}));this._onDidRegisterCommand.fire(id);return ret}registerCommandAlias(oldId,newId){return CommandsRegistry.registerCommand(oldId,((accessor,...args)=>accessor.get(ICommandService).executeCommand(newId,...args)))}getCommand(id){const list=this._commands.get(id);if(!list||list.isEmpty()){return void 0}return Iterable.first(list)}getCommands(){const result=new Map;for(const key of this._commands.keys()){const command=this.getCommand(key);if(command){result.set(key,command)}}return result}};CommandsRegistry.registerCommand("noop",(()=>{}))}});function sorter(a,b){if(a.weight1!==b.weight1){return a.weight1-b.weight1}if(a.command&&b.command){if(a.commandb.command){return 1}}return a.weight2-b.weight2}var KeybindingsRegistryImpl,KeybindingsRegistry,Extensions4;var init_keybindingsRegistry=__esm({"node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingsRegistry.js"(){init_keybindings();init_platform();init_commands();init_platform2();init_lifecycle();init_linkedList();KeybindingsRegistryImpl=class{constructor(){this._coreKeybindings=new LinkedList;this._extensionKeybindings=[];this._cachedMergedKeybindings=null}static bindToCurrentPlatform(kb){if(OS===1){if(kb&&kb.win){return kb.win}}else if(OS===2){if(kb&&kb.mac){return kb.mac}}else{if(kb&&kb.linux){return kb.linux}}return kb}registerKeybindingRule(rule){const actualKb=KeybindingsRegistryImpl.bindToCurrentPlatform(rule);const result=new DisposableStore;if(actualKb&&actualKb.primary){const kk=decodeKeybinding(actualKb.primary,OS);if(kk){result.add(this._registerDefaultKeybinding(kk,rule.id,rule.args,rule.weight,0,rule.when))}}if(actualKb&&Array.isArray(actualKb.secondary)){for(let i=0,len=actualKb.secondary.length;i{remove();this._cachedMergedKeybindings=null}))}getDefaultKeybindings(){if(!this._cachedMergedKeybindings){this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings);this._cachedMergedKeybindings.sort(sorter)}return this._cachedMergedKeybindings.slice(0)}};KeybindingsRegistry=new KeybindingsRegistryImpl;Extensions4={EditorModes:"platform.keybindingsRegistry"};Registry.add(Extensions4.EditorModes,KeybindingsRegistry)}});function isIMenuItem(item){return item.command!==void 0}function isISubmenuItem(item){return item.submenu!==void 0}function registerAction2(ctor){const disposables=new DisposableStore;const action=new ctor;const _a6=action.desc,{f1:f1,menu:menu,keybinding:keybinding,description:description}=_a6,command=__rest(_a6,["f1","menu","keybinding","description"]);disposables.add(CommandsRegistry.registerCommand({id:command.id,handler:(accessor,...args)=>action.run(accessor,...args),description:description}));if(Array.isArray(menu)){for(const item of menu){disposables.add(MenuRegistry.appendMenuItem(item.id,Object.assign({command:Object.assign(Object.assign({},command),{precondition:item.precondition===null?void 0:command.precondition})},item)))}}else if(menu){disposables.add(MenuRegistry.appendMenuItem(menu.id,Object.assign({command:Object.assign(Object.assign({},command),{precondition:menu.precondition===null?void 0:command.precondition})},menu)))}if(f1){disposables.add(MenuRegistry.appendMenuItem(MenuId.CommandPalette,{command:command,when:command.precondition}));disposables.add(MenuRegistry.addCommand(command))}if(Array.isArray(keybinding)){for(const item of keybinding){disposables.add(KeybindingsRegistry.registerKeybindingRule(Object.assign(Object.assign({},item),{id:command.id,when:command.precondition?ContextKeyExpr.and(command.precondition,item.when):item.when})))}}else if(keybinding){disposables.add(KeybindingsRegistry.registerKeybindingRule(Object.assign(Object.assign({},keybinding),{id:command.id,when:command.precondition?ContextKeyExpr.and(command.precondition,keybinding.when):keybinding.when})))}return disposables}var __decorate5,__param5,__rest,MenuItemAction_1,MenuId,IMenuService,MenuRegistryChangeEvent,MenuRegistry,SubmenuItemAction,MenuItemAction,Action2;var init_actions2=__esm({"node_modules/monaco-editor/esm/vs/platform/actions/common/actions.js"(){init_actions();init_themables();init_event();init_lifecycle();init_linkedList();init_commands();init_contextkey();init_instantiation();init_keybindingsRegistry();__decorate5=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param5=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__rest=function(s,e){var t2={};for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0)t2[p]=s[p];if(s!=null&&typeof Object.getOwnPropertySymbols==="function")for(var i=0,p=Object.getOwnPropertySymbols(s);icandidate===id}};MenuRegistryChangeEvent._all=new Map;MenuRegistry=new class{constructor(){this._commands=new Map;this._menuItems=new Map;this._onDidChangeMenu=new MicrotaskEmitter({merge:MenuRegistryChangeEvent.merge});this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(command){this._commands.set(command.id,command);this._onDidChangeMenu.fire(MenuRegistryChangeEvent.for(MenuId.CommandPalette));return toDisposable((()=>{if(this._commands.delete(command.id)){this._onDidChangeMenu.fire(MenuRegistryChangeEvent.for(MenuId.CommandPalette))}}))}getCommand(id){return this._commands.get(id)}getCommands(){const map=new Map;this._commands.forEach(((value,key)=>map.set(key,value)));return map}appendMenuItem(id,item){let list=this._menuItems.get(id);if(!list){list=new LinkedList;this._menuItems.set(id,list)}const rm=list.push(item);this._onDidChangeMenu.fire(MenuRegistryChangeEvent.for(id));return toDisposable((()=>{rm();this._onDidChangeMenu.fire(MenuRegistryChangeEvent.for(id))}))}appendMenuItems(items){const result=new DisposableStore;for(const{id:id,item:item}of items){result.add(this.appendMenuItem(id,item))}return result}getMenuItems(id){let result;if(this._menuItems.has(id)){result=[...this._menuItems.get(id)]}else{result=[]}if(id===MenuId.CommandPalette){this._appendImplicitItems(result)}return result}_appendImplicitItems(result){const set=new Set;for(const item of result){if(isIMenuItem(item)){set.add(item.command.id);if(item.alt){set.add(item.alt.id)}}}this._commands.forEach(((command,id)=>{if(!set.has(id)){result.push({command:command})}}))}};SubmenuItemAction=class extends SubmenuAction{constructor(item,hideActions,actions){super(`submenuitem.${item.submenu.id}`,typeof item.title==="string"?item.title:item.title.value,actions,"submenu");this.item=item;this.hideActions=hideActions}};MenuItemAction=MenuItemAction_1=class MenuItemAction2{static label(action,options2){return(options2===null||options2===void 0?void 0:options2.renderShortTitle)&&action.shortTitle?typeof action.shortTitle==="string"?action.shortTitle:action.shortTitle.value:typeof action.title==="string"?action.title:action.title.value}constructor(item,alt,options2,hideActions,contextKeyService,_commandService){var _a6,_b3;this.hideActions=hideActions;this._commandService=_commandService;this.id=item.id;this.label=MenuItemAction_1.label(item,options2);this.tooltip=(_b3=typeof item.tooltip==="string"?item.tooltip:(_a6=item.tooltip)===null||_a6===void 0?void 0:_a6.value)!==null&&_b3!==void 0?_b3:"";this.enabled=!item.precondition||contextKeyService.contextMatchesRules(item.precondition);this.checked=void 0;let icon;if(item.toggled){const toggled=item.toggled.condition?item.toggled:{condition:item.toggled};this.checked=contextKeyService.contextMatchesRules(toggled.condition);if(this.checked&&toggled.tooltip){this.tooltip=typeof toggled.tooltip==="string"?toggled.tooltip:toggled.tooltip.value}if(this.checked&&ThemeIcon.isThemeIcon(toggled.icon)){icon=toggled.icon}if(this.checked&&toggled.title){this.label=typeof toggled.title==="string"?toggled.title:toggled.title.value}}if(!icon){icon=ThemeIcon.isThemeIcon(item.icon)?item.icon:void 0}this.item=item;this.alt=alt?new MenuItemAction_1(alt,void 0,options2,hideActions,contextKeyService,_commandService):void 0;this._options=options2;this.class=icon&&ThemeIcon.asClassName(icon)}run(...args){var _a6,_b3;let runArgs=[];if((_a6=this._options)===null||_a6===void 0?void 0:_a6.arg){runArgs=[...runArgs,this._options.arg]}if((_b3=this._options)===null||_b3===void 0?void 0:_b3.shouldForwardArgs){runArgs=[...runArgs,...args]}return this._commandService.executeCommand(this.id,...runArgs)}};MenuItemAction=MenuItemAction_1=__decorate5([__param5(4,IContextKeyService),__param5(5,ICommandService)],MenuItemAction);Action2=class{constructor(desc){this.desc=desc}}}});var ITelemetryService;var init_telemetry=__esm({"node_modules/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js"(){init_instantiation();ITelemetryService=createDecorator("telemetryService")}});function registerModelAndPositionCommand(id,handler){CommandsRegistry.registerCommand(id,(function(accessor,...args){const instaService=accessor.get(IInstantiationService);const[resource,position]=args;assertType(URI.isUri(resource));assertType(Position.isIPosition(position));const model=accessor.get(IModelService).getModel(resource);if(model){const editorPosition=Position.lift(position);return instaService.invokeFunction(handler,model,editorPosition,...args.slice(2))}return accessor.get(ITextModelService).createModelReference(resource).then((reference=>new Promise(((resolve2,reject)=>{try{const result=instaService.invokeFunction(handler,reference.object.textEditorModel,Position.lift(position),args.slice(2));resolve2(result)}catch(err){reject(err)}})).finally((()=>{reference.dispose()}))))}))}function registerEditorCommand(editorCommand){EditorContributionRegistry.INSTANCE.registerEditorCommand(editorCommand);return editorCommand}function registerEditorAction(ctor){const action=new ctor;EditorContributionRegistry.INSTANCE.registerEditorAction(action);return action}function registerMultiEditorAction(action){EditorContributionRegistry.INSTANCE.registerEditorAction(action);return action}function registerInstantiatedEditorAction(editorAction){EditorContributionRegistry.INSTANCE.registerEditorAction(editorAction)}function registerEditorContribution(id,ctor,instantiation){EditorContributionRegistry.INSTANCE.registerEditorContribution(id,ctor,instantiation)}function registerCommand(command){command.register();return command}var Command2,MultiCommand,ProxyCommand,EditorCommand,EditorAction,MultiEditorAction,EditorAction2,EditorExtensionsRegistry,Extensions5,EditorContributionRegistry,UndoCommand,RedoCommand,SelectAllCommand;var init_editorExtensions=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js"(){init_nls();init_uri();init_codeEditorService();init_position();init_model2();init_resolverService();init_actions2();init_commands();init_contextkey();init_instantiation();init_keybindingsRegistry();init_platform2();init_telemetry();init_types();init_log();Command2=class{constructor(opts){this.id=opts.id;this.precondition=opts.precondition;this._kbOpts=opts.kbOpts;this._menuOpts=opts.menuOpts;this._description=opts.description}register(){if(Array.isArray(this._menuOpts)){this._menuOpts.forEach(this._registerMenuItem,this)}else if(this._menuOpts){this._registerMenuItem(this._menuOpts)}if(this._kbOpts){const kbOptsArr=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const kbOpts of kbOptsArr){let kbWhen=kbOpts.kbExpr;if(this.precondition){if(kbWhen){kbWhen=ContextKeyExpr.and(kbWhen,this.precondition)}else{kbWhen=this.precondition}}const desc={id:this.id,weight:kbOpts.weight,args:kbOpts.args,when:kbWhen,primary:kbOpts.primary,secondary:kbOpts.secondary,win:kbOpts.win,linux:kbOpts.linux,mac:kbOpts.mac};KeybindingsRegistry.registerKeybindingRule(desc)}}CommandsRegistry.registerCommand({id:this.id,handler:(accessor,args)=>this.runCommand(accessor,args),description:this._description})}_registerMenuItem(item){MenuRegistry.appendMenuItem(item.menuId,{group:item.group,command:{id:this.id,title:item.title,icon:item.icon,precondition:this.precondition},when:item.when,order:item.order})}};MultiCommand=class extends Command2{constructor(){super(...arguments);this._implementations=[]}addImplementation(priority,name,implementation,when){this._implementations.push({priority:priority,name:name,implementation:implementation,when:when});this._implementations.sort(((a,b)=>b.priority-a.priority));return{dispose:()=>{for(let i=0;i{const kbService=editorAccessor.get(IContextKeyService);if(!kbService.contextMatchesRules(precondition!==null&&precondition!==void 0?precondition:void 0)){return}return runner(editorAccessor,editor2,args)}))}runCommand(accessor,args){return EditorCommand.runEditorCommand(accessor,args,this.precondition,((accessor2,editor2,args2)=>this.runEditorCommand(accessor2,editor2,args2)))}};EditorAction=class extends EditorCommand{static convertOptions(opts){let menuOpts;if(Array.isArray(opts.menuOpts)){menuOpts=opts.menuOpts}else if(opts.menuOpts){menuOpts=[opts.menuOpts]}else{menuOpts=[]}function withDefaults(item){if(!item.menuId){item.menuId=MenuId.EditorContext}if(!item.title){item.title=opts.label}item.when=ContextKeyExpr.and(opts.precondition,item.when);return item}if(Array.isArray(opts.contextMenuOpts)){menuOpts.push(...opts.contextMenuOpts.map(withDefaults))}else if(opts.contextMenuOpts){menuOpts.push(withDefaults(opts.contextMenuOpts))}opts.menuOpts=menuOpts;return opts}constructor(opts){super(EditorAction.convertOptions(opts));this.label=opts.label;this.alias=opts.alias}runEditorCommand(accessor,editor2,args){this.reportTelemetry(accessor,editor2);return this.run(accessor,editor2,args||{})}reportTelemetry(accessor,editor2){accessor.get(ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}};MultiEditorAction=class extends EditorAction{constructor(){super(...arguments);this._implementations=[]}addImplementation(priority,implementation){this._implementations.push([priority,implementation]);this._implementations.sort(((a,b)=>b[0]-a[0]));return{dispose:()=>{for(let i=0;i{var _a6,_b3;const kbService=editorAccessor.get(IContextKeyService);const logService=editorAccessor.get(ILogService);const enabled=kbService.contextMatchesRules((_a6=this.desc.precondition)!==null&&_a6!==void 0?_a6:void 0);if(!enabled){logService.debug(`[EditorAction2] NOT running command because its precondition is FALSE`,this.desc.id,(_b3=this.desc.precondition)===null||_b3===void 0?void 0:_b3.serialize());return}return this.runEditorCommand(editorAccessor,editor2,...args)}))}};(function(EditorExtensionsRegistry2){function getEditorCommand(commandId){return EditorContributionRegistry.INSTANCE.getEditorCommand(commandId)}EditorExtensionsRegistry2.getEditorCommand=getEditorCommand;function getEditorActions(){return EditorContributionRegistry.INSTANCE.getEditorActions()}EditorExtensionsRegistry2.getEditorActions=getEditorActions;function getEditorContributions(){return EditorContributionRegistry.INSTANCE.getEditorContributions()}EditorExtensionsRegistry2.getEditorContributions=getEditorContributions;function getSomeEditorContributions(ids){return EditorContributionRegistry.INSTANCE.getEditorContributions().filter((c=>ids.indexOf(c.id)>=0))}EditorExtensionsRegistry2.getSomeEditorContributions=getSomeEditorContributions;function getDiffEditorContributions(){return EditorContributionRegistry.INSTANCE.getDiffEditorContributions()}EditorExtensionsRegistry2.getDiffEditorContributions=getDiffEditorContributions})(EditorExtensionsRegistry||(EditorExtensionsRegistry={}));Extensions5={EditorCommonContributions:"editor.contributions"};EditorContributionRegistry=class{constructor(){this.editorContributions=[];this.diffEditorContributions=[];this.editorActions=[];this.editorCommands=Object.create(null)}registerEditorContribution(id,ctor,instantiation){this.editorContributions.push({id:id,ctor:ctor,instantiation:instantiation})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(action){action.register();this.editorActions.push(action)}getEditorActions(){return this.editorActions}registerEditorCommand(editorCommand){editorCommand.register();this.editorCommands[editorCommand.id]=editorCommand}getEditorCommand(commandId){return this.editorCommands[commandId]||null}};EditorContributionRegistry.INSTANCE=new EditorContributionRegistry;Registry.add(Extensions5.EditorCommonContributions,EditorContributionRegistry.INSTANCE);UndoCommand=registerCommand(new MultiCommand({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2048|56},menuOpts:[{menuId:MenuId.MenubarEditMenu,group:"1_do",title:localize({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:MenuId.CommandPalette,group:"",title:localize("undo","Undo"),order:1}]}));registerCommand(new ProxyCommand(UndoCommand,{id:"default:undo",precondition:void 0}));RedoCommand=registerCommand(new MultiCommand({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2048|55,secondary:[2048|1024|56],mac:{primary:2048|1024|56}},menuOpts:[{menuId:MenuId.MenubarEditMenu,group:"1_do",title:localize({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:MenuId.CommandPalette,group:"",title:localize("redo","Redo"),order:1}]}));registerCommand(new ProxyCommand(RedoCommand,{id:"default:redo",precondition:void 0}));SelectAllCommand=registerCommand(new MultiCommand({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2048|31},menuOpts:[{menuId:MenuId.MenubarSelectionMenu,group:"1_basic",title:localize({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:MenuId.CommandPalette,group:"",title:localize("selectAll","Select All"),order:1}]}))}});var __decorate6,__param6,MarkerDecorationsContribution;var init_markerDecorations2=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/services/markerDecorations.js"(){init_markerDecorations();init_editorExtensions();__decorate6=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param6=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};MarkerDecorationsContribution=class MarkerDecorationsContribution2{constructor(_editor,_markerDecorationsService){}dispose(){}};MarkerDecorationsContribution.ID="editor.contrib.markerDecorations";MarkerDecorationsContribution=__decorate6([__param6(1,IMarkerDecorationsService)],MarkerDecorationsContribution);registerEditorContribution(MarkerDecorationsContribution.ID,MarkerDecorationsContribution,0)}});var init_3=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/media/editor.css"(){}});var ElementSizeObserver;var init_elementSizeObserver=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/config/elementSizeObserver.js"(){init_lifecycle();init_event();ElementSizeObserver=class extends Disposable{constructor(referenceDomElement,dimension){super();this._onDidChange=this._register(new Emitter);this.onDidChange=this._onDidChange.event;this._referenceDomElement=referenceDomElement;this._width=-1;this._height=-1;this._resizeObserver=null;this.measureReferenceDomElement(false,dimension)}dispose(){this.stopObserving();super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let observeContentRect=null;const observeNow=()=>{if(observeContentRect){this.observe({width:observeContentRect.width,height:observeContentRect.height})}else{this.observe()}};let shouldObserve=false;let alreadyObservedThisAnimationFrame=false;const update=()=>{if(shouldObserve&&!alreadyObservedThisAnimationFrame){try{shouldObserve=false;alreadyObservedThisAnimationFrame=true;observeNow()}finally{requestAnimationFrame((()=>{alreadyObservedThisAnimationFrame=false;update()}))}}};this._resizeObserver=new ResizeObserver((entries2=>{observeContentRect=entries2&&entries2[0]&&entries2[0].contentRect?entries2[0].contentRect:null;shouldObserve=true;update()}));this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){if(this._resizeObserver){this._resizeObserver.disconnect();this._resizeObserver=null}}observe(dimension){this.measureReferenceDomElement(true,dimension)}measureReferenceDomElement(emitEvent,dimension){let observedWidth=0;let observedHeight=0;if(dimension){observedWidth=dimension.width;observedHeight=dimension.height}else if(this._referenceDomElement){observedWidth=this._referenceDomElement.clientWidth;observedHeight=this._referenceDomElement.clientHeight}observedWidth=Math.max(5,observedWidth);observedHeight=Math.max(5,observedHeight);if(this._width!==observedWidth||this._height!==observedHeight){this._width=observedWidth;this._height=observedHeight;if(emitEvent){this._onDidChange.fire()}}}}}});function registerEditorSettingMigration(key,migrate){EditorSettingMigration.items.push(new EditorSettingMigration(key,migrate))}function registerSimpleEditorSettingMigration(key,values){registerEditorSettingMigration(key,((value,read,write)=>{if(typeof value!=="undefined"){for(const[oldValue,newValue]of values){if(value===oldValue){write(key,newValue);return}}}}))}function migrateOptions(options2){EditorSettingMigration.items.forEach((migration=>migration.apply(options2)))}var EditorSettingMigration,suggestFilteredTypesMapping;var init_migrateOptions=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/config/migrateOptions.js"(){EditorSettingMigration=class{constructor(key,migrate){this.key=key;this.migrate=migrate}apply(options2){const value=EditorSettingMigration._read(options2,this.key);const read=key=>EditorSettingMigration._read(options2,key);const write=(key,value2)=>EditorSettingMigration._write(options2,key,value2);this.migrate(value,read,write)}static _read(source,key){if(typeof source==="undefined"){return void 0}const firstDotIndex=key.indexOf(".");if(firstDotIndex>=0){const firstSegment=key.substring(0,firstDotIndex);return this._read(source[firstSegment],key.substring(firstDotIndex+1))}return source[key]}static _write(target,key,value){const firstDotIndex=key.indexOf(".");if(firstDotIndex>=0){const firstSegment=key.substring(0,firstDotIndex);target[firstSegment]=target[firstSegment]||{};this._write(target[firstSegment],key.substring(firstDotIndex+1),value);return}target[key]=value}};EditorSettingMigration.items=[];registerSimpleEditorSettingMigration("wordWrap",[[true,"on"],[false,"off"]]);registerSimpleEditorSettingMigration("lineNumbers",[[true,"on"],[false,"off"]]);registerSimpleEditorSettingMigration("cursorBlinking",[["visible","solid"]]);registerSimpleEditorSettingMigration("renderWhitespace",[[true,"boundary"],[false,"none"]]);registerSimpleEditorSettingMigration("renderLineHighlight",[[true,"line"],[false,"none"]]);registerSimpleEditorSettingMigration("acceptSuggestionOnEnter",[[true,"on"],[false,"off"]]);registerSimpleEditorSettingMigration("tabCompletion",[[false,"off"],[true,"onlySnippets"]]);registerSimpleEditorSettingMigration("hover",[[true,{enabled:true}],[false,{enabled:false}]]);registerSimpleEditorSettingMigration("parameterHints",[[true,{enabled:true}],[false,{enabled:false}]]);registerSimpleEditorSettingMigration("autoIndent",[[false,"advanced"],[true,"full"]]);registerSimpleEditorSettingMigration("matchBrackets",[[true,"always"],[false,"never"]]);registerSimpleEditorSettingMigration("renderFinalNewline",[[true,"on"],[false,"off"]]);registerSimpleEditorSettingMigration("cursorSmoothCaretAnimation",[[true,"on"],[false,"off"]]);registerEditorSettingMigration("autoClosingBrackets",((value,read,write)=>{if(value===false){write("autoClosingBrackets","never");if(typeof read("autoClosingQuotes")==="undefined"){write("autoClosingQuotes","never")}if(typeof read("autoSurround")==="undefined"){write("autoSurround","never")}}}));registerEditorSettingMigration("renderIndentGuides",((value,read,write)=>{if(typeof value!=="undefined"){write("renderIndentGuides",void 0);if(typeof read("guides.indentation")==="undefined"){write("guides.indentation",!!value)}}}));registerEditorSettingMigration("highlightActiveIndentGuide",((value,read,write)=>{if(typeof value!=="undefined"){write("highlightActiveIndentGuide",void 0);if(typeof read("guides.highlightActiveIndentation")==="undefined"){write("guides.highlightActiveIndentation",!!value)}}}));suggestFilteredTypesMapping={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};registerEditorSettingMigration("suggest.filteredTypes",((value,read,write)=>{if(value&&typeof value==="object"){for(const entry of Object.entries(suggestFilteredTypesMapping)){const v=value[entry[0]];if(v===false){if(typeof read(`suggest.${entry[1]}`)==="undefined"){write(`suggest.${entry[1]}`,false)}}}write("suggest.filteredTypes",void 0)}}));registerEditorSettingMigration("quickSuggestions",((input,read,write)=>{if(typeof input==="boolean"){const value=input?"on":"off";const newValue={comments:value,strings:value,other:value};write("quickSuggestions",newValue)}}));registerEditorSettingMigration("experimental.stickyScroll.enabled",((value,read,write)=>{if(typeof value==="boolean"){write("experimental.stickyScroll.enabled",void 0);if(typeof read("stickyScroll.enabled")==="undefined"){write("stickyScroll.enabled",value)}}}));registerEditorSettingMigration("experimental.stickyScroll.maxLineCount",((value,read,write)=>{if(typeof value==="number"){write("experimental.stickyScroll.maxLineCount",void 0);if(typeof read("stickyScroll.maxLineCount")==="undefined"){write("stickyScroll.maxLineCount",value)}}}))}});var TabFocusImpl,TabFocus;var init_tabFocus=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/config/tabFocus.js"(){init_event();TabFocusImpl=class{constructor(){this._tabFocusTerminal=false;this._tabFocusEditor=false;this._onDidChangeTabFocus=new Emitter;this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(context){return context==="terminalFocus"?this._tabFocusTerminal:this._tabFocusEditor}setTabFocusMode(tabFocusMode,context){if(context==="terminalFocus"){this._tabFocusTerminal=tabFocusMode}else{this._tabFocusEditor=tabFocusMode}this._onDidChangeTabFocus.fire()}};TabFocus=new TabFocusImpl}});function digitCount(n){let r=0;while(n){n=Math.floor(n/10);r++}return r?r:1}function getExtraEditorClassName(){let extra="";if(!isSafari2&&!isWebkitWebView){extra+="no-user-select "}if(isSafari2){extra+="no-minimap-shadow ";extra+="enable-user-select "}if(isMacintosh){extra+="mac "}return extra}function deepCloneAndMigrateOptions(_options){const options2=deepClone(_options);migrateOptions(options2);return options2}var __decorate7,__param7,EditorConfiguration,ValidatedEditorOptions,ComputedEditorOptions,EditorOptionsUtil;var init_editorConfiguration=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/config/editorConfiguration.js"(){init_browser();init_arrays();init_event();init_lifecycle();init_objects();init_platform();init_elementSizeObserver();init_fontMeasurements();init_migrateOptions();init_tabFocus();init_editorOptions();init_editorZoom();init_fontInfo();init_accessibility();__decorate7=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param7=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};EditorConfiguration=class EditorConfiguration2 extends Disposable{constructor(isSimpleWidget,options2,container,_accessibilityService){super();this._accessibilityService=_accessibilityService;this._onDidChange=this._register(new Emitter);this.onDidChange=this._onDidChange.event;this._onDidChangeFast=this._register(new Emitter);this.onDidChangeFast=this._onDidChangeFast.event;this._isDominatedByLongLines=false;this._viewLineCount=1;this._lineNumbersDigitCount=1;this._reservedHeight=0;this._glyphMarginDecorationLaneCount=1;this._computeOptionsMemory=new ComputeOptionsMemory;this.isSimpleWidget=isSimpleWidget;this._containerObserver=this._register(new ElementSizeObserver(container,options2.dimension));this._rawOptions=deepCloneAndMigrateOptions(options2);this._validatedOptions=EditorOptionsUtil.validateOptions(this._rawOptions);this.options=this._computeOptions();if(this.options.get(12)){this._containerObserver.startObserving()}this._register(EditorZoom.onDidChangeZoomLevel((()=>this._recomputeOptions())));this._register(TabFocus.onDidChangeTabFocus((()=>this._recomputeOptions())));this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions())));this._register(FontMeasurements.onDidChange((()=>this._recomputeOptions())));this._register(PixelRatio.onDidChange((()=>this._recomputeOptions())));this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const newOptions=this._computeOptions();const changeEvent=EditorOptionsUtil.checkEquals(this.options,newOptions);if(changeEvent===null){return}this.options=newOptions;this._onDidChangeFast.fire(changeEvent);this._onDidChange.fire(changeEvent)}_computeOptions(){const partialEnv=this._readEnvConfiguration();const bareFontInfo=BareFontInfo.createFromValidatedSettings(this._validatedOptions,partialEnv.pixelRatio,this.isSimpleWidget);const fontInfo=this._readFontInfo(bareFontInfo);const env2={memory:this._computeOptionsMemory,outerWidth:partialEnv.outerWidth,outerHeight:partialEnv.outerHeight-this._reservedHeight,fontInfo:fontInfo,extraEditorClassName:partialEnv.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:partialEnv.emptySelectionClipboard,pixelRatio:partialEnv.pixelRatio,tabFocusMode:TabFocus.getTabFocusMode("editorFocus"),accessibilitySupport:partialEnv.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return EditorOptionsUtil.computeOptions(this._validatedOptions,env2)}_readEnvConfiguration(){return{extraEditorClassName:getExtraEditorClassName(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:isWebKit||isFirefox2,pixelRatio:PixelRatio.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(bareFontInfo){return FontMeasurements.readFontInfo(bareFontInfo)}getRawOptions(){return this._rawOptions}updateOptions(_newOptions){const newOptions=deepCloneAndMigrateOptions(_newOptions);const didChange=EditorOptionsUtil.applyUpdate(this._rawOptions,newOptions);if(!didChange){return}this._validatedOptions=EditorOptionsUtil.validateOptions(this._rawOptions);this._recomputeOptions()}observeContainer(dimension){this._containerObserver.observe(dimension)}setIsDominatedByLongLines(isDominatedByLongLines){if(this._isDominatedByLongLines===isDominatedByLongLines){return}this._isDominatedByLongLines=isDominatedByLongLines;this._recomputeOptions()}setModelLineCount(modelLineCount){const lineNumbersDigitCount=digitCount(modelLineCount);if(this._lineNumbersDigitCount===lineNumbersDigitCount){return}this._lineNumbersDigitCount=lineNumbersDigitCount;this._recomputeOptions()}setViewLineCount(viewLineCount){if(this._viewLineCount===viewLineCount){return}this._viewLineCount=viewLineCount;this._recomputeOptions()}setReservedHeight(reservedHeight){if(this._reservedHeight===reservedHeight){return}this._reservedHeight=reservedHeight;this._recomputeOptions()}setGlyphMarginDecorationLaneCount(decorationLaneCount){if(this._glyphMarginDecorationLaneCount===decorationLaneCount){return}this._glyphMarginDecorationLaneCount=decorationLaneCount;this._recomputeOptions()}};EditorConfiguration=__decorate7([__param7(3,IAccessibilityService)],EditorConfiguration);ValidatedEditorOptions=class{constructor(){this._values=[]}_read(option){return this._values[option]}get(id){return this._values[id]}_write(option,value){this._values[option]=value}};ComputedEditorOptions=class{constructor(){this._values=[]}_read(id){if(id>=this._values.length){throw new Error("Cannot read uninitialized value")}return this._values[id]}get(id){return this._read(id)}_write(id,value){this._values[id]=value}};EditorOptionsUtil=class{static validateOptions(options2){const result=new ValidatedEditorOptions;for(const editorOption of editorOptionsRegistry){const value=editorOption.name==="_never_"?void 0:options2[editorOption.name];result._write(editorOption.id,editorOption.validate(value))}return result}static computeOptions(options2,env2){const result=new ComputedEditorOptions;for(const editorOption of editorOptionsRegistry){result._write(editorOption.id,editorOption.compute(env2,result,options2._read(editorOption.id)))}return result}static _deepEquals(a,b){if(typeof a!=="object"||typeof b!=="object"||!a||!b){return a===b}if(Array.isArray(a)||Array.isArray(b)){return Array.isArray(a)&&Array.isArray(b)?equals(a,b):false}if(Object.keys(a).length!==Object.keys(b).length){return false}for(const key in a){if(!EditorOptionsUtil._deepEquals(a[key],b[key])){return false}}return true}static checkEquals(a,b){const result=[];let somethingChanged=false;for(const editorOption of editorOptionsRegistry){const changed=!EditorOptionsUtil._deepEquals(a._read(editorOption.id),b._read(editorOption.id));result[editorOption.id]=changed;if(changed){somethingChanged=true}}return somethingChanged?new ConfigurationChangedEvent(result):null}static applyUpdate(options2,update){let changed=false;for(const editorOption of editorOptionsRegistry){if(update.hasOwnProperty(editorOption.name)){const result=editorOption.applyUpdate(options2[editorOption.name],update[editorOption.name]);options2[editorOption.name]=result.newValue;changed=changed||result.didChange}}return changed}}}});function memoize(_target,key,descriptor){let fnKey=null;let fn=null;if(typeof descriptor.value==="function"){fnKey="value";fn=descriptor.value;if(fn.length!==0){console.warn("Memoize should only be used in functions with zero parameters")}}else if(typeof descriptor.get==="function"){fnKey="get";fn=descriptor.get}if(!fn){throw new Error("not supported")}const memoizeKey=`$memoize$${key}`;descriptor[fnKey]=function(...args){if(!this.hasOwnProperty(memoizeKey)){Object.defineProperty(this,memoizeKey,{configurable:false,enumerable:false,writable:false,value:fn.apply(this,args)})}return this[memoizeKey]}}var init_decorators=__esm({"node_modules/monaco-editor/esm/vs/base/common/decorators.js"(){}});var __decorate8,EventType2,Gesture;var init_touch=__esm({"node_modules/monaco-editor/esm/vs/base/browser/touch.js"(){init_dom();init_arrays();init_decorators();init_lifecycle();init_linkedList();__decorate8=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};(function(EventType3){EventType3.Tap="-monaco-gesturetap";EventType3.Change="-monaco-gesturechange";EventType3.Start="-monaco-gesturestart";EventType3.End="-monaco-gesturesend";EventType3.Contextmenu="-monaco-gesturecontextmenu"})(EventType2||(EventType2={}));Gesture=class extends Disposable{constructor(){super();this.dispatched=false;this.targets=new LinkedList;this.ignoreTargets=new LinkedList;this.activeTouches={};this.handle=null;this._lastSetTapCountTime=0;this._register(addDisposableListener(document,"touchstart",(e=>this.onTouchStart(e)),{passive:false}));this._register(addDisposableListener(document,"touchend",(e=>this.onTouchEnd(e))));this._register(addDisposableListener(document,"touchmove",(e=>this.onTouchMove(e)),{passive:false}))}static addTarget(element){if(!Gesture.isTouchDevice()){return Disposable.None}if(!Gesture.INSTANCE){Gesture.INSTANCE=new Gesture}const remove=Gesture.INSTANCE.targets.push(element);return toDisposable(remove)}static ignoreTarget(element){if(!Gesture.isTouchDevice()){return Disposable.None}if(!Gesture.INSTANCE){Gesture.INSTANCE=new Gesture}const remove=Gesture.INSTANCE.ignoreTargets.push(element);return toDisposable(remove)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){if(this.handle){this.handle.dispose();this.handle=null}super.dispose()}onTouchStart(e){const timestamp=Date.now();if(this.handle){this.handle.dispose();this.handle=null}for(let i=0,len=e.targetTouches.length;i=Gesture.HOLD_DELAY&&Math.abs(data.initialPageX-tail(data.rollingPageX))<30&&Math.abs(data.initialPageY-tail(data.rollingPageY))<30){const evt=this.newGestureEvent(EventType2.Contextmenu,data.initialTarget);evt.pageX=tail(data.rollingPageX);evt.pageY=tail(data.rollingPageY);this.dispatchEvent(evt)}else if(activeTouchCount===1){const finalX=tail(data.rollingPageX);const finalY=tail(data.rollingPageY);const deltaT=tail(data.rollingTimestamps)-data.rollingTimestamps[0];const deltaX=finalX-data.rollingPageX[0];const deltaY=finalY-data.rollingPageY[0];const dispatchTo=[...this.targets].filter((t2=>data.initialTarget instanceof Node&&t2.contains(data.initialTarget)));this.inertia(dispatchTo,timestamp,Math.abs(deltaX)/deltaT,deltaX>0?1:-1,finalX,Math.abs(deltaY)/deltaT,deltaY>0?1:-1,finalY)}this.dispatchEvent(this.newGestureEvent(EventType2.End,data.initialTarget));delete this.activeTouches[touch.identifier]}if(this.dispatched){e.preventDefault();e.stopPropagation();this.dispatched=false}}newGestureEvent(type,initialTarget){const event=document.createEvent("CustomEvent");event.initEvent(type,false,true);event.initialTarget=initialTarget;event.tapCount=0;return event}dispatchEvent(event){if(event.type===EventType2.Tap){const currentTime=(new Date).getTime();let setTapCount=0;if(currentTime-this._lastSetTapCountTime>Gesture.CLEAR_TAP_COUNT_TIME){setTapCount=1}else{setTapCount=2}this._lastSetTapCountTime=currentTime;event.tapCount=setTapCount}else if(event.type===EventType2.Change||event.type===EventType2.Contextmenu){this._lastSetTapCountTime=0}if(event.initialTarget instanceof Node){for(const ignoreTarget of this.ignoreTargets){if(ignoreTarget.contains(event.initialTarget)){return}}for(const target of this.targets){if(target.contains(event.initialTarget)){target.dispatchEvent(event);this.dispatched=true}}}}inertia(dispatchTo,t1,vX,dirX,x,vY,dirY,y){this.handle=scheduleAtNextAnimationFrame((()=>{const now=Date.now();const deltaT=now-t1;let delta_pos_x=0,delta_pos_y=0;let stopped=true;vX+=Gesture.SCROLL_FRICTION*deltaT;vY+=Gesture.SCROLL_FRICTION*deltaT;if(vX>0){stopped=false;delta_pos_x=dirX*vX*deltaT}if(vY>0){stopped=false;delta_pos_y=dirY*vY*deltaT}const evt=this.newGestureEvent(EventType2.Change);evt.translationX=delta_pos_x;evt.translationY=delta_pos_y;dispatchTo.forEach((d=>d.dispatchEvent(evt)));if(!stopped){this.inertia(dispatchTo,now,vX,dirX,x+delta_pos_x,vY,dirY,y+delta_pos_y)}}))}onTouchMove(e){const timestamp=Date.now();for(let i=0,len=e.changedTouches.length;i3){data.rollingPageX.shift();data.rollingPageY.shift();data.rollingTimestamps.shift()}data.rollingPageX.push(touch.pageX);data.rollingPageY.push(touch.pageY);data.rollingTimestamps.push(timestamp)}if(this.dispatched){e.preventDefault();e.stopPropagation();this.dispatched=false}}};Gesture.SCROLL_FRICTION=-.005;Gesture.HOLD_DELAY=700;Gesture.CLEAR_TAP_COUNT_TIME=400;__decorate8([memoize],Gesture,"isTouchDevice",null)}});var GlobalPointerMoveMonitor;var init_globalPointerMoveMonitor=__esm({"node_modules/monaco-editor/esm/vs/base/browser/globalPointerMoveMonitor.js"(){init_dom();init_lifecycle();GlobalPointerMoveMonitor=class{constructor(){this._hooks=new DisposableStore;this._pointerMoveCallback=null;this._onStopCallback=null}dispose(){this.stopMonitoring(false);this._hooks.dispose()}stopMonitoring(invokeStopCallback,browserEvent){if(!this.isMonitoring()){return}this._hooks.clear();this._pointerMoveCallback=null;const onStopCallback=this._onStopCallback;this._onStopCallback=null;if(invokeStopCallback&&onStopCallback){onStopCallback(browserEvent)}}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(initialElement,pointerId,initialButtons,pointerMoveCallback,onStopCallback){if(this.isMonitoring()){this.stopMonitoring(false)}this._pointerMoveCallback=pointerMoveCallback;this._onStopCallback=onStopCallback;let eventSource=initialElement;try{initialElement.setPointerCapture(pointerId);this._hooks.add(toDisposable((()=>{try{initialElement.releasePointerCapture(pointerId)}catch(err){}})))}catch(err){eventSource=window}this._hooks.add(addDisposableListener(eventSource,EventType.POINTER_MOVE,(e=>{if(e.buttons!==initialButtons){this.stopMonitoring(true);return}e.preventDefault();this._pointerMoveCallback(e)})));this._hooks.add(addDisposableListener(eventSource,EventType.POINTER_UP,(e=>this.stopMonitoring(true))))}}}});function asCssVariableName(colorIdent){return`--vscode-${colorIdent.replace(/\./g,"-")}`}function asCssVariable(color){return`var(${asCssVariableName(color)})`}function asCssVariableWithDefault(color,defaultCssValue){return`var(${asCssVariableName(color)}, ${defaultCssValue})`}function registerColor(id,defaults,description,needsTransparency,deprecationMessage){return colorRegistry.registerColor(id,defaults,description,needsTransparency,deprecationMessage)}function executeTransform(transform,theme){var _a6,_b3,_c2,_d2;switch(transform.op){case 0:return(_a6=resolveColorValue(transform.value,theme))===null||_a6===void 0?void 0:_a6.darken(transform.factor);case 1:return(_b3=resolveColorValue(transform.value,theme))===null||_b3===void 0?void 0:_b3.lighten(transform.factor);case 2:return(_c2=resolveColorValue(transform.value,theme))===null||_c2===void 0?void 0:_c2.transparent(transform.factor);case 3:{const backgroundColor=resolveColorValue(transform.background,theme);if(!backgroundColor){return resolveColorValue(transform.value,theme)}return(_d2=resolveColorValue(transform.value,theme))===null||_d2===void 0?void 0:_d2.makeOpaque(backgroundColor)}case 4:for(const candidate of transform.values){const color=resolveColorValue(candidate,theme);if(color){return color}}return void 0;case 6:return resolveColorValue(theme.defines(transform.if)?transform.then:transform.else,theme);case 5:{const from=resolveColorValue(transform.value,theme);if(!from){return void 0}const backgroundColor=resolveColorValue(transform.background,theme);if(!backgroundColor){return from.transparent(transform.factor*transform.transparency)}return from.isDarkerThan(backgroundColor)?Color.getLighterColor(from,backgroundColor,transform.factor).transparent(transform.transparency):Color.getDarkerColor(from,backgroundColor,transform.factor).transparent(transform.transparency)}default:throw assertNever(transform)}}function darken(colorValue,factor2){return{op:0,value:colorValue,factor:factor2}}function lighten(colorValue,factor2){return{op:1,value:colorValue,factor:factor2}}function transparent(colorValue,factor2){return{op:2,value:colorValue,factor:factor2}}function oneOf(...colorValues){return{op:4,values:colorValues}}function ifDefinedThenElse(ifArg,thenArg,elseArg){return{op:6,if:ifArg,then:thenArg,else:elseArg}}function lessProminent(colorValue,backgroundColorValue,factor2,transparency){return{op:5,value:colorValue,background:backgroundColorValue,factor:factor2,transparency:transparency}}function resolveColorValue(colorValue,theme){if(colorValue===null){return void 0}else if(typeof colorValue==="string"){if(colorValue[0]==="#"){return Color.fromHex(colorValue)}return theme.getColor(colorValue)}else if(colorValue instanceof Color){return colorValue}else if(typeof colorValue==="object"){return executeTransform(colorValue,theme)}return void 0}var Extensions6,ColorRegistry,colorRegistry,foreground,disabledForeground,errorForeground,descriptionForeground,iconForeground,focusBorder,contrastBorder,activeContrastBorder,selectionBackground,textSeparatorForeground,textLinkForeground,textLinkActiveForeground,textPreformatForeground,textBlockQuoteBackground,textBlockQuoteBorder,textCodeBlockBackground,widgetShadow,widgetBorder,inputBackground,inputForeground,inputBorder,inputActiveOptionBorder,inputActiveOptionHoverBackground,inputActiveOptionBackground,inputActiveOptionForeground,inputPlaceholderForeground,inputValidationInfoBackground,inputValidationInfoForeground,inputValidationInfoBorder,inputValidationWarningBackground,inputValidationWarningForeground,inputValidationWarningBorder,inputValidationErrorBackground,inputValidationErrorForeground,inputValidationErrorBorder,selectBackground,selectListBackground,selectForeground,selectBorder,buttonForeground,buttonSeparator,buttonBackground,buttonHoverBackground,buttonBorder,buttonSecondaryForeground,buttonSecondaryBackground,buttonSecondaryHoverBackground,badgeBackground,badgeForeground,scrollbarShadow,scrollbarSliderBackground,scrollbarSliderHoverBackground,scrollbarSliderActiveBackground,progressBarBackground,editorErrorBackground,editorErrorForeground,editorErrorBorder,editorWarningBackground,editorWarningForeground,editorWarningBorder,editorInfoBackground,editorInfoForeground,editorInfoBorder,editorHintForeground,editorHintBorder,sashHoverBorder,editorBackground,editorForeground,editorStickyScrollBackground,editorStickyScrollHoverBackground,editorWidgetBackground,editorWidgetForeground,editorWidgetBorder,editorWidgetResizeBorder,quickInputBackground,quickInputForeground,quickInputTitleBackground,pickerGroupForeground,pickerGroupBorder,keybindingLabelBackground,keybindingLabelForeground,keybindingLabelBorder,keybindingLabelBottomBorder,editorSelectionBackground,editorSelectionForeground,editorInactiveSelection,editorSelectionHighlight,editorSelectionHighlightBorder,editorFindMatch,editorFindMatchHighlight,editorFindRangeHighlight,editorFindMatchBorder,editorFindMatchHighlightBorder,editorFindRangeHighlightBorder,searchEditorFindMatch,searchEditorFindMatchBorder,searchResultsInfoForeground,editorHoverHighlight,editorHoverBackground,editorHoverForeground,editorHoverBorder,editorHoverStatusBarBackground,editorActiveLinkForeground,editorInlayHintForeground,editorInlayHintBackground,editorInlayHintTypeForeground,editorInlayHintTypeBackground,editorInlayHintParameterForeground,editorInlayHintParameterBackground,editorLightBulbForeground,editorLightBulbAutoFixForeground,defaultInsertColor,defaultRemoveColor,diffInserted,diffRemoved,diffInsertedLine,diffRemovedLine,diffInsertedLineGutter,diffRemovedLineGutter,diffOverviewRulerInserted,diffOverviewRulerRemoved,diffInsertedOutline,diffRemovedOutline,diffBorder,diffDiagonalFill,diffUnchangedRegionBackground,diffUnchangedRegionForeground,diffUnchangedTextBackground,listFocusBackground,listFocusForeground,listFocusOutline,listFocusAndSelectionOutline,listActiveSelectionBackground,listActiveSelectionForeground,listActiveSelectionIconForeground,listInactiveSelectionBackground,listInactiveSelectionForeground,listInactiveSelectionIconForeground,listInactiveFocusBackground,listInactiveFocusOutline,listHoverBackground,listHoverForeground,listDropBackground,listHighlightForeground,listFocusHighlightForeground,listInvalidItemForeground,listErrorForeground,listWarningForeground,listFilterWidgetBackground,listFilterWidgetOutline,listFilterWidgetNoMatchesOutline,listFilterWidgetShadow,listFilterMatchHighlight,listFilterMatchHighlightBorder,treeIndentGuidesStroke,treeInactiveIndentGuidesStroke,tableColumnsBorder,tableOddRowsBackgroundColor,listDeemphasizedForeground,checkboxBackground,checkboxSelectBackground,checkboxForeground,checkboxBorder,checkboxSelectBorder,_deprecatedQuickInputListFocusBackground,quickInputListFocusForeground,quickInputListFocusIconForeground,quickInputListFocusBackground,menuBorder,menuForeground,menuBackground,menuSelectionForeground,menuSelectionBackground,menuSelectionBorder,menuSeparatorBackground,toolbarHoverBackground,toolbarHoverOutline,toolbarActiveBackground,snippetTabstopHighlightBackground,snippetTabstopHighlightBorder,snippetFinalTabstopHighlightBackground,snippetFinalTabstopHighlightBorder,breadcrumbsForeground,breadcrumbsBackground,breadcrumbsFocusForeground,breadcrumbsActiveSelectionForeground,breadcrumbsPickerBackground,headerTransparency,currentBaseColor,incomingBaseColor,commonBaseColor,contentTransparency,rulerTransparency,mergeCurrentHeaderBackground,mergeCurrentContentBackground,mergeIncomingHeaderBackground,mergeIncomingContentBackground,mergeCommonHeaderBackground,mergeCommonContentBackground,mergeBorder,overviewRulerCurrentContentForeground,overviewRulerIncomingContentForeground,overviewRulerCommonContentForeground,overviewRulerFindMatchForeground,overviewRulerSelectionHighlightForeground,minimapFindMatch,minimapSelectionOccurrenceHighlight,minimapSelection,minimapError,minimapWarning,minimapBackground,minimapForegroundOpacity,minimapSliderBackground,minimapSliderHoverBackground,minimapSliderActiveBackground,problemsErrorIconForeground,problemsWarningIconForeground,problemsInfoIconForeground,chartsForeground,chartsLines,chartsRed,chartsBlue,chartsYellow,chartsOrange,chartsGreen,chartsPurple,workbenchColorsSchemaId,schemaRegistry,delayer;var init_colorRegistry=__esm({"node_modules/monaco-editor/esm/vs/platform/theme/common/colorRegistry.js"(){init_async();init_color();init_event();init_assert();init_nls();init_jsonContributionRegistry();init_platform2();Extensions6={ColorContribution:"base.contributions.colors"};ColorRegistry=class{constructor(){this._onDidChangeSchema=new Emitter;this.onDidChangeSchema=this._onDidChangeSchema.event;this.colorSchema={type:"object",properties:{}};this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]};this.colorsById={}}registerColor(id,defaults,description,needsTransparency=false,deprecationMessage){const colorContribution={id:id,description:description,defaults:defaults,needsTransparency:needsTransparency,deprecationMessage:deprecationMessage};this.colorsById[id]=colorContribution;const propertySchema={type:"string",description:description,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};if(deprecationMessage){propertySchema.deprecationMessage=deprecationMessage}this.colorSchema.properties[id]=propertySchema;this.colorReferenceSchema.enum.push(id);this.colorReferenceSchema.enumDescriptions.push(description);this._onDidChangeSchema.fire();return id}getColors(){return Object.keys(this.colorsById).map((id=>this.colorsById[id]))}resolveDefaultColor(id,theme){const colorDesc=this.colorsById[id];if(colorDesc&&colorDesc.defaults){const colorValue=colorDesc.defaults[theme.type];return resolveColorValue(colorValue,theme)}return void 0}getColorSchema(){return this.colorSchema}toString(){const sorter2=(a,b)=>{const cat1=a.indexOf(".")===-1?0:1;const cat2=b.indexOf(".")===-1?0:1;if(cat1!==cat2){return cat1-cat2}return a.localeCompare(b)};return Object.keys(this.colorsById).sort(sorter2).map((k=>`- \`${k}\`: ${this.colorsById[k].description}`)).join("\n")}};colorRegistry=new ColorRegistry;Registry.add(Extensions6.ColorContribution,colorRegistry);foreground=registerColor("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},localize("foreground","Overall foreground color. This color is only used if not overridden by a component."));disabledForeground=registerColor("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},localize("disabledForeground","Overall foreground for disabled elements. This color is only used if not overridden by a component."));errorForeground=registerColor("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},localize("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component."));descriptionForeground=registerColor("descriptionForeground",{light:"#717171",dark:transparent(foreground,.7),hcDark:transparent(foreground,.7),hcLight:transparent(foreground,.7)},localize("descriptionForeground","Foreground color for description text providing additional information, for example for a label."));iconForeground=registerColor("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},localize("iconForeground","The default color for icons in the workbench."));focusBorder=registerColor("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},localize("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component."));contrastBorder=registerColor("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},localize("contrastBorder","An extra border around elements to separate them from others for greater contrast."));activeContrastBorder=registerColor("contrastActiveBorder",{light:null,dark:null,hcDark:focusBorder,hcLight:focusBorder},localize("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast."));selectionBackground=registerColor("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},localize("selectionBackground","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));textSeparatorForeground=registerColor("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:Color.black,hcLight:"#292929"},localize("textSeparatorForeground","Color for text separators."));textLinkForeground=registerColor("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},localize("textLinkForeground","Foreground color for links in text."));textLinkActiveForeground=registerColor("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},localize("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover."));textPreformatForeground=registerColor("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},localize("textPreformatForeground","Foreground color for preformatted text segments."));textBlockQuoteBackground=registerColor("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},localize("textBlockQuoteBackground","Background color for block quotes in text."));textBlockQuoteBorder=registerColor("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:Color.white,hcLight:"#292929"},localize("textBlockQuoteBorder","Border color for block quotes in text."));textCodeBlockBackground=registerColor("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:Color.black,hcLight:"#F2F2F2"},localize("textCodeBlockBackground","Background color for code blocks in text."));widgetShadow=registerColor("widget.shadow",{dark:transparent(Color.black,.36),light:transparent(Color.black,.16),hcDark:null,hcLight:null},localize("widgetShadow","Shadow color of widgets such as find/replace inside the editor."));widgetBorder=registerColor("widget.border",{dark:null,light:null,hcDark:contrastBorder,hcLight:contrastBorder},localize("widgetBorder","Border color of widgets such as find/replace inside the editor."));inputBackground=registerColor("input.background",{dark:"#3C3C3C",light:Color.white,hcDark:Color.black,hcLight:Color.white},localize("inputBoxBackground","Input box background."));inputForeground=registerColor("input.foreground",{dark:foreground,light:foreground,hcDark:foreground,hcLight:foreground},localize("inputBoxForeground","Input box foreground."));inputBorder=registerColor("input.border",{dark:null,light:null,hcDark:contrastBorder,hcLight:contrastBorder},localize("inputBoxBorder","Input box border."));inputActiveOptionBorder=registerColor("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:contrastBorder,hcLight:contrastBorder},localize("inputBoxActiveOptionBorder","Border color of activated options in input fields."));inputActiveOptionHoverBackground=registerColor("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},localize("inputOption.hoverBackground","Background color of activated options in input fields."));inputActiveOptionBackground=registerColor("inputOption.activeBackground",{dark:transparent(focusBorder,.4),light:transparent(focusBorder,.2),hcDark:Color.transparent,hcLight:Color.transparent},localize("inputOption.activeBackground","Background hover color of options in input fields."));inputActiveOptionForeground=registerColor("inputOption.activeForeground",{dark:Color.white,light:Color.black,hcDark:foreground,hcLight:foreground},localize("inputOption.activeForeground","Foreground color of activated options in input fields."));inputPlaceholderForeground=registerColor("input.placeholderForeground",{light:transparent(foreground,.5),dark:transparent(foreground,.5),hcDark:transparent(foreground,.7),hcLight:transparent(foreground,.7)},localize("inputPlaceholderForeground","Input box foreground color for placeholder text."));inputValidationInfoBackground=registerColor("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:Color.black,hcLight:Color.white},localize("inputValidationInfoBackground","Input validation background color for information severity."));inputValidationInfoForeground=registerColor("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:foreground},localize("inputValidationInfoForeground","Input validation foreground color for information severity."));inputValidationInfoBorder=registerColor("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:contrastBorder,hcLight:contrastBorder},localize("inputValidationInfoBorder","Input validation border color for information severity."));inputValidationWarningBackground=registerColor("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:Color.black,hcLight:Color.white},localize("inputValidationWarningBackground","Input validation background color for warning severity."));inputValidationWarningForeground=registerColor("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:foreground},localize("inputValidationWarningForeground","Input validation foreground color for warning severity."));inputValidationWarningBorder=registerColor("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:contrastBorder,hcLight:contrastBorder},localize("inputValidationWarningBorder","Input validation border color for warning severity."));inputValidationErrorBackground=registerColor("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:Color.black,hcLight:Color.white},localize("inputValidationErrorBackground","Input validation background color for error severity."));inputValidationErrorForeground=registerColor("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:foreground},localize("inputValidationErrorForeground","Input validation foreground color for error severity."));inputValidationErrorBorder=registerColor("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:contrastBorder,hcLight:contrastBorder},localize("inputValidationErrorBorder","Input validation border color for error severity."));selectBackground=registerColor("dropdown.background",{dark:"#3C3C3C",light:Color.white,hcDark:Color.black,hcLight:Color.white},localize("dropdownBackground","Dropdown background."));selectListBackground=registerColor("dropdown.listBackground",{dark:null,light:null,hcDark:Color.black,hcLight:Color.white},localize("dropdownListBackground","Dropdown list background."));selectForeground=registerColor("dropdown.foreground",{dark:"#F0F0F0",light:foreground,hcDark:Color.white,hcLight:foreground},localize("dropdownForeground","Dropdown foreground."));selectBorder=registerColor("dropdown.border",{dark:selectBackground,light:"#CECECE",hcDark:contrastBorder,hcLight:contrastBorder},localize("dropdownBorder","Dropdown border."));buttonForeground=registerColor("button.foreground",{dark:Color.white,light:Color.white,hcDark:Color.white,hcLight:Color.white},localize("buttonForeground","Button foreground color."));buttonSeparator=registerColor("button.separator",{dark:transparent(buttonForeground,.4),light:transparent(buttonForeground,.4),hcDark:transparent(buttonForeground,.4),hcLight:transparent(buttonForeground,.4)},localize("buttonSeparator","Button separator color."));buttonBackground=registerColor("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},localize("buttonBackground","Button background color."));buttonHoverBackground=registerColor("button.hoverBackground",{dark:lighten(buttonBackground,.2),light:darken(buttonBackground,.2),hcDark:buttonBackground,hcLight:buttonBackground},localize("buttonHoverBackground","Button background color when hovering."));buttonBorder=registerColor("button.border",{dark:contrastBorder,light:contrastBorder,hcDark:contrastBorder,hcLight:contrastBorder},localize("buttonBorder","Button border color."));buttonSecondaryForeground=registerColor("button.secondaryForeground",{dark:Color.white,light:Color.white,hcDark:Color.white,hcLight:foreground},localize("buttonSecondaryForeground","Secondary button foreground color."));buttonSecondaryBackground=registerColor("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:Color.white},localize("buttonSecondaryBackground","Secondary button background color."));buttonSecondaryHoverBackground=registerColor("button.secondaryHoverBackground",{dark:lighten(buttonSecondaryBackground,.2),light:darken(buttonSecondaryBackground,.2),hcDark:null,hcLight:null},localize("buttonSecondaryHoverBackground","Secondary button background color when hovering."));badgeBackground=registerColor("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:Color.black,hcLight:"#0F4A85"},localize("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count."));badgeForeground=registerColor("badge.foreground",{dark:Color.white,light:"#333",hcDark:Color.white,hcLight:Color.white},localize("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count."));scrollbarShadow=registerColor("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},localize("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled."));scrollbarSliderBackground=registerColor("scrollbarSlider.background",{dark:Color.fromHex("#797979").transparent(.4),light:Color.fromHex("#646464").transparent(.4),hcDark:transparent(contrastBorder,.6),hcLight:transparent(contrastBorder,.4)},localize("scrollbarSliderBackground","Scrollbar slider background color."));scrollbarSliderHoverBackground=registerColor("scrollbarSlider.hoverBackground",{dark:Color.fromHex("#646464").transparent(.7),light:Color.fromHex("#646464").transparent(.7),hcDark:transparent(contrastBorder,.8),hcLight:transparent(contrastBorder,.8)},localize("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering."));scrollbarSliderActiveBackground=registerColor("scrollbarSlider.activeBackground",{dark:Color.fromHex("#BFBFBF").transparent(.4),light:Color.fromHex("#000000").transparent(.6),hcDark:contrastBorder,hcLight:contrastBorder},localize("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on."));progressBarBackground=registerColor("progressBar.background",{dark:Color.fromHex("#0E70C0"),light:Color.fromHex("#0E70C0"),hcDark:contrastBorder,hcLight:contrastBorder},localize("progressBarBackground","Background color of the progress bar that can show for long running operations."));editorErrorBackground=registerColor("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},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);editorErrorForeground=registerColor("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},localize("editorError.foreground","Foreground color of error squigglies in the editor."));editorErrorBorder=registerColor("editorError.border",{dark:null,light:null,hcDark:Color.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},localize("errorBorder","If set, color of double underlines for errors in the editor."));editorWarningBackground=registerColor("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},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);editorWarningForeground=registerColor("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},localize("editorWarning.foreground","Foreground color of warning squigglies in the editor."));editorWarningBorder=registerColor("editorWarning.border",{dark:null,light:null,hcDark:Color.fromHex("#FFCC00").transparent(.8),hcLight:Color.fromHex("#FFCC00").transparent(.8)},localize("warningBorder","If set, color of double underlines for warnings in the editor."));editorInfoBackground=registerColor("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},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);editorInfoForeground=registerColor("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},localize("editorInfo.foreground","Foreground color of info squigglies in the editor."));editorInfoBorder=registerColor("editorInfo.border",{dark:null,light:null,hcDark:Color.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},localize("infoBorder","If set, color of double underlines for infos in the editor."));editorHintForeground=registerColor("editorHint.foreground",{dark:Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},localize("editorHint.foreground","Foreground color of hint squigglies in the editor."));editorHintBorder=registerColor("editorHint.border",{dark:null,light:null,hcDark:Color.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},localize("hintBorder","If set, color of double underlines for hints in the editor."));sashHoverBorder=registerColor("sash.hoverBorder",{dark:focusBorder,light:focusBorder,hcDark:focusBorder,hcLight:focusBorder},localize("sashActiveBorder","Border color of active sashes."));editorBackground=registerColor("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:Color.black,hcLight:Color.white},localize("editorBackground","Editor background color."));editorForeground=registerColor("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:Color.white,hcLight:foreground},localize("editorForeground","Editor default foreground color."));editorStickyScrollBackground=registerColor("editorStickyScroll.background",{light:editorBackground,dark:editorBackground,hcDark:editorBackground,hcLight:editorBackground},localize("editorStickyScrollBackground","Sticky scroll background color for the editor"));editorStickyScrollHoverBackground=registerColor("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:Color.fromHex("#0F4A85").transparent(.1)},localize("editorStickyScrollHoverBackground","Sticky scroll on hover background color for the editor"));editorWidgetBackground=registerColor("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:Color.white},localize("editorWidgetBackground","Background color of editor widgets, such as find/replace."));editorWidgetForeground=registerColor("editorWidget.foreground",{dark:foreground,light:foreground,hcDark:foreground,hcLight:foreground},localize("editorWidgetForeground","Foreground color of editor widgets, such as find/replace."));editorWidgetBorder=registerColor("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:contrastBorder,hcLight:contrastBorder},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."));editorWidgetResizeBorder=registerColor("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},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."));quickInputBackground=registerColor("quickInput.background",{dark:editorWidgetBackground,light:editorWidgetBackground,hcDark:editorWidgetBackground,hcLight:editorWidgetBackground},localize("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette."));quickInputForeground=registerColor("quickInput.foreground",{dark:editorWidgetForeground,light:editorWidgetForeground,hcDark:editorWidgetForeground,hcLight:editorWidgetForeground},localize("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette."));quickInputTitleBackground=registerColor("quickInputTitle.background",{dark:new Color(new RGBA(255,255,255,.105)),light:new Color(new RGBA(0,0,0,.06)),hcDark:"#000000",hcLight:Color.white},localize("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette."));pickerGroupForeground=registerColor("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:Color.white,hcLight:"#0F4A85"},localize("pickerGroupForeground","Quick picker color for grouping labels."));pickerGroupBorder=registerColor("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:Color.white,hcLight:"#0F4A85"},localize("pickerGroupBorder","Quick picker color for grouping borders."));keybindingLabelBackground=registerColor("keybindingLabel.background",{dark:new Color(new RGBA(128,128,128,.17)),light:new Color(new RGBA(221,221,221,.4)),hcDark:Color.transparent,hcLight:Color.transparent},localize("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut."));keybindingLabelForeground=registerColor("keybindingLabel.foreground",{dark:Color.fromHex("#CCCCCC"),light:Color.fromHex("#555555"),hcDark:Color.white,hcLight:foreground},localize("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut."));keybindingLabelBorder=registerColor("keybindingLabel.border",{dark:new Color(new RGBA(51,51,51,.6)),light:new Color(new RGBA(204,204,204,.4)),hcDark:new Color(new RGBA(111,195,223)),hcLight:contrastBorder},localize("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut."));keybindingLabelBottomBorder=registerColor("keybindingLabel.bottomBorder",{dark:new Color(new RGBA(68,68,68,.6)),light:new Color(new RGBA(187,187,187,.4)),hcDark:new Color(new RGBA(111,195,223)),hcLight:foreground},localize("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut."));editorSelectionBackground=registerColor("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},localize("editorSelectionBackground","Color of the editor selection."));editorSelectionForeground=registerColor("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:Color.white},localize("editorSelectionForeground","Color of the selected text for high contrast."));editorInactiveSelection=registerColor("editor.inactiveSelectionBackground",{light:transparent(editorSelectionBackground,.5),dark:transparent(editorSelectionBackground,.5),hcDark:transparent(editorSelectionBackground,.7),hcLight:transparent(editorSelectionBackground,.5)},localize("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),true);editorSelectionHighlight=registerColor("editor.selectionHighlightBackground",{light:lessProminent(editorSelectionBackground,editorBackground,.3,.6),dark:lessProminent(editorSelectionBackground,editorBackground,.3,.6),hcDark:null,hcLight:null},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);editorSelectionHighlightBorder=registerColor("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:activeContrastBorder,hcLight:activeContrastBorder},localize("editorSelectionHighlightBorder","Border color for regions with the same content as the selection."));editorFindMatch=registerColor("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},localize("editorFindMatch","Color of the current search match."));editorFindMatchHighlight=registerColor("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},localize("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),true);editorFindRangeHighlight=registerColor("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},localize("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),true);editorFindMatchBorder=registerColor("editor.findMatchBorder",{light:null,dark:null,hcDark:activeContrastBorder,hcLight:activeContrastBorder},localize("editorFindMatchBorder","Border color of the current search match."));editorFindMatchHighlightBorder=registerColor("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:activeContrastBorder,hcLight:activeContrastBorder},localize("findMatchHighlightBorder","Border color of the other search matches."));editorFindRangeHighlightBorder=registerColor("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:transparent(activeContrastBorder,.4),hcLight:transparent(activeContrastBorder,.4)},localize("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),true);searchEditorFindMatch=registerColor("searchEditor.findMatchBackground",{light:transparent(editorFindMatchHighlight,.66),dark:transparent(editorFindMatchHighlight,.66),hcDark:editorFindMatchHighlight,hcLight:editorFindMatchHighlight},localize("searchEditor.queryMatch","Color of the Search Editor query matches."));searchEditorFindMatchBorder=registerColor("searchEditor.findMatchBorder",{light:transparent(editorFindMatchHighlightBorder,.66),dark:transparent(editorFindMatchHighlightBorder,.66),hcDark:editorFindMatchHighlightBorder,hcLight:editorFindMatchHighlightBorder},localize("searchEditor.editorFindMatchBorder","Border color of the Search Editor query matches."));searchResultsInfoForeground=registerColor("search.resultsInfoForeground",{light:foreground,dark:transparent(foreground,.65),hcDark:foreground,hcLight:foreground},localize("search.resultsInfoForeground","Color of the text in the search viewlet's completion message."));editorHoverHighlight=registerColor("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},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);editorHoverBackground=registerColor("editorHoverWidget.background",{light:editorWidgetBackground,dark:editorWidgetBackground,hcDark:editorWidgetBackground,hcLight:editorWidgetBackground},localize("hoverBackground","Background color of the editor hover."));editorHoverForeground=registerColor("editorHoverWidget.foreground",{light:editorWidgetForeground,dark:editorWidgetForeground,hcDark:editorWidgetForeground,hcLight:editorWidgetForeground},localize("hoverForeground","Foreground color of the editor hover."));editorHoverBorder=registerColor("editorHoverWidget.border",{light:editorWidgetBorder,dark:editorWidgetBorder,hcDark:editorWidgetBorder,hcLight:editorWidgetBorder},localize("hoverBorder","Border color of the editor hover."));editorHoverStatusBarBackground=registerColor("editorHoverWidget.statusBarBackground",{dark:lighten(editorHoverBackground,.2),light:darken(editorHoverBackground,.05),hcDark:editorWidgetBackground,hcLight:editorWidgetBackground},localize("statusBarBackground","Background color of the editor hover status bar."));editorActiveLinkForeground=registerColor("editorLink.activeForeground",{dark:"#4E94CE",light:Color.blue,hcDark:Color.cyan,hcLight:"#292929"},localize("activeLinkForeground","Color of active links."));editorInlayHintForeground=registerColor("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:Color.white,hcLight:Color.black},localize("editorInlayHintForeground","Foreground color of inline hints"));editorInlayHintBackground=registerColor("editorInlayHint.background",{dark:transparent(badgeBackground,.1),light:transparent(badgeBackground,.1),hcDark:transparent(Color.white,.1),hcLight:transparent(badgeBackground,.1)},localize("editorInlayHintBackground","Background color of inline hints"));editorInlayHintTypeForeground=registerColor("editorInlayHint.typeForeground",{dark:editorInlayHintForeground,light:editorInlayHintForeground,hcDark:editorInlayHintForeground,hcLight:editorInlayHintForeground},localize("editorInlayHintForegroundTypes","Foreground color of inline hints for types"));editorInlayHintTypeBackground=registerColor("editorInlayHint.typeBackground",{dark:editorInlayHintBackground,light:editorInlayHintBackground,hcDark:editorInlayHintBackground,hcLight:editorInlayHintBackground},localize("editorInlayHintBackgroundTypes","Background color of inline hints for types"));editorInlayHintParameterForeground=registerColor("editorInlayHint.parameterForeground",{dark:editorInlayHintForeground,light:editorInlayHintForeground,hcDark:editorInlayHintForeground,hcLight:editorInlayHintForeground},localize("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters"));editorInlayHintParameterBackground=registerColor("editorInlayHint.parameterBackground",{dark:editorInlayHintBackground,light:editorInlayHintBackground,hcDark:editorInlayHintBackground,hcLight:editorInlayHintBackground},localize("editorInlayHintBackgroundParameter","Background color of inline hints for parameters"));editorLightBulbForeground=registerColor("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},localize("editorLightBulbForeground","The color used for the lightbulb actions icon."));editorLightBulbAutoFixForeground=registerColor("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},localize("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon."));defaultInsertColor=new Color(new RGBA(155,185,85,.2));defaultRemoveColor=new Color(new RGBA(255,0,0,.2));diffInserted=registerColor("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},localize("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),true);diffRemoved=registerColor("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},localize("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),true);diffInsertedLine=registerColor("diffEditor.insertedLineBackground",{dark:defaultInsertColor,light:defaultInsertColor,hcDark:null,hcLight:null},localize("diffEditorInsertedLines","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations."),true);diffRemovedLine=registerColor("diffEditor.removedLineBackground",{dark:defaultRemoveColor,light:defaultRemoveColor,hcDark:null,hcLight:null},localize("diffEditorRemovedLines","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations."),true);diffInsertedLineGutter=registerColor("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},localize("diffEditorInsertedLineGutter","Background color for the margin where lines got inserted."));diffRemovedLineGutter=registerColor("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},localize("diffEditorRemovedLineGutter","Background color for the margin where lines got removed."));diffOverviewRulerInserted=registerColor("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},localize("diffEditorOverviewInserted","Diff overview ruler foreground for inserted content."));diffOverviewRulerRemoved=registerColor("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},localize("diffEditorOverviewRemoved","Diff overview ruler foreground for removed content."));diffInsertedOutline=registerColor("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},localize("diffEditorInsertedOutline","Outline color for the text that got inserted."));diffRemovedOutline=registerColor("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},localize("diffEditorRemovedOutline","Outline color for text that got removed."));diffBorder=registerColor("diffEditor.border",{dark:null,light:null,hcDark:contrastBorder,hcLight:contrastBorder},localize("diffEditorBorder","Border color between the two text editors."));diffDiagonalFill=registerColor("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},localize("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views."));diffUnchangedRegionBackground=registerColor("diffEditor.unchangedRegionBackground",{dark:"#3e3e3e",light:"#e4e4e4",hcDark:null,hcLight:null},localize("diffEditor.unchangedRegionBackground","The background color of unchanged blocks in the diff editor."));diffUnchangedRegionForeground=registerColor("diffEditor.unchangedRegionForeground",{dark:"#a3a2a2",light:"#4d4c4c",hcDark:null,hcLight:null},localize("diffEditor.unchangedRegionForeground","The foreground color of unchanged blocks in the diff editor."));diffUnchangedTextBackground=registerColor("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},localize("diffEditor.unchangedCodeBackground","The background color of unchanged code in the diff editor."));listFocusBackground=registerColor("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},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."));listFocusForeground=registerColor("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},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."));listFocusOutline=registerColor("list.focusOutline",{dark:focusBorder,light:focusBorder,hcDark:activeContrastBorder,hcLight:activeContrastBorder},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."));listFocusAndSelectionOutline=registerColor("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},localize("listFocusAndSelectionOutline","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not."));listActiveSelectionBackground=registerColor("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:Color.fromHex("#0F4A85").transparent(.1)},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."));listActiveSelectionForeground=registerColor("list.activeSelectionForeground",{dark:Color.white,light:Color.white,hcDark:null,hcLight:null},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."));listActiveSelectionIconForeground=registerColor("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},localize("listActiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not."));listInactiveSelectionBackground=registerColor("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:Color.fromHex("#0F4A85").transparent(.1)},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."));listInactiveSelectionForeground=registerColor("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},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."));listInactiveSelectionIconForeground=registerColor("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},localize("listInactiveSelectionIconForeground","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not."));listInactiveFocusBackground=registerColor("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},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."));listInactiveFocusOutline=registerColor("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},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."));listHoverBackground=registerColor("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:Color.white.transparent(.1),hcLight:Color.fromHex("#0F4A85").transparent(.1)},localize("listHoverBackground","List/Tree background when hovering over items using the mouse."));listHoverForeground=registerColor("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},localize("listHoverForeground","List/Tree foreground when hovering over items using the mouse."));listDropBackground=registerColor("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},localize("listDropBackground","List/Tree drag and drop background when moving items around using the mouse."));listHighlightForeground=registerColor("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:focusBorder,hcLight:focusBorder},localize("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree."));listFocusHighlightForeground=registerColor("list.focusHighlightForeground",{dark:listHighlightForeground,light:ifDefinedThenElse(listActiveSelectionBackground,listHighlightForeground,"#BBE7FF"),hcDark:listHighlightForeground,hcLight:listHighlightForeground},localize("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));listInvalidItemForeground=registerColor("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},localize("invalidItemForeground","List/Tree foreground color for invalid items, for example an unresolved root in explorer."));listErrorForeground=registerColor("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},localize("listErrorForeground","Foreground color of list items containing errors."));listWarningForeground=registerColor("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},localize("listWarningForeground","Foreground color of list items containing warnings."));listFilterWidgetBackground=registerColor("listFilterWidget.background",{light:darken(editorWidgetBackground,0),dark:lighten(editorWidgetBackground,0),hcDark:editorWidgetBackground,hcLight:editorWidgetBackground},localize("listFilterWidgetBackground","Background color of the type filter widget in lists and trees."));listFilterWidgetOutline=registerColor("listFilterWidget.outline",{dark:Color.transparent,light:Color.transparent,hcDark:"#f38518",hcLight:"#007ACC"},localize("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees."));listFilterWidgetNoMatchesOutline=registerColor("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:contrastBorder,hcLight:contrastBorder},localize("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches."));listFilterWidgetShadow=registerColor("listFilterWidget.shadow",{dark:widgetShadow,light:widgetShadow,hcDark:widgetShadow,hcLight:widgetShadow},localize("listFilterWidgetShadow","Shadow color of the type filter widget in lists and trees."));listFilterMatchHighlight=registerColor("list.filterMatchBackground",{dark:editorFindMatchHighlight,light:editorFindMatchHighlight,hcDark:null,hcLight:null},localize("listFilterMatchHighlight","Background color of the filtered match."));listFilterMatchHighlightBorder=registerColor("list.filterMatchBorder",{dark:editorFindMatchHighlightBorder,light:editorFindMatchHighlightBorder,hcDark:contrastBorder,hcLight:activeContrastBorder},localize("listFilterMatchHighlightBorder","Border color of the filtered match."));treeIndentGuidesStroke=registerColor("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},localize("treeIndentGuidesStroke","Tree stroke color for the indentation guides."));treeInactiveIndentGuidesStroke=registerColor("tree.inactiveIndentGuidesStroke",{dark:transparent(treeIndentGuidesStroke,.4),light:transparent(treeIndentGuidesStroke,.4),hcDark:transparent(treeIndentGuidesStroke,.4),hcLight:transparent(treeIndentGuidesStroke,.4)},localize("treeInactiveIndentGuidesStroke","Tree stroke color for the indentation guides that are not active."));tableColumnsBorder=registerColor("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},localize("tableColumnsBorder","Table border color between columns."));tableOddRowsBackgroundColor=registerColor("tree.tableOddRowsBackground",{dark:transparent(foreground,.04),light:transparent(foreground,.04),hcDark:null,hcLight:null},localize("tableOddRowsBackgroundColor","Background color for odd table rows."));listDeemphasizedForeground=registerColor("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},localize("listDeemphasizedForeground","List/Tree foreground color for items that are deemphasized. "));checkboxBackground=registerColor("checkbox.background",{dark:selectBackground,light:selectBackground,hcDark:selectBackground,hcLight:selectBackground},localize("checkbox.background","Background color of checkbox widget."));checkboxSelectBackground=registerColor("checkbox.selectBackground",{dark:editorWidgetBackground,light:editorWidgetBackground,hcDark:editorWidgetBackground,hcLight:editorWidgetBackground},localize("checkbox.select.background","Background color of checkbox widget when the element it's in is selected."));checkboxForeground=registerColor("checkbox.foreground",{dark:selectForeground,light:selectForeground,hcDark:selectForeground,hcLight:selectForeground},localize("checkbox.foreground","Foreground color of checkbox widget."));checkboxBorder=registerColor("checkbox.border",{dark:selectBorder,light:selectBorder,hcDark:selectBorder,hcLight:selectBorder},localize("checkbox.border","Border color of checkbox widget."));checkboxSelectBorder=registerColor("checkbox.selectBorder",{dark:iconForeground,light:iconForeground,hcDark:iconForeground,hcLight:iconForeground},localize("checkbox.select.border","Border color of checkbox widget when the element it's in is selected."));_deprecatedQuickInputListFocusBackground=registerColor("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,localize("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead"));quickInputListFocusForeground=registerColor("quickInputList.focusForeground",{dark:listActiveSelectionForeground,light:listActiveSelectionForeground,hcDark:listActiveSelectionForeground,hcLight:listActiveSelectionForeground},localize("quickInput.listFocusForeground","Quick picker foreground color for the focused item."));quickInputListFocusIconForeground=registerColor("quickInputList.focusIconForeground",{dark:listActiveSelectionIconForeground,light:listActiveSelectionIconForeground,hcDark:listActiveSelectionIconForeground,hcLight:listActiveSelectionIconForeground},localize("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item."));quickInputListFocusBackground=registerColor("quickInputList.focusBackground",{dark:oneOf(_deprecatedQuickInputListFocusBackground,listActiveSelectionBackground),light:oneOf(_deprecatedQuickInputListFocusBackground,listActiveSelectionBackground),hcDark:null,hcLight:null},localize("quickInput.listFocusBackground","Quick picker background color for the focused item."));menuBorder=registerColor("menu.border",{dark:null,light:null,hcDark:contrastBorder,hcLight:contrastBorder},localize("menuBorder","Border color of menus."));menuForeground=registerColor("menu.foreground",{dark:selectForeground,light:selectForeground,hcDark:selectForeground,hcLight:selectForeground},localize("menuForeground","Foreground color of menu items."));menuBackground=registerColor("menu.background",{dark:selectBackground,light:selectBackground,hcDark:selectBackground,hcLight:selectBackground},localize("menuBackground","Background color of menu items."));menuSelectionForeground=registerColor("menu.selectionForeground",{dark:listActiveSelectionForeground,light:listActiveSelectionForeground,hcDark:listActiveSelectionForeground,hcLight:listActiveSelectionForeground},localize("menuSelectionForeground","Foreground color of the selected menu item in menus."));menuSelectionBackground=registerColor("menu.selectionBackground",{dark:listActiveSelectionBackground,light:listActiveSelectionBackground,hcDark:listActiveSelectionBackground,hcLight:listActiveSelectionBackground},localize("menuSelectionBackground","Background color of the selected menu item in menus."));menuSelectionBorder=registerColor("menu.selectionBorder",{dark:null,light:null,hcDark:activeContrastBorder,hcLight:activeContrastBorder},localize("menuSelectionBorder","Border color of the selected menu item in menus."));menuSeparatorBackground=registerColor("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:contrastBorder,hcLight:contrastBorder},localize("menuSeparatorBackground","Color of a separator menu item in menus."));toolbarHoverBackground=registerColor("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},localize("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse"));toolbarHoverOutline=registerColor("toolbar.hoverOutline",{dark:null,light:null,hcDark:activeContrastBorder,hcLight:activeContrastBorder},localize("toolbarHoverOutline","Toolbar outline when hovering over actions using the mouse"));toolbarActiveBackground=registerColor("toolbar.activeBackground",{dark:lighten(toolbarHoverBackground,.1),light:darken(toolbarHoverBackground,.1),hcDark:null,hcLight:null},localize("toolbarActiveBackground","Toolbar background when holding the mouse over actions"));snippetTabstopHighlightBackground=registerColor("editor.snippetTabstopHighlightBackground",{dark:new Color(new RGBA(124,124,124,.3)),light:new Color(new RGBA(10,50,100,.2)),hcDark:new Color(new RGBA(124,124,124,.3)),hcLight:new Color(new RGBA(10,50,100,.2))},localize("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop."));snippetTabstopHighlightBorder=registerColor("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},localize("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop."));snippetFinalTabstopHighlightBackground=registerColor("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},localize("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet."));snippetFinalTabstopHighlightBorder=registerColor("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new Color(new RGBA(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},localize("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet."));breadcrumbsForeground=registerColor("breadcrumb.foreground",{light:transparent(foreground,.8),dark:transparent(foreground,.8),hcDark:transparent(foreground,.8),hcLight:transparent(foreground,.8)},localize("breadcrumbsFocusForeground","Color of focused breadcrumb items."));breadcrumbsBackground=registerColor("breadcrumb.background",{light:editorBackground,dark:editorBackground,hcDark:editorBackground,hcLight:editorBackground},localize("breadcrumbsBackground","Background color of breadcrumb items."));breadcrumbsFocusForeground=registerColor("breadcrumb.focusForeground",{light:darken(foreground,.2),dark:lighten(foreground,.1),hcDark:lighten(foreground,.1),hcLight:lighten(foreground,.1)},localize("breadcrumbsFocusForeground","Color of focused breadcrumb items."));breadcrumbsActiveSelectionForeground=registerColor("breadcrumb.activeSelectionForeground",{light:darken(foreground,.2),dark:lighten(foreground,.1),hcDark:lighten(foreground,.1),hcLight:lighten(foreground,.1)},localize("breadcrumbsSelectedForeground","Color of selected breadcrumb items."));breadcrumbsPickerBackground=registerColor("breadcrumbPicker.background",{light:editorWidgetBackground,dark:editorWidgetBackground,hcDark:editorWidgetBackground,hcLight:editorWidgetBackground},localize("breadcrumbsSelectedBackground","Background color of breadcrumb item picker."));headerTransparency=.5;currentBaseColor=Color.fromHex("#40C8AE").transparent(headerTransparency);incomingBaseColor=Color.fromHex("#40A6FF").transparent(headerTransparency);commonBaseColor=Color.fromHex("#606060").transparent(.4);contentTransparency=.4;rulerTransparency=1;mergeCurrentHeaderBackground=registerColor("merge.currentHeaderBackground",{dark:currentBaseColor,light:currentBaseColor,hcDark:null,hcLight:null},localize("mergeCurrentHeaderBackground","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),true);mergeCurrentContentBackground=registerColor("merge.currentContentBackground",{dark:transparent(mergeCurrentHeaderBackground,contentTransparency),light:transparent(mergeCurrentHeaderBackground,contentTransparency),hcDark:transparent(mergeCurrentHeaderBackground,contentTransparency),hcLight:transparent(mergeCurrentHeaderBackground,contentTransparency)},localize("mergeCurrentContentBackground","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),true);mergeIncomingHeaderBackground=registerColor("merge.incomingHeaderBackground",{dark:incomingBaseColor,light:incomingBaseColor,hcDark:null,hcLight:null},localize("mergeIncomingHeaderBackground","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),true);mergeIncomingContentBackground=registerColor("merge.incomingContentBackground",{dark:transparent(mergeIncomingHeaderBackground,contentTransparency),light:transparent(mergeIncomingHeaderBackground,contentTransparency),hcDark:transparent(mergeIncomingHeaderBackground,contentTransparency),hcLight:transparent(mergeIncomingHeaderBackground,contentTransparency)},localize("mergeIncomingContentBackground","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),true);mergeCommonHeaderBackground=registerColor("merge.commonHeaderBackground",{dark:commonBaseColor,light:commonBaseColor,hcDark:null,hcLight:null},localize("mergeCommonHeaderBackground","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),true);mergeCommonContentBackground=registerColor("merge.commonContentBackground",{dark:transparent(mergeCommonHeaderBackground,contentTransparency),light:transparent(mergeCommonHeaderBackground,contentTransparency),hcDark:transparent(mergeCommonHeaderBackground,contentTransparency),hcLight:transparent(mergeCommonHeaderBackground,contentTransparency)},localize("mergeCommonContentBackground","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),true);mergeBorder=registerColor("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},localize("mergeBorder","Border color on headers and the splitter in inline merge-conflicts."));overviewRulerCurrentContentForeground=registerColor("editorOverviewRuler.currentContentForeground",{dark:transparent(mergeCurrentHeaderBackground,rulerTransparency),light:transparent(mergeCurrentHeaderBackground,rulerTransparency),hcDark:mergeBorder,hcLight:mergeBorder},localize("overviewRulerCurrentContentForeground","Current overview ruler foreground for inline merge-conflicts."));overviewRulerIncomingContentForeground=registerColor("editorOverviewRuler.incomingContentForeground",{dark:transparent(mergeIncomingHeaderBackground,rulerTransparency),light:transparent(mergeIncomingHeaderBackground,rulerTransparency),hcDark:mergeBorder,hcLight:mergeBorder},localize("overviewRulerIncomingContentForeground","Incoming overview ruler foreground for inline merge-conflicts."));overviewRulerCommonContentForeground=registerColor("editorOverviewRuler.commonContentForeground",{dark:transparent(mergeCommonHeaderBackground,rulerTransparency),light:transparent(mergeCommonHeaderBackground,rulerTransparency),hcDark:mergeBorder,hcLight:mergeBorder},localize("overviewRulerCommonContentForeground","Common ancestor overview ruler foreground for inline merge-conflicts."));overviewRulerFindMatchForeground=registerColor("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},localize("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),true);overviewRulerSelectionHighlightForeground=registerColor("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},localize("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),true);minimapFindMatch=registerColor("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},localize("minimapFindMatchHighlight","Minimap marker color for find matches."),true);minimapSelectionOccurrenceHighlight=registerColor("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},localize("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),true);minimapSelection=registerColor("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},localize("minimapSelectionHighlight","Minimap marker color for the editor selection."),true);minimapError=registerColor("minimap.errorHighlight",{dark:new Color(new RGBA(255,18,18,.7)),light:new Color(new RGBA(255,18,18,.7)),hcDark:new Color(new RGBA(255,50,50,1)),hcLight:"#B5200D"},localize("minimapError","Minimap marker color for errors."));minimapWarning=registerColor("minimap.warningHighlight",{dark:editorWarningForeground,light:editorWarningForeground,hcDark:editorWarningBorder,hcLight:editorWarningBorder},localize("overviewRuleWarning","Minimap marker color for warnings."));minimapBackground=registerColor("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},localize("minimapBackground","Minimap background color."));minimapForegroundOpacity=registerColor("minimap.foregroundOpacity",{dark:Color.fromHex("#000f"),light:Color.fromHex("#000f"),hcDark:Color.fromHex("#000f"),hcLight:Color.fromHex("#000f")},localize("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.'));minimapSliderBackground=registerColor("minimapSlider.background",{light:transparent(scrollbarSliderBackground,.5),dark:transparent(scrollbarSliderBackground,.5),hcDark:transparent(scrollbarSliderBackground,.5),hcLight:transparent(scrollbarSliderBackground,.5)},localize("minimapSliderBackground","Minimap slider background color."));minimapSliderHoverBackground=registerColor("minimapSlider.hoverBackground",{light:transparent(scrollbarSliderHoverBackground,.5),dark:transparent(scrollbarSliderHoverBackground,.5),hcDark:transparent(scrollbarSliderHoverBackground,.5),hcLight:transparent(scrollbarSliderHoverBackground,.5)},localize("minimapSliderHoverBackground","Minimap slider background color when hovering."));minimapSliderActiveBackground=registerColor("minimapSlider.activeBackground",{light:transparent(scrollbarSliderActiveBackground,.5),dark:transparent(scrollbarSliderActiveBackground,.5),hcDark:transparent(scrollbarSliderActiveBackground,.5),hcLight:transparent(scrollbarSliderActiveBackground,.5)},localize("minimapSliderActiveBackground","Minimap slider background color when clicked on."));problemsErrorIconForeground=registerColor("problemsErrorIcon.foreground",{dark:editorErrorForeground,light:editorErrorForeground,hcDark:editorErrorForeground,hcLight:editorErrorForeground},localize("problemsErrorIconForeground","The color used for the problems error icon."));problemsWarningIconForeground=registerColor("problemsWarningIcon.foreground",{dark:editorWarningForeground,light:editorWarningForeground,hcDark:editorWarningForeground,hcLight:editorWarningForeground},localize("problemsWarningIconForeground","The color used for the problems warning icon."));problemsInfoIconForeground=registerColor("problemsInfoIcon.foreground",{dark:editorInfoForeground,light:editorInfoForeground,hcDark:editorInfoForeground,hcLight:editorInfoForeground},localize("problemsInfoIconForeground","The color used for the problems info icon."));chartsForeground=registerColor("charts.foreground",{dark:foreground,light:foreground,hcDark:foreground,hcLight:foreground},localize("chartsForeground","The foreground color used in charts."));chartsLines=registerColor("charts.lines",{dark:transparent(foreground,.5),light:transparent(foreground,.5),hcDark:transparent(foreground,.5),hcLight:transparent(foreground,.5)},localize("chartsLines","The color used for horizontal lines in charts."));chartsRed=registerColor("charts.red",{dark:editorErrorForeground,light:editorErrorForeground,hcDark:editorErrorForeground,hcLight:editorErrorForeground},localize("chartsRed","The red color used in chart visualizations."));chartsBlue=registerColor("charts.blue",{dark:editorInfoForeground,light:editorInfoForeground,hcDark:editorInfoForeground,hcLight:editorInfoForeground},localize("chartsBlue","The blue color used in chart visualizations."));chartsYellow=registerColor("charts.yellow",{dark:editorWarningForeground,light:editorWarningForeground,hcDark:editorWarningForeground,hcLight:editorWarningForeground},localize("chartsYellow","The yellow color used in chart visualizations."));chartsOrange=registerColor("charts.orange",{dark:minimapFindMatch,light:minimapFindMatch,hcDark:minimapFindMatch,hcLight:minimapFindMatch},localize("chartsOrange","The orange color used in chart visualizations."));chartsGreen=registerColor("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},localize("chartsGreen","The green color used in chart visualizations."));chartsPurple=registerColor("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},localize("chartsPurple","The purple color used in chart visualizations."));workbenchColorsSchemaId="vscode://schemas/workbench-colors";schemaRegistry=Registry.as(Extensions.JSONContribution);schemaRegistry.registerSchema(workbenchColorsSchemaId,colorRegistry.getColorSchema());delayer=new RunOnceScheduler((()=>schemaRegistry.notifySchemaChanged(workbenchColorsSchemaId)),200);colorRegistry.onDidChangeSchema((()=>{if(!delayer.isScheduled()){delayer.schedule()}}))}});function createEditorPagePosition(editorViewDomNode){const editorPos=getDomNodePagePosition(editorViewDomNode);return new EditorPagePosition(editorPos.left,editorPos.top,editorPos.width,editorPos.height)}function createCoordinatesRelativeToEditor(editorViewDomNode,editorPagePosition,pos){const scaleX=editorPagePosition.width/editorViewDomNode.offsetWidth;const scaleY=editorPagePosition.height/editorViewDomNode.offsetHeight;const relativeX=(pos.x-editorPagePosition.x)/scaleX;const relativeY=(pos.y-editorPagePosition.y)/scaleY;return new CoordinatesRelativeToEditor(relativeX,relativeY)}function camelToDashes(str){return str.replace(/(^[A-Z])/,(([first2])=>first2.toLowerCase())).replace(/([A-Z])/g,(([letter])=>`-${letter.toLowerCase()}`))}var PageCoordinates,ClientCoordinates,EditorPagePosition,CoordinatesRelativeToEditor,EditorMouseEvent,EditorMouseEventFactory,EditorPointerEventFactory,GlobalEditorPointerMoveMonitor,DynamicCssRules,RefCountedCssRule;var init_editorDom=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js"(){init_dom();init_globalPointerMoveMonitor();init_mouseEvent();init_async();init_lifecycle();init_colorRegistry();PageCoordinates=class{constructor(x,y){this.x=x;this.y=y;this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new ClientCoordinates(this.x-window.scrollX,this.y-window.scrollY)}};ClientCoordinates=class{constructor(clientX,clientY){this.clientX=clientX;this.clientY=clientY;this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new PageCoordinates(this.clientX+window.scrollX,this.clientY+window.scrollY)}};EditorPagePosition=class{constructor(x,y,width,height){this.x=x;this.y=y;this.width=width;this.height=height;this._editorPagePositionBrand=void 0}};CoordinatesRelativeToEditor=class{constructor(x,y){this.x=x;this.y=y;this._positionRelativeToEditorBrand=void 0}};EditorMouseEvent=class extends StandardMouseEvent{constructor(e,isFromPointerCapture,editorViewDomNode){super(e);this._editorMouseEventBrand=void 0;this.isFromPointerCapture=isFromPointerCapture;this.pos=new PageCoordinates(this.posx,this.posy);this.editorPos=createEditorPagePosition(editorViewDomNode);this.relativePos=createCoordinatesRelativeToEditor(editorViewDomNode,this.editorPos,this.pos)}};EditorMouseEventFactory=class{constructor(editorViewDomNode){this._editorViewDomNode=editorViewDomNode}_create(e){return new EditorMouseEvent(e,false,this._editorViewDomNode)}onContextMenu(target,callback){return addDisposableListener(target,"contextmenu",(e=>{callback(this._create(e))}))}onMouseUp(target,callback){return addDisposableListener(target,"mouseup",(e=>{callback(this._create(e))}))}onMouseDown(target,callback){return addDisposableListener(target,EventType.MOUSE_DOWN,(e=>{callback(this._create(e))}))}onPointerDown(target,callback){return addDisposableListener(target,EventType.POINTER_DOWN,(e=>{callback(this._create(e),e.pointerId)}))}onMouseLeave(target,callback){return addDisposableListener(target,EventType.MOUSE_LEAVE,(e=>{callback(this._create(e))}))}onMouseMove(target,callback){return addDisposableListener(target,"mousemove",(e=>callback(this._create(e))))}};EditorPointerEventFactory=class{constructor(editorViewDomNode){this._editorViewDomNode=editorViewDomNode}_create(e){return new EditorMouseEvent(e,false,this._editorViewDomNode)}onPointerUp(target,callback){return addDisposableListener(target,"pointerup",(e=>{callback(this._create(e))}))}onPointerDown(target,callback){return addDisposableListener(target,EventType.POINTER_DOWN,(e=>{callback(this._create(e),e.pointerId)}))}onPointerLeave(target,callback){return addDisposableListener(target,EventType.POINTER_LEAVE,(e=>{callback(this._create(e))}))}onPointerMove(target,callback){return addDisposableListener(target,"pointermove",(e=>callback(this._create(e))))}};GlobalEditorPointerMoveMonitor=class extends Disposable{constructor(editorViewDomNode){super();this._editorViewDomNode=editorViewDomNode;this._globalPointerMoveMonitor=this._register(new GlobalPointerMoveMonitor);this._keydownListener=null}startMonitoring(initialElement,pointerId,initialButtons,pointerMoveCallback,onStopCallback){this._keydownListener=addStandardDisposableListener(document,"keydown",(e=>{const chord=e.toKeyCodeChord();if(chord.isModifierKey()){return}this._globalPointerMoveMonitor.stopMonitoring(true,e.browserEvent)}),true);this._globalPointerMoveMonitor.startMonitoring(initialElement,pointerId,initialButtons,(e=>{pointerMoveCallback(new EditorMouseEvent(e,true,this._editorViewDomNode))}),(e=>{this._keydownListener.dispose();onStopCallback(e)}))}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(true)}};DynamicCssRules=class{constructor(_editor){this._editor=_editor;this._instanceId=++DynamicCssRules._idPool;this._counter=0;this._rules=new Map;this._garbageCollectionScheduler=new RunOnceScheduler((()=>this.garbageCollect()),1e3)}createClassNameRef(options2){const rule=this.getOrCreateRule(options2);rule.increaseRefCount();return{className:rule.className,dispose:()=>{rule.decreaseRefCount();this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(properties){const key=this.computeUniqueKey(properties);let existingRule=this._rules.get(key);if(!existingRule){const counter=this._counter++;existingRule=new RefCountedCssRule(key,`dyn-rule-${this._instanceId}-${counter}`,isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,properties);this._rules.set(key,existingRule)}return existingRule}computeUniqueKey(properties){return JSON.stringify(properties)}garbageCollect(){for(const rule of this._rules.values()){if(!rule.hasReferences()){this._rules.delete(rule.key);rule.dispose()}}}};DynamicCssRules._idPool=0;RefCountedCssRule=class{constructor(key,className,_containerElement,properties){this.key=key;this.className=className;this.properties=properties;this._referenceCount=0;this._styleElement=createStyleSheet(_containerElement);this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(className,properties){let str=`.${className} {`;for(const prop in properties){const value=properties[prop];let cssValue;if(typeof value==="object"){cssValue=asCssVariable(value.id)}else{cssValue=value}const cssPropName=camelToDashes(prop);str+=`\n\t${cssPropName}: ${cssValue};`}str+=`\n}`;return str}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}}});var ViewEventHandler;var init_viewEventHandler=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewEventHandler.js"(){init_lifecycle();ViewEventHandler=class extends Disposable{constructor(){super();this._shouldRender=true}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=true}setShouldRender(){this._shouldRender=true}onDidRender(){this._shouldRender=false}onCompositionStart(e){return false}onCompositionEnd(e){return false}onConfigurationChanged(e){return false}onCursorStateChanged(e){return false}onDecorationsChanged(e){return false}onFlushed(e){return false}onFocusChanged(e){return false}onLanguageConfigurationChanged(e){return false}onLineMappingChanged(e){return false}onLinesChanged(e){return false}onLinesDeleted(e){return false}onLinesInserted(e){return false}onRevealRangeRequest(e){return false}onScrollChanged(e){return false}onThemeChanged(e){return false}onTokensChanged(e){return false}onTokensColorsChanged(e){return false}onZonesChanged(e){return false}handleEvents(events){let shouldRender=false;for(let i=0,len=events.length;i=range2.left){prev.width=Math.max(prev.width,range2.left+range2.width-prev.left)}else{result[resultLen++]=prev;prev=range2}}result[resultLen++]=prev;return result}static _createHorizontalRangesFromClientRects(clientRects,clientRectDeltaLeft,clientRectScale){if(!clientRects||clientRects.length===0){return null}const result=[];for(let i=0,len=clientRects.length;imax){return null}startChildIndex=Math.min(max,Math.max(min,startChildIndex));endChildIndex=Math.min(max,Math.max(min,endChildIndex));if(startChildIndex===endChildIndex&&startOffset===endOffset&&startOffset===0&&!domNode.children[startChildIndex].firstChild){const clientRects2=domNode.children[startChildIndex].getClientRects();context.markDidDomLayout();return this._createHorizontalRangesFromClientRects(clientRects2,context.clientRectDeltaLeft,context.clientRectScale)}if(startChildIndex!==endChildIndex){if(endChildIndex>0&&endOffset===0){endChildIndex--;endOffset=1073741824}}let startElement=domNode.children[startChildIndex].firstChild;let endElement=domNode.children[endChildIndex].firstChild;if(!startElement||!endElement){if(!startElement&&startOffset===0&&startChildIndex>0){startElement=domNode.children[startChildIndex-1].firstChild;startOffset=1073741824}if(!endElement&&endOffset===0&&endChildIndex>0){endElement=domNode.children[endChildIndex-1].firstChild;endOffset=1073741824}}if(!startElement||!endElement){return null}startOffset=Math.min(startElement.textContent.length,Math.max(0,startOffset));endOffset=Math.min(endElement.textContent.length,Math.max(0,endOffset));const clientRects=this._readClientRects(startElement,startOffset,endElement,endOffset,context.endNode);context.markDidDomLayout();return this._createHorizontalRangesFromClientRects(clientRects,context.clientRectDeltaLeft,context.clientRectScale)}}}});function isHighContrast(scheme){return scheme===ColorScheme.HIGH_CONTRAST_DARK||scheme===ColorScheme.HIGH_CONTRAST_LIGHT}function isDark(scheme){return scheme===ColorScheme.DARK||scheme===ColorScheme.HIGH_CONTRAST_DARK}var ColorScheme;var init_theme=__esm({"node_modules/monaco-editor/esm/vs/platform/theme/common/theme.js"(){(function(ColorScheme2){ColorScheme2["DARK"]="dark";ColorScheme2["LIGHT"]="light";ColorScheme2["HIGH_CONTRAST_DARK"]="hcDark";ColorScheme2["HIGH_CONTRAST_LIGHT"]="hcLight"})(ColorScheme||(ColorScheme={}))}});function createWebKitRenderedLine(domNode,renderLineInput,characterMapping,containsRTL2,containsForeignElements){return new WebKitRenderedViewLine(domNode,renderLineInput,characterMapping,containsRTL2,containsForeignElements)}function createNormalRenderedLine(domNode,renderLineInput,characterMapping,containsRTL2,containsForeignElements){return new RenderedViewLine(domNode,renderLineInput,characterMapping,containsRTL2,containsForeignElements)}function getColumnOfNodeOffset(characterMapping,spanNode,offset){const spanNodeTextContentLength=spanNode.textContent.length;let spanIndex=-1;while(spanNode){spanNode=spanNode.previousSibling;spanIndex++}return characterMapping.getColumn(new DomPosition(spanIndex,offset),spanNodeTextContentLength)}var canUseFastRenderedViewLine,monospaceAssumptionsAreValid,ViewLineOptions,ViewLine,FastRenderedViewLine,RenderedViewLine,WebKitRenderedViewLine,createRenderedLine;var init_viewLine=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLine.js"(){init_browser();init_fastDomNode();init_platform();init_rangeUtil();init_renderingContext();init_lineDecorations();init_viewLineRenderer();init_theme();init_editorOptions();canUseFastRenderedViewLine=function(){if(isNative){return true}if(isLinux||isFirefox2||isSafari2){return false}return true}();monospaceAssumptionsAreValid=true;ViewLineOptions=class{constructor(config,themeType){this.themeType=themeType;const options2=config.options;const fontInfo=options2.get(49);const experimentalWhitespaceRendering=options2.get(37);if(experimentalWhitespaceRendering==="off"){this.renderWhitespace=options2.get(97)}else{this.renderWhitespace="none"}this.renderControlCharacters=options2.get(92);this.spaceWidth=fontInfo.spaceWidth;this.middotWidth=fontInfo.middotWidth;this.wsmiddotWidth=fontInfo.wsmiddotWidth;this.useMonospaceOptimizations=fontInfo.isMonospace&&!options2.get(32);this.canUseHalfwidthRightwardsArrow=fontInfo.canUseHalfwidthRightwardsArrow;this.lineHeight=options2.get(65);this.stopRenderingLineAfter=options2.get(115);this.fontLigatures=options2.get(50)}equals(other){return this.themeType===other.themeType&&this.renderWhitespace===other.renderWhitespace&&this.renderControlCharacters===other.renderControlCharacters&&this.spaceWidth===other.spaceWidth&&this.middotWidth===other.middotWidth&&this.wsmiddotWidth===other.wsmiddotWidth&&this.useMonospaceOptimizations===other.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===other.canUseHalfwidthRightwardsArrow&&this.lineHeight===other.lineHeight&&this.stopRenderingLineAfter===other.stopRenderingLineAfter&&this.fontLigatures===other.fontLigatures}};ViewLine=class{constructor(options2){this._options=options2;this._isMaybeInvalid=true;this._renderedViewLine=null}getDomNode(){if(this._renderedViewLine&&this._renderedViewLine.domNode){return this._renderedViewLine.domNode.domNode}return null}setDomNode(domNode){if(this._renderedViewLine){this._renderedViewLine.domNode=createFastDomNode(domNode)}else{throw new Error("I have no rendered view line to set the dom node to...")}}onContentChanged(){this._isMaybeInvalid=true}onTokensChanged(){this._isMaybeInvalid=true}onDecorationsChanged(){this._isMaybeInvalid=true}onOptionsChanged(newOptions){this._isMaybeInvalid=true;this._options=newOptions}onSelectionChanged(){if(isHighContrast(this._options.themeType)||this._options.renderWhitespace==="selection"){this._isMaybeInvalid=true;return true}return false}renderLine(lineNumber,deltaTop,viewportData,sb){if(this._isMaybeInvalid===false){return false}this._isMaybeInvalid=false;const lineData=viewportData.getViewLineRenderingData(lineNumber);const options2=this._options;const actualInlineDecorations=LineDecoration.filter(lineData.inlineDecorations,lineNumber,lineData.minColumn,lineData.maxColumn);let selectionsOnLine=null;if(isHighContrast(options2.themeType)||this._options.renderWhitespace==="selection"){const selections=viewportData.selections;for(const selection of selections){if(selection.endLineNumberlineNumber){continue}const startColumn=selection.startLineNumber===lineNumber?selection.startColumn:lineData.minColumn;const endColumn=selection.endLineNumber===lineNumber?selection.endColumn:lineData.maxColumn;if(startColumn');const output=renderViewLine(renderLineInput,sb);sb.appendString("");let renderedViewLine=null;if(monospaceAssumptionsAreValid&&canUseFastRenderedViewLine&&lineData.isBasicASCII&&options2.useMonospaceOptimizations&&output.containsForeignElements===0){renderedViewLine=new FastRenderedViewLine(this._renderedViewLine?this._renderedViewLine.domNode:null,renderLineInput,output.characterMapping)}if(!renderedViewLine){renderedViewLine=createRenderedLine(this._renderedViewLine?this._renderedViewLine.domNode:null,renderLineInput,output.characterMapping,output.containsRTL,output.containsForeignElements)}this._renderedViewLine=renderedViewLine;return true}layoutLine(lineNumber,deltaTop){if(this._renderedViewLine&&this._renderedViewLine.domNode){this._renderedViewLine.domNode.setTop(deltaTop);this._renderedViewLine.domNode.setHeight(this._options.lineHeight)}}getWidth(context){if(!this._renderedViewLine){return 0}return this._renderedViewLine.getWidth(context)}getWidthIsFast(){if(!this._renderedViewLine){return true}return this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){if(!this._renderedViewLine){return false}return this._renderedViewLine instanceof FastRenderedViewLine}monospaceAssumptionsAreValid(){if(!this._renderedViewLine){return monospaceAssumptionsAreValid}if(this._renderedViewLine instanceof FastRenderedViewLine){return this._renderedViewLine.monospaceAssumptionsAreValid()}return monospaceAssumptionsAreValid}onMonospaceAssumptionsInvalidated(){if(this._renderedViewLine&&this._renderedViewLine instanceof FastRenderedViewLine){this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine()}}getVisibleRangesForRange(lineNumber,startColumn,endColumn,context){if(!this._renderedViewLine){return null}startColumn=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,startColumn));endColumn=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,endColumn));const stopRenderingLineAfter=this._renderedViewLine.input.stopRenderingLineAfter;if(stopRenderingLineAfter!==-1&&startColumn>stopRenderingLineAfter+1&&endColumn>stopRenderingLineAfter+1){return new VisibleRanges(true,[new FloatHorizontalRange(this.getWidth(context),0)])}if(stopRenderingLineAfter!==-1&&startColumn>stopRenderingLineAfter+1){startColumn=stopRenderingLineAfter+1}if(stopRenderingLineAfter!==-1&&endColumn>stopRenderingLineAfter+1){endColumn=stopRenderingLineAfter+1}const horizontalRanges=this._renderedViewLine.getVisibleRangesForRange(lineNumber,startColumn,endColumn,context);if(horizontalRanges&&horizontalRanges.length>0){return new VisibleRanges(false,horizontalRanges)}return null}getColumnOfNodeOffset(spanNode,offset){if(!this._renderedViewLine){return 1}return this._renderedViewLine.getColumnOfNodeOffset(spanNode,offset)}};ViewLine.CLASS_NAME="view-line";FastRenderedViewLine=class{constructor(domNode,renderLineInput,characterMapping){this._cachedWidth=-1;this.domNode=domNode;this.input=renderLineInput;const keyColumnCount=Math.floor(renderLineInput.lineContent.length/300);if(keyColumnCount>0){this._keyColumnPixelOffsetCache=new Float32Array(keyColumnCount);for(let i=0;i=2){console.warn(`monospace assumptions have been violated, therefore disabling monospace optimizations!`);monospaceAssumptionsAreValid=false}}return monospaceAssumptionsAreValid}toSlowRenderedLine(){return createRenderedLine(this.domNode,this.input,this._characterMapping,false,0)}getVisibleRangesForRange(lineNumber,startColumn,endColumn,context){const startPosition=this._getColumnPixelOffset(lineNumber,startColumn,context);const endPosition=this._getColumnPixelOffset(lineNumber,endColumn,context);return[new FloatHorizontalRange(startPosition,endPosition-startPosition)]}_getColumnPixelOffset(lineNumber,column,context){if(column<=300){const horizontalOffset2=this._characterMapping.getHorizontalOffset(column);return this._charWidth*horizontalOffset2}const keyColumnOrdinal=Math.floor((column-1)/300)-1;const keyColumn=(keyColumnOrdinal+1)*300+1;let keyColumnPixelOffset=-1;if(this._keyColumnPixelOffsetCache){keyColumnPixelOffset=this._keyColumnPixelOffsetCache[keyColumnOrdinal];if(keyColumnPixelOffset===-1){keyColumnPixelOffset=this._actualReadPixelOffset(lineNumber,keyColumn,context);this._keyColumnPixelOffsetCache[keyColumnOrdinal]=keyColumnPixelOffset}}if(keyColumnPixelOffset===-1){const horizontalOffset2=this._characterMapping.getHorizontalOffset(column);return this._charWidth*horizontalOffset2}const keyColumnHorizontalOffset=this._characterMapping.getHorizontalOffset(keyColumn);const horizontalOffset=this._characterMapping.getHorizontalOffset(column);return keyColumnPixelOffset+this._charWidth*(horizontalOffset-keyColumnHorizontalOffset)}_getReadingTarget(myDomNode){return myDomNode.domNode.firstChild}_actualReadPixelOffset(lineNumber,column,context){if(!this.domNode){return-1}const domPosition=this._characterMapping.getDomPosition(column);const r=RangeUtil.readHorizontalRanges(this._getReadingTarget(this.domNode),domPosition.partIndex,domPosition.charIndex,domPosition.partIndex,domPosition.charIndex,context);if(!r||r.length===0){return-1}return r[0].left}getColumnOfNodeOffset(spanNode,offset){return getColumnOfNodeOffset(this._characterMapping,spanNode,offset)}};RenderedViewLine=class{constructor(domNode,renderLineInput,characterMapping,containsRTL2,containsForeignElements){this.domNode=domNode;this.input=renderLineInput;this._characterMapping=characterMapping;this._isWhitespaceOnly=/^\s*$/.test(renderLineInput.lineContent);this._containsForeignElements=containsForeignElements;this._cachedWidth=-1;this._pixelOffsetCache=null;if(!containsRTL2||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let column=0,len=this._characterMapping.length;column<=len;column++){this._pixelOffsetCache[column]=-1}}}_getReadingTarget(myDomNode){return myDomNode.domNode.firstChild}getWidth(context){if(!this.domNode){return 0}if(this._cachedWidth===-1){this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth;context===null||context===void 0?void 0:context.markDidDomLayout()}return this._cachedWidth}getWidthIsFast(){if(this._cachedWidth===-1){return false}return true}getVisibleRangesForRange(lineNumber,startColumn,endColumn,context){if(!this.domNode){return null}if(this._pixelOffsetCache!==null){const startOffset=this._readPixelOffset(this.domNode,lineNumber,startColumn,context);if(startOffset===-1){return null}const endOffset=this._readPixelOffset(this.domNode,lineNumber,endColumn,context);if(endOffset===-1){return null}return[new FloatHorizontalRange(startOffset,endOffset-startOffset)]}return this._readVisibleRangesForRange(this.domNode,lineNumber,startColumn,endColumn,context)}_readVisibleRangesForRange(domNode,lineNumber,startColumn,endColumn,context){if(startColumn===endColumn){const pixelOffset=this._readPixelOffset(domNode,lineNumber,startColumn,context);if(pixelOffset===-1){return null}else{return[new FloatHorizontalRange(pixelOffset,0)]}}else{return this._readRawVisibleRangesForRange(domNode,startColumn,endColumn,context)}}_readPixelOffset(domNode,lineNumber,column,context){if(this._characterMapping.length===0){if(this._containsForeignElements===0){return 0}if(this._containsForeignElements===2){return 0}if(this._containsForeignElements===1){return this.getWidth(context)}const readingTarget=this._getReadingTarget(domNode);if(readingTarget.firstChild){context.markDidDomLayout();return readingTarget.firstChild.offsetWidth}else{return 0}}if(this._pixelOffsetCache!==null){const cachedPixelOffset=this._pixelOffsetCache[column];if(cachedPixelOffset!==-1){return cachedPixelOffset}const result=this._actualReadPixelOffset(domNode,lineNumber,column,context);this._pixelOffsetCache[column]=result;return result}return this._actualReadPixelOffset(domNode,lineNumber,column,context)}_actualReadPixelOffset(domNode,lineNumber,column,context){if(this._characterMapping.length===0){const r2=RangeUtil.readHorizontalRanges(this._getReadingTarget(domNode),0,0,0,0,context);if(!r2||r2.length===0){return-1}return r2[0].left}if(column===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0){return this.getWidth(context)}const domPosition=this._characterMapping.getDomPosition(column);const r=RangeUtil.readHorizontalRanges(this._getReadingTarget(domNode),domPosition.partIndex,domPosition.charIndex,domPosition.partIndex,domPosition.charIndex,context);if(!r||r.length===0){return-1}const result=r[0].left;if(this.input.isBasicASCII){const horizontalOffset=this._characterMapping.getHorizontalOffset(column);const expectedResult=Math.round(this.input.spaceWidth*horizontalOffset);if(Math.abs(expectedResult-result)<=1){return expectedResult}}return result}_readRawVisibleRangesForRange(domNode,startColumn,endColumn,context){if(startColumn===1&&endColumn===this._characterMapping.length){return[new FloatHorizontalRange(0,this.getWidth(context))]}const startDomPosition=this._characterMapping.getDomPosition(startColumn);const endDomPosition=this._characterMapping.getDomPosition(endColumn);return RangeUtil.readHorizontalRanges(this._getReadingTarget(domNode),startDomPosition.partIndex,startDomPosition.charIndex,endDomPosition.partIndex,endDomPosition.charIndex,context)}getColumnOfNodeOffset(spanNode,offset){return getColumnOfNodeOffset(this._characterMapping,spanNode,offset)}};WebKitRenderedViewLine=class extends RenderedViewLine{_readVisibleRangesForRange(domNode,lineNumber,startColumn,endColumn,context){const output=super._readVisibleRangesForRange(domNode,lineNumber,startColumn,endColumn,context);if(!output||output.length===0||startColumn===endColumn||startColumn===1&&endColumn===this._characterMapping.length){return output}if(!this.input.containsRTL){const endPixelOffset=this._readPixelOffset(domNode,lineNumber,endColumn,context);if(endPixelOffset!==-1){const lastRange=output[output.length-1];if(lastRange.left=visibleColumn){const beforeDelta=visibleColumn-beforeVisibleColumn;const afterDelta=afterVisibleColumn-visibleColumn;if(afterDeltarect.left+rect.width){offset=text2.length}else{const charWidthReader=CharWidthReader.getInstance();for(let i=0;i=4&&path[0]===3&&path[3]===7}static isStrictChildOfViewLines(path){return path.length>4&&path[0]===3&&path[3]===7}static isChildOfScrollableElement(path){return path.length>=2&&path[0]===3&&path[1]===5}static isChildOfMinimap(path){return path.length>=2&&path[0]===3&&path[1]===8}static isChildOfContentWidgets(path){return path.length>=4&&path[0]===3&&path[3]===1}static isChildOfOverflowGuard(path){return path.length>=1&&path[0]===3}static isChildOfOverflowingContentWidgets(path){return path.length>=1&&path[0]===2}static isChildOfOverlayWidgets(path){return path.length>=2&&path[0]===3&&path[1]===4}};HitTestContext=class{constructor(context,viewHelper,lastRenderData){this.viewModel=context.viewModel;const options2=context.configuration.options;this.layoutInfo=options2.get(142);this.viewDomNode=viewHelper.viewDomNode;this.lineHeight=options2.get(65);this.stickyTabStops=options2.get(114);this.typicalHalfwidthCharacterWidth=options2.get(49).typicalHalfwidthCharacterWidth;this.lastRenderData=lastRenderData;this._context=context;this._viewHelper=viewHelper}getZoneAtCoord(mouseVerticalOffset){return HitTestContext.getZoneAtCoord(this._context,mouseVerticalOffset)}static getZoneAtCoord(context,mouseVerticalOffset){const viewZoneWhitespace=context.viewLayout.getWhitespaceAtVerticalOffset(mouseVerticalOffset);if(viewZoneWhitespace){const viewZoneMiddle=viewZoneWhitespace.verticalOffset+viewZoneWhitespace.height/2;const lineCount=context.viewModel.getLineCount();let positionBefore=null;let position;let positionAfter=null;if(viewZoneWhitespace.afterLineNumber!==lineCount){positionAfter=new Position(viewZoneWhitespace.afterLineNumber+1,1)}if(viewZoneWhitespace.afterLineNumber>0){positionBefore=new Position(viewZoneWhitespace.afterLineNumber,context.viewModel.getLineMaxColumn(viewZoneWhitespace.afterLineNumber))}if(positionAfter===null){position=positionBefore}else if(positionBefore===null){position=positionAfter}else if(mouseVerticalOffset=ctx.layoutInfo.glyphMarginLeft;this.isInContentArea=!this.isInMarginArea;this.mouseColumn=Math.max(0,MouseTargetFactory._getMouseColumn(this.mouseContentHorizontalOffset,ctx.typicalHalfwidthCharacterWidth))}};HitTestRequest=class extends BareHitTestRequest{constructor(ctx,editorPos,pos,relativePos,target){super(ctx,editorPos,pos,relativePos);this._ctx=ctx;if(target){this.target=target;this.targetPath=PartFingerprints.collect(target,ctx.viewDomNode)}else{this.target=null;this.targetPath=new Uint8Array(0)}}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(position=null){if(position&&position.columnd.contentLeft+d.width){continue}const cursorVerticalOffset=ctx.getVerticalOffsetForLineNumber(d.position.lineNumber);if(cursorVerticalOffset<=mouseVerticalOffset&&mouseVerticalOffset<=cursorVerticalOffset+d.height){return request.fulfillContentText(d.position,null,{mightBeForeignElement:false,injectedText:null})}}}return null}static _hitTestViewZone(ctx,request){const viewZoneData=ctx.getZoneAtCoord(request.mouseVerticalOffset);if(viewZoneData){const mouseTargetType=request.isInContentArea?8:5;return request.fulfillViewZone(mouseTargetType,viewZoneData.position,viewZoneData)}return null}static _hitTestTextArea(ctx,request){if(ElementPath.isTextArea(request.targetPath)){if(ctx.lastRenderData.lastTextareaPosition){return request.fulfillContentText(ctx.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:false,injectedText:null})}return request.fulfillTextarea()}return null}static _hitTestMargin(ctx,request){if(request.isInMarginArea){const res=ctx.getFullLineRangeAtCoord(request.mouseVerticalOffset);const pos=res.range.getStartPosition();let offset=Math.abs(request.relativePos.x);const detail={isAfterLines:res.isAfterLines,glyphMarginLeft:ctx.layoutInfo.glyphMarginLeft,glyphMarginWidth:ctx.layoutInfo.glyphMarginWidth,lineNumbersWidth:ctx.layoutInfo.lineNumbersWidth,offsetX:offset};offset-=ctx.layoutInfo.glyphMarginLeft;if(offset<=ctx.layoutInfo.glyphMarginWidth){return request.fulfillMargin(2,pos,res.range,detail)}offset-=ctx.layoutInfo.glyphMarginWidth;if(offset<=ctx.layoutInfo.lineNumbersWidth){return request.fulfillMargin(3,pos,res.range,detail)}offset-=ctx.layoutInfo.lineNumbersWidth;return request.fulfillMargin(4,pos,res.range,detail)}return null}static _hitTestViewLines(ctx,request,domHitTestExecuted){if(!ElementPath.isChildOfViewLines(request.targetPath)){return null}if(ctx.isInTopPadding(request.mouseVerticalOffset)){return request.fulfillContentEmpty(new Position(1,1),EMPTY_CONTENT_AFTER_LINES)}if(ctx.isAfterLines(request.mouseVerticalOffset)||ctx.isInBottomPadding(request.mouseVerticalOffset)){const lineCount=ctx.viewModel.getLineCount();const maxLineColumn=ctx.viewModel.getLineMaxColumn(lineCount);return request.fulfillContentEmpty(new Position(lineCount,maxLineColumn),EMPTY_CONTENT_AFTER_LINES)}if(domHitTestExecuted){if(ElementPath.isStrictChildOfViewLines(request.targetPath)){const lineNumber=ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);if(ctx.viewModel.getLineLength(lineNumber)===0){const lineWidth2=ctx.getLineWidth(lineNumber);const detail=createEmptyContentDataInLines(request.mouseContentHorizontalOffset-lineWidth2);return request.fulfillContentEmpty(new Position(lineNumber,1),detail)}const lineWidth=ctx.getLineWidth(lineNumber);if(request.mouseContentHorizontalOffset>=lineWidth){const detail=createEmptyContentDataInLines(request.mouseContentHorizontalOffset-lineWidth);const pos=new Position(lineNumber,ctx.viewModel.getLineMaxColumn(lineNumber));return request.fulfillContentEmpty(pos,detail)}}return request.fulfillUnknown()}const hitTestResult=MouseTargetFactory._doHitTest(ctx,request);if(hitTestResult.type===1){return MouseTargetFactory.createMouseTargetFromHitTestPosition(ctx,request,hitTestResult.spanNode,hitTestResult.position,hitTestResult.injectedText)}return this._createMouseTarget(ctx,request.withTarget(hitTestResult.hitTarget),true)}static _hitTestMinimap(ctx,request){if(ElementPath.isChildOfMinimap(request.targetPath)){const possibleLineNumber=ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);const maxColumn=ctx.viewModel.getLineMaxColumn(possibleLineNumber);return request.fulfillScrollbar(new Position(possibleLineNumber,maxColumn))}return null}static _hitTestScrollbarSlider(ctx,request){if(ElementPath.isChildOfScrollableElement(request.targetPath)){if(request.target&&request.target.nodeType===1){const className=request.target.className;if(className&&/\b(slider|scrollbar)\b/.test(className)){const possibleLineNumber=ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);const maxColumn=ctx.viewModel.getLineMaxColumn(possibleLineNumber);return request.fulfillScrollbar(new Position(possibleLineNumber,maxColumn))}}}return null}static _hitTestScrollbar(ctx,request){if(ElementPath.isChildOfScrollableElement(request.targetPath)){const possibleLineNumber=ctx.getLineNumberAtVerticalOffset(request.mouseVerticalOffset);const maxColumn=ctx.viewModel.getLineMaxColumn(possibleLineNumber);return request.fulfillScrollbar(new Position(possibleLineNumber,maxColumn))}return null}getMouseColumn(relativePos){const options2=this._context.configuration.options;const layoutInfo=options2.get(142);const mouseContentHorizontalOffset=this._context.viewLayout.getCurrentScrollLeft()+relativePos.x-layoutInfo.contentLeft;return MouseTargetFactory._getMouseColumn(mouseContentHorizontalOffset,options2.get(49).typicalHalfwidthCharacterWidth)}static _getMouseColumn(mouseContentHorizontalOffset,typicalHalfwidthCharacterWidth){if(mouseContentHorizontalOffset<0){return 1}const chars=Math.round(mouseContentHorizontalOffset/typicalHalfwidthCharacterWidth);return chars+1}static createMouseTargetFromHitTestPosition(ctx,request,spanNode,pos,injectedText){const lineNumber=pos.lineNumber;const column=pos.column;const lineWidth=ctx.getLineWidth(lineNumber);if(request.mouseContentHorizontalOffset>lineWidth){const detail=createEmptyContentDataInLines(request.mouseContentHorizontalOffset-lineWidth);return request.fulfillContentEmpty(pos,detail)}const visibleRange=ctx.visibleRangeForPosition(lineNumber,column);if(!visibleRange){return request.fulfillUnknown(pos)}const columnHorizontalOffset=visibleRange.left;if(Math.abs(request.mouseContentHorizontalOffset-columnHorizontalOffset)<1){return request.fulfillContentText(pos,null,{mightBeForeignElement:!!injectedText,injectedText:injectedText})}const points=[];points.push({offset:visibleRange.left,column:column});if(column>1){const visibleRange2=ctx.visibleRangeForPosition(lineNumber,column-1);if(visibleRange2){points.push({offset:visibleRange2.left,column:column-1})}}const lineMaxColumn=ctx.viewModel.getLineMaxColumn(lineNumber);if(columna.offset-b.offset));const mouseCoordinates=request.pos.toClientCoordinates();const spanNodeClientRect=spanNode.getBoundingClientRect();const mouseIsOverSpanNode=spanNodeClientRect.left<=mouseCoordinates.clientX&&mouseCoordinates.clientX<=spanNodeClientRect.right;let rng=null;for(let i=1;ilineEndVerticalOffset;if(!isBelowLastLine){const lineCenteredVerticalOffset=Math.floor((lineStartVerticalOffset+lineEndVerticalOffset)/2);let adjustedPageY=request.pos.y+(lineCenteredVerticalOffset-request.mouseVerticalOffset);if(adjustedPageY<=request.editorPos.y){adjustedPageY=request.editorPos.y+1}if(adjustedPageY>=request.editorPos.y+request.editorPos.height){adjustedPageY=request.editorPos.y+request.editorPos.height-1}const adjustedPage=new PageCoordinates(request.pos.x,adjustedPageY);const r=this._actualDoHitTestWithCaretRangeFromPoint(ctx,adjustedPage.toClientCoordinates());if(r.type===1){return r}}return this._actualDoHitTestWithCaretRangeFromPoint(ctx,request.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(ctx,coords){const shadowRoot=getShadowRoot(ctx.viewDomNode);let range2;if(shadowRoot){if(typeof shadowRoot.caretRangeFromPoint==="undefined"){range2=shadowCaretRangeFromPoint(shadowRoot,coords.clientX,coords.clientY)}else{range2=shadowRoot.caretRangeFromPoint(coords.clientX,coords.clientY)}}else{range2=document.caretRangeFromPoint(coords.clientX,coords.clientY)}if(!range2||!range2.startContainer){return new UnknownHitTestResult}const startContainer=range2.startContainer;if(startContainer.nodeType===startContainer.TEXT_NODE){const parent1=startContainer.parentNode;const parent2=parent1?parent1.parentNode:null;const parent3=parent2?parent2.parentNode:null;const parent3ClassName=parent3&&parent3.nodeType===parent3.ELEMENT_NODE?parent3.className:null;if(parent3ClassName===ViewLine.CLASS_NAME){return HitTestResult.createFromDOMInfo(ctx,parent1,range2.startOffset)}else{return new UnknownHitTestResult(startContainer.parentNode)}}else if(startContainer.nodeType===startContainer.ELEMENT_NODE){const parent1=startContainer.parentNode;const parent2=parent1?parent1.parentNode:null;const parent2ClassName=parent2&&parent2.nodeType===parent2.ELEMENT_NODE?parent2.className:null;if(parent2ClassName===ViewLine.CLASS_NAME){return HitTestResult.createFromDOMInfo(ctx,startContainer,startContainer.textContent.length)}else{return new UnknownHitTestResult(startContainer)}}return new UnknownHitTestResult}static _doHitTestWithCaretPositionFromPoint(ctx,coords){const hitResult=document.caretPositionFromPoint(coords.clientX,coords.clientY);if(hitResult.offsetNode.nodeType===hitResult.offsetNode.TEXT_NODE){const parent1=hitResult.offsetNode.parentNode;const parent2=parent1?parent1.parentNode:null;const parent3=parent2?parent2.parentNode:null;const parent3ClassName=parent3&&parent3.nodeType===parent3.ELEMENT_NODE?parent3.className:null;if(parent3ClassName===ViewLine.CLASS_NAME){return HitTestResult.createFromDOMInfo(ctx,hitResult.offsetNode.parentNode,hitResult.offset)}else{return new UnknownHitTestResult(hitResult.offsetNode.parentNode)}}if(hitResult.offsetNode.nodeType===hitResult.offsetNode.ELEMENT_NODE){const parent1=hitResult.offsetNode.parentNode;const parent1ClassName=parent1&&parent1.nodeType===parent1.ELEMENT_NODE?parent1.className:null;const parent2=parent1?parent1.parentNode:null;const parent2ClassName=parent2&&parent2.nodeType===parent2.ELEMENT_NODE?parent2.className:null;if(parent1ClassName===ViewLine.CLASS_NAME){const tokenSpan=hitResult.offsetNode.childNodes[Math.min(hitResult.offset,hitResult.offsetNode.childNodes.length-1)];if(tokenSpan){return HitTestResult.createFromDOMInfo(ctx,tokenSpan,0)}}else if(parent2ClassName===ViewLine.CLASS_NAME){return HitTestResult.createFromDOMInfo(ctx,hitResult.offsetNode,0)}}return new UnknownHitTestResult(hitResult.offsetNode)}static _snapToSoftTabBoundary(position,viewModel){const lineContent=viewModel.getLineContent(position.lineNumber);const{tabSize:tabSize}=viewModel.model.getOptions();const newPosition=AtomicTabMoveOperations.atomicPosition(lineContent,position.column-1,tabSize,2);if(newPosition!==-1){return new Position(position.lineNumber,newPosition+1)}return position}static _doHitTest(ctx,request){let result=new UnknownHitTestResult;if(typeof document.caretRangeFromPoint==="function"){result=this._doHitTestWithCaretRangeFromPoint(ctx,request)}else if(document.caretPositionFromPoint){result=this._doHitTestWithCaretPositionFromPoint(ctx,request.pos.toClientCoordinates())}if(result.type===1){const injectedText=ctx.viewModel.getInjectedTextAt(result.position);const normalizedPosition=ctx.viewModel.normalizePosition(result.position,2);if(injectedText||!normalizedPosition.equals(result.position)){result=new ContentHitTestResult(normalizedPosition,result.spanNode,injectedText)}}return result}};CharWidthReader=class{static getInstance(){if(!CharWidthReader._INSTANCE){CharWidthReader._INSTANCE=new CharWidthReader}return CharWidthReader._INSTANCE}constructor(){this._cache={};this._canvas=document.createElement("canvas")}getCharWidth(char,font){const cacheKey=char+font;if(this._cache[cacheKey]){return this._cache[cacheKey]}const context=this._canvas.getContext("2d");context.font=font;const metrics=context.measureText(char);const width=metrics.width;this._cache[cacheKey]=width;return width}};CharWidthReader._INSTANCE=null}});var Widget;var init_widget=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/widget.js"(){init_dom();init_keyboardEvent();init_mouseEvent();init_touch();init_lifecycle();Widget=class extends Disposable{onclick(domNode,listener){this._register(addDisposableListener(domNode,EventType.CLICK,(e=>listener(new StandardMouseEvent(e)))))}onmousedown(domNode,listener){this._register(addDisposableListener(domNode,EventType.MOUSE_DOWN,(e=>listener(new StandardMouseEvent(e)))))}onmouseover(domNode,listener){this._register(addDisposableListener(domNode,EventType.MOUSE_OVER,(e=>listener(new StandardMouseEvent(e)))))}onmouseleave(domNode,listener){this._register(addDisposableListener(domNode,EventType.MOUSE_LEAVE,(e=>listener(new StandardMouseEvent(e)))))}onkeydown(domNode,listener){this._register(addDisposableListener(domNode,EventType.KEY_DOWN,(e=>listener(new StandardKeyboardEvent(e)))))}onkeyup(domNode,listener){this._register(addDisposableListener(domNode,EventType.KEY_UP,(e=>listener(new StandardKeyboardEvent(e)))))}oninput(domNode,listener){this._register(addDisposableListener(domNode,EventType.INPUT,listener))}onblur(domNode,listener){this._register(addDisposableListener(domNode,EventType.BLUR,listener))}onfocus(domNode,listener){this._register(addDisposableListener(domNode,EventType.FOCUS,listener))}ignoreGesture(domNode){return Gesture.ignoreTarget(domNode)}}}});var ARROW_IMG_SIZE,ScrollbarArrow;var init_scrollbarArrow=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarArrow.js"(){init_globalPointerMoveMonitor();init_widget();init_async();init_themables();init_dom();ARROW_IMG_SIZE=11;ScrollbarArrow=class extends Widget{constructor(opts){super();this._onActivate=opts.onActivate;this.bgDomNode=document.createElement("div");this.bgDomNode.className="arrow-background";this.bgDomNode.style.position="absolute";this.bgDomNode.style.width=opts.bgWidth+"px";this.bgDomNode.style.height=opts.bgHeight+"px";if(typeof opts.top!=="undefined"){this.bgDomNode.style.top="0px"}if(typeof opts.left!=="undefined"){this.bgDomNode.style.left="0px"}if(typeof opts.bottom!=="undefined"){this.bgDomNode.style.bottom="0px"}if(typeof opts.right!=="undefined"){this.bgDomNode.style.right="0px"}this.domNode=document.createElement("div");this.domNode.className=opts.className;this.domNode.classList.add(...ThemeIcon.asClassNameArray(opts.icon));this.domNode.style.position="absolute";this.domNode.style.width=ARROW_IMG_SIZE+"px";this.domNode.style.height=ARROW_IMG_SIZE+"px";if(typeof opts.top!=="undefined"){this.domNode.style.top=opts.top+"px"}if(typeof opts.left!=="undefined"){this.domNode.style.left=opts.left+"px"}if(typeof opts.bottom!=="undefined"){this.domNode.style.bottom=opts.bottom+"px"}if(typeof opts.right!=="undefined"){this.domNode.style.right=opts.right+"px"}this._pointerMoveMonitor=this._register(new GlobalPointerMoveMonitor);this._register(addStandardDisposableListener(this.bgDomNode,EventType.POINTER_DOWN,(e=>this._arrowPointerDown(e))));this._register(addStandardDisposableListener(this.domNode,EventType.POINTER_DOWN,(e=>this._arrowPointerDown(e))));this._pointerdownRepeatTimer=this._register(new IntervalTimer);this._pointerdownScheduleRepeatTimer=this._register(new TimeoutTimer)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element)){return}const scheduleRepeater=()=>{this._pointerdownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24)};this._onActivate();this._pointerdownRepeatTimer.cancel();this._pointerdownScheduleRepeatTimer.cancelAndSet(scheduleRepeater,200);this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(pointerMoveData=>{}),(()=>{this._pointerdownRepeatTimer.cancel();this._pointerdownScheduleRepeatTimer.cancel()}));e.preventDefault()}}}});var ScrollbarVisibilityController;var init_scrollbarVisibilityController=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.js"(){init_async();init_lifecycle();ScrollbarVisibilityController=class extends Disposable{constructor(visibility,visibleClassName,invisibleClassName){super();this._visibility=visibility;this._visibleClassName=visibleClassName;this._invisibleClassName=invisibleClassName;this._domNode=null;this._isVisible=false;this._isNeeded=false;this._rawShouldBeVisible=false;this._shouldBeVisible=false;this._revealTimer=this._register(new TimeoutTimer)}setVisibility(visibility){if(this._visibility!==visibility){this._visibility=visibility;this._updateShouldBeVisible()}}setShouldBeVisible(rawShouldBeVisible){this._rawShouldBeVisible=rawShouldBeVisible;this._updateShouldBeVisible()}_applyVisibilitySetting(){if(this._visibility===2){return false}if(this._visibility===3){return true}return this._rawShouldBeVisible}_updateShouldBeVisible(){const shouldBeVisible=this._applyVisibilitySetting();if(this._shouldBeVisible!==shouldBeVisible){this._shouldBeVisible=shouldBeVisible;this.ensureVisibility()}}setIsNeeded(isNeeded){if(this._isNeeded!==isNeeded){this._isNeeded=isNeeded;this.ensureVisibility()}}setDomNode(domNode){this._domNode=domNode;this._domNode.setClassName(this._invisibleClassName);this.setShouldBeVisible(false)}ensureVisibility(){if(!this._isNeeded){this._hide(false);return}if(this._shouldBeVisible){this._reveal()}else{this._hide(true)}}_reveal(){if(this._isVisible){return}this._isVisible=true;this._revealTimer.setIfNotSet((()=>{var _a6;(_a6=this._domNode)===null||_a6===void 0?void 0:_a6.setClassName(this._visibleClassName)}),0)}_hide(withFadeAway){var _a6;this._revealTimer.cancel();if(!this._isVisible){return}this._isVisible=false;(_a6=this._domNode)===null||_a6===void 0?void 0:_a6.setClassName(this._invisibleClassName+(withFadeAway?" fade":""))}}}});var POINTER_DRAG_RESET_DISTANCE,AbstractScrollbar;var init_abstractScrollbar=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/abstractScrollbar.js"(){init_dom();init_fastDomNode();init_globalPointerMoveMonitor();init_scrollbarArrow();init_scrollbarVisibilityController();init_widget();init_platform();POINTER_DRAG_RESET_DISTANCE=140;AbstractScrollbar=class extends Widget{constructor(opts){super();this._lazyRender=opts.lazyRender;this._host=opts.host;this._scrollable=opts.scrollable;this._scrollByPage=opts.scrollByPage;this._scrollbarState=opts.scrollbarState;this._visibilityController=this._register(new ScrollbarVisibilityController(opts.visibility,"visible scrollbar "+opts.extraScrollbarClassName,"invisible scrollbar "+opts.extraScrollbarClassName));this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());this._pointerMoveMonitor=this._register(new GlobalPointerMoveMonitor);this._shouldRender=true;this.domNode=createFastDomNode(document.createElement("div"));this.domNode.setAttribute("role","presentation");this.domNode.setAttribute("aria-hidden","true");this._visibilityController.setDomNode(this.domNode);this.domNode.setPosition("absolute");this._register(addDisposableListener(this.domNode.domNode,EventType.POINTER_DOWN,(e=>this._domNodePointerDown(e))))}_createArrow(opts){const arrow=this._register(new ScrollbarArrow(opts));this.domNode.domNode.appendChild(arrow.bgDomNode);this.domNode.domNode.appendChild(arrow.domNode)}_createSlider(top,left,width,height){this.slider=createFastDomNode(document.createElement("div"));this.slider.setClassName("slider");this.slider.setPosition("absolute");this.slider.setTop(top);this.slider.setLeft(left);if(typeof width==="number"){this.slider.setWidth(width)}if(typeof height==="number"){this.slider.setHeight(height)}this.slider.setLayerHinting(true);this.slider.setContain("strict");this.domNode.domNode.appendChild(this.slider.domNode);this._register(addDisposableListener(this.slider.domNode,EventType.POINTER_DOWN,(e=>{if(e.button===0){e.preventDefault();this._sliderPointerDown(e)}})));this.onclick(this.slider.domNode,(e=>{if(e.leftButton){e.stopPropagation()}}))}_onElementSize(visibleSize){if(this._scrollbarState.setVisibleSize(visibleSize)){this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());this._shouldRender=true;if(!this._lazyRender){this.render()}}return this._shouldRender}_onElementScrollSize(elementScrollSize){if(this._scrollbarState.setScrollSize(elementScrollSize)){this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());this._shouldRender=true;if(!this._lazyRender){this.render()}}return this._shouldRender}_onElementScrollPosition(elementScrollPosition){if(this._scrollbarState.setScrollPosition(elementScrollPosition)){this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded());this._shouldRender=true;if(!this._lazyRender){this.render()}}return this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(true)}beginHide(){this._visibilityController.setShouldBeVisible(false)}render(){if(!this._shouldRender){return}this._shouldRender=false;this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize());this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition())}_domNodePointerDown(e){if(e.target!==this.domNode.domNode){return}this._onPointerDown(e)}delegatePointerDown(e){const domTop=this.domNode.domNode.getClientRects()[0].top;const sliderStart=domTop+this._scrollbarState.getSliderPosition();const sliderStop=domTop+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize();const pointerPos=this._sliderPointerPosition(e);if(sliderStart<=pointerPos&&pointerPos<=sliderStop){if(e.button===0){e.preventDefault();this._sliderPointerDown(e)}}else{this._onPointerDown(e)}}_onPointerDown(e){let offsetX;let offsetY;if(e.target===this.domNode.domNode&&typeof e.offsetX==="number"&&typeof e.offsetY==="number"){offsetX=e.offsetX;offsetY=e.offsetY}else{const domNodePosition=getDomNodePagePosition(this.domNode.domNode);offsetX=e.pageX-domNodePosition.left;offsetY=e.pageY-domNodePosition.top}const offset=this._pointerDownRelativePosition(offsetX,offsetY);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(offset):this._scrollbarState.getDesiredScrollPositionFromOffset(offset));if(e.button===0){e.preventDefault();this._sliderPointerDown(e)}}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element)){return}const initialPointerPosition=this._sliderPointerPosition(e);const initialPointerOrthogonalPosition=this._sliderOrthogonalPointerPosition(e);const initialScrollbarState=this._scrollbarState.clone();this.slider.toggleClassName("active",true);this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(pointerMoveData=>{const pointerOrthogonalPosition=this._sliderOrthogonalPointerPosition(pointerMoveData);const pointerOrthogonalDelta=Math.abs(pointerOrthogonalPosition-initialPointerOrthogonalPosition);if(isWindows&&pointerOrthogonalDelta>POINTER_DRAG_RESET_DISTANCE){this._setDesiredScrollPositionNow(initialScrollbarState.getScrollPosition());return}const pointerPosition=this._sliderPointerPosition(pointerMoveData);const pointerDelta=pointerPosition-initialPointerPosition;this._setDesiredScrollPositionNow(initialScrollbarState.getDesiredScrollPositionFromDelta(pointerDelta))}),(()=>{this.slider.toggleClassName("active",false);this._host.onDragEnd()}));this._host.onDragStart()}_setDesiredScrollPositionNow(_desiredScrollPosition){const desiredScrollPosition={};this.writeScrollPosition(desiredScrollPosition,_desiredScrollPosition);this._scrollable.setScrollPositionNow(desiredScrollPosition)}updateScrollbarSize(scrollbarSize){this._updateScrollbarSize(scrollbarSize);this._scrollbarState.setScrollbarSize(scrollbarSize);this._shouldRender=true;if(!this._lazyRender){this.render()}}isNeeded(){return this._scrollbarState.isNeeded()}}}});var MINIMUM_SLIDER_SIZE,ScrollbarState;var init_scrollbarState=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollbarState.js"(){MINIMUM_SLIDER_SIZE=20;ScrollbarState=class{constructor(arrowSize,scrollbarSize,oppositeScrollbarSize,visibleSize,scrollSize,scrollPosition){this._scrollbarSize=Math.round(scrollbarSize);this._oppositeScrollbarSize=Math.round(oppositeScrollbarSize);this._arrowSize=Math.round(arrowSize);this._visibleSize=visibleSize;this._scrollSize=scrollSize;this._scrollPosition=scrollPosition;this._computedAvailableSize=0;this._computedIsNeeded=false;this._computedSliderSize=0;this._computedSliderRatio=0;this._computedSliderPosition=0;this._refreshComputedValues()}clone(){return new ScrollbarState(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(visibleSize){const iVisibleSize=Math.round(visibleSize);if(this._visibleSize!==iVisibleSize){this._visibleSize=iVisibleSize;this._refreshComputedValues();return true}return false}setScrollSize(scrollSize){const iScrollSize=Math.round(scrollSize);if(this._scrollSize!==iScrollSize){this._scrollSize=iScrollSize;this._refreshComputedValues();return true}return false}setScrollPosition(scrollPosition){const iScrollPosition=Math.round(scrollPosition);if(this._scrollPosition!==iScrollPosition){this._scrollPosition=iScrollPosition;this._refreshComputedValues();return true}return false}setScrollbarSize(scrollbarSize){this._scrollbarSize=Math.round(scrollbarSize)}setOppositeScrollbarSize(oppositeScrollbarSize){this._oppositeScrollbarSize=Math.round(oppositeScrollbarSize)}static _computeValues(oppositeScrollbarSize,arrowSize,visibleSize,scrollSize,scrollPosition){const computedAvailableSize=Math.max(0,visibleSize-oppositeScrollbarSize);const computedRepresentableSize=Math.max(0,computedAvailableSize-2*arrowSize);const computedIsNeeded=scrollSize>0&&scrollSize>visibleSize;if(!computedIsNeeded){return{computedAvailableSize:Math.round(computedAvailableSize),computedIsNeeded:computedIsNeeded,computedSliderSize:Math.round(computedRepresentableSize),computedSliderRatio:0,computedSliderPosition:0}}const computedSliderSize=Math.round(Math.max(MINIMUM_SLIDER_SIZE,Math.floor(visibleSize*computedRepresentableSize/scrollSize)));const computedSliderRatio=(computedRepresentableSize-computedSliderSize)/(scrollSize-visibleSize);const computedSliderPosition=scrollPosition*computedSliderRatio;return{computedAvailableSize:Math.round(computedAvailableSize),computedIsNeeded:computedIsNeeded,computedSliderSize:Math.round(computedSliderSize),computedSliderRatio:computedSliderRatio,computedSliderPosition:Math.round(computedSliderPosition)}}_refreshComputedValues(){const r=ScrollbarState._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=r.computedAvailableSize;this._computedIsNeeded=r.computedIsNeeded;this._computedSliderSize=r.computedSliderSize;this._computedSliderRatio=r.computedSliderRatio;this._computedSliderPosition=r.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(offset){if(!this._computedIsNeeded){return 0}const desiredSliderPosition=offset-this._arrowSize-this._computedSliderSize/2;return Math.round(desiredSliderPosition/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(offset){if(!this._computedIsNeeded){return 0}const correctedOffset=offset-this._arrowSize;let desiredScrollPosition=this._scrollPosition;if(correctedOffsetthis._host.onMouseWheel(new StandardWheelEvent(null,1,0))});this._createArrow({className:"scra",icon:Codicon.scrollbarButtonRight,top:scrollbarDelta,left:void 0,bottom:void 0,right:arrowDelta,bgWidth:options2.arrowSize,bgHeight:options2.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new StandardWheelEvent(null,-1,0))})}this._createSlider(Math.floor((options2.horizontalScrollbarSize-options2.horizontalSliderSize)/2),0,void 0,options2.horizontalSliderSize)}_updateSlider(sliderSize,sliderPosition){this.slider.setWidth(sliderSize);this.slider.setLeft(sliderPosition)}_renderDomNode(largeSize,smallSize){this.domNode.setWidth(largeSize);this.domNode.setHeight(smallSize);this.domNode.setLeft(0);this.domNode.setBottom(0)}onDidScroll(e){this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender;this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender;this._shouldRender=this._onElementSize(e.width)||this._shouldRender;return this._shouldRender}_pointerDownRelativePosition(offsetX,offsetY){return offsetX}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(size2){this.slider.setHeight(size2)}writeScrollPosition(target,scrollPosition){target.scrollLeft=scrollPosition}updateOptions(options2){this.updateScrollbarSize(options2.horizontal===2?0:options2.horizontalScrollbarSize);this._scrollbarState.setOppositeScrollbarSize(options2.vertical===2?0:options2.verticalScrollbarSize);this._visibilityController.setVisibility(options2.horizontal);this._scrollByPage=options2.scrollByPage}}}});var VerticalScrollbar;var init_verticalScrollbar=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/verticalScrollbar.js"(){init_mouseEvent();init_abstractScrollbar();init_scrollbarArrow();init_scrollbarState();init_codicons();VerticalScrollbar=class extends AbstractScrollbar{constructor(scrollable,options2,host){const scrollDimensions=scrollable.getScrollDimensions();const scrollPosition=scrollable.getCurrentScrollPosition();super({lazyRender:options2.lazyRender,host:host,scrollbarState:new ScrollbarState(options2.verticalHasArrows?options2.arrowSize:0,options2.vertical===2?0:options2.verticalScrollbarSize,0,scrollDimensions.height,scrollDimensions.scrollHeight,scrollPosition.scrollTop),visibility:options2.vertical,extraScrollbarClassName:"vertical",scrollable:scrollable,scrollByPage:options2.scrollByPage});if(options2.verticalHasArrows){const arrowDelta=(options2.arrowSize-ARROW_IMG_SIZE)/2;const scrollbarDelta=(options2.verticalScrollbarSize-ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:Codicon.scrollbarButtonUp,top:arrowDelta,left:scrollbarDelta,bottom:void 0,right:void 0,bgWidth:options2.verticalScrollbarSize,bgHeight:options2.arrowSize,onActivate:()=>this._host.onMouseWheel(new StandardWheelEvent(null,0,1))});this._createArrow({className:"scra",icon:Codicon.scrollbarButtonDown,top:void 0,left:scrollbarDelta,bottom:arrowDelta,right:void 0,bgWidth:options2.verticalScrollbarSize,bgHeight:options2.arrowSize,onActivate:()=>this._host.onMouseWheel(new StandardWheelEvent(null,0,-1))})}this._createSlider(0,Math.floor((options2.verticalScrollbarSize-options2.verticalSliderSize)/2),options2.verticalSliderSize,void 0)}_updateSlider(sliderSize,sliderPosition){this.slider.setHeight(sliderSize);this.slider.setTop(sliderPosition)}_renderDomNode(largeSize,smallSize){this.domNode.setWidth(smallSize);this.domNode.setHeight(largeSize);this.domNode.setRight(0);this.domNode.setTop(0)}onDidScroll(e){this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender;this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender;this._shouldRender=this._onElementSize(e.height)||this._shouldRender;return this._shouldRender}_pointerDownRelativePosition(offsetX,offsetY){return offsetY}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(size2){this.slider.setWidth(size2)}writeScrollPosition(target,scrollPosition){target.scrollTop=scrollPosition}updateOptions(options2){this.updateScrollbarSize(options2.vertical===2?0:options2.verticalScrollbarSize);this._scrollbarState.setOppositeScrollbarSize(0);this._visibilityController.setVisibility(options2.vertical);this._scrollByPage=options2.scrollByPage}}}});function createEaseOutCubic(from,to){const delta=to-from;return function(completion){return from+delta*easeOutCubic(completion)}}function createComposed(a,b,cut){return function(completion){if(completionscrollWidth){scrollLeft=scrollWidth-width}if(scrollLeft<0){scrollLeft=0}if(height<0){height=0}if(scrollTop+height>scrollHeight){scrollTop=scrollHeight-height}if(scrollTop<0){scrollTop=0}this.width=width;this.scrollWidth=scrollWidth;this.scrollLeft=scrollLeft;this.height=height;this.scrollHeight=scrollHeight;this.scrollTop=scrollTop}equals(other){return this.rawScrollLeft===other.rawScrollLeft&&this.rawScrollTop===other.rawScrollTop&&this.width===other.width&&this.scrollWidth===other.scrollWidth&&this.scrollLeft===other.scrollLeft&&this.height===other.height&&this.scrollHeight===other.scrollHeight&&this.scrollTop===other.scrollTop}withScrollDimensions(update,useRawScrollPositions){return new ScrollState(this._forceIntegerValues,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)}withScrollPosition(update){return new ScrollState(this._forceIntegerValues,this.width,this.scrollWidth,typeof update.scrollLeft!=="undefined"?update.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof update.scrollTop!=="undefined"?update.scrollTop:this.rawScrollTop)}createScrollEvent(previous,inSmoothScrolling){const widthChanged=this.width!==previous.width;const scrollWidthChanged=this.scrollWidth!==previous.scrollWidth;const scrollLeftChanged=this.scrollLeft!==previous.scrollLeft;const heightChanged=this.height!==previous.height;const scrollHeightChanged=this.scrollHeight!==previous.scrollHeight;const scrollTopChanged=this.scrollTop!==previous.scrollTop;return{inSmoothScrolling:inSmoothScrolling,oldWidth:previous.width,oldScrollWidth:previous.scrollWidth,oldScrollLeft:previous.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:previous.height,oldScrollHeight:previous.scrollHeight,oldScrollTop:previous.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:widthChanged,scrollWidthChanged:scrollWidthChanged,scrollLeftChanged:scrollLeftChanged,heightChanged:heightChanged,scrollHeightChanged:scrollHeightChanged,scrollTopChanged:scrollTopChanged}}};Scrollable=class extends Disposable{constructor(options2){super();this._scrollableBrand=void 0;this._onScroll=this._register(new Emitter);this.onScroll=this._onScroll.event;this._smoothScrollDuration=options2.smoothScrollDuration;this._scheduleAtNextAnimationFrame=options2.scheduleAtNextAnimationFrame;this._state=new ScrollState(options2.forceIntegerValues,0,0,0,0,0,0);this._smoothScrolling=null}dispose(){if(this._smoothScrolling){this._smoothScrolling.dispose();this._smoothScrolling=null}super.dispose()}setSmoothScrollDuration(smoothScrollDuration){this._smoothScrollDuration=smoothScrollDuration}validateScrollPosition(scrollPosition){return this._state.withScrollPosition(scrollPosition)}getScrollDimensions(){return this._state}setScrollDimensions(dimensions,useRawScrollPositions){var _a6;const newState=this._state.withScrollDimensions(dimensions,useRawScrollPositions);this._setState(newState,Boolean(this._smoothScrolling));(_a6=this._smoothScrolling)===null||_a6===void 0?void 0:_a6.acceptScrollDimensions(this._state)}getFutureScrollPosition(){if(this._smoothScrolling){return this._smoothScrolling.to}return this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(update){const newState=this._state.withScrollPosition(update);if(this._smoothScrolling){this._smoothScrolling.dispose();this._smoothScrolling=null}this._setState(newState,false)}setScrollPositionSmooth(update,reuseAnimation){if(this._smoothScrollDuration===0){return this.setScrollPositionNow(update)}if(this._smoothScrolling){update={scrollLeft:typeof update.scrollLeft==="undefined"?this._smoothScrolling.to.scrollLeft:update.scrollLeft,scrollTop:typeof update.scrollTop==="undefined"?this._smoothScrolling.to.scrollTop:update.scrollTop};const validTarget=this._state.withScrollPosition(update);if(this._smoothScrolling.to.scrollLeft===validTarget.scrollLeft&&this._smoothScrolling.to.scrollTop===validTarget.scrollTop){return}let newSmoothScrolling;if(reuseAnimation){newSmoothScrolling=new SmoothScrollingOperation(this._smoothScrolling.from,validTarget,this._smoothScrolling.startTime,this._smoothScrolling.duration)}else{newSmoothScrolling=this._smoothScrolling.combine(this._state,validTarget,this._smoothScrollDuration)}this._smoothScrolling.dispose();this._smoothScrolling=newSmoothScrolling}else{const validTarget=this._state.withScrollPosition(update);this._smoothScrolling=SmoothScrollingOperation.start(this._state,validTarget,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{if(!this._smoothScrolling){return}this._smoothScrolling.animationFrameDisposable=null;this._performSmoothScrolling()}))}hasPendingScrollAnimation(){return Boolean(this._smoothScrolling)}_performSmoothScrolling(){if(!this._smoothScrolling){return}const update=this._smoothScrolling.tick();const newState=this._state.withScrollPosition(update);this._setState(newState,true);if(!this._smoothScrolling){return}if(update.isDone){this._smoothScrolling.dispose();this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{if(!this._smoothScrolling){return}this._smoothScrolling.animationFrameDisposable=null;this._performSmoothScrolling()}))}_setState(newState,inSmoothScrolling){const oldState=this._state;if(oldState.equals(newState)){return}this._state=newState;this._onScroll.fire(this._state.createScrollEvent(oldState,inSmoothScrolling))}};SmoothScrollingUpdate=class{constructor(scrollLeft,scrollTop,isDone){this.scrollLeft=scrollLeft;this.scrollTop=scrollTop;this.isDone=isDone}};SmoothScrollingOperation=class{constructor(from,to,startTime,duration){this.from=from;this.to=to;this.duration=duration;this.startTime=startTime;this.animationFrameDisposable=null;this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width);this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(from,to,viewportSize){const delta=Math.abs(from-to);if(delta>2.5*viewportSize){let stop1,stop2;if(from0&&Math.abs(item.deltaY)>0){return 1}let score3=.5;const prev=this._front===-1&&this._rear===-1?null:this._memory[this._rear];if(prev){}if(!this._isAlmostInt(item.deltaX)||!this._isAlmostInt(item.deltaY)){score3+=.25}return Math.min(Math.max(score3,0),1)}_isAlmostInt(value){const delta=Math.abs(Math.round(value)-value);return delta<.01}};MouseWheelClassifier.INSTANCE=new MouseWheelClassifier;AbstractScrollableElement=class extends Widget{get options(){return this._options}constructor(element,options2,scrollable){super();this._onScroll=this._register(new Emitter);this.onScroll=this._onScroll.event;this._onWillScroll=this._register(new Emitter);element.style.overflow="hidden";this._options=resolveOptions(options2);this._scrollable=scrollable;this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e);this._onDidScroll(e);this._onScroll.fire(e)})));const scrollbarHost={onMouseWheel:mouseWheelEvent=>this._onMouseWheel(mouseWheelEvent),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new VerticalScrollbar(this._scrollable,this._options,scrollbarHost));this._horizontalScrollbar=this._register(new HorizontalScrollbar(this._scrollable,this._options,scrollbarHost));this._domNode=document.createElement("div");this._domNode.className="monaco-scrollable-element "+this._options.className;this._domNode.setAttribute("role","presentation");this._domNode.style.position="relative";this._domNode.style.overflow="hidden";this._domNode.appendChild(element);this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode);this._domNode.appendChild(this._verticalScrollbar.domNode.domNode);if(this._options.useShadows){this._leftShadowDomNode=createFastDomNode(document.createElement("div"));this._leftShadowDomNode.setClassName("shadow");this._domNode.appendChild(this._leftShadowDomNode.domNode);this._topShadowDomNode=createFastDomNode(document.createElement("div"));this._topShadowDomNode.setClassName("shadow");this._domNode.appendChild(this._topShadowDomNode.domNode);this._topLeftShadowDomNode=createFastDomNode(document.createElement("div"));this._topLeftShadowDomNode.setClassName("shadow");this._domNode.appendChild(this._topLeftShadowDomNode.domNode)}else{this._leftShadowDomNode=null;this._topShadowDomNode=null;this._topLeftShadowDomNode=null}this._listenOnDomNode=this._options.listenOnDomNode||this._domNode;this._mouseWheelToDispose=[];this._setListeningToMouseWheel(this._options.handleMouseWheel);this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e)));this.onmouseleave(this._listenOnDomNode,(e=>this._onMouseLeave(e)));this._hideTimeout=this._register(new TimeoutTimer);this._isDragging=false;this._mouseIsOver=false;this._shouldRender=true;this._revealOnScroll=true}dispose(){this._mouseWheelToDispose=dispose(this._mouseWheelToDispose);super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(browserEvent){this._verticalScrollbar.delegatePointerDown(browserEvent)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(dimensions){this._scrollable.setScrollDimensions(dimensions,false)}updateClassName(newClassName){this._options.className=newClassName;if(isMacintosh){this._options.className+=" mac"}this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(newOptions){if(typeof newOptions.handleMouseWheel!=="undefined"){this._options.handleMouseWheel=newOptions.handleMouseWheel;this._setListeningToMouseWheel(this._options.handleMouseWheel)}if(typeof newOptions.mouseWheelScrollSensitivity!=="undefined"){this._options.mouseWheelScrollSensitivity=newOptions.mouseWheelScrollSensitivity}if(typeof newOptions.fastScrollSensitivity!=="undefined"){this._options.fastScrollSensitivity=newOptions.fastScrollSensitivity}if(typeof newOptions.scrollPredominantAxis!=="undefined"){this._options.scrollPredominantAxis=newOptions.scrollPredominantAxis}if(typeof newOptions.horizontal!=="undefined"){this._options.horizontal=newOptions.horizontal}if(typeof newOptions.vertical!=="undefined"){this._options.vertical=newOptions.vertical}if(typeof newOptions.horizontalScrollbarSize!=="undefined"){this._options.horizontalScrollbarSize=newOptions.horizontalScrollbarSize}if(typeof newOptions.verticalScrollbarSize!=="undefined"){this._options.verticalScrollbarSize=newOptions.verticalScrollbarSize}if(typeof newOptions.scrollByPage!=="undefined"){this._options.scrollByPage=newOptions.scrollByPage}this._horizontalScrollbar.updateOptions(this._options);this._verticalScrollbar.updateOptions(this._options);if(!this._options.lazyRender){this._render()}}delegateScrollFromMouseWheelEvent(browserEvent){this._onMouseWheel(new StandardWheelEvent(browserEvent))}_setListeningToMouseWheel(shouldListen){const isListening=this._mouseWheelToDispose.length>0;if(isListening===shouldListen){return}this._mouseWheelToDispose=dispose(this._mouseWheelToDispose);if(shouldListen){const onMouseWheel=browserEvent=>{this._onMouseWheel(new StandardWheelEvent(browserEvent))};this._mouseWheelToDispose.push(addDisposableListener(this._listenOnDomNode,EventType.MOUSE_WHEEL,onMouseWheel,{passive:false}))}}_onMouseWheel(e){var _a6;if((_a6=e.browserEvent)===null||_a6===void 0?void 0:_a6.defaultPrevented){return}const classifier=MouseWheelClassifier.INSTANCE;if(SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED){classifier.acceptStandardWheelEvent(e)}let didScroll=false;if(e.deltaY||e.deltaX){let deltaY=e.deltaY*this._options.mouseWheelScrollSensitivity;let deltaX=e.deltaX*this._options.mouseWheelScrollSensitivity;if(this._options.scrollPredominantAxis){if(this._options.scrollYToX&&deltaX+deltaY===0){deltaX=deltaY=0}else if(Math.abs(deltaY)>=Math.abs(deltaX)){deltaX=0}else{deltaY=0}}if(this._options.flipAxes){[deltaY,deltaX]=[deltaX,deltaY]}const shiftConvert=!isMacintosh&&e.browserEvent&&e.browserEvent.shiftKey;if((this._options.scrollYToX||shiftConvert)&&!deltaX){deltaX=deltaY;deltaY=0}if(e.browserEvent&&e.browserEvent.altKey){deltaX=deltaX*this._options.fastScrollSensitivity;deltaY=deltaY*this._options.fastScrollSensitivity}const futureScrollPosition=this._scrollable.getFutureScrollPosition();let desiredScrollPosition={};if(deltaY){const deltaScrollTop=SCROLL_WHEEL_SENSITIVITY*deltaY;const desiredScrollTop=futureScrollPosition.scrollTop-(deltaScrollTop<0?Math.floor(deltaScrollTop):Math.ceil(deltaScrollTop));this._verticalScrollbar.writeScrollPosition(desiredScrollPosition,desiredScrollTop)}if(deltaX){const deltaScrollLeft=SCROLL_WHEEL_SENSITIVITY*deltaX;const desiredScrollLeft=futureScrollPosition.scrollLeft-(deltaScrollLeft<0?Math.floor(deltaScrollLeft):Math.ceil(deltaScrollLeft));this._horizontalScrollbar.writeScrollPosition(desiredScrollPosition,desiredScrollLeft)}desiredScrollPosition=this._scrollable.validateScrollPosition(desiredScrollPosition);if(futureScrollPosition.scrollLeft!==desiredScrollPosition.scrollLeft||futureScrollPosition.scrollTop!==desiredScrollPosition.scrollTop){const canPerformSmoothScroll=SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED&&this._options.mouseWheelSmoothScroll&&classifier.isPhysicalMouseWheel();if(canPerformSmoothScroll){this._scrollable.setScrollPositionSmooth(desiredScrollPosition)}else{this._scrollable.setScrollPositionNow(desiredScrollPosition)}didScroll=true}}let consumeMouseWheel=didScroll;if(!consumeMouseWheel&&this._options.alwaysConsumeMouseWheel){consumeMouseWheel=true}if(!consumeMouseWheel&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())){consumeMouseWheel=true}if(consumeMouseWheel){e.preventDefault();e.stopPropagation()}}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender;this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender;if(this._options.useShadows){this._shouldRender=true}if(this._revealOnScroll){this._reveal()}if(!this._options.lazyRender){this._render()}}renderNow(){if(!this._options.lazyRender){throw new Error("Please use `lazyRender` together with `renderNow`!")}this._render()}_render(){if(!this._shouldRender){return}this._shouldRender=false;this._horizontalScrollbar.render();this._verticalScrollbar.render();if(this._options.useShadows){const scrollState=this._scrollable.getCurrentScrollPosition();const enableTop=scrollState.scrollTop>0;const enableLeft=scrollState.scrollLeft>0;const leftClassName=enableLeft?" left":"";const topClassName=enableTop?" top":"";const topLeftClassName=enableLeft||enableTop?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${leftClassName}`);this._topShadowDomNode.setClassName(`shadow${topClassName}`);this._topLeftShadowDomNode.setClassName(`shadow${topLeftClassName}${topClassName}${leftClassName}`)}}_onDragStart(){this._isDragging=true;this._reveal()}_onDragEnd(){this._isDragging=false;this._hide()}_onMouseLeave(e){this._mouseIsOver=false;this._hide()}_onMouseOver(e){this._mouseIsOver=true;this._reveal()}_reveal(){this._verticalScrollbar.beginReveal();this._horizontalScrollbar.beginReveal();this._scheduleHide()}_hide(){if(!this._mouseIsOver&&!this._isDragging){this._verticalScrollbar.beginHide();this._horizontalScrollbar.beginHide()}}_scheduleHide(){if(!this._mouseIsOver&&!this._isDragging){this._hideTimeout.cancelAndSet((()=>this._hide()),HIDE_TIMEOUT)}}};ScrollableElement=class extends AbstractScrollableElement{constructor(element,options2){options2=options2||{};options2.mouseWheelSmoothScroll=false;const scrollable=new Scrollable({forceIntegerValues:true,smoothScrollDuration:0,scheduleAtNextAnimationFrame:callback=>scheduleAtNextAnimationFrame(callback)});super(element,options2,scrollable);this._register(scrollable)}setScrollPosition(update){this._scrollable.setScrollPositionNow(update)}};SmoothScrollableElement=class extends AbstractScrollableElement{constructor(element,options2,scrollable){super(element,options2,scrollable)}setScrollPosition(update){if(update.reuseAnimation){this._scrollable.setScrollPositionSmooth(update,update.reuseAnimation)}else{this._scrollable.setScrollPositionNow(update)}}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};DomScrollableElement=class extends AbstractScrollableElement{constructor(element,options2){options2=options2||{};options2.mouseWheelSmoothScroll=false;const scrollable=new Scrollable({forceIntegerValues:false,smoothScrollDuration:0,scheduleAtNextAnimationFrame:callback=>scheduleAtNextAnimationFrame(callback)});super(element,options2,scrollable);this._register(scrollable);this._element=element;this.onScroll((e=>{if(e.scrollTopChanged){this._element.scrollTop=e.scrollTop}if(e.scrollLeftChanged){this._element.scrollLeft=e.scrollLeft}}));this.scanDomNode()}setScrollPosition(update){this._scrollable.setScrollPositionNow(update)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight});this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}}});var MouseHandler,MouseDownOperation,TopBottomDragScrolling,TopBottomDragScrollingOperation,MouseDownState;var init_mouseHandler=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/controller/mouseHandler.js"(){init_dom();init_mouseEvent();init_lifecycle();init_platform();init_mouseTarget();init_editorDom();init_editorZoom();init_position();init_selection();init_viewEventHandler();init_scrollableElement();MouseHandler=class extends ViewEventHandler{constructor(context,viewController,viewHelper){super();this._mouseLeaveMonitor=null;this._context=context;this.viewController=viewController;this.viewHelper=viewHelper;this.mouseTargetFactory=new MouseTargetFactory(this._context,viewHelper);this._mouseDownOperation=this._register(new MouseDownOperation(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,((e,testEventTarget)=>this._createMouseTarget(e,testEventTarget)),(e=>this._getMouseColumn(e))));this.lastMouseLeaveTime=-1;this._height=this._context.configuration.options.get(142).height;const mouseEvents=new EditorMouseEventFactory(this.viewHelper.viewDomNode);this._register(mouseEvents.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,true))));this._register(mouseEvents.onMouseMove(this.viewHelper.viewDomNode,(e=>{this._onMouseMove(e);if(!this._mouseLeaveMonitor){this._mouseLeaveMonitor=addDisposableListener(document,"mousemove",(e2=>{if(!this.viewHelper.viewDomNode.contains(e2.target)){this._onMouseLeave(new EditorMouseEvent(e2,false,this.viewHelper.viewDomNode))}}))}})));this._register(mouseEvents.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e))));this._register(mouseEvents.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e))));let capturePointerId=0;this._register(mouseEvents.onPointerDown(this.viewHelper.viewDomNode,((e,pointerId)=>{capturePointerId=pointerId})));this._register(addDisposableListener(this.viewHelper.viewDomNode,EventType.POINTER_UP,(e=>{this._mouseDownOperation.onPointerUp()})));this._register(mouseEvents.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e,capturePointerId))));this._setupMouseWheelZoomListener();this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const classifier=MouseWheelClassifier.INSTANCE;let prevMouseWheelTime=0;let gestureStartZoomLevel=EditorZoom.getZoomLevel();let gestureHasZoomModifiers=false;let gestureAccumulatedDelta=0;const onMouseWheel=browserEvent=>{this.viewController.emitMouseWheel(browserEvent);if(!this._context.configuration.options.get(74)){return}const e=new StandardWheelEvent(browserEvent);classifier.acceptStandardWheelEvent(e);if(classifier.isPhysicalMouseWheel()){if(hasMouseWheelZoomModifiers(browserEvent)){const zoomLevel=EditorZoom.getZoomLevel();const delta=e.deltaY>0?1:-1;EditorZoom.setZoomLevel(zoomLevel+delta);e.preventDefault();e.stopPropagation()}}else{if(Date.now()-prevMouseWheelTime>50){gestureStartZoomLevel=EditorZoom.getZoomLevel();gestureHasZoomModifiers=hasMouseWheelZoomModifiers(browserEvent);gestureAccumulatedDelta=0}prevMouseWheelTime=Date.now();gestureAccumulatedDelta+=e.deltaY;if(gestureHasZoomModifiers){EditorZoom.setZoomLevel(gestureStartZoomLevel+gestureAccumulatedDelta/5);e.preventDefault();e.stopPropagation()}}};this._register(addDisposableListener(this.viewHelper.viewDomNode,EventType.MOUSE_WHEEL,onMouseWheel,{capture:true,passive:false}));function hasMouseWheelZoomModifiers(browserEvent){return isMacintosh?(browserEvent.metaKey||browserEvent.ctrlKey)&&!browserEvent.shiftKey&&!browserEvent.altKey:browserEvent.ctrlKey&&!browserEvent.metaKey&&!browserEvent.shiftKey&&!browserEvent.altKey}}dispose(){this._context.removeEventHandler(this);if(this._mouseLeaveMonitor){this._mouseLeaveMonitor.dispose();this._mouseLeaveMonitor=null}super.dispose()}onConfigurationChanged(e){if(e.hasChanged(142)){const height=this._context.configuration.options.get(142).height;if(this._height!==height){this._height=height;this._mouseDownOperation.onHeightChanged()}}return false}onCursorStateChanged(e){this._mouseDownOperation.onCursorStateChanged(e);return false}onFocusChanged(e){return false}getTargetAtClientPoint(clientX,clientY){const clientPos=new ClientCoordinates(clientX,clientY);const pos=clientPos.toPageCoordinates();const editorPos=createEditorPagePosition(this.viewHelper.viewDomNode);if(pos.yeditorPos.y+editorPos.height||pos.xeditorPos.x+editorPos.width){return null}const relativePos=createCoordinatesRelativeToEditor(this.viewHelper.viewDomNode,editorPos,pos);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),editorPos,pos,relativePos,null)}_createMouseTarget(e,testEventTarget){let target=e.target;if(!this.viewHelper.viewDomNode.contains(target)){const shadowRoot=getShadowRoot(this.viewHelper.viewDomNode);if(shadowRoot){target=shadowRoot.elementsFromPoint(e.posx,e.posy).find((el=>this.viewHelper.viewDomNode.contains(el)))}}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,testEventTarget?target:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,testEventTarget){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,testEventTarget)})}_onMouseMove(e){const targetIsWidget=this.mouseTargetFactory.mouseTargetIsWidget(e);if(!targetIsWidget){e.preventDefault()}if(this._mouseDownOperation.isActive()){return}const actualMouseMoveTime=e.timestamp;if(actualMouseMoveTime{e.preventDefault();this.viewHelper.focusTextArea()};if(shouldHandle&&(targetIsContent||targetIsLineNumbers&&selectOnLineNumbers)){focus();this._mouseDownOperation.start(t2.type,e,pointerId)}else if(targetIsGutter){e.preventDefault()}else if(targetIsViewZone){const viewZoneData=t2.detail;if(shouldHandle&&this.viewHelper.shouldSuppressMouseDownOnViewZone(viewZoneData.viewZoneId)){focus();this._mouseDownOperation.start(t2.type,e,pointerId);e.preventDefault()}}else if(targetIsWidget&&this.viewHelper.shouldSuppressMouseDownOnWidget(t2.detail)){focus();e.preventDefault()}this.viewController.emitMouseDown({event:e,target:t2})}};MouseDownOperation=class extends Disposable{constructor(_context,_viewController,_viewHelper,_mouseTargetFactory,createMouseTarget,getMouseColumn){super();this._context=_context;this._viewController=_viewController;this._viewHelper=_viewHelper;this._mouseTargetFactory=_mouseTargetFactory;this._createMouseTarget=createMouseTarget;this._getMouseColumn=getMouseColumn;this._mouseMoveMonitor=this._register(new GlobalEditorPointerMoveMonitor(this._viewHelper.viewDomNode));this._topBottomDragScrolling=this._register(new TopBottomDragScrolling(this._context,this._viewHelper,this._mouseTargetFactory,((position,inSelectionMode,revealType)=>this._dispatchMouse(position,inSelectionMode,revealType))));this._mouseState=new MouseDownState;this._currentSelection=new Selection(1,1,1,1);this._isActive=false;this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e;this._mouseState.setModifiers(e);const position=this._findMousePosition(e,false);if(!position){return}if(this._mouseState.isDragAndDrop){this._viewController.emitMouseDrag({event:e,target:position})}else{if(position.type===13&&(position.outsidePosition==="above"||position.outsidePosition==="below")){this._topBottomDragScrolling.start(position,e)}else{this._topBottomDragScrolling.stop();this._dispatchMouse(position,true,1)}}}start(targetType,e,pointerId){this._lastMouseEvent=e;this._mouseState.setStartedOnLineNumbers(targetType===3);this._mouseState.setStartButtons(e);this._mouseState.setModifiers(e);const position=this._findMousePosition(e,true);if(!position||!position.position){return}this._mouseState.trySetCount(e.detail,position.position);e.detail=this._mouseState.count;const options2=this._context.configuration.options;if(!options2.get(89)&&options2.get(34)&&!options2.get(21)&&!this._mouseState.altKey&&e.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&position.type===6&&position.position&&this._currentSelection.containsPosition(position.position)){this._mouseState.isDragAndDrop=true;this._isActive=true;this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,pointerId,e.buttons,(e2=>this._onMouseDownThenMove(e2)),(browserEvent=>{const position2=this._findMousePosition(this._lastMouseEvent,false);if(browserEvent&&browserEvent instanceof KeyboardEvent){this._viewController.emitMouseDropCanceled()}else{this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:position2?this._createMouseTarget(this._lastMouseEvent,true):null})}this._stop()}));return}this._mouseState.isDragAndDrop=false;this._dispatchMouse(position,e.shiftKey,1);if(!this._isActive){this._isActive=true;this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,pointerId,e.buttons,(e2=>this._onMouseDownThenMove(e2)),(()=>this._stop()))}}_stop(){this._isActive=false;this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const editorContent=e.editorPos;const model=this._context.viewModel;const viewLayout=this._context.viewLayout;const mouseColumn=this._getMouseColumn(e);if(e.posyeditorContent.y+editorContent.height){const outsideDistance=e.posy-editorContent.y-editorContent.height;const verticalOffset=viewLayout.getCurrentScrollTop()+e.relativePos.y;const viewZoneData=HitTestContext.getZoneAtCoord(this._context,verticalOffset);if(viewZoneData){const newPosition=this._helpPositionJumpOverViewZone(viewZoneData);if(newPosition){return MouseTarget.createOutsideEditor(mouseColumn,newPosition,"below",outsideDistance)}}const belowLineNumber=viewLayout.getLineNumberAtVerticalOffset(verticalOffset);return MouseTarget.createOutsideEditor(mouseColumn,new Position(belowLineNumber,model.getLineMaxColumn(belowLineNumber)),"below",outsideDistance)}const possibleLineNumber=viewLayout.getLineNumberAtVerticalOffset(viewLayout.getCurrentScrollTop()+e.relativePos.y);if(e.posxeditorContent.x+editorContent.width){const outsideDistance=e.posx-editorContent.x-editorContent.width;return MouseTarget.createOutsideEditor(mouseColumn,new Position(possibleLineNumber,model.getLineMaxColumn(possibleLineNumber)),"right",outsideDistance)}return null}_findMousePosition(e,testEventTarget){const positionOutsideEditor=this._getPositionOutsideEditor(e);if(positionOutsideEditor){return positionOutsideEditor}const t2=this._createMouseTarget(e,testEventTarget);const hintedPosition=t2.position;if(!hintedPosition){return null}if(t2.type===8||t2.type===5){const newPosition=this._helpPositionJumpOverViewZone(t2.detail);if(newPosition){return MouseTarget.createViewZone(t2.type,t2.element,t2.mouseColumn,newPosition,t2.detail)}}return t2}_helpPositionJumpOverViewZone(viewZoneData){const selectionStart=new Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn);const positionBefore=viewZoneData.positionBefore;const positionAfter=viewZoneData.positionAfter;if(positionBefore&&positionAfter){if(positionBefore.isBefore(selectionStart)){return positionBefore}else{return positionAfter}}return null}_dispatchMouse(position,inSelectionMode,revealType){if(!position.position){return}this._viewController.dispatchMouse({position:position.position,mouseColumn:position.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:revealType,inSelectionMode:inSelectionMode,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:position.type===6&&position.detail.injectedText!==null})}};TopBottomDragScrolling=class extends Disposable{constructor(_context,_viewHelper,_mouseTargetFactory,_dispatchMouse){super();this._context=_context;this._viewHelper=_viewHelper;this._mouseTargetFactory=_mouseTargetFactory;this._dispatchMouse=_dispatchMouse;this._operation=null}dispose(){super.dispose();this.stop()}start(position,mouseEvent){if(this._operation){this._operation.setPosition(position,mouseEvent)}else{this._operation=new TopBottomDragScrollingOperation(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,position,mouseEvent)}}stop(){if(this._operation){this._operation.dispose();this._operation=null}}};TopBottomDragScrollingOperation=class extends Disposable{constructor(_context,_viewHelper,_mouseTargetFactory,_dispatchMouse,position,mouseEvent){super();this._context=_context;this._viewHelper=_viewHelper;this._mouseTargetFactory=_mouseTargetFactory;this._dispatchMouse=_dispatchMouse;this._position=position;this._mouseEvent=mouseEvent;this._lastTime=Date.now();this._animationFrameDisposable=scheduleAtNextAnimationFrame((()=>this._execute()))}dispose(){this._animationFrameDisposable.dispose()}setPosition(position,mouseEvent){this._position=position;this._mouseEvent=mouseEvent}_tick(){const now=Date.now();const elapsed=now-this._lastTime;this._lastTime=now;return elapsed}_getScrollSpeed(){const lineHeight=this._context.configuration.options.get(65);const viewportInLines=this._context.configuration.options.get(142).height/lineHeight;const outsideDistanceInLines=this._position.outsideDistance/lineHeight;if(outsideDistanceInLines<=1.5){return Math.max(30,viewportInLines*(1+outsideDistanceInLines))}if(outsideDistanceInLines<=3){return Math.max(60,viewportInLines*(2+outsideDistanceInLines))}return Math.max(200,viewportInLines*(7+outsideDistanceInLines))}_execute(){const lineHeight=this._context.configuration.options.get(65);const scrollSpeedInLines=this._getScrollSpeed();const elapsed=this._tick();const scrollInPixels=scrollSpeedInLines*(elapsed/1e3)*lineHeight;const scrollValue=this._position.outsidePosition==="above"?-scrollInPixels:scrollInPixels;this._context.viewModel.viewLayout.deltaScrollNow(0,scrollValue);this._viewHelper.renderNow();const viewportData=this._context.viewLayout.getLinesViewportData();const edgeLineNumber=this._position.outsidePosition==="above"?viewportData.startLineNumber:viewportData.endLineNumber;let mouseTarget;{const editorPos=createEditorPagePosition(this._viewHelper.viewDomNode);const horizontalScrollbarHeight=this._context.configuration.options.get(142).horizontalScrollbarHeight;const pos=new PageCoordinates(this._mouseEvent.pos.x,editorPos.y+editorPos.height-horizontalScrollbarHeight-.1);const relativePos=createCoordinatesRelativeToEditor(this._viewHelper.viewDomNode,editorPos,pos);mouseTarget=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),editorPos,pos,relativePos,null)}if(!mouseTarget.position||mouseTarget.position.lineNumber!==edgeLineNumber){if(this._position.outsidePosition==="above"){mouseTarget=MouseTarget.createOutsideEditor(this._position.mouseColumn,new Position(edgeLineNumber,1),"above",this._position.outsideDistance)}else{mouseTarget=MouseTarget.createOutsideEditor(this._position.mouseColumn,new Position(edgeLineNumber,this._context.viewModel.getLineMaxColumn(edgeLineNumber)),"below",this._position.outsideDistance)}}this._dispatchMouse(mouseTarget,true,2);this._animationFrameDisposable=scheduleAtNextAnimationFrame((()=>this._execute()))}};MouseDownState=class{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=false;this._ctrlKey=false;this._metaKey=false;this._shiftKey=false;this._leftButton=false;this._middleButton=false;this._startedOnLineNumbers=false;this._lastMouseDownPosition=null;this._lastMouseDownPositionEqualCount=0;this._lastMouseDownCount=0;this._lastSetMouseDownCountTime=0;this.isDragAndDrop=false}get count(){return this._lastMouseDownCount}setModifiers(source){this._altKey=source.altKey;this._ctrlKey=source.ctrlKey;this._metaKey=source.metaKey;this._shiftKey=source.shiftKey}setStartButtons(source){this._leftButton=source.leftButton;this._middleButton=source.middleButton}setStartedOnLineNumbers(startedOnLineNumbers){this._startedOnLineNumbers=startedOnLineNumbers}trySetCount(setMouseDownCount,newMouseDownPosition){const currentTime=(new Date).getTime();if(currentTime-this._lastSetMouseDownCountTime>MouseDownState.CLEAR_MOUSE_DOWN_COUNT_TIME){setMouseDownCount=1}this._lastSetMouseDownCountTime=currentTime;if(setMouseDownCount>this._lastMouseDownCount+1){setMouseDownCount=this._lastMouseDownCount+1}if(this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(newMouseDownPosition)){this._lastMouseDownPositionEqualCount++}else{this._lastMouseDownPositionEqualCount=1}this._lastMouseDownPosition=newMouseDownPosition;this._lastMouseDownCount=Math.min(setMouseDownCount,this._lastMouseDownPositionEqualCount)}};MouseDownState.CLEAR_MOUSE_DOWN_COUNT_TIME=400}});var DomEmitter;var init_event2=__esm({"node_modules/monaco-editor/esm/vs/base/browser/event.js"(){init_event();DomEmitter=class{get event(){return this.emitter.event}constructor(element,type,useCapture){const fn=e=>this.emitter.fire(e);this.emitter=new Emitter({onWillAddFirstListener:()=>element.addEventListener(type,fn,useCapture),onDidRemoveLastListener:()=>element.removeEventListener(type,fn,useCapture)})}dispose(){this.emitter.dispose()}}}});var inputLatency;var init_performance=__esm({"node_modules/monaco-editor/esm/vs/base/browser/performance.js"(){(function(inputLatency2){const totalKeydownTime={total:0,min:Number.MAX_VALUE,max:0};const totalInputTime=Object.assign({},totalKeydownTime);const totalRenderTime=Object.assign({},totalKeydownTime);const totalInputLatencyTime=Object.assign({},totalKeydownTime);let measurementsCount=0;const state={keydown:0,input:0,render:0};function onKeyDown(){recordIfFinished();performance.mark("inputlatency/start");performance.mark("keydown/start");state.keydown=1;queueMicrotask(markKeyDownEnd)}inputLatency2.onKeyDown=onKeyDown;function markKeyDownEnd(){if(state.keydown===1){performance.mark("keydown/end");state.keydown=2}}function onBeforeInput(){performance.mark("input/start");state.input=1;scheduleRecordIfFinishedTask()}inputLatency2.onBeforeInput=onBeforeInput;function onInput(){if(state.input===0){onBeforeInput()}queueMicrotask(markInputEnd)}inputLatency2.onInput=onInput;function markInputEnd(){if(state.input===1){performance.mark("input/end");state.input=2}}function onKeyUp(){recordIfFinished()}inputLatency2.onKeyUp=onKeyUp;function onSelectionChange(){recordIfFinished()}inputLatency2.onSelectionChange=onSelectionChange;function onRenderStart(){if(state.keydown===2&&state.input===2&&state.render===0){performance.mark("render/start");state.render=1;queueMicrotask(markRenderEnd);scheduleRecordIfFinishedTask()}}inputLatency2.onRenderStart=onRenderStart;function markRenderEnd(){if(state.render===1){performance.mark("render/end");state.render=2}}function scheduleRecordIfFinishedTask(){setTimeout(recordIfFinished)}function recordIfFinished(){if(state.keydown===2&&state.input===2&&state.render===2){performance.mark("inputlatency/end");performance.measure("keydown","keydown/start","keydown/end");performance.measure("input","input/start","input/end");performance.measure("render","render/start","render/end");performance.measure("inputlatency","inputlatency/start","inputlatency/end");addMeasure("keydown",totalKeydownTime);addMeasure("input",totalInputTime);addMeasure("render",totalRenderTime);addMeasure("inputlatency",totalInputLatencyTime);measurementsCount++;reset2()}}function addMeasure(entryName,cumulativeMeasurement){const duration=performance.getEntriesByName(entryName)[0].duration;cumulativeMeasurement.total+=duration;cumulativeMeasurement.min=Math.min(cumulativeMeasurement.min,duration);cumulativeMeasurement.max=Math.max(cumulativeMeasurement.max,duration)}function reset2(){performance.clearMarks("keydown/start");performance.clearMarks("keydown/end");performance.clearMarks("input/start");performance.clearMarks("input/end");performance.clearMarks("render/start");performance.clearMarks("render/end");performance.clearMarks("inputlatency/start");performance.clearMarks("inputlatency/end");performance.clearMeasures("keydown");performance.clearMeasures("input");performance.clearMeasures("render");performance.clearMeasures("inputlatency");state.keydown=0;state.input=0;state.render=0}function getAndClearMeasurements(){if(measurementsCount===0){return void 0}const result={keydown:cumulativeToFinalMeasurement(totalKeydownTime),input:cumulativeToFinalMeasurement(totalInputTime),render:cumulativeToFinalMeasurement(totalRenderTime),total:cumulativeToFinalMeasurement(totalInputLatencyTime),sampleCount:measurementsCount};clearCumulativeMeasurement(totalKeydownTime);clearCumulativeMeasurement(totalInputTime);clearCumulativeMeasurement(totalRenderTime);clearCumulativeMeasurement(totalInputLatencyTime);measurementsCount=0;return result}inputLatency2.getAndClearMeasurements=getAndClearMeasurements;function cumulativeToFinalMeasurement(cumulative){return{average:cumulative.total/measurementsCount,max:cumulative.max,min:cumulative.min}}function clearCumulativeMeasurement(cumulative){cumulative.total=0;cumulative.min=Number.MAX_VALUE;cumulative.max=0}})(inputLatency||(inputLatency={}))}});var _debugComposition,TextAreaState,PagedScreenReaderStrategy;var init_textAreaState=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaState.js"(){init_strings();init_range();_debugComposition=false;TextAreaState=class{constructor(value,selectionStart,selectionEnd,selection,newlineCountBeforeSelection){this.value=value;this.selectionStart=selectionStart;this.selectionEnd=selectionEnd;this.selection=selection;this.newlineCountBeforeSelection=newlineCountBeforeSelection}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(textArea,previousState){const value=textArea.getValue();const selectionStart=textArea.getSelectionStart();const selectionEnd=textArea.getSelectionEnd();let newlineCountBeforeSelection=void 0;if(previousState){const valueBeforeSelectionStart=value.substring(0,selectionStart);const previousValueBeforeSelectionStart=previousState.value.substring(0,previousState.selectionStart);if(valueBeforeSelectionStart===previousValueBeforeSelectionStart){newlineCountBeforeSelection=previousState.newlineCountBeforeSelection}}return new TextAreaState(value,selectionStart,selectionEnd,null,newlineCountBeforeSelection)}collapseSelection(){if(this.selectionStart===this.value.length){return this}return new TextAreaState(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(reason,textArea,select){if(_debugComposition){console.log(`writeToTextArea ${reason}: ${this.toString()}`)}textArea.setValue(reason,this.value);if(select){textArea.setSelectionRange(reason,this.selectionStart,this.selectionEnd)}}deduceEditorPosition(offset){var _a6,_b3,_c2,_d2,_e2,_f2,_g2,_h2;if(offset<=this.selectionStart){const str=this.value.substring(offset,this.selectionStart);return this._finishDeduceEditorPosition((_b3=(_a6=this.selection)===null||_a6===void 0?void 0:_a6.getStartPosition())!==null&&_b3!==void 0?_b3:null,str,-1)}if(offset>=this.selectionEnd){const str=this.value.substring(this.selectionEnd,offset);return this._finishDeduceEditorPosition((_d2=(_c2=this.selection)===null||_c2===void 0?void 0:_c2.getEndPosition())!==null&&_d2!==void 0?_d2:null,str,1)}const str1=this.value.substring(this.selectionStart,offset);if(str1.indexOf(String.fromCharCode(8230))===-1){return this._finishDeduceEditorPosition((_f2=(_e2=this.selection)===null||_e2===void 0?void 0:_e2.getStartPosition())!==null&&_f2!==void 0?_f2:null,str1,1)}const str2=this.value.substring(offset,this.selectionEnd);return this._finishDeduceEditorPosition((_h2=(_g2=this.selection)===null||_g2===void 0?void 0:_g2.getEndPosition())!==null&&_h2!==void 0?_h2:null,str2,-1)}_finishDeduceEditorPosition(anchor,deltaText,signum){let lineFeedCnt=0;let lastLineFeedIndex=-1;while((lastLineFeedIndex=deltaText.indexOf("\n",lastLineFeedIndex+1))!==-1){lineFeedCnt++}return[anchor,signum*deltaText.length,lineFeedCnt]}static deduceInput(previousState,currentState,couldBeEmojiInput){if(!previousState){return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(_debugComposition){console.log("------------------------deduceInput");console.log(`PREVIOUS STATE: ${previousState.toString()}`);console.log(`CURRENT STATE: ${currentState.toString()}`)}const prefixLength=Math.min(commonPrefixLength(previousState.value,currentState.value),previousState.selectionStart,currentState.selectionStart);const suffixLength=Math.min(commonSuffixLength(previousState.value,currentState.value),previousState.value.length-previousState.selectionEnd,currentState.value.length-currentState.selectionEnd);const previousValue=previousState.value.substring(prefixLength,previousState.value.length-suffixLength);const currentValue=currentState.value.substring(prefixLength,currentState.value.length-suffixLength);const previousSelectionStart=previousState.selectionStart-prefixLength;const previousSelectionEnd=previousState.selectionEnd-prefixLength;const currentSelectionStart=currentState.selectionStart-prefixLength;const currentSelectionEnd=currentState.selectionEnd-prefixLength;if(_debugComposition){console.log(`AFTER DIFFING PREVIOUS STATE: <${previousValue}>, selectionStart: ${previousSelectionStart}, selectionEnd: ${previousSelectionEnd}`);console.log(`AFTER DIFFING CURRENT STATE: <${currentValue}>, selectionStart: ${currentSelectionStart}, selectionEnd: ${currentSelectionEnd}`)}if(currentSelectionStart===currentSelectionEnd){const replacePreviousCharacters2=previousState.selectionStart-prefixLength;if(_debugComposition){console.log(`REMOVE PREVIOUS: ${replacePreviousCharacters2} chars`)}return{text:currentValue,replacePrevCharCnt:replacePreviousCharacters2,replaceNextCharCnt:0,positionDelta:0}}const replacePreviousCharacters=previousSelectionEnd-previousSelectionStart;return{text:currentValue,replacePrevCharCnt:replacePreviousCharacters,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(previousState,currentState){if(!previousState){return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(_debugComposition){console.log("------------------------deduceAndroidCompositionInput");console.log(`PREVIOUS STATE: ${previousState.toString()}`);console.log(`CURRENT STATE: ${currentState.toString()}`)}if(previousState.value===currentState.value){return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:currentState.selectionEnd-previousState.selectionEnd}}const prefixLength=Math.min(commonPrefixLength(previousState.value,currentState.value),previousState.selectionEnd);const suffixLength=Math.min(commonSuffixLength(previousState.value,currentState.value),previousState.value.length-previousState.selectionEnd);const previousValue=previousState.value.substring(prefixLength,previousState.value.length-suffixLength);const currentValue=currentState.value.substring(prefixLength,currentState.value.length-suffixLength);const previousSelectionStart=previousState.selectionStart-prefixLength;const previousSelectionEnd=previousState.selectionEnd-prefixLength;const currentSelectionStart=currentState.selectionStart-prefixLength;const currentSelectionEnd=currentState.selectionEnd-prefixLength;if(_debugComposition){console.log(`AFTER DIFFING PREVIOUS STATE: <${previousValue}>, selectionStart: ${previousSelectionStart}, selectionEnd: ${previousSelectionEnd}`);console.log(`AFTER DIFFING CURRENT STATE: <${currentValue}>, selectionStart: ${currentSelectionStart}, selectionEnd: ${currentSelectionEnd}`)}return{text:currentValue,replacePrevCharCnt:previousSelectionEnd,replaceNextCharCnt:previousValue.length-previousSelectionEnd,positionDelta:currentSelectionEnd-currentValue.length}}};TextAreaState.EMPTY=new TextAreaState("",0,0,null,void 0);PagedScreenReaderStrategy=class{static _getPageOfLine(lineNumber,linesPerPage){return Math.floor((lineNumber-1)/linesPerPage)}static _getRangeForPage(page,linesPerPage){const offset=page*linesPerPage;const startLineNumber=offset+1;const endLineNumber=offset+linesPerPage;return new Range(startLineNumber,1,endLineNumber+1,1)}static fromEditorSelection(model,selection,linesPerPage,trimLongText){const LIMIT_CHARS=500;const selectionStartPage=PagedScreenReaderStrategy._getPageOfLine(selection.startLineNumber,linesPerPage);const selectionStartPageRange=PagedScreenReaderStrategy._getRangeForPage(selectionStartPage,linesPerPage);const selectionEndPage=PagedScreenReaderStrategy._getPageOfLine(selection.endLineNumber,linesPerPage);const selectionEndPageRange=PagedScreenReaderStrategy._getRangeForPage(selectionEndPage,linesPerPage);let pretextRange=selectionStartPageRange.intersectRanges(new Range(1,1,selection.startLineNumber,selection.startColumn));if(trimLongText&&model.getValueLengthInRange(pretextRange,1)>LIMIT_CHARS){const pretextStart=model.modifyPosition(pretextRange.getEndPosition(),-LIMIT_CHARS);pretextRange=Range.fromPositions(pretextStart,pretextRange.getEndPosition())}const pretext=model.getValueInRange(pretextRange,1);const lastLine=model.getLineCount();const lastLineMaxColumn=model.getLineMaxColumn(lastLine);let posttextRange=selectionEndPageRange.intersectRanges(new Range(selection.endLineNumber,selection.endColumn,lastLine,lastLineMaxColumn));if(trimLongText&&model.getValueLengthInRange(posttextRange,1)>LIMIT_CHARS){const posttextEnd=model.modifyPosition(posttextRange.getStartPosition(),LIMIT_CHARS);posttextRange=Range.fromPositions(posttextRange.getStartPosition(),posttextEnd)}const posttext=model.getValueInRange(posttextRange,1);let text2;if(selectionStartPage===selectionEndPage||selectionStartPage+1===selectionEndPage){text2=model.getValueInRange(selection,1)}else{const selectionRange1=selectionStartPageRange.intersectRanges(selection);const selectionRange2=selectionEndPageRange.intersectRanges(selection);text2=model.getValueInRange(selectionRange1,1)+String.fromCharCode(8230)+model.getValueInRange(selectionRange2,1)}if(trimLongText&&text2.length>2*LIMIT_CHARS){text2=text2.substring(0,LIMIT_CHARS)+String.fromCharCode(8230)+text2.substring(text2.length-LIMIT_CHARS,text2.length)}return new TextAreaState(pretext+text2+posttext,pretext.length,pretext.length+text2.length,selection,pretextRange.endLineNumber-pretextRange.startLineNumber)}}}});var TextAreaSyntethicEvents,CopyOptions,InMemoryClipboardMetadataManager,CompositionContext,TextAreaInput,ClipboardEventUtils,TextAreaWrapper;var init_textAreaInput=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaInput.js"(){init_browser();init_dom();init_event2();init_keyboardEvent();init_performance();init_async();init_event();init_lifecycle();init_mime();init_strings();init_textAreaState();init_selection();(function(TextAreaSyntethicEvents2){TextAreaSyntethicEvents2.Tap="-monaco-textarea-synthetic-tap"})(TextAreaSyntethicEvents||(TextAreaSyntethicEvents={}));CopyOptions={forceCopyWithSyntaxHighlighting:false};InMemoryClipboardMetadataManager=class{constructor(){this._lastState=null}set(lastCopiedValue,data){this._lastState={lastCopiedValue:lastCopiedValue,data:data}}get(pastedText){if(this._lastState&&this._lastState.lastCopiedValue===pastedText){return this._lastState.data}this._lastState=null;return null}};InMemoryClipboardMetadataManager.INSTANCE=new InMemoryClipboardMetadataManager;CompositionContext=class{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(text2){text2=text2||"";const typeInput={text:text2,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};this._lastTypeTextLength=text2.length;return typeInput}};TextAreaInput=class extends Disposable{get textAreaState(){return this._textAreaState}constructor(_host,_textArea,_OS,_browser){super();this._host=_host;this._textArea=_textArea;this._OS=_OS;this._browser=_browser;this._onFocus=this._register(new Emitter);this.onFocus=this._onFocus.event;this._onBlur=this._register(new Emitter);this.onBlur=this._onBlur.event;this._onKeyDown=this._register(new Emitter);this.onKeyDown=this._onKeyDown.event;this._onKeyUp=this._register(new Emitter);this.onKeyUp=this._onKeyUp.event;this._onCut=this._register(new Emitter);this.onCut=this._onCut.event;this._onPaste=this._register(new Emitter);this.onPaste=this._onPaste.event;this._onType=this._register(new Emitter);this.onType=this._onType.event;this._onCompositionStart=this._register(new Emitter);this.onCompositionStart=this._onCompositionStart.event;this._onCompositionUpdate=this._register(new Emitter);this.onCompositionUpdate=this._onCompositionUpdate.event;this._onCompositionEnd=this._register(new Emitter);this.onCompositionEnd=this._onCompositionEnd.event;this._onSelectionChangeRequest=this._register(new Emitter);this.onSelectionChangeRequest=this._onSelectionChangeRequest.event;this._asyncTriggerCut=this._register(new RunOnceScheduler((()=>this._onCut.fire()),0));this._asyncFocusGainWriteScreenReaderContent=this._register(new RunOnceScheduler((()=>this.writeScreenReaderContent("asyncFocusGain")),0));this._textAreaState=TextAreaState.EMPTY;this._selectionChangeListener=null;this.writeScreenReaderContent("ctor");this._hasFocus=false;this._currentComposition=null;let lastKeyDown=null;this._register(this._textArea.onKeyDown((_e2=>{const e=new StandardKeyboardEvent(_e2);if(e.keyCode===114||this._currentComposition&&e.keyCode===1){e.stopPropagation()}if(e.equals(9)){e.preventDefault()}lastKeyDown=e;this._onKeyDown.fire(e)})));this._register(this._textArea.onKeyUp((_e2=>{const e=new StandardKeyboardEvent(_e2);this._onKeyUp.fire(e)})));this._register(this._textArea.onCompositionStart((e=>{if(_debugComposition){console.log(`[compositionstart]`,e)}const currentComposition=new CompositionContext;if(this._currentComposition){this._currentComposition=currentComposition;return}this._currentComposition=currentComposition;if(this._OS===2&&lastKeyDown&&lastKeyDown.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&(lastKeyDown.code==="ArrowRight"||lastKeyDown.code==="ArrowLeft")){if(_debugComposition){console.log(`[compositionstart] Handling long press case on macOS + arrow key`,e)}currentComposition.handleCompositionUpdate("x");this._onCompositionStart.fire({data:e.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:e.data});return}this._onCompositionStart.fire({data:e.data})})));this._register(this._textArea.onCompositionUpdate((e=>{if(_debugComposition){console.log(`[compositionupdate]`,e)}const currentComposition=this._currentComposition;if(!currentComposition){return}if(this._browser.isAndroid){const newState=TextAreaState.readFromTextArea(this._textArea,this._textAreaState);const typeInput2=TextAreaState.deduceAndroidCompositionInput(this._textAreaState,newState);this._textAreaState=newState;this._onType.fire(typeInput2);this._onCompositionUpdate.fire(e);return}const typeInput=currentComposition.handleCompositionUpdate(e.data);this._textAreaState=TextAreaState.readFromTextArea(this._textArea,this._textAreaState);this._onType.fire(typeInput);this._onCompositionUpdate.fire(e)})));this._register(this._textArea.onCompositionEnd((e=>{if(_debugComposition){console.log(`[compositionend]`,e)}const currentComposition=this._currentComposition;if(!currentComposition){return}this._currentComposition=null;if(this._browser.isAndroid){const newState=TextAreaState.readFromTextArea(this._textArea,this._textAreaState);const typeInput2=TextAreaState.deduceAndroidCompositionInput(this._textAreaState,newState);this._textAreaState=newState;this._onType.fire(typeInput2);this._onCompositionEnd.fire();return}const typeInput=currentComposition.handleCompositionUpdate(e.data);this._textAreaState=TextAreaState.readFromTextArea(this._textArea,this._textAreaState);this._onType.fire(typeInput);this._onCompositionEnd.fire()})));this._register(this._textArea.onInput((e=>{if(_debugComposition){console.log(`[input]`,e)}this._textArea.setIgnoreSelectionChangeTime("received input event");if(this._currentComposition){return}const newState=TextAreaState.readFromTextArea(this._textArea,this._textAreaState);const typeInput=TextAreaState.deduceInput(this._textAreaState,newState,this._OS===2);if(typeInput.replacePrevCharCnt===0&&typeInput.text.length===1){if(isHighSurrogate(typeInput.text.charCodeAt(0))||typeInput.text.charCodeAt(0)===127){return}}this._textAreaState=newState;if(typeInput.text!==""||typeInput.replacePrevCharCnt!==0||typeInput.replaceNextCharCnt!==0||typeInput.positionDelta!==0){this._onType.fire(typeInput)}})));this._register(this._textArea.onCut((e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event");this._ensureClipboardGetsEditorSelection(e);this._asyncTriggerCut.schedule()})));this._register(this._textArea.onCopy((e=>{this._ensureClipboardGetsEditorSelection(e)})));this._register(this._textArea.onPaste((e=>{this._textArea.setIgnoreSelectionChangeTime("received paste event");e.preventDefault();if(!e.clipboardData){return}let[text2,metadata]=ClipboardEventUtils.getTextData(e.clipboardData);if(!text2){return}metadata=metadata||InMemoryClipboardMetadataManager.INSTANCE.get(text2);this._onPaste.fire({text:text2,metadata:metadata})})));this._register(this._textArea.onFocus((()=>{const hadFocus=this._hasFocus;this._setHasFocus(true);if(this._browser.isSafari&&!hadFocus&&this._hasFocus){this._asyncFocusGainWriteScreenReaderContent.schedule()}})));this._register(this._textArea.onBlur((()=>{if(this._currentComposition){this._currentComposition=null;this.writeScreenReaderContent("blurWithoutCompositionEnd");this._onCompositionEnd.fire()}this._setHasFocus(false)})));this._register(this._textArea.onSyntheticTap((()=>{if(this._browser.isAndroid&&this._currentComposition){this._currentComposition=null;this.writeScreenReaderContent("tapWithoutCompositionEnd");this._onCompositionEnd.fire()}})))}_installSelectionChangeListener(){let previousSelectionChangeEventTime=0;return addDisposableListener(document,"selectionchange",(e=>{inputLatency.onSelectionChange();if(!this._hasFocus){return}if(this._currentComposition){return}if(!this._browser.isChrome){return}const now=Date.now();const delta1=now-previousSelectionChangeEventTime;previousSelectionChangeEventTime=now;if(delta1<5){return}const delta2=now-this._textArea.getIgnoreSelectionChangeTime();this._textArea.resetSelectionChangeTime();if(delta2<100){return}if(!this._textAreaState.selection){return}const newValue=this._textArea.getValue();if(this._textAreaState.value!==newValue){return}const newSelectionStart=this._textArea.getSelectionStart();const newSelectionEnd=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===newSelectionStart&&this._textAreaState.selectionEnd===newSelectionEnd){return}const _newSelectionStartPosition=this._textAreaState.deduceEditorPosition(newSelectionStart);const newSelectionStartPosition=this._host.deduceModelPosition(_newSelectionStartPosition[0],_newSelectionStartPosition[1],_newSelectionStartPosition[2]);const _newSelectionEndPosition=this._textAreaState.deduceEditorPosition(newSelectionEnd);const newSelectionEndPosition=this._host.deduceModelPosition(_newSelectionEndPosition[0],_newSelectionEndPosition[1],_newSelectionEndPosition[2]);const newSelection=new Selection(newSelectionStartPosition.lineNumber,newSelectionStartPosition.column,newSelectionEndPosition.lineNumber,newSelectionEndPosition.column);this._onSelectionChangeRequest.fire(newSelection)}))}dispose(){super.dispose();if(this._selectionChangeListener){this._selectionChangeListener.dispose();this._selectionChangeListener=null}}focusTextArea(){this._setHasFocus(true);this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(newHasFocus){if(this._hasFocus===newHasFocus){return}this._hasFocus=newHasFocus;if(this._selectionChangeListener){this._selectionChangeListener.dispose();this._selectionChangeListener=null}if(this._hasFocus){this._selectionChangeListener=this._installSelectionChangeListener()}if(this._hasFocus){this.writeScreenReaderContent("focusgain")}if(this._hasFocus){this._onFocus.fire()}else{this._onBlur.fire()}}_setAndWriteTextAreaState(reason,textAreaState){if(!this._hasFocus){textAreaState=textAreaState.collapseSelection()}textAreaState.writeToTextArea(reason,this._textArea,this._hasFocus);this._textAreaState=textAreaState}writeScreenReaderContent(reason){if(this._currentComposition){return}this._setAndWriteTextAreaState(reason,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(e){const dataToCopy=this._host.getDataToCopy();const storedMetadata={version:1,isFromEmptySelection:dataToCopy.isFromEmptySelection,multicursorText:dataToCopy.multicursorText,mode:dataToCopy.mode};InMemoryClipboardMetadataManager.INSTANCE.set(this._browser.isFirefox?dataToCopy.text.replace(/\r\n/g,"\n"):dataToCopy.text,storedMetadata);e.preventDefault();if(e.clipboardData){ClipboardEventUtils.setTextData(e.clipboardData,dataToCopy.text,dataToCopy.html,storedMetadata)}}};ClipboardEventUtils={getTextData(clipboardData){const text2=clipboardData.getData(Mimes.text);let metadata=null;const rawmetadata=clipboardData.getData("vscode-editor-data");if(typeof rawmetadata==="string"){try{metadata=JSON.parse(rawmetadata);if(metadata.version!==1){metadata=null}}catch(err){}}if(text2.length===0&&metadata===null&&clipboardData.files.length>0){const files=Array.prototype.slice.call(clipboardData.files,0);return[files.map((file=>file.name)).join("\n"),null]}return[text2,metadata]},setTextData(clipboardData,text2,html2,metadata){clipboardData.setData(Mimes.text,text2);if(typeof html2==="string"){clipboardData.setData("text/html",html2)}clipboardData.setData("vscode-editor-data",JSON.stringify(metadata))}};TextAreaWrapper=class extends Disposable{constructor(_actual){super();this._actual=_actual;this.onKeyDown=this._register(new DomEmitter(this._actual,"keydown")).event;this.onKeyUp=this._register(new DomEmitter(this._actual,"keyup")).event;this.onCompositionStart=this._register(new DomEmitter(this._actual,"compositionstart")).event;this.onCompositionUpdate=this._register(new DomEmitter(this._actual,"compositionupdate")).event;this.onCompositionEnd=this._register(new DomEmitter(this._actual,"compositionend")).event;this.onBeforeInput=this._register(new DomEmitter(this._actual,"beforeinput")).event;this.onInput=this._register(new DomEmitter(this._actual,"input")).event;this.onCut=this._register(new DomEmitter(this._actual,"cut")).event;this.onCopy=this._register(new DomEmitter(this._actual,"copy")).event;this.onPaste=this._register(new DomEmitter(this._actual,"paste")).event;this.onFocus=this._register(new DomEmitter(this._actual,"focus")).event;this.onBlur=this._register(new DomEmitter(this._actual,"blur")).event;this._onSyntheticTap=this._register(new Emitter);this.onSyntheticTap=this._onSyntheticTap.event;this._ignoreSelectionChangeTime=0;this._register(this.onKeyDown((()=>inputLatency.onKeyDown())));this._register(this.onBeforeInput((()=>inputLatency.onBeforeInput())));this._register(this.onInput((()=>inputLatency.onInput())));this._register(this.onKeyUp((()=>inputLatency.onKeyUp())));this._register(addDisposableListener(this._actual,TextAreaSyntethicEvents.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const shadowRoot=getShadowRoot(this._actual);if(shadowRoot){return shadowRoot.activeElement===this._actual}else if(isInDOM(this._actual)){return document.activeElement===this._actual}else{return false}}setIgnoreSelectionChangeTime(reason){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(reason,value){const textArea=this._actual;if(textArea.value===value){return}this.setIgnoreSelectionChangeTime("setValue");textArea.value=value}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(reason,selectionStart,selectionEnd){const textArea=this._actual;let activeElement=null;const shadowRoot=getShadowRoot(textArea);if(shadowRoot){activeElement=shadowRoot.activeElement}else{activeElement=document.activeElement}const currentIsFocused=activeElement===textArea;const currentSelectionStart=textArea.selectionStart;const currentSelectionEnd=textArea.selectionEnd;if(currentIsFocused&¤tSelectionStart===selectionStart&¤tSelectionEnd===selectionEnd){if(isFirefox2&&window.parent!==window){textArea.focus()}return}if(currentIsFocused){this.setIgnoreSelectionChangeTime("setSelectionRange");textArea.setSelectionRange(selectionStart,selectionEnd);if(isFirefox2&&window.parent!==window){textArea.focus()}return}try{const scrollState=saveParentsScrollTop(textArea);this.setIgnoreSelectionChangeTime("setSelectionRange");textArea.focus();textArea.setSelectionRange(selectionStart,selectionEnd);restoreParentsScrollTop(textArea,scrollState)}catch(e){}}}}});var PointerEventHandler,TouchHandler,PointerHandler;var init_pointerHandler=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/controller/pointerHandler.js"(){init_dom();init_platform();init_touch();init_lifecycle();init_mouseHandler();init_editorDom();init_canIUse();init_textAreaInput();PointerEventHandler=class extends MouseHandler{constructor(context,viewController,viewHelper){super(context,viewController,viewHelper);this._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));this._register(addDisposableListener(this.viewHelper.linesContentDomNode,EventType2.Tap,(e=>this.onTap(e))));this._register(addDisposableListener(this.viewHelper.linesContentDomNode,EventType2.Change,(e=>this.onChange(e))));this._register(addDisposableListener(this.viewHelper.linesContentDomNode,EventType2.Contextmenu,(e=>this._onContextMenu(new EditorMouseEvent(e,false,this.viewHelper.viewDomNode),false))));this._lastPointerType="mouse";this._register(addDisposableListener(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const pointerType=e.pointerType;if(pointerType==="mouse"){this._lastPointerType="mouse";return}else if(pointerType==="touch"){this._lastPointerType="touch"}else{this._lastPointerType="pen"}})));const pointerEvents=new EditorPointerEventFactory(this.viewHelper.viewDomNode);this._register(pointerEvents.onPointerMove(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e))));this._register(pointerEvents.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e))));this._register(pointerEvents.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e))));this._register(pointerEvents.onPointerDown(this.viewHelper.viewDomNode,((e,pointerId)=>this._onMouseDown(e,pointerId))))}onTap(event){if(!event.initialTarget||!this.viewHelper.linesContentDomNode.contains(event.initialTarget)){return}event.preventDefault();this.viewHelper.focusTextArea();const target=this._createMouseTarget(new EditorMouseEvent(event,false,this.viewHelper.viewDomNode),false);if(target.position){this.viewController.dispatchMouse({position:target.position,mouseColumn:target.position.column,startedOnLineNumbers:false,revealType:1,mouseDownCount:event.tapCount,inSelectionMode:false,altKey:false,ctrlKey:false,metaKey:false,shiftKey:false,leftButton:false,middleButton:false,onInjectedText:target.type===6&&target.detail.injectedText!==null})}}onChange(e){if(this._lastPointerType==="touch"){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}_onMouseDown(e,pointerId){if(e.browserEvent.pointerType==="touch"){return}super._onMouseDown(e,pointerId)}};TouchHandler=class extends MouseHandler{constructor(context,viewController,viewHelper){super(context,viewController,viewHelper);this._register(Gesture.addTarget(this.viewHelper.linesContentDomNode));this._register(addDisposableListener(this.viewHelper.linesContentDomNode,EventType2.Tap,(e=>this.onTap(e))));this._register(addDisposableListener(this.viewHelper.linesContentDomNode,EventType2.Change,(e=>this.onChange(e))));this._register(addDisposableListener(this.viewHelper.linesContentDomNode,EventType2.Contextmenu,(e=>this._onContextMenu(new EditorMouseEvent(e,false,this.viewHelper.viewDomNode),false))))}onTap(event){event.preventDefault();this.viewHelper.focusTextArea();const target=this._createMouseTarget(new EditorMouseEvent(event,false,this.viewHelper.viewDomNode),false);if(target.position){const event2=document.createEvent("CustomEvent");event2.initEvent(TextAreaSyntethicEvents.Tap,false,true);this.viewHelper.dispatchTextAreaEvent(event2);this.viewController.moveTo(target.position,1)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}};PointerHandler=class extends Disposable{constructor(context,viewController,viewHelper){super();if(isIOS&&BrowserFeatures.pointerEvents){this.handler=this._register(new PointerEventHandler(context,viewController,viewHelper))}else if(window.TouchEvent){this.handler=this._register(new TouchHandler(context,viewController,viewHelper))}else{this.handler=this._register(new MouseHandler(context,viewController,viewHelper))}}getTargetAtClientPoint(clientX,clientY){return this.handler.getTargetAtClientPoint(clientX,clientY)}}}});var init_5=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css"(){}});var init_6=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css"(){}});var DynamicViewOverlay;var init_dynamicViewOverlay=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js"(){init_viewEventHandler();DynamicViewOverlay=class extends ViewEventHandler{}}});function themeColorFromId(id){return{id:id}}function getThemeTypeSelector(type){switch(type){case ColorScheme.DARK:return"vs-dark";case ColorScheme.HIGH_CONTRAST_DARK:return"hc-black";case ColorScheme.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}function registerThemingParticipant(participant){return themingRegistry.onColorThemeChange(participant)}var IThemeService,Extensions7,ThemingRegistry,themingRegistry,Themable;var init_themeService=__esm({"node_modules/monaco-editor/esm/vs/platform/theme/common/themeService.js"(){init_event();init_lifecycle();init_instantiation();init_platform2();init_theme();IThemeService=createDecorator("themeService");Extensions7={ThemingContribution:"base.contributions.theming"};ThemingRegistry=class{constructor(){this.themingParticipants=[];this.themingParticipants=[];this.onThemingParticipantAddedEmitter=new Emitter}onColorThemeChange(participant){this.themingParticipants.push(participant);this.onThemingParticipantAddedEmitter.fire(participant);return toDisposable((()=>{const idx=this.themingParticipants.indexOf(participant);this.themingParticipants.splice(idx,1)}))}getThemingParticipants(){return this.themingParticipants}};themingRegistry=new ThemingRegistry;Registry.add(Extensions7.ThemingContribution,themingRegistry);Themable=class extends Disposable{constructor(themeService){super();this.themeService=themeService;this.theme=themeService.getColorTheme();this._register(this.themeService.onDidColorThemeChange((theme=>this.onThemeChange(theme))))}onThemeChange(theme){this.theme=theme;this.updateStyles()}updateStyles(){}}}});var editorLineHighlight,editorLineHighlightBorder,editorRangeHighlight,editorRangeHighlightBorder,editorSymbolHighlight,editorSymbolHighlightBorder,editorCursorForeground,editorCursorBackground,editorWhitespaces,editorLineNumbers,deprecatedEditorIndentGuides,deprecatedEditorActiveIndentGuides,editorIndentGuide1,editorIndentGuide2,editorIndentGuide3,editorIndentGuide4,editorIndentGuide5,editorIndentGuide6,editorActiveIndentGuide1,editorActiveIndentGuide2,editorActiveIndentGuide3,editorActiveIndentGuide4,editorActiveIndentGuide5,editorActiveIndentGuide6,deprecatedEditorActiveLineNumber,editorActiveLineNumber,editorDimmedLineNumber,editorRuler,editorCodeLensForeground,editorBracketMatchBackground,editorBracketMatchBorder,editorOverviewRulerBorder,editorOverviewRulerBackground,editorGutter,editorUnnecessaryCodeBorder,editorUnnecessaryCodeOpacity,ghostTextBorder,ghostTextForeground,ghostTextBackground,rulerRangeDefault,overviewRulerRangeHighlight,overviewRulerError,overviewRulerWarning,overviewRulerInfo,editorBracketHighlightingForeground1,editorBracketHighlightingForeground2,editorBracketHighlightingForeground3,editorBracketHighlightingForeground4,editorBracketHighlightingForeground5,editorBracketHighlightingForeground6,editorBracketHighlightingUnexpectedBracketForeground,editorBracketPairGuideBackground1,editorBracketPairGuideBackground2,editorBracketPairGuideBackground3,editorBracketPairGuideBackground4,editorBracketPairGuideBackground5,editorBracketPairGuideBackground6,editorBracketPairGuideActiveBackground1,editorBracketPairGuideActiveBackground2,editorBracketPairGuideActiveBackground3,editorBracketPairGuideActiveBackground4,editorBracketPairGuideActiveBackground5,editorBracketPairGuideActiveBackground6,editorUnicodeHighlightBorder,editorUnicodeHighlightBackground;var init_editorColorRegistry=__esm({"node_modules/monaco-editor/esm/vs/editor/common/core/editorColorRegistry.js"(){init_nls();init_color();init_colorRegistry();init_themeService();editorLineHighlight=registerColor("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},localize("lineHighlight","Background color for the highlight of line at the cursor position."));editorLineHighlightBorder=registerColor("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:contrastBorder},localize("lineHighlightBorderBox","Background color for the border around the line at the cursor position."));editorRangeHighlight=registerColor("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},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);editorRangeHighlightBorder=registerColor("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:activeContrastBorder,hcLight:activeContrastBorder},localize("rangeHighlightBorder","Background color of the border around highlighted ranges."),true);editorSymbolHighlight=registerColor("editor.symbolHighlightBackground",{dark:editorFindMatchHighlight,light:editorFindMatchHighlight,hcDark:null,hcLight:null},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);editorSymbolHighlightBorder=registerColor("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:activeContrastBorder,hcLight:activeContrastBorder},localize("symbolHighlightBorder","Background color of the border around highlighted symbols."),true);editorCursorForeground=registerColor("editorCursor.foreground",{dark:"#AEAFAD",light:Color.black,hcDark:Color.white,hcLight:"#0F4A85"},localize("caret","Color of the editor cursor."));editorCursorBackground=registerColor("editorCursor.background",null,localize("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor."));editorWhitespaces=registerColor("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},localize("editorWhitespaces","Color of whitespace characters in the editor."));editorLineNumbers=registerColor("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:Color.white,hcLight:"#292929"},localize("editorLineNumbers","Color of editor line numbers."));deprecatedEditorIndentGuides=registerColor("editorIndentGuide.background",{dark:editorWhitespaces,light:editorWhitespaces,hcDark:editorWhitespaces,hcLight:editorWhitespaces},localize("editorIndentGuides","Color of the editor indentation guides."),false,localize("deprecatedEditorIndentGuides","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead."));deprecatedEditorActiveIndentGuides=registerColor("editorIndentGuide.activeBackground",{dark:editorWhitespaces,light:editorWhitespaces,hcDark:editorWhitespaces,hcLight:editorWhitespaces},localize("editorActiveIndentGuide","Color of the active editor indentation guides."),false,localize("deprecatedEditorActiveIndentGuide","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead."));editorIndentGuide1=registerColor("editorIndentGuide.background1",{dark:deprecatedEditorIndentGuides,light:deprecatedEditorIndentGuides,hcDark:deprecatedEditorIndentGuides,hcLight:deprecatedEditorIndentGuides},localize("editorIndentGuides1","Color of the editor indentation guides (1)."));editorIndentGuide2=registerColor("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorIndentGuides2","Color of the editor indentation guides (2)."));editorIndentGuide3=registerColor("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorIndentGuides3","Color of the editor indentation guides (3)."));editorIndentGuide4=registerColor("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorIndentGuides4","Color of the editor indentation guides (4)."));editorIndentGuide5=registerColor("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorIndentGuides5","Color of the editor indentation guides (5)."));editorIndentGuide6=registerColor("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorIndentGuides6","Color of the editor indentation guides (6)."));editorActiveIndentGuide1=registerColor("editorIndentGuide.activeBackground1",{dark:deprecatedEditorActiveIndentGuides,light:deprecatedEditorActiveIndentGuides,hcDark:deprecatedEditorActiveIndentGuides,hcLight:deprecatedEditorActiveIndentGuides},localize("editorActiveIndentGuide1","Color of the active editor indentation guides (1)."));editorActiveIndentGuide2=registerColor("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorActiveIndentGuide2","Color of the active editor indentation guides (2)."));editorActiveIndentGuide3=registerColor("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorActiveIndentGuide3","Color of the active editor indentation guides (3)."));editorActiveIndentGuide4=registerColor("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorActiveIndentGuide4","Color of the active editor indentation guides (4)."));editorActiveIndentGuide5=registerColor("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorActiveIndentGuide5","Color of the active editor indentation guides (5)."));editorActiveIndentGuide6=registerColor("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorActiveIndentGuide6","Color of the active editor indentation guides (6)."));deprecatedEditorActiveLineNumber=registerColor("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:activeContrastBorder,hcLight:activeContrastBorder},localize("editorActiveLineNumber","Color of editor active line number"),false,localize("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));editorActiveLineNumber=registerColor("editorLineNumber.activeForeground",{dark:deprecatedEditorActiveLineNumber,light:deprecatedEditorActiveLineNumber,hcDark:deprecatedEditorActiveLineNumber,hcLight:deprecatedEditorActiveLineNumber},localize("editorActiveLineNumber","Color of editor active line number"));editorDimmedLineNumber=registerColor("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},localize("editorDimmedLineNumber","Color of the final editor line when editor.renderFinalNewline is set to dimmed."));editorRuler=registerColor("editorRuler.foreground",{dark:"#5A5A5A",light:Color.lightgrey,hcDark:Color.white,hcLight:"#292929"},localize("editorRuler","Color of the editor rulers."));editorCodeLensForeground=registerColor("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},localize("editorCodeLensForeground","Foreground color of editor CodeLens"));editorBracketMatchBackground=registerColor("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},localize("editorBracketMatchBackground","Background color behind matching brackets"));editorBracketMatchBorder=registerColor("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:contrastBorder,hcLight:contrastBorder},localize("editorBracketMatchBorder","Color for matching brackets boxes"));editorOverviewRulerBorder=registerColor("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},localize("editorOverviewRulerBorder","Color of the overview ruler border."));editorOverviewRulerBackground=registerColor("editorOverviewRuler.background",null,localize("editorOverviewRulerBackground","Background color of the editor overview ruler."));editorGutter=registerColor("editorGutter.background",{dark:editorBackground,light:editorBackground,hcDark:editorBackground,hcLight:editorBackground},localize("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers."));editorUnnecessaryCodeBorder=registerColor("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:Color.fromHex("#fff").transparent(.8),hcLight:contrastBorder},localize("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor."));editorUnnecessaryCodeOpacity=registerColor("editorUnnecessaryCode.opacity",{dark:Color.fromHex("#000a"),light:Color.fromHex("#0007"),hcDark:null,hcLight:null},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.`));ghostTextBorder=registerColor("editorGhostText.border",{dark:null,light:null,hcDark:Color.fromHex("#fff").transparent(.8),hcLight:Color.fromHex("#292929").transparent(.8)},localize("editorGhostTextBorder","Border color of ghost text in the editor."));ghostTextForeground=registerColor("editorGhostText.foreground",{dark:Color.fromHex("#ffffff56"),light:Color.fromHex("#0007"),hcDark:null,hcLight:null},localize("editorGhostTextForeground","Foreground color of the ghost text in the editor."));ghostTextBackground=registerColor("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},localize("editorGhostTextBackground","Background color of the ghost text in the editor."));rulerRangeDefault=new Color(new RGBA(0,122,204,.6));overviewRulerRangeHighlight=registerColor("editorOverviewRuler.rangeHighlightForeground",{dark:rulerRangeDefault,light:rulerRangeDefault,hcDark:rulerRangeDefault,hcLight:rulerRangeDefault},localize("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),true);overviewRulerError=registerColor("editorOverviewRuler.errorForeground",{dark:new Color(new RGBA(255,18,18,.7)),light:new Color(new RGBA(255,18,18,.7)),hcDark:new Color(new RGBA(255,50,50,1)),hcLight:"#B5200D"},localize("overviewRuleError","Overview ruler marker color for errors."));overviewRulerWarning=registerColor("editorOverviewRuler.warningForeground",{dark:editorWarningForeground,light:editorWarningForeground,hcDark:editorWarningBorder,hcLight:editorWarningBorder},localize("overviewRuleWarning","Overview ruler marker color for warnings."));overviewRulerInfo=registerColor("editorOverviewRuler.infoForeground",{dark:editorInfoForeground,light:editorInfoForeground,hcDark:editorInfoBorder,hcLight:editorInfoBorder},localize("overviewRuleInfo","Overview ruler marker color for infos."));editorBracketHighlightingForeground1=registerColor("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},localize("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization."));editorBracketHighlightingForeground2=registerColor("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},localize("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization."));editorBracketHighlightingForeground3=registerColor("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},localize("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization."));editorBracketHighlightingForeground4=registerColor("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization."));editorBracketHighlightingForeground5=registerColor("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization."));editorBracketHighlightingForeground6=registerColor("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization."));editorBracketHighlightingUnexpectedBracketForeground=registerColor("editorBracketHighlight.unexpectedBracket.foreground",{dark:new Color(new RGBA(255,18,18,.8)),light:new Color(new RGBA(255,18,18,.8)),hcDark:new Color(new RGBA(255,50,50,1)),hcLight:""},localize("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets."));editorBracketPairGuideBackground1=registerColor("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides."));editorBracketPairGuideBackground2=registerColor("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides."));editorBracketPairGuideBackground3=registerColor("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides."));editorBracketPairGuideBackground4=registerColor("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides."));editorBracketPairGuideBackground5=registerColor("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides."));editorBracketPairGuideBackground6=registerColor("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides."));editorBracketPairGuideActiveBackground1=registerColor("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides."));editorBracketPairGuideActiveBackground2=registerColor("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides."));editorBracketPairGuideActiveBackground3=registerColor("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides."));editorBracketPairGuideActiveBackground4=registerColor("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides."));editorBracketPairGuideActiveBackground5=registerColor("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides."));editorBracketPairGuideActiveBackground6=registerColor("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},localize("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));editorUnicodeHighlightBorder=registerColor("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},localize("editorUnicodeHighlight.border","Border color used to highlight unicode characters."));editorUnicodeHighlightBackground=registerColor("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},localize("editorUnicodeHighlight.background","Background color used to highlight unicode characters."));registerThemingParticipant(((theme,collector)=>{const background=theme.getColor(editorBackground);const lineHighlight=theme.getColor(editorLineHighlight);const imeBackground=lineHighlight&&!lineHighlight.isTransparent()?lineHighlight:background;if(imeBackground){collector.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${imeBackground}; }`)}}))}});var LineNumbersOverlay;var init_lineNumbers=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js"(){init_6();init_platform();init_dynamicViewOverlay();init_position();init_themeService();init_editorColorRegistry();LineNumbersOverlay=class extends DynamicViewOverlay{constructor(context){super();this._context=context;this._readConfig();this._lastCursorModelPosition=new Position(1,1);this._renderResult=null;this._activeLineNumber=1;this._context.addEventHandler(this)}_readConfig(){const options2=this._context.configuration.options;this._lineHeight=options2.get(65);const lineNumbers=options2.get(66);this._renderLineNumbers=lineNumbers.renderType;this._renderCustomLineNumbers=lineNumbers.renderFn;this._renderFinalNewline=options2.get(93);const layoutInfo=options2.get(142);this._lineNumbersLeft=layoutInfo.lineNumbersLeft;this._lineNumbersWidth=layoutInfo.lineNumbersWidth}dispose(){this._context.removeEventHandler(this);this._renderResult=null;super.dispose()}onConfigurationChanged(e){this._readConfig();return true}onCursorStateChanged(e){const primaryViewPosition=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(primaryViewPosition);let shouldRender=false;if(this._activeLineNumber!==primaryViewPosition.lineNumber){this._activeLineNumber=primaryViewPosition.lineNumber;shouldRender=true}if(this._renderLineNumbers===2||this._renderLineNumbers===3){shouldRender=true}return shouldRender}onFlushed(e){return true}onLinesChanged(e){return true}onLinesDeleted(e){return true}onLinesInserted(e){return true}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return true}_getLineRenderLineNumber(viewLineNumber){const modelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Position(viewLineNumber,1));if(modelPosition.column!==1){return""}const modelLineNumber=modelPosition.lineNumber;if(this._renderCustomLineNumbers){return this._renderCustomLineNumbers(modelLineNumber)}if(this._renderLineNumbers===2){const diff=Math.abs(this._lastCursorModelPosition.lineNumber-modelLineNumber);if(diff===0){return''+modelLineNumber+""}return String(diff)}if(this._renderLineNumbers===3){if(this._lastCursorModelPosition.lineNumber===modelLineNumber){return String(modelLineNumber)}if(modelLineNumber%10===0){return String(modelLineNumber)}return""}return String(modelLineNumber)}prepareRender(ctx){if(this._renderLineNumbers===0){this._renderResult=null;return}const lineHeightClassName=isLinux?this._lineHeight%2===0?" lh-even":" lh-odd":"";const visibleStartLineNumber=ctx.visibleRange.startLineNumber;const visibleEndLineNumber=ctx.visibleRange.endLineNumber;const lineCount=this._context.viewModel.getLineCount();const output=[];for(let lineNumber=visibleStartLineNumber;lineNumber<=visibleEndLineNumber;lineNumber++){const lineIndex=lineNumber-visibleStartLineNumber;const renderLineNumber=this._getLineRenderLineNumber(lineNumber);if(!renderLineNumber){output[lineIndex]="";continue}let extraClassName="";if(lineNumber===lineCount&&this._context.viewModel.getLineLength(lineNumber)===0){if(this._renderFinalNewline==="off"){output[lineIndex]="";continue}if(this._renderFinalNewline==="dimmed"){extraClassName=" dimmed-line-number"}}if(lineNumber===this._activeLineNumber){extraClassName=" active-line-number"}output[lineIndex]=`
    ${renderLineNumber}
    `}this._renderResult=output}render(startLineNumber,lineNumber){if(!this._renderResult){return""}const lineIndex=lineNumber-startLineNumber;if(lineIndex<0||lineIndex>=this._renderResult.length){return""}return this._renderResult[lineIndex]}};LineNumbersOverlay.CLASS_NAME="line-numbers";registerThemingParticipant(((theme,collector)=>{const editorLineNumbersColor=theme.getColor(editorLineNumbers);const editorDimmedLineNumberColor=theme.getColor(editorDimmedLineNumber);if(editorDimmedLineNumberColor){collector.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${editorDimmedLineNumberColor}; }`)}else if(editorLineNumbersColor){collector.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${editorLineNumbersColor.transparent(.4)}; }`)}}))}});var init_7=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/margin/margin.css"(){}});var Margin;var init_margin=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/margin/margin.js"(){init_7();init_fastDomNode();init_viewPart();Margin=class extends ViewPart{constructor(context){super(context);const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._canUseLayerHinting=!options2.get(31);this._contentLeft=layoutInfo.contentLeft;this._glyphMarginLeft=layoutInfo.glyphMarginLeft;this._glyphMarginWidth=layoutInfo.glyphMarginWidth;this._domNode=createFastDomNode(document.createElement("div"));this._domNode.setClassName(Margin.OUTER_CLASS_NAME);this._domNode.setPosition("absolute");this._domNode.setAttribute("role","presentation");this._domNode.setAttribute("aria-hidden","true");this._glyphMarginBackgroundDomNode=createFastDomNode(document.createElement("div"));this._glyphMarginBackgroundDomNode.setClassName(Margin.CLASS_NAME);this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._canUseLayerHinting=!options2.get(31);this._contentLeft=layoutInfo.contentLeft;this._glyphMarginLeft=layoutInfo.glyphMarginLeft;this._glyphMarginWidth=layoutInfo.glyphMarginWidth;return true}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(ctx){}render(ctx){this._domNode.setLayerHinting(this._canUseLayerHinting);this._domNode.setContain("strict");const adjustedScrollTop=ctx.scrollTop-ctx.bigNumbersDelta;this._domNode.setTop(-adjustedScrollTop);const height=Math.min(ctx.scrollHeight,1e6);this._domNode.setHeight(height);this._domNode.setWidth(this._contentLeft);this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft);this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth);this._glyphMarginBackgroundDomNode.setHeight(height)}};Margin.CLASS_NAME="glyph-margin";Margin.OUTER_CLASS_NAME="margin"}});var init_8=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.css"(){}});var MOUSE_CURSOR_TEXT_CSS_CLASS_NAME;var init_mouseCursor=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/mouseCursor/mouseCursor.js"(){init_8();MOUSE_CURSOR_TEXT_CSS_CLASS_NAME=`monaco-mouse-cursor-text`}});var IMEImpl,IME;var init_ime=__esm({"node_modules/monaco-editor/esm/vs/base/common/ime.js"(){init_event();IMEImpl=class{constructor(){this._onDidChange=new Emitter;this.onDidChange=this._onDidChange.event;this._enabled=true}get enabled(){return this._enabled}enable(){this._enabled=true;this._onDidChange.fire()}disable(){this._enabled=false;this._onDidChange.fire()}};IME=new IMEImpl}});var IKeybindingService;var init_keybinding=__esm({"node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js"(){init_instantiation();IKeybindingService=createDecorator("keybindingService")}});function measureText(text2,fontInfo,tabSize){if(text2.length===0){return 0}const container=document.createElement("div");container.style.position="absolute";container.style.top="-50000px";container.style.width="50000px";const regularDomNode=document.createElement("span");applyFontInfo(regularDomNode,fontInfo);regularDomNode.style.whiteSpace="pre";regularDomNode.style.tabSize=`${tabSize*fontInfo.spaceWidth}px`;regularDomNode.append(text2);container.appendChild(regularDomNode);document.body.appendChild(container);const res=regularDomNode.offsetWidth;document.body.removeChild(container);return res}var __decorate9,__param8,VisibleTextAreaData,canUseZeroSizeTextarea,TextAreaHandler;var init_textAreaHandler=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.js"(){init_5();init_nls();init_browser();init_fastDomNode();init_platform();init_strings();init_domFontInfo();init_textAreaInput();init_textAreaState();init_viewPart();init_lineNumbers();init_margin();init_editorOptions();init_wordCharacterClassifier();init_position();init_range();init_selection();init_mouseCursor();init_languages();init_color();init_ime();init_keybinding();__decorate9=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param8=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};VisibleTextAreaData=class{constructor(_context,modelLineNumber,distanceToModelLineStart,widthOfHiddenLineTextBefore,distanceToModelLineEnd){this._context=_context;this.modelLineNumber=modelLineNumber;this.distanceToModelLineStart=distanceToModelLineStart;this.widthOfHiddenLineTextBefore=widthOfHiddenLineTextBefore;this.distanceToModelLineEnd=distanceToModelLineEnd;this._visibleTextAreaBrand=void 0;this.startPosition=null;this.endPosition=null;this.visibleTextareaStart=null;this.visibleTextareaEnd=null;this._previousPresentation=null}prepareRender(visibleRangeProvider){const startModelPosition=new Position(this.modelLineNumber,this.distanceToModelLineStart+1);const endModelPosition=new Position(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(startModelPosition);this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(endModelPosition);if(this.startPosition.lineNumber===this.endPosition.lineNumber){this.visibleTextareaStart=visibleRangeProvider.visibleRangeForPosition(this.startPosition);this.visibleTextareaEnd=visibleRangeProvider.visibleRangeForPosition(this.endPosition)}else{this.visibleTextareaStart=null;this.visibleTextareaEnd=null}}definePresentation(tokenPresentation){if(!this._previousPresentation){if(tokenPresentation){this._previousPresentation=tokenPresentation}else{this._previousPresentation={foreground:1,italic:false,bold:false,underline:false,strikethrough:false}}}return this._previousPresentation}};canUseZeroSizeTextarea=isFirefox2;TextAreaHandler=class TextAreaHandler2 extends ViewPart{constructor(context,viewController,visibleRangeProvider,_keybindingService){super(context);this._keybindingService=_keybindingService;this._primaryCursorPosition=new Position(1,1);this._primaryCursorVisibleRange=null;this._viewController=viewController;this._visibleRangeProvider=visibleRangeProvider;this._scrollLeft=0;this._scrollTop=0;const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._setAccessibilityOptions(options2);this._contentLeft=layoutInfo.contentLeft;this._contentWidth=layoutInfo.contentWidth;this._contentHeight=layoutInfo.height;this._fontInfo=options2.get(49);this._lineHeight=options2.get(65);this._emptySelectionClipboard=options2.get(36);this._copyWithSyntaxHighlighting=options2.get(24);this._visibleTextArea=null;this._selections=[new Selection(1,1,1,1)];this._modelSelections=[new Selection(1,1,1,1)];this._lastRenderPosition=null;this.textArea=createFastDomNode(document.createElement("textarea"));PartFingerprints.write(this.textArea,6);this.textArea.setClassName(`inputarea ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:tabSize}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${tabSize*this._fontInfo.spaceWidth}px`;this.textArea.setAttribute("autocorrect","off");this.textArea.setAttribute("autocapitalize","off");this.textArea.setAttribute("autocomplete","off");this.textArea.setAttribute("spellcheck","false");this.textArea.setAttribute("aria-label",this._getAriaLabel(options2));this.textArea.setAttribute("aria-required",options2.get(5)?"true":"false");this.textArea.setAttribute("tabindex",String(options2.get(122)));this.textArea.setAttribute("role","textbox");this.textArea.setAttribute("aria-roledescription",localize("editor","editor"));this.textArea.setAttribute("aria-multiline","true");this.textArea.setAttribute("aria-autocomplete",options2.get(89)?"none":"both");this._ensureReadOnlyAttribute();this.textAreaCover=createFastDomNode(document.createElement("div"));this.textAreaCover.setPosition("absolute");const simpleModel={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:lineNumber=>this._context.viewModel.getLineMaxColumn(lineNumber),getValueInRange:(range2,eol)=>this._context.viewModel.getValueInRange(range2,eol),getValueLengthInRange:(range2,eol)=>this._context.viewModel.getValueLengthInRange(range2,eol),modifyPosition:(position,offset)=>this._context.viewModel.modifyPosition(position,offset)};const textAreaInputHost={getDataToCopy:()=>{const rawTextToCopy=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,isWindows);const newLineCharacter=this._context.viewModel.model.getEOL();const isFromEmptySelection=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty();const multicursorText=Array.isArray(rawTextToCopy)?rawTextToCopy:null;const text2=Array.isArray(rawTextToCopy)?rawTextToCopy.join(newLineCharacter):rawTextToCopy;let html2=void 0;let mode=null;if(CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&text2.length<65536){const richText=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);if(richText){html2=richText.html;mode=richText.mode}}return{isFromEmptySelection:isFromEmptySelection,multicursorText:multicursorText,text:text2,html:html2,mode:mode}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const selection=this._selections[0];if(isMacintosh&&selection.isEmpty()){const position=selection.getStartPosition();let textBefore=this._getWordBeforePosition(position);if(textBefore.length===0){textBefore=this._getCharacterBeforePosition(position)}if(textBefore.length>0){return new TextAreaState(textBefore,textBefore.length,textBefore.length,Range.fromPositions(position),0)}}const LIMIT_CHARS=500;if(isMacintosh&&!selection.isEmpty()&&simpleModel.getValueLengthInRange(selection,0)0){return new TextAreaState(wordAtPosition,positionOffsetInWord,positionOffsetInWord,Range.fromPositions(position),0)}}return TextAreaState.EMPTY}return PagedScreenReaderStrategy.fromEditorSelection(simpleModel,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(viewAnchorPosition,deltaOffset,lineFeedCnt)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(viewAnchorPosition,deltaOffset,lineFeedCnt)};const textAreaWrapper=this._register(new TextAreaWrapper(this.textArea.domNode));this._textAreaInput=this._register(new TextAreaInput(textAreaInputHost,textAreaWrapper,OS,{isAndroid:isAndroid2,isChrome:isChrome2,isFirefox:isFirefox2,isSafari:isSafari2}));this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)})));this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)})));this._register(this._textAreaInput.onPaste((e=>{let pasteOnNewLine=false;let multicursorText=null;let mode=null;if(e.metadata){pasteOnNewLine=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection;multicursorText=typeof e.metadata.multicursorText!=="undefined"?e.metadata.multicursorText:null;mode=e.metadata.mode}this._viewController.paste(e.text,pasteOnNewLine,multicursorText,mode)})));this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()})));this._register(this._textAreaInput.onType((e=>{if(e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta){if(_debugComposition){console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`)}this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)}else{if(_debugComposition){console.log(` => type: <<${e.text}>>`)}this._viewController.type(e.text)}})));this._register(this._textAreaInput.onSelectionChangeRequest((modelSelection=>{this._viewController.setSelection(modelSelection)})));this._register(this._textAreaInput.onCompositionStart((e=>{const ta=this.textArea.domNode;const modelSelection=this._modelSelections[0];const{distanceToModelLineStart:distanceToModelLineStart,widthOfHiddenTextBefore:widthOfHiddenTextBefore}=(()=>{const textBeforeSelection=ta.value.substring(0,Math.min(ta.selectionStart,ta.selectionEnd));const lineFeedOffset1=textBeforeSelection.lastIndexOf("\n");const lineTextBeforeSelection=textBeforeSelection.substring(lineFeedOffset1+1);const tabOffset1=lineTextBeforeSelection.lastIndexOf("\t");const desiredVisibleBeforeCharCount=lineTextBeforeSelection.length-tabOffset1-1;const startModelPosition=modelSelection.getStartPosition();const visibleBeforeCharCount=Math.min(startModelPosition.column-1,desiredVisibleBeforeCharCount);const distanceToModelLineStart2=startModelPosition.column-1-visibleBeforeCharCount;const hiddenLineTextBefore=lineTextBeforeSelection.substring(0,lineTextBeforeSelection.length-visibleBeforeCharCount);const{tabSize:tabSize2}=this._context.viewModel.model.getOptions();const widthOfHiddenTextBefore2=measureText(hiddenLineTextBefore,this._fontInfo,tabSize2);return{distanceToModelLineStart:distanceToModelLineStart2,widthOfHiddenTextBefore:widthOfHiddenTextBefore2}})();const{distanceToModelLineEnd:distanceToModelLineEnd}=(()=>{const textAfterSelection=ta.value.substring(Math.max(ta.selectionStart,ta.selectionEnd));const lineFeedOffset2=textAfterSelection.indexOf("\n");const lineTextAfterSelection=lineFeedOffset2===-1?textAfterSelection:textAfterSelection.substring(0,lineFeedOffset2);const tabOffset2=lineTextAfterSelection.indexOf("\t");const desiredVisibleAfterCharCount=tabOffset2===-1?lineTextAfterSelection.length:lineTextAfterSelection.length-tabOffset2-1;const endModelPosition=modelSelection.getEndPosition();const visibleAfterCharCount=Math.min(this._context.viewModel.model.getLineMaxColumn(endModelPosition.lineNumber)-endModelPosition.column,desiredVisibleAfterCharCount);const distanceToModelLineEnd2=this._context.viewModel.model.getLineMaxColumn(endModelPosition.lineNumber)-endModelPosition.column-visibleAfterCharCount;return{distanceToModelLineEnd:distanceToModelLineEnd2}})();this._context.viewModel.revealRange("keyboard",true,Range.fromPositions(this._selections[0].getStartPosition()),0,1);this._visibleTextArea=new VisibleTextAreaData(this._context,modelSelection.startLineNumber,distanceToModelLineStart,widthOfHiddenTextBefore,distanceToModelLineEnd);this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");this._visibleTextArea.prepareRender(this._visibleRangeProvider);this._render();this.textArea.setClassName(`inputarea ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`);this._viewController.compositionStart();this._context.viewModel.onCompositionStart()})));this._register(this._textAreaInput.onCompositionUpdate((e=>{if(!this._visibleTextArea){return}this._visibleTextArea.prepareRender(this._visibleRangeProvider);this._render()})));this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null;this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");this._render();this.textArea.setClassName(`inputarea ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);this._viewController.compositionEnd();this._context.viewModel.onCompositionEnd()})));this._register(this._textAreaInput.onFocus((()=>{this._context.viewModel.setHasFocus(true)})));this._register(this._textAreaInput.onBlur((()=>{this._context.viewModel.setHasFocus(false)})));this._register(IME.onDidChange((()=>{this._ensureReadOnlyAttribute()})))}writeScreenReaderContent(reason){this._textAreaInput.writeScreenReaderContent(reason)}dispose(){super.dispose()}_getAndroidWordAtPosition(position){const ANDROID_WORD_SEPARATORS='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?';const lineContent=this._context.viewModel.getLineContent(position.lineNumber);const wordSeparators2=getMapForWordSeparators(ANDROID_WORD_SEPARATORS);let goingLeft=true;let startColumn=position.column;let goingRight=true;let endColumn=position.column;let distance=0;while(distance<50&&(goingLeft||goingRight)){if(goingLeft&&startColumn<=1){goingLeft=false}if(goingLeft){const charCode=lineContent.charCodeAt(startColumn-2);const charClass=wordSeparators2.get(charCode);if(charClass!==0){goingLeft=false}else{startColumn--}}if(goingRight&&endColumn>lineContent.length){goingRight=false}if(goingRight){const charCode=lineContent.charCodeAt(endColumn-1);const charClass=wordSeparators2.get(charCode);if(charClass!==0){goingRight=false}else{endColumn++}}distance++}return[lineContent.substring(startColumn-1,endColumn-1),position.column-startColumn]}_getWordBeforePosition(position){const lineContent=this._context.viewModel.getLineContent(position.lineNumber);const wordSeparators2=getMapForWordSeparators(this._context.configuration.options.get(128));let column=position.column;let distance=0;while(column>1){const charCode=lineContent.charCodeAt(column-2);const charClass=wordSeparators2.get(charCode);if(charClass!==0||distance>50){return lineContent.substring(column-1,position.column-1)}distance++;column--}return lineContent.substring(0,position.column-1)}_getCharacterBeforePosition(position){if(position.column>1){const lineContent=this._context.viewModel.getLineContent(position.lineNumber);const charBefore=lineContent.charAt(position.column-2);if(!isHighSurrogate(charBefore.charCodeAt(0))){return charBefore}}return""}_getAriaLabel(options2){var _a6,_b3,_c2;const accessibilitySupport=options2.get(2);if(accessibilitySupport===1){const toggleKeybindingLabel=(_a6=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))===null||_a6===void 0?void 0:_a6.getAriaLabel();const runCommandKeybindingLabel=(_b3=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))===null||_b3===void 0?void 0:_b3.getAriaLabel();const keybindingEditorKeybindingLabel=(_c2=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))===null||_c2===void 0?void 0:_c2.getAriaLabel();const editorNotAccessibleMessage=localize("accessibilityModeOff","The editor is not accessible at this time.");if(toggleKeybindingLabel){return localize("accessibilityOffAriaLabel","{0} To enable screen reader optimized mode, use {1}",editorNotAccessibleMessage,toggleKeybindingLabel)}else if(runCommandKeybindingLabel){return localize("accessibilityOffAriaLabelNoKb","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.",editorNotAccessibleMessage,runCommandKeybindingLabel)}else if(keybindingEditorKeybindingLabel){return localize("accessibilityOffAriaLabelNoKbs","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it.",editorNotAccessibleMessage,keybindingEditorKeybindingLabel)}else{return editorNotAccessibleMessage}}return options2.get(4)}_setAccessibilityOptions(options2){this._accessibilitySupport=options2.get(2);const accessibilityPageSize=options2.get(3);if(this._accessibilitySupport===2&&accessibilityPageSize===EditorOptions.accessibilityPageSize.defaultValue){this._accessibilityPageSize=500}else{this._accessibilityPageSize=accessibilityPageSize}const layoutInfo=options2.get(142);const wrappingColumn=layoutInfo.wrappingColumn;if(wrappingColumn!==-1&&this._accessibilitySupport!==1){const fontInfo=options2.get(49);this._textAreaWrapping=true;this._textAreaWidth=Math.round(wrappingColumn*fontInfo.typicalHalfwidthCharacterWidth)}else{this._textAreaWrapping=false;this._textAreaWidth=canUseZeroSizeTextarea?0:1}}onConfigurationChanged(e){const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._setAccessibilityOptions(options2);this._contentLeft=layoutInfo.contentLeft;this._contentWidth=layoutInfo.contentWidth;this._contentHeight=layoutInfo.height;this._fontInfo=options2.get(49);this._lineHeight=options2.get(65);this._emptySelectionClipboard=options2.get(36);this._copyWithSyntaxHighlighting=options2.get(24);this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:tabSize}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${tabSize*this._fontInfo.spaceWidth}px`;this.textArea.setAttribute("aria-label",this._getAriaLabel(options2));this.textArea.setAttribute("aria-required",options2.get(5)?"true":"false");this.textArea.setAttribute("tabindex",String(options2.get(122)));if(e.hasChanged(33)||e.hasChanged(89)){this._ensureReadOnlyAttribute()}if(e.hasChanged(2)){this._textAreaInput.writeScreenReaderContent("strategy changed")}return true}onCursorStateChanged(e){this._selections=e.selections.slice(0);this._modelSelections=e.modelSelections.slice(0);this._textAreaInput.writeScreenReaderContent("selection changed");return true}onDecorationsChanged(e){return true}onFlushed(e){return true}onLinesChanged(e){return true}onLinesDeleted(e){return true}onLinesInserted(e){return true}onScrollChanged(e){this._scrollLeft=e.scrollLeft;this._scrollTop=e.scrollTop;return true}onZonesChanged(e){return true}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(options2){if(options2.activeDescendant){this.textArea.setAttribute("aria-haspopup","true");this.textArea.setAttribute("aria-autocomplete","list");this.textArea.setAttribute("aria-activedescendant",options2.activeDescendant)}else{this.textArea.setAttribute("aria-haspopup","false");this.textArea.setAttribute("aria-autocomplete","both");this.textArea.removeAttribute("aria-activedescendant")}if(options2.role){this.textArea.setAttribute("role",options2.role)}}_ensureReadOnlyAttribute(){const options2=this._context.configuration.options;const useReadOnly=!IME.enabled||options2.get(33)&&options2.get(89);if(useReadOnly){this.textArea.setAttribute("readonly","true")}else{this.textArea.removeAttribute("readonly")}}prepareRender(ctx){var _a6;this._primaryCursorPosition=new Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn);this._primaryCursorVisibleRange=ctx.visibleRangeForPosition(this._primaryCursorPosition);(_a6=this._visibleTextArea)===null||_a6===void 0?void 0:_a6.prepareRender(ctx)}render(ctx){this._textAreaInput.writeScreenReaderContent("render");this._render()}_render(){var _a6;if(this._visibleTextArea){const visibleStart=this._visibleTextArea.visibleTextareaStart;const visibleEnd=this._visibleTextArea.visibleTextareaEnd;const startPosition=this._visibleTextArea.startPosition;const endPosition=this._visibleTextArea.endPosition;if(startPosition&&endPosition&&visibleStart&&visibleEnd&&visibleEnd.left>=this._scrollLeft&&visibleStart.left<=this._scrollLeft+this._contentWidth){const top2=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop;const lineCount=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let scrollLeft=this._visibleTextArea.widthOfHiddenLineTextBefore;let left2=this._contentLeft+visibleStart.left-this._scrollLeft;let width=visibleEnd.left-visibleStart.left+1;if(left2this._contentWidth){width=this._contentWidth}const viewLineData=this._context.viewModel.getViewLineData(startPosition.lineNumber);const startTokenIndex=viewLineData.tokens.findTokenIndexAtOffset(startPosition.column-1);const endTokenIndex=viewLineData.tokens.findTokenIndexAtOffset(endPosition.column-1);const textareaSpansSingleToken=startTokenIndex===endTokenIndex;const presentation=this._visibleTextArea.definePresentation(textareaSpansSingleToken?viewLineData.tokens.getPresentation(startTokenIndex):null);this.textArea.domNode.scrollTop=lineCount*this._lineHeight;this.textArea.domNode.scrollLeft=scrollLeft;this._doRender({lastRenderPosition:null,top:top2,left:left2,width:width,height:this._lineHeight,useCover:false,color:(TokenizationRegistry2.getColorMap()||[])[presentation.foreground],italic:presentation.italic,bold:presentation.bold,underline:presentation.underline,strikethrough:presentation.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const left=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(leftthis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const top=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(top<0||top>this._contentHeight){this._renderAtTopLeft();return}if(isMacintosh){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:top,left:this._textAreaWrapping?this._contentLeft:left,width:this._textAreaWidth,height:this._lineHeight,useCover:false});this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const lineCount=(_a6=this._textAreaInput.textAreaState.newlineCountBeforeSelection)!==null&&_a6!==void 0?_a6:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=lineCount*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:top,left:this._textAreaWrapping?this._contentLeft:left,width:this._textAreaWidth,height:canUseZeroSizeTextarea?0:1,useCover:false})}_newlinecount(text2){let result=0;let startIndex=-1;do{startIndex=text2.indexOf("\n",startIndex+1);if(startIndex===-1){break}result++}while(true);return result}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:canUseZeroSizeTextarea?0:1,useCover:true})}_doRender(renderData){this._lastRenderPosition=renderData.lastRenderPosition;const ta=this.textArea;const tac=this.textAreaCover;applyFontInfo(ta,this._fontInfo);ta.setTop(renderData.top);ta.setLeft(renderData.left);ta.setWidth(renderData.width);ta.setHeight(renderData.height);ta.setColor(renderData.color?Color.Format.CSS.formatHex(renderData.color):"");ta.setFontStyle(renderData.italic?"italic":"");if(renderData.bold){ta.setFontWeight("bold")}ta.setTextDecoration(`${renderData.underline?" underline":""}${renderData.strikethrough?" line-through":""}`);tac.setTop(renderData.useCover?renderData.top:0);tac.setLeft(renderData.useCover?renderData.left:0);tac.setWidth(renderData.useCover?renderData.width:0);tac.setHeight(renderData.useCover?renderData.height:0);const options2=this._context.configuration.options;if(options2.get(56)){tac.setClassName("monaco-editor-background textAreaCover "+Margin.OUTER_CLASS_NAME)}else{if(options2.get(66).renderType!==0){tac.setClassName("monaco-editor-background textAreaCover "+LineNumbersOverlay.CLASS_NAME)}else{tac.setClassName("monaco-editor-background textAreaCover")}}}};TextAreaHandler=__decorate9([__param8(3,IKeybindingService)],TextAreaHandler)}});function _normalizeIndentationFromWhitespace(str,indentSize,insertSpaces){let spacesCnt=0;for(let i=0;itrue;autoCloseNever=()=>false;autoCloseBeforeWhitespace=chr=>chr===" "||chr==="\t";CursorConfiguration=class{static shouldRecreate(e){return e.hasChanged(142)||e.hasChanged(128)||e.hasChanged(36)||e.hasChanged(75)||e.hasChanged(77)||e.hasChanged(78)||e.hasChanged(6)||e.hasChanged(10)||e.hasChanged(8)||e.hasChanged(9)||e.hasChanged(13)||e.hasChanged(126)||e.hasChanged(49)||e.hasChanged(89)}constructor(languageId,modelOptions,configuration,languageConfigurationService){this.languageConfigurationService=languageConfigurationService;this._cursorMoveConfigurationBrand=void 0;this._languageId=languageId;const options2=configuration.options;const layoutInfo=options2.get(142);const fontInfo=options2.get(49);this.readOnly=options2.get(89);this.tabSize=modelOptions.tabSize;this.indentSize=modelOptions.indentSize;this.insertSpaces=modelOptions.insertSpaces;this.stickyTabStops=options2.get(114);this.lineHeight=fontInfo.lineHeight;this.typicalHalfwidthCharacterWidth=fontInfo.typicalHalfwidthCharacterWidth;this.pageSize=Math.max(1,Math.floor(layoutInfo.height/this.lineHeight)-2);this.useTabStops=options2.get(126);this.wordSeparators=options2.get(128);this.emptySelectionClipboard=options2.get(36);this.copyWithSyntaxHighlighting=options2.get(24);this.multiCursorMergeOverlapping=options2.get(75);this.multiCursorPaste=options2.get(77);this.multiCursorLimit=options2.get(78);this.autoClosingBrackets=options2.get(6);this.autoClosingQuotes=options2.get(10);this.autoClosingDelete=options2.get(8);this.autoClosingOvertype=options2.get(9);this.autoSurround=options2.get(13);this.autoIndent=options2.get(11);this.surroundingPairs={};this._electricChars=null;this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(languageId,this.autoClosingQuotes,true),bracket:this._getShouldAutoClose(languageId,this.autoClosingBrackets,false)};this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(languageId).getAutoClosingPairs();const surroundingPairs=this.languageConfigurationService.getLanguageConfiguration(languageId).getSurroundingPairs();if(surroundingPairs){for(const pair of surroundingPairs){this.surroundingPairs[pair.open]=pair.close}}}get electricChars(){var _a6;if(!this._electricChars){this._electricChars={};const electricChars=(_a6=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||_a6===void 0?void 0:_a6.getElectricCharacters();if(electricChars){for(const char of electricChars){this._electricChars[char]=true}}}return this._electricChars}onElectricCharacter(character,context,column){const scopedLineTokens=createScopedLineTokens(context,column-1);const electricCharacterSupport=this.languageConfigurationService.getLanguageConfiguration(scopedLineTokens.languageId).electricCharacter;if(!electricCharacterSupport){return null}return electricCharacterSupport.onElectricCharacter(character,scopedLineTokens,column-scopedLineTokens.firstCharOffset)}normalizeIndentation(str){return normalizeIndentation(str,this.indentSize,this.insertSpaces)}_getShouldAutoClose(languageId,autoCloseConfig,forQuotes){switch(autoCloseConfig){case"beforeWhitespace":return autoCloseBeforeWhitespace;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(languageId,forQuotes);case"always":return autoCloseAlways;case"never":return autoCloseNever}}_getLanguageDefinedShouldAutoClose(languageId,forQuotes){const autoCloseBeforeSet=this.languageConfigurationService.getLanguageConfiguration(languageId).getAutoCloseBeforeSet(forQuotes);return c=>autoCloseBeforeSet.indexOf(c)!==-1}visibleColumnFromColumn(model,position){return CursorColumns.visibleColumnFromColumn(model.getLineContent(position.lineNumber),position.column,this.tabSize)}columnFromVisibleColumn(model,lineNumber,visibleColumn){const result=CursorColumns.columnFromVisibleColumn(model.getLineContent(lineNumber),visibleColumn,this.tabSize);const minColumn=model.getLineMinColumn(lineNumber);if(resultmaxColumn){return maxColumn}return result}};CursorState=class{static fromModelState(modelState){return new PartialModelCursorState(modelState)}static fromViewState(viewState){return new PartialViewCursorState(viewState)}static fromModelSelection(modelSelection){const selection=Selection.liftSelection(modelSelection);const modelState=new SingleCursorState(Range.fromPositions(selection.getSelectionStart()),0,0,selection.getPosition(),0);return CursorState.fromModelState(modelState)}static fromModelSelections(modelSelections){const states=[];for(let i=0,len=modelSelections.length;itoLineNumber;const isRTL=fromVisibleColumn>toVisibleColumn;const isLTR=fromVisibleColumntoVisibleColumn){continue}if(visibleEndColumnfromVisibleColumn){continue}if(visibleStartColumn0){toViewVisualColumn--}return ColumnSelection.columnSelect(config,model,prevColumnSelectData.fromViewLineNumber,prevColumnSelectData.fromViewVisualColumn,prevColumnSelectData.toViewLineNumber,toViewVisualColumn)}static columnSelectRight(config,model,prevColumnSelectData){let maxVisualViewColumn=0;const minViewLineNumber=Math.min(prevColumnSelectData.fromViewLineNumber,prevColumnSelectData.toViewLineNumber);const maxViewLineNumber=Math.max(prevColumnSelectData.fromViewLineNumber,prevColumnSelectData.toViewLineNumber);for(let lineNumber=minViewLineNumber;lineNumber<=maxViewLineNumber;lineNumber++){const lineMaxViewColumn=model.getLineMaxColumn(lineNumber);const lineMaxVisualViewColumn=config.visibleColumnFromColumn(model,new Position(lineNumber,lineMaxViewColumn));maxVisualViewColumn=Math.max(maxVisualViewColumn,lineMaxVisualViewColumn)}let toViewVisualColumn=prevColumnSelectData.toViewVisualColumn;if(toViewVisualColumnmodel.getLineMinColumn(position.lineNumber)){return position.delta(void 0,-prevCharLength(model.getLineContent(position.lineNumber),position.column-1))}else if(position.lineNumber>1){const newLineNumber=position.lineNumber-1;return new Position(newLineNumber,model.getLineMaxColumn(newLineNumber))}else{return position}}static leftPositionAtomicSoftTabs(model,position,tabSize){if(position.column<=model.getLineIndentColumn(position.lineNumber)){const minColumn=model.getLineMinColumn(position.lineNumber);const lineContent=model.getLineContent(position.lineNumber);const newPosition=AtomicTabMoveOperations.atomicPosition(lineContent,position.column-1,tabSize,0);if(newPosition!==-1&&newPosition+1>=minColumn){return new Position(position.lineNumber,newPosition+1)}}return this.leftPosition(model,position)}static left(config,model,position){const pos=config.stickyTabStops?MoveOperations.leftPositionAtomicSoftTabs(model,position,config.tabSize):MoveOperations.leftPosition(model,position);return new CursorPosition(pos.lineNumber,pos.column,0)}static moveLeft(config,model,cursor,inSelectionMode,noOfColumns){let lineNumber,column;if(cursor.hasSelection()&&!inSelectionMode){lineNumber=cursor.selection.startLineNumber;column=cursor.selection.startColumn}else{const pos=cursor.position.delta(void 0,-(noOfColumns-1));const normalizedPos=model.normalizePosition(MoveOperations.clipPositionColumn(pos,model),0);const p=MoveOperations.left(config,model,normalizedPos);lineNumber=p.lineNumber;column=p.column}return cursor.move(inSelectionMode,lineNumber,column,0)}static clipPositionColumn(position,model){return new Position(position.lineNumber,MoveOperations.clipRange(position.column,model.getLineMinColumn(position.lineNumber),model.getLineMaxColumn(position.lineNumber)))}static clipRange(value,min,max){if(valuemax){return max}return value}static rightPosition(model,lineNumber,column){if(columnlineCount){lineNumber=lineCount;if(allowMoveOnEdgeLine){column=model.getLineMaxColumn(lineNumber)}else{column=Math.min(model.getLineMaxColumn(lineNumber),column)}}else{column=config.columnFromVisibleColumn(model,lineNumber,currentVisibleColumn)}if(wasAtEdgePosition){leftoverVisibleColumns=0}else{leftoverVisibleColumns=currentVisibleColumn-CursorColumns.visibleColumnFromColumn(model.getLineContent(lineNumber),column,config.tabSize)}if(normalizationAffinity!==void 0){const position=new Position(lineNumber,column);const newPosition=model.normalizePosition(position,normalizationAffinity);leftoverVisibleColumns=leftoverVisibleColumns+(column-newPosition.column);lineNumber=newPosition.lineNumber;column=newPosition.column}return new CursorPosition(lineNumber,column,leftoverVisibleColumns)}static down(config,model,lineNumber,column,leftoverVisibleColumns,count,allowMoveOnLastLine){return this.vertical(config,model,lineNumber,column,leftoverVisibleColumns,lineNumber+count,allowMoveOnLastLine,4)}static moveDown(config,model,cursor,inSelectionMode,linesCount){let lineNumber,column;if(cursor.hasSelection()&&!inSelectionMode){lineNumber=cursor.selection.endLineNumber;column=cursor.selection.endColumn}else{lineNumber=cursor.position.lineNumber;column=cursor.position.column}let i=0;let r;do{r=MoveOperations.down(config,model,lineNumber+i,column,cursor.leftoverVisibleColumns,linesCount,true);const np=model.normalizePosition(new Position(r.lineNumber,r.column),2);if(np.lineNumber>lineNumber){break}}while(i++<10&&lineNumber+i1&&this._isBlankLine(model,lineNumber)){lineNumber--}while(lineNumber>1&&!this._isBlankLine(model,lineNumber)){lineNumber--}return cursor.move(inSelectionMode,lineNumber,model.getLineMinColumn(lineNumber),0)}static moveToNextBlankLine(config,model,cursor,inSelectionMode){const lineCount=model.getLineCount();let lineNumber=cursor.position.lineNumber;while(lineNumber=lineText.length+1){return false}const character=lineText.charAt(position.column-2);const autoClosingPairCandidates=autoClosingPairsOpen.get(character);if(!autoClosingPairCandidates){return false}if(isQuote(character)){if(autoClosingQuotes==="never"){return false}}else{if(autoClosingBrackets==="never"){return false}}const afterCharacter=lineText.charAt(position.column-1);let foundAutoClosingPair=false;for(const autoClosingPairCandidate of autoClosingPairCandidates){if(autoClosingPairCandidate.open===character&&autoClosingPairCandidate.close===afterCharacter){foundAutoClosingPair=true}}if(!foundAutoClosingPair){return false}if(autoClosingDelete==="auto"){let found=false;for(let j=0,lenJ=autoClosedCharacters.length;j1){const lineContent=model.getLineContent(position.lineNumber);const firstNonWhitespaceIndex2=firstNonWhitespaceIndex(lineContent);const lastIndentationColumn=firstNonWhitespaceIndex2===-1?lineContent.length+1:firstNonWhitespaceIndex2+1;if(position.column<=lastIndentationColumn){const fromVisibleColumn=config.visibleColumnFromColumn(model,position);const toVisibleColumn=CursorColumns.prevIndentTabStop(fromVisibleColumn,config.indentSize);const toColumn=config.columnFromVisibleColumn(model,position.lineNumber,toVisibleColumn);return new Range(position.lineNumber,toColumn,position.lineNumber,position.column)}}return Range.fromPositions(DeleteOperations.getPositionAfterDeleteLeft(position,model),position)}static getPositionAfterDeleteLeft(position,model){if(position.column>1){const idx=getLeftDeleteOffset(position.column-1,model.getLineContent(position.lineNumber));return position.with(void 0,idx+1)}else if(position.lineNumber>1){const newLine=position.lineNumber-1;return new Position(newLine,model.getLineMaxColumn(newLine))}else{return position}}static cut(config,model,selections){const commands=[];let lastCutRange=null;selections.sort(((a,b)=>Position.compare(a.getStartPosition(),b.getEndPosition())));for(let i=0,len=selections.length;i1&&(lastCutRange===null||lastCutRange===void 0?void 0:lastCutRange.endLineNumber)!==position.lineNumber){startLineNumber=position.lineNumber-1;startColumn=model.getLineMaxColumn(position.lineNumber-1);endLineNumber=position.lineNumber;endColumn=model.getLineMaxColumn(position.lineNumber)}else{startLineNumber=position.lineNumber;startColumn=1;endLineNumber=position.lineNumber;endColumn=model.getLineMaxColumn(position.lineNumber)}const deleteSelection=new Range(startLineNumber,startColumn,endLineNumber,endColumn);lastCutRange=deleteSelection;if(!deleteSelection.isEmpty()){commands[i]=new ReplaceCommand(deleteSelection,"")}else{commands[i]=null}}else{commands[i]=null}}else{commands[i]=new ReplaceCommand(selection,"")}}return new EditOperationResult(0,commands,{shouldPushStackElementBefore:true,shouldPushStackElementAfter:true})}}}});function enforceDefined(arr){return arr.filter((el=>Boolean(el)))}var WordOperations,WordPartOperations;var init_cursorWordOperations=__esm({"node_modules/monaco-editor/esm/vs/editor/common/cursor/cursorWordOperations.js"(){init_strings();init_cursorCommon();init_cursorDeleteOperations();init_wordCharacterClassifier();init_position();init_range();WordOperations=class{static _createWord(lineContent,wordType,nextCharClass,start,end){return{start:start,end:end,wordType:wordType,nextCharClass:nextCharClass}}static _findPreviousWordOnLine(wordSeparators2,model,position){const lineContent=model.getLineContent(position.lineNumber);return this._doFindPreviousWordOnLine(lineContent,wordSeparators2,position)}static _doFindPreviousWordOnLine(lineContent,wordSeparators2,position){let wordType=0;for(let chIndex=position.column-2;chIndex>=0;chIndex--){const chCode=lineContent.charCodeAt(chIndex);const chClass=wordSeparators2.get(chCode);if(chClass===0){if(wordType===2){return this._createWord(lineContent,wordType,chClass,chIndex+1,this._findEndOfWord(lineContent,wordSeparators2,wordType,chIndex+1))}wordType=1}else if(chClass===2){if(wordType===1){return this._createWord(lineContent,wordType,chClass,chIndex+1,this._findEndOfWord(lineContent,wordSeparators2,wordType,chIndex+1))}wordType=2}else if(chClass===1){if(wordType!==0){return this._createWord(lineContent,wordType,chClass,chIndex+1,this._findEndOfWord(lineContent,wordSeparators2,wordType,chIndex+1))}}}if(wordType!==0){return this._createWord(lineContent,wordType,1,0,this._findEndOfWord(lineContent,wordSeparators2,wordType,0))}return null}static _findEndOfWord(lineContent,wordSeparators2,wordType,startIndex){const len=lineContent.length;for(let chIndex=startIndex;chIndex=0;chIndex--){const chCode=lineContent.charCodeAt(chIndex);const chClass=wordSeparators2.get(chCode);if(chClass===1){return chIndex+1}if(wordType===1&&chClass===2){return chIndex+1}if(wordType===2&&chClass===0){return chIndex+1}}return 0}static moveWordLeft(wordSeparators2,model,position,wordNavigationType){let lineNumber=position.lineNumber;let column=position.column;if(column===1){if(lineNumber>1){lineNumber=lineNumber-1;column=model.getLineMaxColumn(lineNumber)}}let prevWordOnLine=WordOperations._findPreviousWordOnLine(wordSeparators2,model,new Position(lineNumber,column));if(wordNavigationType===0){return new Position(lineNumber,prevWordOnLine?prevWordOnLine.start+1:1)}if(wordNavigationType===1){if(prevWordOnLine&&prevWordOnLine.wordType===2&&prevWordOnLine.end-prevWordOnLine.start===1&&prevWordOnLine.nextCharClass===0){prevWordOnLine=WordOperations._findPreviousWordOnLine(wordSeparators2,model,new Position(lineNumber,prevWordOnLine.start+1))}return new Position(lineNumber,prevWordOnLine?prevWordOnLine.start+1:1)}if(wordNavigationType===3){while(prevWordOnLine&&prevWordOnLine.wordType===2){prevWordOnLine=WordOperations._findPreviousWordOnLine(wordSeparators2,model,new Position(lineNumber,prevWordOnLine.start+1))}return new Position(lineNumber,prevWordOnLine?prevWordOnLine.start+1:1)}if(prevWordOnLine&&column<=prevWordOnLine.end+1){prevWordOnLine=WordOperations._findPreviousWordOnLine(wordSeparators2,model,new Position(lineNumber,prevWordOnLine.start+1))}return new Position(lineNumber,prevWordOnLine?prevWordOnLine.end+1:1)}static _moveWordPartLeft(model,position){const lineNumber=position.lineNumber;const maxColumn=model.getLineMaxColumn(lineNumber);if(position.column===1){return lineNumber>1?new Position(lineNumber-1,model.getLineMaxColumn(lineNumber-1)):position}const lineContent=model.getLineContent(lineNumber);for(let column=position.column-1;column>1;column--){const left=lineContent.charCodeAt(column-2);const right=lineContent.charCodeAt(column-1);if(left===95&&right!==95){return new Position(lineNumber,column)}if(left===45&&right!==45){return new Position(lineNumber,column)}if((isLowerAsciiLetter(left)||isAsciiDigit(left))&&isUpperAsciiLetter(right)){return new Position(lineNumber,column)}if(isUpperAsciiLetter(left)&&isUpperAsciiLetter(right)){if(column+1=nextWordOnLine.start+1){nextWordOnLine=WordOperations._findNextWordOnLine(wordSeparators2,model,new Position(lineNumber,nextWordOnLine.end+1))}if(nextWordOnLine){column=nextWordOnLine.start+1}else{column=model.getLineMaxColumn(lineNumber)}}return new Position(lineNumber,column)}static _moveWordPartRight(model,position){const lineNumber=position.lineNumber;const maxColumn=model.getLineMaxColumn(lineNumber);if(position.column===maxColumn){return lineNumber1){column=1}else{lineNumber--;column=model.getLineMaxColumn(lineNumber)}}}else{if(prevWordOnLine&&column<=prevWordOnLine.end+1){prevWordOnLine=WordOperations._findPreviousWordOnLine(wordSeparators2,model,new Position(lineNumber,prevWordOnLine.start+1))}if(prevWordOnLine){column=prevWordOnLine.end+1}else{if(column>1){column=1}else{lineNumber--;column=model.getLineMaxColumn(lineNumber)}}}return new Range(lineNumber,column,position.lineNumber,position.column)}static deleteInsideWord(wordSeparators2,model,selection){if(!selection.isEmpty()){return selection}const position=new Position(selection.positionLineNumber,selection.positionColumn);const r=this._deleteInsideWordWhitespace(model,position);if(r){return r}return this._deleteInsideWordDetermineDeleteRange(wordSeparators2,model,position)}static _charAtIsWhitespace(str,index){const charCode=str.charCodeAt(index);return charCode===32||charCode===9}static _deleteInsideWordWhitespace(model,position){const lineContent=model.getLineContent(position.lineNumber);const lineContentLength=lineContent.length;if(lineContentLength===0){return null}let leftIndex=Math.max(position.column-2,0);if(!this._charAtIsWhitespace(lineContent,leftIndex)){return null}let rightIndex=Math.min(position.column-1,lineContentLength-1);if(!this._charAtIsWhitespace(lineContent,rightIndex)){return null}while(leftIndex>0&&this._charAtIsWhitespace(lineContent,leftIndex-1)){leftIndex--}while(rightIndex+11){return new Range(position.lineNumber-1,model.getLineMaxColumn(position.lineNumber-1),position.lineNumber,1)}else{if(position.lineNumberword.start+1<=position.column&&position.column<=word.end+1;const createRangeWithPosition=(startColumn,endColumn)=>{startColumn=Math.min(startColumn,position.column);endColumn=Math.max(endColumn,position.column);return new Range(position.lineNumber,startColumn,position.lineNumber,endColumn)};const deleteWordAndAdjacentWhitespace=word=>{let startColumn=word.start+1;let endColumn=word.end+1;let expandedToTheRight=false;while(endColumn-11&&this._charAtIsWhitespace(lineContent,startColumn-2)){startColumn--}}return createRangeWithPosition(startColumn,endColumn)};const prevWordOnLine=WordOperations._findPreviousWordOnLine(wordSeparators2,model,position);if(prevWordOnLine&&touchesWord(prevWordOnLine)){return deleteWordAndAdjacentWhitespace(prevWordOnLine)}const nextWordOnLine=WordOperations._findNextWordOnLine(wordSeparators2,model,position);if(nextWordOnLine&&touchesWord(nextWordOnLine)){return deleteWordAndAdjacentWhitespace(nextWordOnLine)}if(prevWordOnLine&&nextWordOnLine){return createRangeWithPosition(prevWordOnLine.end+1,nextWordOnLine.start+1)}if(prevWordOnLine){return createRangeWithPosition(prevWordOnLine.start+1,prevWordOnLine.end+1)}if(nextWordOnLine){return createRangeWithPosition(nextWordOnLine.start+1,nextWordOnLine.end+1)}return createRangeWithPosition(1,lineLength+1)}static _deleteWordPartLeft(model,selection){if(!selection.isEmpty()){return selection}const pos=selection.getPosition();const toPosition=WordOperations._moveWordPartLeft(model,pos);return new Range(pos.lineNumber,pos.column,toPosition.lineNumber,toPosition.column)}static _findFirstNonWhitespaceChar(str,startIndex){const len=str.length;for(let chIndex=startIndex;chIndex=nextWordOnLine.start+1){nextWordOnLine=WordOperations._findNextWordOnLine(wordSeparators2,model,new Position(lineNumber,nextWordOnLine.end+1))}if(nextWordOnLine){column=nextWordOnLine.start+1}else{if(columnlineCount){selectToLineNumber=lineCount;selectToColumn=viewModel.model.getLineMaxColumn(selectToLineNumber)}return CursorState.fromModelState(new SingleCursorState(new Range(position.lineNumber,1,selectToLineNumber,selectToColumn),2,0,new Position(selectToLineNumber,selectToColumn),0))}const enteringLineNumber=cursor.modelState.selectionStart.getStartPosition().lineNumber;if(position.lineNumberenteringLineNumber){const lineCount=viewModel.getLineCount();let selectToViewLineNumber=viewPosition.lineNumber+1;let selectToViewColumn=1;if(selectToViewLineNumber>lineCount){selectToViewLineNumber=lineCount;selectToViewColumn=viewModel.getLineMaxColumn(selectToViewLineNumber)}return CursorState.fromViewState(cursor.viewState.move(true,selectToViewLineNumber,selectToViewColumn,0))}else{const endPositionOfSelectionStart=cursor.modelState.selectionStart.getEndPosition();return CursorState.fromModelState(cursor.modelState.move(true,endPositionOfSelectionStart.lineNumber,endPositionOfSelectionStart.column,0))}}static word(viewModel,cursor,inSelectionMode,_position){const position=viewModel.model.validatePosition(_position);return CursorState.fromModelState(WordOperations.word(viewModel.cursorConfig,viewModel.model,cursor.modelState,inSelectionMode,position))}static cancelSelection(viewModel,cursor){if(!cursor.modelState.hasSelection()){return new CursorState(cursor.modelState,cursor.viewState)}const lineNumber=cursor.viewState.position.lineNumber;const column=cursor.viewState.position.column;return CursorState.fromViewState(new SingleCursorState(new Range(lineNumber,column,lineNumber,column),0,0,new Position(lineNumber,column),0))}static moveTo(viewModel,cursor,inSelectionMode,_position,_viewPosition){if(inSelectionMode){if(cursor.modelState.selectionStartKind===1){return this.word(viewModel,cursor,inSelectionMode,_position)}if(cursor.modelState.selectionStartKind===2){return this.line(viewModel,cursor,inSelectionMode,_position,_viewPosition)}}const position=viewModel.model.validatePosition(_position);const viewPosition=_viewPosition?viewModel.coordinatesConverter.validateViewPosition(new Position(_viewPosition.lineNumber,_viewPosition.column),position):viewModel.coordinatesConverter.convertModelPositionToViewPosition(position);return CursorState.fromViewState(cursor.viewState.move(inSelectionMode,viewPosition.lineNumber,viewPosition.column,0))}static simpleMove(viewModel,cursors,direction,inSelectionMode,value,unit){switch(direction){case 0:{if(unit===4){return this._moveHalfLineLeft(viewModel,cursors,inSelectionMode)}else{return this._moveLeft(viewModel,cursors,inSelectionMode,value)}}case 1:{if(unit===4){return this._moveHalfLineRight(viewModel,cursors,inSelectionMode)}else{return this._moveRight(viewModel,cursors,inSelectionMode,value)}}case 2:{if(unit===2){return this._moveUpByViewLines(viewModel,cursors,inSelectionMode,value)}else{return this._moveUpByModelLines(viewModel,cursors,inSelectionMode,value)}}case 3:{if(unit===2){return this._moveDownByViewLines(viewModel,cursors,inSelectionMode,value)}else{return this._moveDownByModelLines(viewModel,cursors,inSelectionMode,value)}}case 4:{if(unit===2){return cursors.map((cursor=>CursorState.fromViewState(MoveOperations.moveToPrevBlankLine(viewModel.cursorConfig,viewModel,cursor.viewState,inSelectionMode))))}else{return cursors.map((cursor=>CursorState.fromModelState(MoveOperations.moveToPrevBlankLine(viewModel.cursorConfig,viewModel.model,cursor.modelState,inSelectionMode))))}}case 5:{if(unit===2){return cursors.map((cursor=>CursorState.fromViewState(MoveOperations.moveToNextBlankLine(viewModel.cursorConfig,viewModel,cursor.viewState,inSelectionMode))))}else{return cursors.map((cursor=>CursorState.fromModelState(MoveOperations.moveToNextBlankLine(viewModel.cursorConfig,viewModel.model,cursor.modelState,inSelectionMode))))}}case 6:{return this._moveToViewMinColumn(viewModel,cursors,inSelectionMode)}case 7:{return this._moveToViewFirstNonWhitespaceColumn(viewModel,cursors,inSelectionMode)}case 8:{return this._moveToViewCenterColumn(viewModel,cursors,inSelectionMode)}case 9:{return this._moveToViewMaxColumn(viewModel,cursors,inSelectionMode)}case 10:{return this._moveToViewLastNonWhitespaceColumn(viewModel,cursors,inSelectionMode)}default:return null}}static viewportMove(viewModel,cursors,direction,inSelectionMode,value){const visibleViewRange=viewModel.getCompletelyVisibleViewRange();const visibleModelRange=viewModel.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange);switch(direction){case 11:{const modelLineNumber=this._firstLineNumberInRange(viewModel.model,visibleModelRange,value);const modelColumn=viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);return[this._moveToModelPosition(viewModel,cursors[0],inSelectionMode,modelLineNumber,modelColumn)]}case 13:{const modelLineNumber=this._lastLineNumberInRange(viewModel.model,visibleModelRange,value);const modelColumn=viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);return[this._moveToModelPosition(viewModel,cursors[0],inSelectionMode,modelLineNumber,modelColumn)]}case 12:{const modelLineNumber=Math.round((visibleModelRange.startLineNumber+visibleModelRange.endLineNumber)/2);const modelColumn=viewModel.model.getLineFirstNonWhitespaceColumn(modelLineNumber);return[this._moveToModelPosition(viewModel,cursors[0],inSelectionMode,modelLineNumber,modelColumn)]}case 14:{const result=[];for(let i=0,len=cursors.length;ivisibleViewRange.endLineNumber-1){newViewLineNumber=visibleViewRange.endLineNumber-1}else if(viewLineNumberCursorState.fromViewState(MoveOperations.moveLeft(viewModel.cursorConfig,viewModel,cursor.viewState,inSelectionMode,noOfColumns))))}static _moveHalfLineLeft(viewModel,cursors,inSelectionMode){const result=[];for(let i=0,len=cursors.length;iCursorState.fromViewState(MoveOperations.moveRight(viewModel.cursorConfig,viewModel,cursor.viewState,inSelectionMode,noOfColumns))))}static _moveHalfLineRight(viewModel,cursors,inSelectionMode){const result=[];for(let i=0,len=cursors.length;i1&&scopedLineTokens.firstCharOffset===0){const oneLineAboveScopedLineTokens=getScopedLineTokens(model,range2.startLineNumber-1);if(oneLineAboveScopedLineTokens.languageId===scopedLineTokens.languageId){previousLineText=oneLineAboveScopedLineTokens.getLineContent()}}const enterResult=richEditSupport.onEnter(autoIndent,previousLineText,beforeEnterText,afterEnterText);if(!enterResult){return null}const indentAction=enterResult.indentAction;let appendText=enterResult.appendText;const removeText=enterResult.removeText||0;if(!appendText){if(indentAction===IndentAction2.Indent||indentAction===IndentAction2.IndentOutdent){appendText="\t"}else{appendText=""}}else if(indentAction===IndentAction2.Indent){appendText="\t"+appendText}let indentation=getIndentationAtPosition(model,range2.startLineNumber,range2.startColumn);if(removeText){indentation=indentation.substring(0,indentation.length-removeText)}return{indentAction:indentAction,appendText:appendText,removeText:removeText,indentation:indentation}}var init_enterAction=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages/enterAction.js"(){init_languageConfiguration();init_languageConfigurationRegistry()}});function cachedStringRepeat(str,count){if(count<=0){return""}if(!repeatCache[str]){repeatCache[str]=["",str]}const cache=repeatCache[str];for(let i=cache.length;i<=count;i++){cache[i]=cache[i-1]+str}return cache[count]}var __decorate10,__param9,ShiftCommand_1,repeatCache,ShiftCommand;var init_shiftCommand=__esm({"node_modules/monaco-editor/esm/vs/editor/common/commands/shiftCommand.js"(){init_strings();init_cursorColumns();init_range();init_selection();init_enterAction();init_languageConfigurationRegistry();__decorate10=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param9=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};repeatCache=Object.create(null);ShiftCommand=ShiftCommand_1=class ShiftCommand2{static unshiftIndent(line,column,tabSize,indentSize,insertSpaces){const contentStartVisibleColumn=CursorColumns.visibleColumnFromColumn(line,column,tabSize);if(insertSpaces){const indent=cachedStringRepeat(" ",indentSize);const desiredTabStop=CursorColumns.prevIndentTabStop(contentStartVisibleColumn,indentSize);const indentCount=desiredTabStop/indentSize;return cachedStringRepeat(indent,indentCount)}else{const indent="\t";const desiredTabStop=CursorColumns.prevRenderTabStop(contentStartVisibleColumn,tabSize);const indentCount=desiredTabStop/tabSize;return cachedStringRepeat(indent,indentCount)}}static shiftIndent(line,column,tabSize,indentSize,insertSpaces){const contentStartVisibleColumn=CursorColumns.visibleColumnFromColumn(line,column,tabSize);if(insertSpaces){const indent=cachedStringRepeat(" ",indentSize);const desiredTabStop=CursorColumns.nextIndentTabStop(contentStartVisibleColumn,indentSize);const indentCount=desiredTabStop/indentSize;return cachedStringRepeat(indent,indentCount)}else{const indent="\t";const desiredTabStop=CursorColumns.nextRenderTabStop(contentStartVisibleColumn,tabSize);const indentCount=desiredTabStop/tabSize;return cachedStringRepeat(indent,indentCount)}}constructor(range2,opts,_languageConfigurationService){this._languageConfigurationService=_languageConfigurationService;this._opts=opts;this._selection=range2;this._selectionId=null;this._useLastEditRangeForCursorEndPosition=false;this._selectionStartColumnStaysPut=false}_addEditOperation(builder,range2,text2){if(this._useLastEditRangeForCursorEndPosition){builder.addTrackedEditOperation(range2,text2)}else{builder.addEditOperation(range2,text2)}}getEditOperations(model,builder){const startLine=this._selection.startLineNumber;let endLine=this._selection.endLineNumber;if(this._selection.endColumn===1&&startLine!==endLine){endLine=endLine-1}const{tabSize:tabSize,indentSize:indentSize,insertSpaces:insertSpaces}=this._opts;const shouldIndentEmptyLines=startLine===endLine;if(this._opts.useTabStops){if(this._selection.isEmpty()){if(/^\s*$/.test(model.getLineContent(startLine))){this._useLastEditRangeForCursorEndPosition=true}}let previousLineExtraSpaces=0,extraSpaces=0;for(let lineNumber=startLine;lineNumber<=endLine;lineNumber++,previousLineExtraSpaces=extraSpaces){extraSpaces=0;const lineText=model.getLineContent(lineNumber);let indentationEndIndex=firstNonWhitespaceIndex(lineText);if(this._opts.isUnshift&&(lineText.length===0||indentationEndIndex===0)){continue}if(!shouldIndentEmptyLines&&!this._opts.isUnshift&&lineText.length===0){continue}if(indentationEndIndex===-1){indentationEndIndex=lineText.length}if(lineNumber>1){const contentStartVisibleColumn=CursorColumns.visibleColumnFromColumn(lineText,indentationEndIndex+1,tabSize);if(contentStartVisibleColumn%indentSize!==0){if(model.tokenization.isCheapToTokenize(lineNumber-1)){const enterAction=getEnterAction(this._opts.autoIndent,model,new Range(lineNumber-1,model.getLineMaxColumn(lineNumber-1),lineNumber-1,model.getLineMaxColumn(lineNumber-1)),this._languageConfigurationService);if(enterAction){extraSpaces=previousLineExtraSpaces;if(enterAction.appendText){for(let j=0,lenJ=enterAction.appendText.length;j1){let lastLineNumber;let resultLineNumber=-1;for(lastLineNumber=lineNumber-1;lastLineNumber>=1;lastLineNumber--){if(model.tokenization.getLanguageIdAtPosition(lastLineNumber,0)!==languageId){return resultLineNumber}const text2=model.getLineContent(lastLineNumber);if(indentRulesSupport.shouldIgnore(text2)||/^\s+$/.test(text2)||text2===""){resultLineNumber=lastLineNumber;continue}return lastLineNumber}}return-1}function getInheritIndentForLine(autoIndent,model,lineNumber,honorIntentialIndent=true,languageConfigurationService){if(autoIndent<4){return null}const indentRulesSupport=languageConfigurationService.getLanguageConfiguration(model.tokenization.getLanguageId()).indentRulesSupport;if(!indentRulesSupport){return null}if(lineNumber<=1){return{indentation:"",action:null}}for(let priorLineNumber=lineNumber-1;priorLineNumber>0;priorLineNumber--){if(model.getLineContent(priorLineNumber)!==""){break}if(priorLineNumber===1){return{indentation:"",action:null}}}const precedingUnIgnoredLine=getPrecedingValidLine(model,lineNumber,indentRulesSupport);if(precedingUnIgnoredLine<0){return null}else if(precedingUnIgnoredLine<1){return{indentation:"",action:null}}const precedingUnIgnoredLineContent=model.getLineContent(precedingUnIgnoredLine);if(indentRulesSupport.shouldIncrease(precedingUnIgnoredLineContent)||indentRulesSupport.shouldIndentNextLine(precedingUnIgnoredLineContent)){return{indentation:getLeadingWhitespace(precedingUnIgnoredLineContent),action:IndentAction2.Indent,line:precedingUnIgnoredLine}}else if(indentRulesSupport.shouldDecrease(precedingUnIgnoredLineContent)){return{indentation:getLeadingWhitespace(precedingUnIgnoredLineContent),action:null,line:precedingUnIgnoredLine}}else{if(precedingUnIgnoredLine===1){return{indentation:getLeadingWhitespace(model.getLineContent(precedingUnIgnoredLine)),action:null,line:precedingUnIgnoredLine}}const previousLine=precedingUnIgnoredLine-1;const previousLineIndentMetadata=indentRulesSupport.getIndentMetadata(model.getLineContent(previousLine));if(!(previousLineIndentMetadata&(1|2))&&previousLineIndentMetadata&4){let stopLine=0;for(let i=previousLine-1;i>0;i--){if(indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))){continue}stopLine=i;break}return{indentation:getLeadingWhitespace(model.getLineContent(stopLine+1)),action:null,line:stopLine+1}}if(honorIntentialIndent){return{indentation:getLeadingWhitespace(model.getLineContent(precedingUnIgnoredLine)),action:null,line:precedingUnIgnoredLine}}else{for(let i=precedingUnIgnoredLine;i>0;i--){const lineContent=model.getLineContent(i);if(indentRulesSupport.shouldIncrease(lineContent)){return{indentation:getLeadingWhitespace(lineContent),action:IndentAction2.Indent,line:i}}else if(indentRulesSupport.shouldIndentNextLine(lineContent)){let stopLine=0;for(let j=i-1;j>0;j--){if(indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))){continue}stopLine=j;break}return{indentation:getLeadingWhitespace(model.getLineContent(stopLine+1)),action:null,line:stopLine+1}}else if(indentRulesSupport.shouldDecrease(lineContent)){return{indentation:getLeadingWhitespace(lineContent),action:null,line:i}}}return{indentation:getLeadingWhitespace(model.getLineContent(1)),action:null,line:1}}}}function getGoodIndentForLine(autoIndent,virtualModel,languageId,lineNumber,indentConverter,languageConfigurationService){if(autoIndent<4){return null}const richEditSupport=languageConfigurationService.getLanguageConfiguration(languageId);if(!richEditSupport){return null}const indentRulesSupport=languageConfigurationService.getLanguageConfiguration(languageId).indentRulesSupport;if(!indentRulesSupport){return null}const indent=getInheritIndentForLine(autoIndent,virtualModel,lineNumber,void 0,languageConfigurationService);const lineContent=virtualModel.getLineContent(lineNumber);if(indent){const inheritLine=indent.line;if(inheritLine!==void 0){let shouldApplyEnterRules=true;for(let inBetweenLine=inheritLine;inBetweenLine0&&lineTokens.getLanguageId(0)!==scopedLineTokens.languageId){embeddedLanguage=true;beforeEnterText=scopedLineText.substr(0,range2.startColumn-1-scopedLineTokens.firstCharOffset)}else{beforeEnterText=lineTokens.getLineContent().substring(0,range2.startColumn-1)}let afterEnterText;if(range2.isEmpty()){afterEnterText=scopedLineText.substr(range2.startColumn-1-scopedLineTokens.firstCharOffset)}else{const endScopedLineTokens=getScopedLineTokens(model,range2.endLineNumber,range2.endColumn);afterEnterText=endScopedLineTokens.getLineContent().substr(range2.endColumn-1-scopedLineTokens.firstCharOffset)}const indentRulesSupport=languageConfigurationService.getLanguageConfiguration(scopedLineTokens.languageId).indentRulesSupport;if(!indentRulesSupport){return null}const beforeEnterResult=beforeEnterText;const beforeEnterIndent=getLeadingWhitespace(beforeEnterText);const virtualModel={tokenization:{getLineTokens:lineNumber=>model.tokenization.getLineTokens(lineNumber),getLanguageId:()=>model.getLanguageId(),getLanguageIdAtPosition:(lineNumber,column)=>model.getLanguageIdAtPosition(lineNumber,column)},getLineContent:lineNumber=>{if(lineNumber===range2.startLineNumber){return beforeEnterResult}else{return model.getLineContent(lineNumber)}}};const currentLineIndent=getLeadingWhitespace(lineTokens.getLineContent());const afterEnterAction=getInheritIndentForLine(autoIndent,virtualModel,range2.startLineNumber+1,void 0,languageConfigurationService);if(!afterEnterAction){const beforeEnter=embeddedLanguage?currentLineIndent:beforeEnterIndent;return{beforeEnter:beforeEnter,afterEnter:beforeEnter}}let afterEnterIndent=embeddedLanguage?currentLineIndent:afterEnterAction.indentation;if(afterEnterAction.action===IndentAction2.Indent){afterEnterIndent=indentConverter.shiftIndent(afterEnterIndent)}if(indentRulesSupport.shouldDecrease(afterEnterText)){afterEnterIndent=indentConverter.unshiftIndent(afterEnterIndent)}return{beforeEnter:embeddedLanguage?currentLineIndent:beforeEnterIndent,afterEnter:afterEnterIndent}}function getIndentActionForType(autoIndent,model,range2,ch,indentConverter,languageConfigurationService){if(autoIndent<4){return null}const scopedLineTokens=getScopedLineTokens(model,range2.startLineNumber,range2.startColumn);if(scopedLineTokens.firstCharOffset){return null}const indentRulesSupport=languageConfigurationService.getLanguageConfiguration(scopedLineTokens.languageId).indentRulesSupport;if(!indentRulesSupport){return null}const scopedLineText=scopedLineTokens.getLineContent();const beforeTypeText=scopedLineText.substr(0,range2.startColumn-1-scopedLineTokens.firstCharOffset);let afterTypeText;if(range2.isEmpty()){afterTypeText=scopedLineText.substr(range2.startColumn-1-scopedLineTokens.firstCharOffset)}else{const endScopedLineTokens=getScopedLineTokens(model,range2.endLineNumber,range2.endColumn);afterTypeText=endScopedLineTokens.getLineContent().substr(range2.endColumn-1-scopedLineTokens.firstCharOffset)}if(!indentRulesSupport.shouldDecrease(beforeTypeText+afterTypeText)&&indentRulesSupport.shouldDecrease(beforeTypeText+ch+afterTypeText)){const r=getInheritIndentForLine(autoIndent,model,range2.startLineNumber,false,languageConfigurationService);if(!r){return null}let indentation=r.indentation;if(r.action!==IndentAction2.Indent){indentation=indentConverter.unshiftIndent(indentation)}return indentation}return null}function getIndentMetadata(model,lineNumber,languageConfigurationService){const indentRulesSupport=languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).indentRulesSupport;if(!indentRulesSupport){return null}if(lineNumber<1||lineNumber>model.getLineCount()){return null}return indentRulesSupport.getIndentMetadata(model.getLineContent(lineNumber))}var init_autoIndent=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages/autoIndent.js"(){init_strings();init_languageConfiguration();init_supports();init_languageConfigurationRegistry()}});function getTypingOperation(typedText,previousTypingOperation){if(typedText===" "){return previousTypingOperation===5||previousTypingOperation===6?6:5}return 4}function shouldPushStackElementBetween(previousTypingOperation,typingOperation){if(isTypingOperation(previousTypingOperation)&&!isTypingOperation(typingOperation)){return true}if(previousTypingOperation===5){return false}return normalizeOperationType(previousTypingOperation)!==normalizeOperationType(typingOperation)}function normalizeOperationType(type){return type===6||type===5?"space":type}function isTypingOperation(type){return type===4||type===5||type===6}var TypeOperations,TypeWithAutoClosingCommand,CompositionOutcome;var init_cursorTypeOperations=__esm({"node_modules/monaco-editor/esm/vs/editor/common/cursor/cursorTypeOperations.js"(){init_errors();init_strings();init_replaceCommand();init_shiftCommand();init_surroundSelectionCommand();init_cursorCommon();init_wordCharacterClassifier();init_range();init_position();init_languageConfiguration();init_languageConfigurationRegistry();init_supports();init_autoIndent();init_enterAction();TypeOperations=class{static indent(config,model,selections){if(model===null||selections===null){return[]}const commands=[];for(let i=0,len=selections.length;i1){let lastLineNumber;for(lastLineNumber=lineNumber-1;lastLineNumber>=1;lastLineNumber--){const lineText=model.getLineContent(lastLineNumber);const nonWhitespaceIdx=lastNonWhitespaceIndex(lineText);if(nonWhitespaceIdx>=0){break}}if(lastLineNumber<1){return null}const maxColumn=model.getLineMaxColumn(lastLineNumber);const expectedEnterAction=getEnterAction(config.autoIndent,model,new Range(lastLineNumber,maxColumn,lastLineNumber,maxColumn),config.languageConfigurationService);if(expectedEnterAction){indentation=expectedEnterAction.indentation+expectedEnterAction.appendText}}if(action){if(action===IndentAction2.Indent){indentation=TypeOperations.shiftIndent(config,indentation)}if(action===IndentAction2.Outdent){indentation=TypeOperations.unshiftIndent(config,indentation)}indentation=config.normalizeIndentation(indentation)}if(!indentation){return null}return indentation}static _replaceJumpToNextIndent(config,model,selection,insertsAutoWhitespace){let typeText="";const position=selection.getStartPosition();if(config.insertSpaces){const visibleColumnFromColumn=config.visibleColumnFromColumn(model,position);const indentSize=config.indentSize;const spacesCnt=indentSize-visibleColumnFromColumn%indentSize;for(let i=0;ithis._compositionType(model,selection,text2,replacePrevCharCnt,replaceNextCharCnt,positionDelta)));return new EditOperationResult(4,commands,{shouldPushStackElementBefore:shouldPushStackElementBetween(prevEditOperationType,4),shouldPushStackElementAfter:false})}static _compositionType(model,selection,text2,replacePrevCharCnt,replaceNextCharCnt,positionDelta){if(!selection.isEmpty()){return null}const pos=selection.getPosition();const startColumn=Math.max(1,pos.column-replacePrevCharCnt);const endColumn=Math.min(model.getLineMaxColumn(pos.lineNumber),pos.column+replaceNextCharCnt);const range2=new Range(pos.lineNumber,startColumn,pos.lineNumber,endColumn);const oldText=model.getValueInRange(range2);if(oldText===text2&&positionDelta===0){return null}return new ReplaceCommandWithOffsetCursorState(range2,text2,0,positionDelta)}static _typeCommand(range2,text2,keepPosition){if(keepPosition){return new ReplaceCommandWithoutChangingPosition(range2,text2,true)}else{return new ReplaceCommand(range2,text2,true)}}static _enter(config,model,keepPosition,range2){if(config.autoIndent===0){return TypeOperations._typeCommand(range2,"\n",keepPosition)}if(!model.tokenization.isCheapToTokenize(range2.getStartPosition().lineNumber)||config.autoIndent===1){const lineText2=model.getLineContent(range2.startLineNumber);const indentation2=getLeadingWhitespace(lineText2).substring(0,range2.startColumn-1);return TypeOperations._typeCommand(range2,"\n"+config.normalizeIndentation(indentation2),keepPosition)}const r=getEnterAction(config.autoIndent,model,range2,config.languageConfigurationService);if(r){if(r.indentAction===IndentAction2.None){return TypeOperations._typeCommand(range2,"\n"+config.normalizeIndentation(r.indentation+r.appendText),keepPosition)}else if(r.indentAction===IndentAction2.Indent){return TypeOperations._typeCommand(range2,"\n"+config.normalizeIndentation(r.indentation+r.appendText),keepPosition)}else if(r.indentAction===IndentAction2.IndentOutdent){const normalIndent=config.normalizeIndentation(r.indentation);const increasedIndent=config.normalizeIndentation(r.indentation+r.appendText);const typeText="\n"+increasedIndent+"\n"+normalIndent;if(keepPosition){return new ReplaceCommandWithoutChangingPosition(range2,typeText,true)}else{return new ReplaceCommandWithOffsetCursorState(range2,typeText,-1,increasedIndent.length-normalIndent.length,true)}}else if(r.indentAction===IndentAction2.Outdent){const actualIndentation=TypeOperations.unshiftIndent(config,r.indentation);return TypeOperations._typeCommand(range2,"\n"+config.normalizeIndentation(actualIndentation+r.appendText),keepPosition)}}const lineText=model.getLineContent(range2.startLineNumber);const indentation=getLeadingWhitespace(lineText).substring(0,range2.startColumn-1);if(config.autoIndent>=4){const ir=getIndentForEnter(config.autoIndent,model,range2,{unshiftIndent:indent=>TypeOperations.unshiftIndent(config,indent),shiftIndent:indent=>TypeOperations.shiftIndent(config,indent),normalizeIndentation:indent=>config.normalizeIndentation(indent)},config.languageConfigurationService);if(ir){let oldEndViewColumn=config.visibleColumnFromColumn(model,range2.getEndPosition());const oldEndColumn=range2.endColumn;const newLineContent=model.getLineContent(range2.endLineNumber);const firstNonWhitespace=firstNonWhitespaceIndex(newLineContent);if(firstNonWhitespace>=0){range2=range2.setEndPosition(range2.endLineNumber,Math.max(range2.endColumn,firstNonWhitespace+1))}else{range2=range2.setEndPosition(range2.endLineNumber,model.getLineMaxColumn(range2.endLineNumber))}if(keepPosition){return new ReplaceCommandWithoutChangingPosition(range2,"\n"+config.normalizeIndentation(ir.afterEnter),true)}else{let offset=0;if(oldEndColumn<=firstNonWhitespace+1){if(!config.insertSpaces){oldEndViewColumn=Math.ceil(oldEndViewColumn/config.indentSize)}offset=Math.min(oldEndViewColumn+1-config.normalizeIndentation(ir.afterEnter).length-1,0)}return new ReplaceCommandWithOffsetCursorState(range2,"\n"+config.normalizeIndentation(ir.afterEnter),0,offset,true)}}}return TypeOperations._typeCommand(range2,"\n"+config.normalizeIndentation(indentation),keepPosition)}static _isAutoIndentType(config,model,selections){if(config.autoIndent<4){return false}for(let i=0,len=selections.length;iTypeOperations.shiftIndent(config,indentation),unshiftIndent:indentation=>TypeOperations.unshiftIndent(config,indentation)},config.languageConfigurationService);if(actualIndentation===null){return null}if(actualIndentation!==config.normalizeIndentation(currentIndentation)){const firstNonWhitespace=model.getLineFirstNonWhitespaceColumn(range2.startLineNumber);if(firstNonWhitespace===0){return TypeOperations._typeCommand(new Range(range2.startLineNumber,1,range2.endLineNumber,range2.endColumn),config.normalizeIndentation(actualIndentation)+ch,false)}else{return TypeOperations._typeCommand(new Range(range2.startLineNumber,1,range2.endLineNumber,range2.endColumn),config.normalizeIndentation(actualIndentation)+model.getLineContent(range2.startLineNumber).substring(firstNonWhitespace-1,range2.startColumn-1)+ch,false)}}return null}static _isAutoClosingOvertype(config,model,selections,autoClosedCharacters,ch){if(config.autoClosingOvertype==="never"){return false}if(!config.autoClosingPairs.autoClosingPairsCloseSingleChar.has(ch)){return false}for(let i=0,len=selections.length;i2?lineText.charCodeAt(position.column-2):0;if(beforeCharacter===92&&chIsQuote){return false}if(config.autoClosingOvertype==="auto"){let found=false;for(let j=0,lenJ=autoClosedCharacters.length;jlineAfter.startsWith(x.open)));const isBeforeClosingBrace=potentialClosingBraces.some((x=>lineAfter.startsWith(x.close)));return!isBeforeStartingBrace&&isBeforeClosingBrace}static _findAutoClosingPairOpen(config,model,positions,ch){const candidates=config.autoClosingPairs.autoClosingPairsOpenByEnd.get(ch);if(!candidates){return null}let result=null;for(const candidate of candidates){if(result===null||candidate.open.length>result.open.length){let candidateIsMatch=true;for(const position of positions){const relevantText=model.getValueInRange(new Range(position.lineNumber,position.column-candidate.open.length+1,position.lineNumber,position.column));if(relevantText+ch!==candidate.open){candidateIsMatch=false;break}}if(candidateIsMatch){result=candidate}}}return result}static _findContainedAutoClosingPair(config,pair){if(pair.open.length<=1){return null}const lastChar=pair.close.charAt(pair.close.length-1);const candidates=config.autoClosingPairs.autoClosingPairsCloseByEnd.get(lastChar)||[];let result=null;for(const candidate of candidates){if(candidate.open!==pair.open&&pair.open.includes(candidate.open)&&pair.close.endsWith(candidate.close)){if(!result||candidate.open.length>result.open.length){result=candidate}}}return result}static _getAutoClosingPairClose(config,model,selections,ch,chIsAlreadyTyped){const chIsQuote=isQuote(ch);const autoCloseConfig=chIsQuote?config.autoClosingQuotes:config.autoClosingBrackets;const shouldAutoCloseBefore=chIsQuote?config.shouldAutoCloseBefore.quote:config.shouldAutoCloseBefore.bracket;if(autoCloseConfig==="never"){return null}for(const selection of selections){if(!selection.isEmpty()){return null}}const positions=selections.map((s=>{const position=s.getPosition();if(chIsAlreadyTyped){return{lineNumber:position.lineNumber,beforeColumn:position.column-ch.length,afterColumn:position.column}}else{return{lineNumber:position.lineNumber,beforeColumn:position.column,afterColumn:position.column}}}));const pair=this._findAutoClosingPairOpen(config,model,positions.map((p=>new Position(p.lineNumber,p.beforeColumn))),ch);if(!pair){return null}const containedPair=this._findContainedAutoClosingPair(config,pair);const containedPairClose=containedPair?containedPair.close:"";let isContainedPairPresent=true;for(const position of positions){const{lineNumber:lineNumber,beforeColumn:beforeColumn,afterColumn:afterColumn}=position;const lineText=model.getLineContent(lineNumber);const lineBefore=lineText.substring(0,beforeColumn-1);const lineAfter=lineText.substring(afterColumn-1);if(!lineAfter.startsWith(containedPairClose)){isContainedPairPresent=false}if(lineAfter.length>0){const characterAfter=lineAfter.charAt(0);const isBeforeCloseBrace=TypeOperations._isBeforeClosingBrace(config,lineAfter);if(!isBeforeCloseBrace&&!shouldAutoCloseBefore(characterAfter)){return null}}if(pair.open.length===1&&(ch==="'"||ch==='"')&&autoCloseConfig!=="always"){const wordSeparators2=getMapForWordSeparators(config.wordSeparators);if(lineBefore.length>0){const characterBefore=lineBefore.charCodeAt(lineBefore.length-1);if(wordSeparators2.get(characterBefore)===0){return null}}}if(!model.tokenization.isCheapToTokenize(lineNumber)){return null}model.tokenization.forceTokenization(lineNumber);const lineTokens=model.tokenization.getLineTokens(lineNumber);const scopedLineTokens=createScopedLineTokens(lineTokens,beforeColumn-1);if(!pair.shouldAutoClose(scopedLineTokens,beforeColumn-scopedLineTokens.firstCharOffset)){return null}const neutralCharacter=pair.findNeutralCharacter();if(neutralCharacter){const tokenType=model.tokenization.getTokenTypeIfInsertingCharacter(lineNumber,beforeColumn,neutralCharacter);if(!pair.isOK(tokenType)){return null}}}if(isContainedPairPresent){return pair.close.substring(0,pair.close.length-containedPairClose.length)}else{return pair.close}}static _runAutoClosingOpenCharType(prevEditOperationType,config,model,selections,ch,chIsAlreadyTyped,autoClosingPairClose){const commands=[];for(let i=0,len=selections.length;inew ReplaceCommand(new Range(s.positionLineNumber,s.positionColumn,s.positionLineNumber,s.positionColumn+1),"",false)));return new EditOperationResult(4,commands,{shouldPushStackElementBefore:true,shouldPushStackElementAfter:false})}const autoClosingPairClose=this._getAutoClosingPairClose(config,model,selections,ch,true);if(autoClosingPairClose!==null){return this._runAutoClosingOpenCharType(prevEditOperationType,config,model,selections,ch,true,autoClosingPairClose)}return null}static typeWithInterceptors(isDoingComposition,prevEditOperationType,config,model,selections,autoClosedCharacters,ch){if(!isDoingComposition&&ch==="\n"){const commands2=[];for(let i=0,len=selections.length;i{const focusedEditor=accessor.get(ICodeEditorService).getFocusedCodeEditor();if(focusedEditor&&focusedEditor.hasTextFocus()){return this._runEditorCommand(accessor,focusedEditor,args)}return false}));target.addImplementation(1e3,"generic-dom-input-textarea",((accessor,args)=>{const activeElement=document.activeElement;if(activeElement&&["input","textarea"].indexOf(activeElement.tagName.toLowerCase())>=0){this.runDOMCommand();return true}return false}));target.addImplementation(0,"generic-dom",((accessor,args)=>{const activeEditor=accessor.get(ICodeEditorService).getActiveCodeEditor();if(activeEditor){activeEditor.focus();return this._runEditorCommand(accessor,activeEditor,args)}return false}))}_runEditorCommand(accessor,editor2,args){const result=this.runEditorCommand(accessor,editor2,args);if(result){return result}return true}};(function(CoreNavigationCommands2){class BaseMoveToCommand extends CoreEditorCommand{constructor(opts){super(opts);this._inSelectionMode=opts.inSelectionMode}runCoreEditorCommand(viewModel,args){if(!args.position){return}viewModel.model.pushStackElement();const cursorStateChanged=viewModel.setCursorStates(args.source,3,[CursorMoveCommands.moveTo(viewModel,viewModel.getPrimaryCursorState(),this._inSelectionMode,args.position,args.viewPosition)]);if(cursorStateChanged&&args.revealType!==2){viewModel.revealPrimaryCursor(args.source,true,true)}}}CoreNavigationCommands2.MoveTo=registerEditorCommand(new BaseMoveToCommand({id:"_moveTo",inSelectionMode:false,precondition:void 0}));CoreNavigationCommands2.MoveToSelect=registerEditorCommand(new BaseMoveToCommand({id:"_moveToSelect",inSelectionMode:true,precondition:void 0}));class ColumnSelectCommand extends CoreEditorCommand{runCoreEditorCommand(viewModel,args){viewModel.model.pushStackElement();const result=this._getColumnSelectResult(viewModel,viewModel.getPrimaryCursorState(),viewModel.getCursorColumnSelectData(),args);if(result===null){return}viewModel.setCursorStates(args.source,3,result.viewStates.map((viewState=>CursorState.fromViewState(viewState))));viewModel.setCursorColumnSelectData({isReal:true,fromViewLineNumber:result.fromLineNumber,fromViewVisualColumn:result.fromVisualColumn,toViewLineNumber:result.toLineNumber,toViewVisualColumn:result.toVisualColumn});if(result.reversed){viewModel.revealTopMostCursor(args.source)}else{viewModel.revealBottomMostCursor(args.source)}}}CoreNavigationCommands2.ColumnSelect=registerEditorCommand(new class extends ColumnSelectCommand{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(viewModel,primary,prevColumnSelectData,args){if(typeof args.position==="undefined"||typeof args.viewPosition==="undefined"||typeof args.mouseColumn==="undefined"){return null}const validatedPosition=viewModel.model.validatePosition(args.position);const validatedViewPosition=viewModel.coordinatesConverter.validateViewPosition(new Position(args.viewPosition.lineNumber,args.viewPosition.column),validatedPosition);const fromViewLineNumber=args.doColumnSelect?prevColumnSelectData.fromViewLineNumber:validatedViewPosition.lineNumber;const fromViewVisualColumn=args.doColumnSelect?prevColumnSelectData.fromViewVisualColumn:args.mouseColumn-1;return ColumnSelection.columnSelect(viewModel.cursorConfig,viewModel,fromViewLineNumber,fromViewVisualColumn,validatedViewPosition.lineNumber,args.mouseColumn-1)}});CoreNavigationCommands2.CursorColumnSelectLeft=registerEditorCommand(new class extends ColumnSelectCommand{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:2048|1024|512|15,linux:{primary:0}}})}_getColumnSelectResult(viewModel,primary,prevColumnSelectData,args){return ColumnSelection.columnSelectLeft(viewModel.cursorConfig,viewModel,prevColumnSelectData)}});CoreNavigationCommands2.CursorColumnSelectRight=registerEditorCommand(new class extends ColumnSelectCommand{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:2048|1024|512|17,linux:{primary:0}}})}_getColumnSelectResult(viewModel,primary,prevColumnSelectData,args){return ColumnSelection.columnSelectRight(viewModel.cursorConfig,viewModel,prevColumnSelectData)}});class ColumnSelectUpCommand extends ColumnSelectCommand{constructor(opts){super(opts);this._isPaged=opts.isPaged}_getColumnSelectResult(viewModel,primary,prevColumnSelectData,args){return ColumnSelection.columnSelectUp(viewModel.cursorConfig,viewModel,prevColumnSelectData,this._isPaged)}}CoreNavigationCommands2.CursorColumnSelectUp=registerEditorCommand(new ColumnSelectUpCommand({isPaged:false,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:2048|1024|512|16,linux:{primary:0}}}));CoreNavigationCommands2.CursorColumnSelectPageUp=registerEditorCommand(new ColumnSelectUpCommand({isPaged:true,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:2048|1024|512|11,linux:{primary:0}}}));class ColumnSelectDownCommand extends ColumnSelectCommand{constructor(opts){super(opts);this._isPaged=opts.isPaged}_getColumnSelectResult(viewModel,primary,prevColumnSelectData,args){return ColumnSelection.columnSelectDown(viewModel.cursorConfig,viewModel,prevColumnSelectData,this._isPaged)}}CoreNavigationCommands2.CursorColumnSelectDown=registerEditorCommand(new ColumnSelectDownCommand({isPaged:false,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:2048|1024|512|18,linux:{primary:0}}}));CoreNavigationCommands2.CursorColumnSelectPageDown=registerEditorCommand(new ColumnSelectDownCommand({isPaged:true,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:2048|1024|512|12,linux:{primary:0}}}));class CursorMoveImpl extends CoreEditorCommand{constructor(){super({id:"cursorMove",precondition:void 0,description:CursorMove.description})}runCoreEditorCommand(viewModel,args){const parsed=CursorMove.parse(args);if(!parsed){return}this._runCursorMove(viewModel,args.source,parsed)}_runCursorMove(viewModel,source,args){viewModel.model.pushStackElement();viewModel.setCursorStates(source,3,CursorMoveImpl._move(viewModel,viewModel.getCursorStates(),args));viewModel.revealPrimaryCursor(source,true)}static _move(viewModel,cursors,args){const inSelectionMode=args.select;const value=args.value;switch(args.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return CursorMoveCommands.simpleMove(viewModel,cursors,args.direction,inSelectionMode,value,args.unit);case 11:case 13:case 12:case 14:return CursorMoveCommands.viewportMove(viewModel,cursors,args.direction,inSelectionMode,value);default:return null}}}CoreNavigationCommands2.CursorMoveImpl=CursorMoveImpl;CoreNavigationCommands2.CursorMove=registerEditorCommand(new CursorMoveImpl);class CursorMoveBasedCommand extends CoreEditorCommand{constructor(opts){super(opts);this._staticArgs=opts.args}runCoreEditorCommand(viewModel,dynamicArgs){let args=this._staticArgs;if(this._staticArgs.value===-1){args={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:dynamicArgs.pageSize||viewModel.cursorConfig.pageSize}}viewModel.model.pushStackElement();viewModel.setCursorStates(dynamicArgs.source,3,CursorMoveCommands.simpleMove(viewModel,viewModel.getCursorStates(),args.direction,args.select,args.value,args.unit));viewModel.revealPrimaryCursor(dynamicArgs.source,true)}}CoreNavigationCommands2.CursorLeft=registerEditorCommand(new CursorMoveBasedCommand({args:{direction:0,unit:0,select:false,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[256|32]}}}));CoreNavigationCommands2.CursorLeftSelect=registerEditorCommand(new CursorMoveBasedCommand({args:{direction:0,unit:0,select:true,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:1024|15}}));CoreNavigationCommands2.CursorRight=registerEditorCommand(new CursorMoveBasedCommand({args:{direction:1,unit:0,select:false,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[256|36]}}}));CoreNavigationCommands2.CursorRightSelect=registerEditorCommand(new CursorMoveBasedCommand({args:{direction:1,unit:0,select:true,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:1024|17}}));CoreNavigationCommands2.CursorUp=registerEditorCommand(new CursorMoveBasedCommand({args:{direction:2,unit:2,select:false,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[256|46]}}}));CoreNavigationCommands2.CursorUpSelect=registerEditorCommand(new CursorMoveBasedCommand({args:{direction:2,unit:2,select:true,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:1024|16,secondary:[2048|1024|16],mac:{primary:1024|16},linux:{primary:1024|16}}}));CoreNavigationCommands2.CursorPageUp=registerEditorCommand(new CursorMoveBasedCommand({args:{direction:2,unit:2,select:false,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:11}}));CoreNavigationCommands2.CursorPageUpSelect=registerEditorCommand(new CursorMoveBasedCommand({args:{direction:2,unit:2,select:true,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:1024|11}}));CoreNavigationCommands2.CursorDown=registerEditorCommand(new CursorMoveBasedCommand({args:{direction:3,unit:2,select:false,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[256|44]}}}));CoreNavigationCommands2.CursorDownSelect=registerEditorCommand(new CursorMoveBasedCommand({args:{direction:3,unit:2,select:true,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:1024|18,secondary:[2048|1024|18],mac:{primary:1024|18},linux:{primary:1024|18}}}));CoreNavigationCommands2.CursorPageDown=registerEditorCommand(new CursorMoveBasedCommand({args:{direction:3,unit:2,select:false,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:12}}));CoreNavigationCommands2.CursorPageDownSelect=registerEditorCommand(new CursorMoveBasedCommand({args:{direction:3,unit:2,select:true,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:1024|12}}));CoreNavigationCommands2.CreateCursor=registerEditorCommand(new class extends CoreEditorCommand{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(viewModel,args){if(!args.position){return}let newState;if(args.wholeLine){newState=CursorMoveCommands.line(viewModel,viewModel.getPrimaryCursorState(),false,args.position,args.viewPosition)}else{newState=CursorMoveCommands.moveTo(viewModel,viewModel.getPrimaryCursorState(),false,args.position,args.viewPosition)}const states=viewModel.getCursorStates();if(states.length>1){const newModelPosition=newState.modelState?newState.modelState.position:null;const newViewPosition=newState.viewState?newState.viewState.position:null;for(let i=0,len=states.length;ilineCount){lineNumber=lineCount}const range2=new Range(lineNumber,1,lineNumber,viewModel.model.getLineMaxColumn(lineNumber));let revealAt=0;if(revealLineArg.at){switch(revealLineArg.at){case RevealLine_.RawAtArgument.Top:revealAt=3;break;case RevealLine_.RawAtArgument.Center:revealAt=1;break;case RevealLine_.RawAtArgument.Bottom:revealAt=4;break;default:break}}const viewRange=viewModel.coordinatesConverter.convertModelRangeToViewRange(range2);viewModel.revealRange(args.source,false,viewRange,revealAt,0)}});CoreNavigationCommands2.SelectAll=new class extends EditorOrNativeTextInputCommand{constructor(){super(SelectAllCommand)}runDOMCommand(){if(isFirefox2){document.activeElement.focus();document.activeElement.select()}document.execCommand("selectAll")}runEditorCommand(accessor,editor2,args){const viewModel=editor2._getViewModel();if(!viewModel){return}this.runCoreEditorCommand(viewModel,args)}runCoreEditorCommand(viewModel,args){viewModel.model.pushStackElement();viewModel.setCursorStates("keyboard",3,[CursorMoveCommands.selectAll(viewModel,viewModel.getPrimaryCursorState())])}};CoreNavigationCommands2.SetSelection=registerEditorCommand(new class extends CoreEditorCommand{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(viewModel,args){if(!args.selection){return}viewModel.model.pushStackElement();viewModel.setCursorStates(args.source,3,[CursorState.fromModelSelection(args.selection)])}})})(CoreNavigationCommands||(CoreNavigationCommands={}));columnSelectionCondition=ContextKeyExpr.and(EditorContextKeys.textInputFocus,EditorContextKeys.columnSelection);registerColumnSelection(CoreNavigationCommands.CursorColumnSelectLeft.id,1024|15);registerColumnSelection(CoreNavigationCommands.CursorColumnSelectRight.id,1024|17);registerColumnSelection(CoreNavigationCommands.CursorColumnSelectUp.id,1024|16);registerColumnSelection(CoreNavigationCommands.CursorColumnSelectPageUp.id,1024|11);registerColumnSelection(CoreNavigationCommands.CursorColumnSelectDown.id,1024|18);registerColumnSelection(CoreNavigationCommands.CursorColumnSelectPageDown.id,1024|12);(function(CoreEditingCommands2){class CoreEditingCommand extends EditorCommand{runEditorCommand(accessor,editor2,args){const viewModel=editor2._getViewModel();if(!viewModel){return}this.runCoreEditingCommand(editor2,viewModel,args||{})}}CoreEditingCommands2.CoreEditingCommand=CoreEditingCommand;CoreEditingCommands2.LineBreakInsert=registerEditorCommand(new class extends CoreEditingCommand{constructor(){super({id:"lineBreakInsert",precondition:EditorContextKeys.writable,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:0,mac:{primary:256|45}}})}runCoreEditingCommand(editor2,viewModel,args){editor2.pushUndoStop();editor2.executeCommands(this.id,TypeOperations.lineBreakInsert(viewModel.cursorConfig,viewModel.model,viewModel.getCursorStates().map((s=>s.modelState.selection))))}});CoreEditingCommands2.Outdent=registerEditorCommand(new class extends CoreEditingCommand{constructor(){super({id:"outdent",precondition:EditorContextKeys.writable,kbOpts:{weight:CORE_WEIGHT,kbExpr:ContextKeyExpr.and(EditorContextKeys.editorTextFocus,EditorContextKeys.tabDoesNotMoveFocus),primary:1024|2}})}runCoreEditingCommand(editor2,viewModel,args){editor2.pushUndoStop();editor2.executeCommands(this.id,TypeOperations.outdent(viewModel.cursorConfig,viewModel.model,viewModel.getCursorStates().map((s=>s.modelState.selection))));editor2.pushUndoStop()}});CoreEditingCommands2.Tab=registerEditorCommand(new class extends CoreEditingCommand{constructor(){super({id:"tab",precondition:EditorContextKeys.writable,kbOpts:{weight:CORE_WEIGHT,kbExpr:ContextKeyExpr.and(EditorContextKeys.editorTextFocus,EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(editor2,viewModel,args){editor2.pushUndoStop();editor2.executeCommands(this.id,TypeOperations.tab(viewModel.cursorConfig,viewModel.model,viewModel.getCursorStates().map((s=>s.modelState.selection))));editor2.pushUndoStop()}});CoreEditingCommands2.DeleteLeft=registerEditorCommand(new class extends CoreEditingCommand{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:1,secondary:[1024|1],mac:{primary:1,secondary:[1024|1,256|38,256|1]}}})}runCoreEditingCommand(editor2,viewModel,args){const[shouldPushStackElementBefore,commands]=DeleteOperations.deleteLeft(viewModel.getPrevEditOperationType(),viewModel.cursorConfig,viewModel.model,viewModel.getCursorStates().map((s=>s.modelState.selection)),viewModel.getCursorAutoClosedCharacters());if(shouldPushStackElementBefore){editor2.pushUndoStop()}editor2.executeCommands(this.id,commands);viewModel.setPrevEditOperationType(2)}});CoreEditingCommands2.DeleteRight=registerEditorCommand(new class extends CoreEditingCommand{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:CORE_WEIGHT,kbExpr:EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[256|34,256|20]}}})}runCoreEditingCommand(editor2,viewModel,args){const[shouldPushStackElementBefore,commands]=DeleteOperations.deleteRight(viewModel.getPrevEditOperationType(),viewModel.cursorConfig,viewModel.model,viewModel.getCursorStates().map((s=>s.modelState.selection)));if(shouldPushStackElementBefore){editor2.pushUndoStop()}editor2.executeCommands(this.id,commands);viewModel.setPrevEditOperationType(3)}});CoreEditingCommands2.Undo=new class extends EditorOrNativeTextInputCommand{constructor(){super(UndoCommand)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(accessor,editor2,args){if(!editor2.hasModel()||editor2.getOption(89)===true){return}return editor2.getModel().undo()}};CoreEditingCommands2.Redo=new class extends EditorOrNativeTextInputCommand{constructor(){super(RedoCommand)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(accessor,editor2,args){if(!editor2.hasModel()||editor2.getOption(89)===true){return}return editor2.getModel().redo()}}})(CoreEditingCommands||(CoreEditingCommands={}));EditorHandlerCommand=class extends Command2{constructor(id,handlerId,description){super({id:id,precondition:void 0,description:description});this._handlerId=handlerId}runCommand(accessor,args){const editor2=accessor.get(ICodeEditorService).getFocusedCodeEditor();if(!editor2){return}editor2.trigger("keyboard",this._handlerId,args)}};registerOverwritableCommand("type",{description:`Type`,args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});registerOverwritableCommand("replacePreviousChar");registerOverwritableCommand("compositionType");registerOverwritableCommand("compositionStart");registerOverwritableCommand("compositionEnd");registerOverwritableCommand("paste");registerOverwritableCommand("cut")}});var ViewController;var init_viewController=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/view/viewController.js"(){init_coreCommands();init_position();init_platform();ViewController=class{constructor(configuration,viewModel,userInputEvents,commandDelegate){this.configuration=configuration;this.viewModel=viewModel;this.userInputEvents=userInputEvents;this.commandDelegate=commandDelegate}paste(text2,pasteOnNewLine,multicursorText,mode){this.commandDelegate.paste(text2,pasteOnNewLine,multicursorText,mode)}type(text2){this.commandDelegate.type(text2)}compositionType(text2,replacePrevCharCnt,replaceNextCharCnt,positionDelta){this.commandDelegate.compositionType(text2,replacePrevCharCnt,replaceNextCharCnt,positionDelta)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(modelSelection){CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:modelSelection})}_validateViewColumn(viewPosition){const minColumn=this.viewModel.getLineMinColumn(viewPosition.lineNumber);if(viewPosition.column=4){this._selectAll()}else if(data.mouseDownCount===3){if(this._hasMulticursorModifier(data)){if(data.inSelectionMode){this._lastCursorLineSelectDrag(data.position,data.revealType)}else{this._lastCursorLineSelect(data.position,data.revealType)}}else{if(data.inSelectionMode){this._lineSelectDrag(data.position,data.revealType)}else{this._lineSelect(data.position,data.revealType)}}}else if(data.mouseDownCount===2){if(!data.onInjectedText){if(this._hasMulticursorModifier(data)){this._lastCursorWordSelect(data.position,data.revealType)}else{if(data.inSelectionMode){this._wordSelectDrag(data.position,data.revealType)}else{this._wordSelect(data.position,data.revealType)}}}}else{if(this._hasMulticursorModifier(data)){if(!this._hasNonMulticursorModifier(data)){if(data.shiftKey){this._columnSelect(data.position,data.mouseColumn,true)}else{if(data.inSelectionMode){this._lastCursorMoveToSelect(data.position,data.revealType)}else{this._createCursor(data.position,false)}}}}else{if(data.inSelectionMode){if(data.altKey){this._columnSelect(data.position,data.mouseColumn,true)}else{if(columnSelection){this._columnSelect(data.position,data.mouseColumn,true)}else{this._moveToSelect(data.position,data.revealType)}}}else{this.moveTo(data.position,data.revealType)}}}}_usualArgs(viewPosition,revealType){viewPosition=this._validateViewColumn(viewPosition);return{source:"mouse",position:this._convertViewToModelPosition(viewPosition),viewPosition:viewPosition,revealType:revealType}}moveTo(viewPosition,revealType){CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(viewPosition,revealType))}_moveToSelect(viewPosition,revealType){CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(viewPosition,revealType))}_columnSelect(viewPosition,mouseColumn,doColumnSelect){viewPosition=this._validateViewColumn(viewPosition);CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(viewPosition),viewPosition:viewPosition,mouseColumn:mouseColumn,doColumnSelect:doColumnSelect})}_createCursor(viewPosition,wholeLine){viewPosition=this._validateViewColumn(viewPosition);CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(viewPosition),viewPosition:viewPosition,wholeLine:wholeLine})}_lastCursorMoveToSelect(viewPosition,revealType){CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(viewPosition,revealType))}_wordSelect(viewPosition,revealType){CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(viewPosition,revealType))}_wordSelectDrag(viewPosition,revealType){CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(viewPosition,revealType))}_lastCursorWordSelect(viewPosition,revealType){CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(viewPosition,revealType))}_lineSelect(viewPosition,revealType){CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(viewPosition,revealType))}_lineSelectDrag(viewPosition,revealType){CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(viewPosition,revealType))}_lastCursorLineSelect(viewPosition,revealType){CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(viewPosition,revealType))}_lastCursorLineSelectDrag(viewPosition,revealType){CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(viewPosition,revealType))}_selectAll(){CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(viewPosition){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(viewPosition)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}}});var ViewUserInputEvents;var init_viewUserInputEvents=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/view/viewUserInputEvents.js"(){init_position();ViewUserInputEvents=class{constructor(coordinatesConverter){this.onKeyDown=null;this.onKeyUp=null;this.onContextMenu=null;this.onMouseMove=null;this.onMouseLeave=null;this.onMouseDown=null;this.onMouseUp=null;this.onMouseDrag=null;this.onMouseDrop=null;this.onMouseDropCanceled=null;this.onMouseWheel=null;this._coordinatesConverter=coordinatesConverter}emitKeyDown(e){var _a6;(_a6=this.onKeyDown)===null||_a6===void 0?void 0:_a6.call(this,e)}emitKeyUp(e){var _a6;(_a6=this.onKeyUp)===null||_a6===void 0?void 0:_a6.call(this,e)}emitContextMenu(e){var _a6;(_a6=this.onContextMenu)===null||_a6===void 0?void 0:_a6.call(this,this._convertViewToModelMouseEvent(e))}emitMouseMove(e){var _a6;(_a6=this.onMouseMove)===null||_a6===void 0?void 0:_a6.call(this,this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){var _a6;(_a6=this.onMouseLeave)===null||_a6===void 0?void 0:_a6.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDown(e){var _a6;(_a6=this.onMouseDown)===null||_a6===void 0?void 0:_a6.call(this,this._convertViewToModelMouseEvent(e))}emitMouseUp(e){var _a6;(_a6=this.onMouseUp)===null||_a6===void 0?void 0:_a6.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){var _a6;(_a6=this.onMouseDrag)===null||_a6===void 0?void 0:_a6.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){var _a6;(_a6=this.onMouseDrop)===null||_a6===void 0?void 0:_a6.call(this,this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){var _a6;(_a6=this.onMouseDropCanceled)===null||_a6===void 0?void 0:_a6.call(this)}emitMouseWheel(e){var _a6;(_a6=this.onMouseWheel)===null||_a6===void 0?void 0:_a6.call(this,e)}_convertViewToModelMouseEvent(e){if(e.target){return{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}}return e}_convertViewToModelMouseTarget(target){return ViewUserInputEvents.convertViewToModelMouseTarget(target,this._coordinatesConverter)}static convertViewToModelMouseTarget(target,coordinatesConverter){const result=Object.assign({},target);if(result.position){result.position=coordinatesConverter.convertViewPositionToModelPosition(result.position)}if(result.range){result.range=coordinatesConverter.convertViewRangeToModelRange(result.range)}if(result.type===5||result.type===8){result.detail=this.convertViewToModelViewZoneData(result.detail,coordinatesConverter)}return result}static convertViewToModelViewZoneData(data,coordinatesConverter){return{viewZoneId:data.viewZoneId,positionBefore:data.positionBefore?coordinatesConverter.convertViewPositionToModelPosition(data.positionBefore):data.positionBefore,positionAfter:data.positionAfter?coordinatesConverter.convertViewPositionToModelPosition(data.positionAfter):data.positionAfter,position:coordinatesConverter.convertViewPositionToModelPosition(data.position),afterLineNumber:coordinatesConverter.convertViewPositionToModelPosition(new Position(data.afterLineNumber,1)).lineNumber}}}}});var RenderedLinesCollection,VisibleLinesCollection,ViewLayerRenderer;var init_viewLayer=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/view/viewLayer.js"(){init_fastDomNode();init_trustedTypes();init_errors();init_stringBuilder();RenderedLinesCollection=class{constructor(createLine){this._createLine=createLine;this._set(1,[])}flush(){this._set(1,[])}_set(rendLineNumberStart,lines){this._lines=lines;this._rendLineNumberStart=rendLineNumberStart}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(lineNumber){const lineIndex=lineNumber-this._rendLineNumberStart;if(lineIndex<0||lineIndex>=this._lines.length){throw new BugIndicatingError("Illegal value for lineNumber")}return this._lines[lineIndex]}onLinesDeleted(deleteFromLineNumber,deleteToLineNumber){if(this.getCount()===0){return null}const startLineNumber=this.getStartLineNumber();const endLineNumber=this.getEndLineNumber();if(deleteToLineNumberendLineNumber){return null}let deleteStartIndex=0;let deleteCount=0;for(let lineNumber=startLineNumber;lineNumber<=endLineNumber;lineNumber++){const lineIndex=lineNumber-this._rendLineNumberStart;if(deleteFromLineNumber<=lineNumber&&lineNumber<=deleteToLineNumber){if(deleteCount===0){deleteStartIndex=lineIndex;deleteCount=1}else{deleteCount++}}}if(deleteFromLineNumber=startLineNumber&&changedLineNumber<=endLineNumber){this._lines[changedLineNumber-this._rendLineNumberStart].onContentChanged();someoneNotified=true}}return someoneNotified}onLinesInserted(insertFromLineNumber,insertToLineNumber){if(this.getCount()===0){return null}const insertCnt=insertToLineNumber-insertFromLineNumber+1;const startLineNumber=this.getStartLineNumber();const endLineNumber=this.getEndLineNumber();if(insertFromLineNumber<=startLineNumber){this._rendLineNumberStart+=insertCnt;return null}if(insertFromLineNumber>endLineNumber){return null}if(insertCnt+insertFromLineNumber>endLineNumber){const deleted=this._lines.splice(insertFromLineNumber-this._rendLineNumberStart,endLineNumber-insertFromLineNumber+1);return deleted}const newLines=[];for(let i=0;iendLineNumber){continue}const from=Math.max(startLineNumber,rng.fromLineNumber);const to=Math.min(endLineNumber,rng.toLineNumber);for(let lineNumber=from;lineNumber<=to;lineNumber++){const lineIndex=lineNumber-this._rendLineNumberStart;this._lines[lineIndex].onTokensChanged();notifiedSomeone=true}}return notifiedSomeone}};VisibleLinesCollection=class{constructor(host){this._host=host;this.domNode=this._createDomNode();this._linesCollection=new RenderedLinesCollection((()=>this._host.createVisibleLine()))}_createDomNode(){const domNode=createFastDomNode(document.createElement("div"));domNode.setClassName("view-layer");domNode.setPosition("absolute");domNode.domNode.setAttribute("role","presentation");domNode.domNode.setAttribute("aria-hidden","true");return domNode}onConfigurationChanged(e){if(e.hasChanged(142)){return true}return false}onFlushed(e){this._linesCollection.flush();return true}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.count)}onLinesDeleted(e){const deleted=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(deleted){for(let i=0,len=deleted.length;istartLineNumber){const fromLineNumber=startLineNumber;const toLineNumber=Math.min(stopLineNumber,ctx.rendLineNumberStart-1);if(fromLineNumber<=toLineNumber){this._insertLinesBefore(ctx,fromLineNumber,toLineNumber,deltaTop,startLineNumber);ctx.linesLength+=toLineNumber-fromLineNumber+1}}else if(ctx.rendLineNumberStart0){this._removeLinesBefore(ctx,removeCnt);ctx.linesLength-=removeCnt}}ctx.rendLineNumberStart=startLineNumber;if(ctx.rendLineNumberStart+ctx.linesLength-1stopLineNumber){const fromLineNumber=Math.max(0,stopLineNumber-ctx.rendLineNumberStart+1);const toLineNumber=ctx.linesLength-1;const removeCnt=toLineNumber-fromLineNumber+1;if(removeCnt>0){this._removeLinesAfter(ctx,removeCnt);ctx.linesLength-=removeCnt}}this._finishRendering(ctx,false,deltaTop);return ctx}_renderUntouchedLines(ctx,startIndex,endIndex,deltaTop,deltaLN){const rendLineNumberStart=ctx.rendLineNumberStart;const lines=ctx.lines;for(let i=startIndex;i<=endIndex;i++){const lineNumber=rendLineNumberStart+i;lines[i].layoutLine(lineNumber,deltaTop[lineNumber-deltaLN])}}_insertLinesBefore(ctx,fromLineNumber,toLineNumber,deltaTop,deltaLN){const newLines=[];let newLinesLen=0;for(let lineNumber=fromLineNumber;lineNumber<=toLineNumber;lineNumber++){newLines[newLinesLen++]=this.host.createVisibleLine()}ctx.lines=newLines.concat(ctx.lines)}_removeLinesBefore(ctx,removeCount){for(let i=0;i=0;i--){const line=ctx.lines[i];if(wasNew[i]){line.setDomNode(currChild);currChild=currChild.previousSibling}}}_finishRenderingInvalidLines(ctx,invalidLinesHTML,wasInvalid){const hugeDomNode=document.createElement("div");if(ViewLayerRenderer._ttPolicy){invalidLinesHTML=ViewLayerRenderer._ttPolicy.createHTML(invalidLinesHTML)}hugeDomNode.innerHTML=invalidLinesHTML;for(let i=0;ivalue});ViewLayerRenderer._sb=new StringBuilder(1e5)}});var ViewOverlays,ViewOverlayLine,ContentViewOverlays,MarginViewOverlays;var init_viewOverlays=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/view/viewOverlays.js"(){init_fastDomNode();init_domFontInfo();init_viewLayer();init_viewPart();ViewOverlays=class extends ViewPart{constructor(context){super(context);this._visibleLines=new VisibleLinesCollection(this);this.domNode=this._visibleLines.domNode;const options2=this._context.configuration.options;const fontInfo=options2.get(49);applyFontInfo(this.domNode,fontInfo);this._dynamicOverlays=[];this._isFocused=false;this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender()){return true}for(let i=0,len=this._dynamicOverlays.length;ioverlay.shouldRender()));for(let i=0,len=toRender.length;i');sb.appendString(result);sb.appendString("");return true}layoutLine(lineNumber,deltaTop){if(this._domNode){this._domNode.setTop(deltaTop);this._domNode.setHeight(this._lineHeight)}}};ContentViewOverlays=class extends ViewOverlays{constructor(context){super(context);const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._contentWidth=layoutInfo.contentWidth;this.domNode.setHeight(0)}onConfigurationChanged(e){const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._contentWidth=layoutInfo.contentWidth;return super.onConfigurationChanged(e)||true}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(ctx){super._viewOverlaysRender(ctx);this.domNode.setWidth(Math.max(ctx.scrollWidth,this._contentWidth))}};MarginViewOverlays=class extends ViewOverlays{constructor(context){super(context);const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._contentLeft=layoutInfo.contentLeft;this.domNode.setClassName("margin-view-overlays");this.domNode.setWidth(1);applyFontInfo(this.domNode,options2.get(49))}onConfigurationChanged(e){const options2=this._context.configuration.options;applyFontInfo(this.domNode,options2.get(49));const layoutInfo=options2.get(142);this._contentLeft=layoutInfo.contentLeft;return super.onConfigurationChanged(e)||true}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(ctx){super._viewOverlaysRender(ctx);const height=Math.min(ctx.scrollHeight,1e6);this.domNode.setHeight(height);this.domNode.setWidth(this._contentLeft)}}}});function safeInvoke(fn,thisArg,...args){try{return fn.call(thisArg,...args)}catch(_a6){return null}}var ViewContentWidgets,Widget2,PositionPair,Coordinate,AnchorCoordinate;var init_contentWidgets=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js"(){init_dom();init_fastDomNode();init_viewPart();ViewContentWidgets=class extends ViewPart{constructor(context,viewDomNode){super(context);this._viewDomNode=viewDomNode;this._widgets={};this.domNode=createFastDomNode(document.createElement("div"));PartFingerprints.write(this.domNode,1);this.domNode.setClassName("contentWidgets");this.domNode.setPosition("absolute");this.domNode.setTop(0);this.overflowingContentWidgetsDomNode=createFastDomNode(document.createElement("div"));PartFingerprints.write(this.overflowingContentWidgetsDomNode,2);this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose();this._widgets={}}onConfigurationChanged(e){const keys=Object.keys(this._widgets);for(const widgetId of keys){this._widgets[widgetId].onConfigurationChanged(e)}return true}onDecorationsChanged(e){return true}onFlushed(e){return true}onLineMappingChanged(e){this._updateAnchorsViewPositions();return true}onLinesChanged(e){this._updateAnchorsViewPositions();return true}onLinesDeleted(e){this._updateAnchorsViewPositions();return true}onLinesInserted(e){this._updateAnchorsViewPositions();return true}onScrollChanged(e){return true}onZonesChanged(e){return true}_updateAnchorsViewPositions(){const keys=Object.keys(this._widgets);for(const widgetId of keys){this._widgets[widgetId].updateAnchorViewPosition()}}addWidget(_widget){const myWidget=new Widget2(this._context,this._viewDomNode,_widget);this._widgets[myWidget.id]=myWidget;if(myWidget.allowEditorOverflow){this.overflowingContentWidgetsDomNode.appendChild(myWidget.domNode)}else{this.domNode.appendChild(myWidget.domNode)}this.setShouldRender()}setWidgetPosition(widget,primaryAnchor,secondaryAnchor,preference,affinity){const myWidget=this._widgets[widget.getId()];myWidget.setPosition(primaryAnchor,secondaryAnchor,preference,affinity);this.setShouldRender()}removeWidget(widget){const widgetId=widget.getId();if(this._widgets.hasOwnProperty(widgetId)){const myWidget=this._widgets[widgetId];delete this._widgets[widgetId];const domNode=myWidget.domNode.domNode;domNode.parentNode.removeChild(domNode);domNode.removeAttribute("monaco-visible-content-widget");this.setShouldRender()}}shouldSuppressMouseDownOnWidget(widgetId){if(this._widgets.hasOwnProperty(widgetId)){return this._widgets[widgetId].suppressMouseDown}return false}onBeforeRender(viewportData){const keys=Object.keys(this._widgets);for(const widgetId of keys){this._widgets[widgetId].onBeforeRender(viewportData)}}prepareRender(ctx){const keys=Object.keys(this._widgets);for(const widgetId of keys){this._widgets[widgetId].prepareRender(ctx)}}render(ctx){const keys=Object.keys(this._widgets);for(const widgetId of keys){this._widgets[widgetId].render(ctx)}}};Widget2=class{constructor(context,viewDomNode,actual){this._primaryAnchor=new PositionPair(null,null);this._secondaryAnchor=new PositionPair(null,null);this._context=context;this._viewDomNode=viewDomNode;this._actual=actual;this.domNode=createFastDomNode(this._actual.getDomNode());this.id=this._actual.getId();this.allowEditorOverflow=this._actual.allowEditorOverflow||false;this.suppressMouseDown=this._actual.suppressMouseDown||false;const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._fixedOverflowWidgets=options2.get(41);this._contentWidth=layoutInfo.contentWidth;this._contentLeft=layoutInfo.contentLeft;this._lineHeight=options2.get(65);this._affinity=null;this._preference=[];this._cachedDomNodeOffsetWidth=-1;this._cachedDomNodeOffsetHeight=-1;this._maxWidth=this._getMaxWidth();this._isVisible=false;this._renderData=null;this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute");this.domNode.setDisplay("none");this.domNode.setVisibility("hidden");this.domNode.setAttribute("widgetId",this.id);this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const options2=this._context.configuration.options;this._lineHeight=options2.get(65);if(e.hasChanged(142)){const layoutInfo=options2.get(142);this._contentLeft=layoutInfo.contentLeft;this._contentWidth=layoutInfo.contentWidth;this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(affinity,primaryAnchor,secondaryAnchor){this._affinity=affinity;this._primaryAnchor=getValidPositionPair(primaryAnchor,this._context.viewModel,this._affinity);this._secondaryAnchor=getValidPositionPair(secondaryAnchor,this._context.viewModel,this._affinity);function getValidPositionPair(position,viewModel,affinity2){if(!position){return new PositionPair(null,null)}const validModelPosition=viewModel.model.validatePosition(position);if(viewModel.coordinatesConverter.modelPositionIsVisible(validModelPosition)){const viewPosition=viewModel.coordinatesConverter.convertModelPositionToViewPosition(validModelPosition,affinity2!==null&&affinity2!==void 0?affinity2:void 0);return new PositionPair(position,viewPosition)}return new PositionPair(position,null)}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(primaryAnchor,secondaryAnchor,preference,affinity){this._setPosition(affinity,primaryAnchor,secondaryAnchor);this._preference=preference;if(this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0){this.domNode.setDisplay("block")}else{this.domNode.setDisplay("none")}this._cachedDomNodeOffsetWidth=-1;this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(anchor,width,height,ctx){const aboveLineTop=anchor.top;const heightAvailableAboveLine=aboveLineTop;const underLineTop=anchor.top+anchor.height;const heightAvailableUnderLine=ctx.viewportHeight-underLineTop;const aboveTop=aboveLineTop-height;const fitsAbove=heightAvailableAboveLine>=height;const belowTop=underLineTop;const fitsBelow=heightAvailableUnderLine>=height;let left=anchor.left;if(left+width>ctx.scrollLeft+ctx.viewportWidth){left=ctx.scrollLeft+ctx.viewportWidth-width}if(leftMAX_LIMIT){const delta=absoluteLeft-(MAX_LIMIT-width);absoluteLeft-=delta;left-=delta}if(absoluteLeft=TOP_PADDING;const fitsBelow=absoluteBelowTop+height<=windowSize.height-BOTTOM_PADDING;if(this._fixedOverflowWidgets){return{fitsAbove:fitsAbove,aboveTop:Math.max(absoluteAboveTop,TOP_PADDING),fitsBelow:fitsBelow,belowTop:absoluteBelowTop,left:absoluteAboveLeft}}return{fitsAbove:fitsAbove,aboveTop:aboveTop,fitsBelow:fitsBelow,belowTop:belowTop,left:left}}_prepareRenderWidgetAtExactPositionOverflowing(topLeft){return new Coordinate(topLeft.top,topLeft.left+this._contentLeft)}_getAnchorsCoordinates(ctx){var _a6,_b3;const primary=getCoordinates(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight);const secondaryViewPosition=((_a6=this._secondaryAnchor.viewPosition)===null||_a6===void 0?void 0:_a6.lineNumber)===((_b3=this._primaryAnchor.viewPosition)===null||_b3===void 0?void 0:_b3.lineNumber)?this._secondaryAnchor.viewPosition:null;const secondary=getCoordinates(secondaryViewPosition,this._affinity,this._lineHeight);return{primary:primary,secondary:secondary};function getCoordinates(position,affinity,lineHeight){if(!position){return null}const horizontalPosition=ctx.visibleRangeForPosition(position);if(!horizontalPosition){return null}const left=position.column===1&&affinity===3?0:horizontalPosition.left;const top=ctx.getVerticalOffsetForLineNumber(position.lineNumber)-ctx.scrollTop;return new AnchorCoordinate(top,left,lineHeight)}}_reduceAnchorCoordinates(primary,secondary,width){if(!secondary){return primary}const fontInfo=this._context.configuration.options.get(49);let left=secondary.left;if(leftviewportData.endLineNumber){return}this.domNode.setMaxWidth(this._maxWidth)}prepareRender(ctx){this._renderData=this._prepareRenderWidget(ctx)}render(ctx){if(!this._renderData){if(this._isVisible){this.domNode.removeAttribute("monaco-visible-content-widget");this._isVisible=false;this.domNode.setVisibility("hidden")}if(typeof this._actual.afterRender==="function"){safeInvoke(this._actual.afterRender,this._actual,null)}return}if(this.allowEditorOverflow){this.domNode.setTop(this._renderData.coordinate.top);this.domNode.setLeft(this._renderData.coordinate.left)}else{this.domNode.setTop(this._renderData.coordinate.top+ctx.scrollTop-ctx.bigNumbersDelta);this.domNode.setLeft(this._renderData.coordinate.left)}if(!this._isVisible){this.domNode.setVisibility("inherit");this.domNode.setAttribute("monaco-visible-content-widget","true");this._isVisible=true}if(typeof this._actual.afterRender==="function"){safeInvoke(this._actual.afterRender,this._actual,this._renderData.position)}}};PositionPair=class{constructor(modelPosition,viewPosition){this.modelPosition=modelPosition;this.viewPosition=viewPosition}};Coordinate=class{constructor(top,left){this.top=top;this.left=left;this._coordinateBrand=void 0}};AnchorCoordinate=class{constructor(top,left,height){this.top=top;this.left=left;this.height=height;this._anchorCoordinateBrand=void 0}}}});var init_9=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css"(){}});var AbstractLineHighlightOverlay,CurrentLineHighlightOverlay,CurrentLineMarginHighlightOverlay;var init_currentLineHighlight=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js"(){init_9();init_dynamicViewOverlay();init_editorColorRegistry();init_arrays();init_themeService();init_selection();init_theme();AbstractLineHighlightOverlay=class extends DynamicViewOverlay{constructor(context){super();this._context=context;const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._lineHeight=options2.get(65);this._renderLineHighlight=options2.get(94);this._renderLineHighlightOnlyWhenFocus=options2.get(95);this._contentLeft=layoutInfo.contentLeft;this._contentWidth=layoutInfo.contentWidth;this._selectionIsEmpty=true;this._focused=false;this._cursorLineNumbers=[1];this._selections=[new Selection(1,1,1,1)];this._renderData=null;this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this);super.dispose()}_readFromSelections(){let hasChanged=false;const cursorsLineNumbers=this._selections.map((s=>s.positionLineNumber));cursorsLineNumbers.sort(((a,b)=>a-b));if(!equals(this._cursorLineNumbers,cursorsLineNumbers)){this._cursorLineNumbers=cursorsLineNumbers;hasChanged=true}const selectionIsEmpty=this._selections.every((s=>s.isEmpty()));if(this._selectionIsEmpty!==selectionIsEmpty){this._selectionIsEmpty=selectionIsEmpty;hasChanged=true}return hasChanged}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._lineHeight=options2.get(65);this._renderLineHighlight=options2.get(94);this._renderLineHighlightOnlyWhenFocus=options2.get(95);this._contentLeft=layoutInfo.contentLeft;this._contentWidth=layoutInfo.contentWidth;return true}onCursorStateChanged(e){this._selections=e.selections;return this._readFromSelections()}onFlushed(e){return true}onLinesDeleted(e){return true}onLinesInserted(e){return true}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return true}onFocusChanged(e){if(!this._renderLineHighlightOnlyWhenFocus){return false}this._focused=e.isFocused;return true}prepareRender(ctx){if(!this._shouldRenderThis()){this._renderData=null;return}const renderedLine=this._renderOne(ctx);const visibleStartLineNumber=ctx.visibleRange.startLineNumber;const visibleEndLineNumber=ctx.visibleRange.endLineNumber;const len=this._cursorLineNumbers.length;let index=0;const renderData=[];for(let lineNumber=visibleStartLineNumber;lineNumber<=visibleEndLineNumber;lineNumber++){const lineIndex=lineNumber-visibleStartLineNumber;while(index=this._renderData.length){return""}return this._renderData[lineIndex]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}};CurrentLineHighlightOverlay=class extends AbstractLineHighlightOverlay{_renderOne(ctx){const className="current-line"+(this._shouldRenderOther()?" current-line-both":"");return`
    `}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}};CurrentLineMarginHighlightOverlay=class extends AbstractLineHighlightOverlay{_renderOne(ctx){const className="current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"");return`
    `}_shouldRenderThis(){return true}_shouldRenderOther(){return this._shouldRenderInContent()}};registerThemingParticipant(((theme,collector)=>{const lineHighlight=theme.getColor(editorLineHighlight);if(lineHighlight){collector.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${lineHighlight}; }`);collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${lineHighlight}; border: none; }`)}if(!lineHighlight||lineHighlight.isTransparent()||theme.defines(editorLineHighlightBorder)){const lineHighlightBorder=theme.getColor(editorLineHighlightBorder);if(lineHighlightBorder){collector.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${lineHighlightBorder}; }`);collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${lineHighlightBorder}; }`);if(isHighContrast(theme.type)){collector.addRule(`.monaco-editor .view-overlays .current-line { border-width: 1px; }`);collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }`)}}}}))}});var init_10=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css"(){}});var DecorationsOverlay;var init_decorations=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.js"(){init_10();init_dynamicViewOverlay();init_renderingContext();init_range();DecorationsOverlay=class extends DynamicViewOverlay{constructor(context){super();this._context=context;const options2=this._context.configuration.options;this._lineHeight=options2.get(65);this._typicalHalfwidthCharacterWidth=options2.get(49).typicalHalfwidthCharacterWidth;this._renderResult=null;this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this);this._renderResult=null;super.dispose()}onConfigurationChanged(e){const options2=this._context.configuration.options;this._lineHeight=options2.get(65);this._typicalHalfwidthCharacterWidth=options2.get(49).typicalHalfwidthCharacterWidth;return true}onDecorationsChanged(e){return true}onFlushed(e){return true}onLinesChanged(e){return true}onLinesDeleted(e){return true}onLinesInserted(e){return true}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return true}prepareRender(ctx){const _decorations=ctx.getDecorationsInViewport();let decorations=[];let decorationsLen=0;for(let i=0,len=_decorations.length;i{if(a.options.zIndexb.options.zIndex){return 1}const aClassName=a.options.className;const bClassName=b.options.className;if(aClassNamebClassName){return 1}return Range.compareRangesUsingStarts(a.range,b.range)}));const visibleStartLineNumber=ctx.visibleRange.startLineNumber;const visibleEndLineNumber=ctx.visibleRange.endLineNumber;const output=[];for(let lineNumber=visibleStartLineNumber;lineNumber<=visibleEndLineNumber;lineNumber++){const lineIndex=lineNumber-visibleStartLineNumber;output[lineIndex]=""}this._renderWholeLineDecorations(ctx,decorations,output);this._renderNormalDecorations(ctx,decorations,output);this._renderResult=output}_renderWholeLineDecorations(ctx,decorations,output){const lineHeight=String(this._lineHeight);const visibleStartLineNumber=ctx.visibleRange.startLineNumber;const visibleEndLineNumber=ctx.visibleRange.endLineNumber;for(let i=0,lenI=decorations.length;i';const startLineNumber=Math.max(d.range.startLineNumber,visibleStartLineNumber);const endLineNumber=Math.min(d.range.endLineNumber,visibleEndLineNumber);for(let j=startLineNumber;j<=endLineNumber;j++){const lineIndex=j-visibleStartLineNumber;output[lineIndex]+=decorationOutput}}}_renderNormalDecorations(ctx,decorations,output){var _a6;const lineHeight=String(this._lineHeight);const visibleStartLineNumber=ctx.visibleRange.startLineNumber;let prevClassName=null;let prevShowIfCollapsed=false;let prevRange=null;let prevShouldFillLineOnLineBreak=false;for(let i=0,lenI=decorations.length;i';output[lineIndex]+=decorationOutput}}}render(startLineNumber,lineNumber){if(!this._renderResult){return""}const lineIndex=lineNumber-startLineNumber;if(lineIndex<0||lineIndex>=this._renderResult.length){return""}return this._renderResult[lineIndex]}}}});var EditorScrollbar2;var init_editorScrollbar=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js"(){init_dom();init_fastDomNode();init_scrollableElement();init_viewPart();init_themeService();EditorScrollbar2=class extends ViewPart{constructor(context,linesContent,viewDomNode,overflowGuardDomNode){super(context);const options2=this._context.configuration.options;const scrollbar=options2.get(101);const mouseWheelScrollSensitivity=options2.get(73);const fastScrollSensitivity=options2.get(39);const scrollPredominantAxis=options2.get(104);const scrollbarOptions={listenOnDomNode:viewDomNode.domNode,className:"editor-scrollable "+getThemeTypeSelector(context.theme.type),useShadows:false,lazyRender:true,vertical:scrollbar.vertical,horizontal:scrollbar.horizontal,verticalHasArrows:scrollbar.verticalHasArrows,horizontalHasArrows:scrollbar.horizontalHasArrows,verticalScrollbarSize:scrollbar.verticalScrollbarSize,verticalSliderSize:scrollbar.verticalSliderSize,horizontalScrollbarSize:scrollbar.horizontalScrollbarSize,horizontalSliderSize:scrollbar.horizontalSliderSize,handleMouseWheel:scrollbar.handleMouseWheel,alwaysConsumeMouseWheel:scrollbar.alwaysConsumeMouseWheel,arrowSize:scrollbar.arrowSize,mouseWheelScrollSensitivity:mouseWheelScrollSensitivity,fastScrollSensitivity:fastScrollSensitivity,scrollPredominantAxis:scrollPredominantAxis,scrollByPage:scrollbar.scrollByPage};this.scrollbar=this._register(new SmoothScrollableElement(linesContent.domNode,scrollbarOptions,this._context.viewLayout.getScrollable()));PartFingerprints.write(this.scrollbar.getDomNode(),5);this.scrollbarDomNode=createFastDomNode(this.scrollbar.getDomNode());this.scrollbarDomNode.setPosition("absolute");this._setLayout();const onBrowserDesperateReveal=(domNode,lookAtScrollTop,lookAtScrollLeft)=>{const newScrollPosition={};if(lookAtScrollTop){const deltaTop=domNode.scrollTop;if(deltaTop){newScrollPosition.scrollTop=this._context.viewLayout.getCurrentScrollTop()+deltaTop;domNode.scrollTop=0}}if(lookAtScrollLeft){const deltaLeft=domNode.scrollLeft;if(deltaLeft){newScrollPosition.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+deltaLeft;domNode.scrollLeft=0}}this._context.viewModel.viewLayout.setScrollPosition(newScrollPosition,1)};this._register(addDisposableListener(viewDomNode.domNode,"scroll",(e=>onBrowserDesperateReveal(viewDomNode.domNode,true,true))));this._register(addDisposableListener(linesContent.domNode,"scroll",(e=>onBrowserDesperateReveal(linesContent.domNode,true,false))));this._register(addDisposableListener(overflowGuardDomNode.domNode,"scroll",(e=>onBrowserDesperateReveal(overflowGuardDomNode.domNode,true,false))));this._register(addDisposableListener(this.scrollbarDomNode.domNode,"scroll",(e=>onBrowserDesperateReveal(this.scrollbarDomNode.domNode,true,false))))}dispose(){super.dispose()}_setLayout(){const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this.scrollbarDomNode.setLeft(layoutInfo.contentLeft);const minimap=options2.get(71);const side=minimap.side;if(side==="right"){this.scrollbarDomNode.setWidth(layoutInfo.contentWidth+layoutInfo.minimap.minimapWidth)}else{this.scrollbarDomNode.setWidth(layoutInfo.contentWidth)}this.scrollbarDomNode.setHeight(layoutInfo.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(browserEvent){this.scrollbar.delegateVerticalScrollbarPointerDown(browserEvent)}delegateScrollFromMouseWheelEvent(browserEvent){this.scrollbar.delegateScrollFromMouseWheelEvent(browserEvent)}onConfigurationChanged(e){if(e.hasChanged(101)||e.hasChanged(73)||e.hasChanged(39)){const options2=this._context.configuration.options;const scrollbar=options2.get(101);const mouseWheelScrollSensitivity=options2.get(73);const fastScrollSensitivity=options2.get(39);const scrollPredominantAxis=options2.get(104);const newOpts={vertical:scrollbar.vertical,horizontal:scrollbar.horizontal,verticalScrollbarSize:scrollbar.verticalScrollbarSize,horizontalScrollbarSize:scrollbar.horizontalScrollbarSize,scrollByPage:scrollbar.scrollByPage,handleMouseWheel:scrollbar.handleMouseWheel,mouseWheelScrollSensitivity:mouseWheelScrollSensitivity,fastScrollSensitivity:fastScrollSensitivity,scrollPredominantAxis:scrollPredominantAxis};this.scrollbar.updateOptions(newOpts)}if(e.hasChanged(142)){this._setLayout()}return true}onScrollChanged(e){return true}onThemeChanged(e){this.scrollbar.updateClassName("editor-scrollable "+getThemeTypeSelector(this._context.theme.type));return true}prepareRender(ctx){}render(ctx){this.scrollbar.renderNow()}}}});var init_11=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css"(){}});var TextModelPart;var init_textModelPart=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/textModelPart.js"(){init_lifecycle();TextModelPart=class extends Disposable{constructor(){super(...arguments);this._isDisposed=false}dispose(){super.dispose();this._isDisposed=true}assertNotDisposed(){if(this._isDisposed){throw new Error("TextModelPart is disposed!")}}}}});function computeIndentLevel(line,tabSize){let indent=0;let i=0;const len=line.length;while(ilineCount){throw new BugIndicatingError("Illegal value for lineNumber")}const foldingRules=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules;const offSide=Boolean(foldingRules&&foldingRules.offSide);let up_aboveContentLineIndex=-2;let up_aboveContentLineIndent=-1;let up_belowContentLineIndex=-2;let up_belowContentLineIndent=-1;const up_resolveIndents=lineNumber2=>{if(up_aboveContentLineIndex!==-1&&(up_aboveContentLineIndex===-2||up_aboveContentLineIndex>lineNumber2-1)){up_aboveContentLineIndex=-1;up_aboveContentLineIndent=-1;for(let lineIndex=lineNumber2-2;lineIndex>=0;lineIndex--){const indent2=this._computeIndentLevel(lineIndex);if(indent2>=0){up_aboveContentLineIndex=lineIndex;up_aboveContentLineIndent=indent2;break}}}if(up_belowContentLineIndex===-2){up_belowContentLineIndex=-1;up_belowContentLineIndent=-1;for(let lineIndex=lineNumber2;lineIndex=0){up_belowContentLineIndex=lineIndex;up_belowContentLineIndent=indent2;break}}}};let down_aboveContentLineIndex=-2;let down_aboveContentLineIndent=-1;let down_belowContentLineIndex=-2;let down_belowContentLineIndent=-1;const down_resolveIndents=lineNumber2=>{if(down_aboveContentLineIndex===-2){down_aboveContentLineIndex=-1;down_aboveContentLineIndent=-1;for(let lineIndex=lineNumber2-2;lineIndex>=0;lineIndex--){const indent2=this._computeIndentLevel(lineIndex);if(indent2>=0){down_aboveContentLineIndex=lineIndex;down_aboveContentLineIndent=indent2;break}}}if(down_belowContentLineIndex!==-1&&(down_belowContentLineIndex===-2||down_belowContentLineIndex=0){down_belowContentLineIndex=lineIndex;down_belowContentLineIndent=indent2;break}}}};let startLineNumber=0;let goUp=true;let endLineNumber=0;let goDown=true;let indent=0;let initialIndent=0;for(let distance=0;goUp||goDown;distance++){const upLineNumber=lineNumber-distance;const downLineNumber=lineNumber+distance;if(distance>1&&(upLineNumber<1||upLineNumber1&&(downLineNumber>lineCount||downLineNumber>maxLineNumber)){goDown=false}if(distance>5e4){goUp=false;goDown=false}let upLineIndentLevel=-1;if(goUp&&upLineNumber>=1){const currentIndent=this._computeIndentLevel(upLineNumber-1);if(currentIndent>=0){up_belowContentLineIndex=upLineNumber-1;up_belowContentLineIndent=currentIndent;upLineIndentLevel=Math.ceil(currentIndent/this.textModel.getOptions().indentSize)}else{up_resolveIndents(upLineNumber);upLineIndentLevel=this._getIndentLevelForWhitespaceLine(offSide,up_aboveContentLineIndent,up_belowContentLineIndent)}}let downLineIndentLevel=-1;if(goDown&&downLineNumber<=lineCount){const currentIndent=this._computeIndentLevel(downLineNumber-1);if(currentIndent>=0){down_aboveContentLineIndex=downLineNumber-1;down_aboveContentLineIndent=currentIndent;downLineIndentLevel=Math.ceil(currentIndent/this.textModel.getOptions().indentSize)}else{down_resolveIndents(downLineNumber);downLineIndentLevel=this._getIndentLevelForWhitespaceLine(offSide,down_aboveContentLineIndent,down_belowContentLineIndent)}}if(distance===0){initialIndent=upLineIndentLevel;continue}if(distance===1){if(downLineNumber<=lineCount&&downLineIndentLevel>=0&&initialIndent+1===downLineIndentLevel){goUp=false;startLineNumber=downLineNumber;endLineNumber=downLineNumber;indent=downLineIndentLevel;continue}if(upLineNumber>=1&&upLineIndentLevel>=0&&upLineIndentLevel-1===initialIndent){goDown=false;startLineNumber=upLineNumber;endLineNumber=upLineNumber;indent=upLineIndentLevel;continue}startLineNumber=lineNumber;endLineNumber=lineNumber;indent=initialIndent;if(indent===0){return{startLineNumber:startLineNumber,endLineNumber:endLineNumber,indent:indent}}}if(goUp){if(upLineIndentLevel>=indent){startLineNumber=upLineNumber}else{goUp=false}}if(goDown){if(downLineIndentLevel>=indent){endLineNumber=downLineNumber}else{goDown=false}}}return{startLineNumber:startLineNumber,endLineNumber:endLineNumber,indent:indent}}getLinesBracketGuides(startLineNumber,endLineNumber,activePosition,options2){var _a6;const result=[];for(let lineNumber=startLineNumber;lineNumber<=endLineNumber;lineNumber++){result.push([])}const includeSingleLinePairs=true;const bracketPairs=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new Range(startLineNumber,1,endLineNumber,this.textModel.getLineMaxColumn(endLineNumber))).toArray();let activeBracketPairRange=void 0;if(activePosition&&bracketPairs.length>0){const bracketsContainingActivePosition=(startLineNumber<=activePosition.lineNumber&&activePosition.lineNumber<=endLineNumber?bracketPairs:this.textModel.bracketPairs.getBracketPairsInRange(Range.fromPositions(activePosition)).toArray()).filter((bp=>Range.strictContainsPosition(bp.range,activePosition)));activeBracketPairRange=(_a6=findLast(bracketsContainingActivePosition,(i=>includeSingleLinePairs||i.range.startLineNumber!==i.range.endLineNumber)))===null||_a6===void 0?void 0:_a6.range}const independentColorPoolPerBracketType=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType;const colorProvider=new BracketPairGuidesClassNames;for(const pair of bracketPairs){if(!pair.closingBracketRange){continue}const isActive=activeBracketPairRange&&pair.range.equalsRange(activeBracketPairRange);if(!isActive&&!options2.includeInactive){continue}const className=colorProvider.getInlineClassName(pair.nestingLevel,pair.nestingLevelOfEqualBracketType,independentColorPoolPerBracketType)+(options2.highlightActive&&isActive?" "+colorProvider.activeClassName:"");const start=pair.openingBracketRange.getStartPosition();const end=pair.closingBracketRange.getStartPosition();const horizontalGuides=options2.horizontalGuides===HorizontalGuidesState.Enabled||options2.horizontalGuides===HorizontalGuidesState.EnabledForActive&&isActive;if(pair.range.startLineNumber===pair.range.endLineNumber){if(includeSingleLinePairs&&horizontalGuides){result[pair.range.startLineNumber-startLineNumber].push(new IndentGuide(-1,pair.openingBracketRange.getEndPosition().column,className,new IndentGuideHorizontalLine(false,end.column),-1,-1))}continue}const endVisibleColumn=this.getVisibleColumnFromPosition(end);const startVisibleColumn=this.getVisibleColumnFromPosition(pair.openingBracketRange.getStartPosition());const guideVisibleColumn=Math.min(startVisibleColumn,endVisibleColumn,pair.minVisibleColumnIndentation+1);let renderHorizontalEndLineAtTheBottom=false;const firstNonWsIndex=firstNonWhitespaceIndex(this.textModel.getLineContent(pair.closingBracketRange.startLineNumber));const hasTextBeforeClosingBracket=firstNonWsIndex=startLineNumber&&startVisibleColumn>guideVisibleColumn){result[start.lineNumber-startLineNumber].push(new IndentGuide(guideVisibleColumn,-1,className,new IndentGuideHorizontalLine(false,start.column),-1,-1))}if(end.lineNumber<=endLineNumber&&endVisibleColumn>guideVisibleColumn){result[end.lineNumber-startLineNumber].push(new IndentGuide(guideVisibleColumn,-1,className,new IndentGuideHorizontalLine(!renderHorizontalEndLineAtTheBottom,end.column),-1,-1))}}}for(const guides of result){guides.sort(((a,b)=>a.visibleColumn-b.visibleColumn))}return result}getVisibleColumnFromPosition(position){return CursorColumns.visibleColumnFromColumn(this.textModel.getLineContent(position.lineNumber),position.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(startLineNumber,endLineNumber){this.assertNotDisposed();const lineCount=this.textModel.getLineCount();if(startLineNumber<1||startLineNumber>lineCount){throw new Error("Illegal value for startLineNumber")}if(endLineNumber<1||endLineNumber>lineCount){throw new Error("Illegal value for endLineNumber")}const options2=this.textModel.getOptions();const foldingRules=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules;const offSide=Boolean(foldingRules&&foldingRules.offSide);const result=new Array(endLineNumber-startLineNumber+1);let aboveContentLineIndex=-2;let aboveContentLineIndent=-1;let belowContentLineIndex=-2;let belowContentLineIndent=-1;for(let lineNumber=startLineNumber;lineNumber<=endLineNumber;lineNumber++){const resultIndex=lineNumber-startLineNumber;const currentIndent=this._computeIndentLevel(lineNumber-1);if(currentIndent>=0){aboveContentLineIndex=lineNumber-1;aboveContentLineIndent=currentIndent;result[resultIndex]=Math.ceil(currentIndent/options2.indentSize);continue}if(aboveContentLineIndex===-2){aboveContentLineIndex=-1;aboveContentLineIndent=-1;for(let lineIndex=lineNumber-2;lineIndex>=0;lineIndex--){const indent=this._computeIndentLevel(lineIndex);if(indent>=0){aboveContentLineIndex=lineIndex;aboveContentLineIndent=indent;break}}}if(belowContentLineIndex!==-1&&(belowContentLineIndex===-2||belowContentLineIndex=0){belowContentLineIndex=lineIndex;belowContentLineIndent=indent;break}}}result[resultIndex]=this._getIndentLevelForWhitespaceLine(offSide,aboveContentLineIndent,belowContentLineIndent)}return result}_getIndentLevelForWhitespaceLine(offSide,aboveContentLineIndent,belowContentLineIndent){const options2=this.textModel.getOptions();if(aboveContentLineIndent===-1||belowContentLineIndent===-1){return 0}else if(aboveContentLineIndentscrollWidth||this._maxIndentLeft>0&&left>this._maxIndentLeft){break}const className=guide.horizontalLine?guide.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical";const width=guide.horizontalLine?((_d2=(_c2=ctx.visibleRangeForPosition(new Position(lineNumber,guide.horizontalLine.endColumn)))===null||_c2===void 0?void 0:_c2.left)!==null&&_d2!==void 0?_d2:left+this._spaceWidth)-left:this._spaceWidth;result+=`
    `}output[lineIndex]=result}this._renderResult=output}getGuidesByLine(visibleStartLineNumber,visibleEndLineNumber,activeCursorPosition){const bracketGuides=this._bracketPairGuideOptions.bracketPairs!==false?this._context.viewModel.getBracketGuidesInRangeByLine(visibleStartLineNumber,visibleEndLineNumber,activeCursorPosition,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===true?HorizontalGuidesState.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?HorizontalGuidesState.EnabledForActive:HorizontalGuidesState.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===true}):null;const indentGuides=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(visibleStartLineNumber,visibleEndLineNumber):null;let activeIndentStartLineNumber=0;let activeIndentEndLineNumber=0;let activeIndentLevel=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==false&&activeCursorPosition){const activeIndentInfo=this._context.viewModel.getActiveIndentGuide(activeCursorPosition.lineNumber,visibleStartLineNumber,visibleEndLineNumber);activeIndentStartLineNumber=activeIndentInfo.startLineNumber;activeIndentEndLineNumber=activeIndentInfo.endLineNumber;activeIndentLevel=activeIndentInfo.indent}const{indentSize:indentSize}=this._context.viewModel.model.getOptions();const result=[];for(let lineNumber=visibleStartLineNumber;lineNumber<=visibleEndLineNumber;lineNumber++){const lineGuides=new Array;result.push(lineGuides);const bracketGuidesInLine=bracketGuides?bracketGuides[lineNumber-visibleStartLineNumber]:[];const bracketGuidesInLineQueue=new ArrayQueue(bracketGuidesInLine);const indentGuidesInLine=indentGuides?indentGuides[lineNumber-visibleStartLineNumber]:0;for(let indentLvl=1;indentLvl<=indentGuidesInLine;indentLvl++){const indentGuide=(indentLvl-1)*indentSize+1;const isActive=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||bracketGuidesInLine.length===0)&&activeIndentStartLineNumber<=lineNumber&&lineNumber<=activeIndentEndLineNumber&&indentLvl===activeIndentLevel;lineGuides.push(...bracketGuidesInLineQueue.takeWhile((g=>g.visibleColumntrue))||[])}return result}render(startLineNumber,lineNumber){if(!this._renderResult){return""}const lineIndex=lineNumber-startLineNumber;if(lineIndex<0||lineIndex>=this._renderResult.length){return""}return this._renderResult[lineIndex]}};registerThemingParticipant(((theme,collector)=>{const colors=[{bracketColor:editorBracketHighlightingForeground1,guideColor:editorBracketPairGuideBackground1,guideColorActive:editorBracketPairGuideActiveBackground1},{bracketColor:editorBracketHighlightingForeground2,guideColor:editorBracketPairGuideBackground2,guideColorActive:editorBracketPairGuideActiveBackground2},{bracketColor:editorBracketHighlightingForeground3,guideColor:editorBracketPairGuideBackground3,guideColorActive:editorBracketPairGuideActiveBackground3},{bracketColor:editorBracketHighlightingForeground4,guideColor:editorBracketPairGuideBackground4,guideColorActive:editorBracketPairGuideActiveBackground4},{bracketColor:editorBracketHighlightingForeground5,guideColor:editorBracketPairGuideBackground5,guideColorActive:editorBracketPairGuideActiveBackground5},{bracketColor:editorBracketHighlightingForeground6,guideColor:editorBracketPairGuideBackground6,guideColorActive:editorBracketPairGuideActiveBackground6}];const colorProvider=new BracketPairGuidesClassNames;const indentColors=[{indentColor:editorIndentGuide1,indentColorActive:editorActiveIndentGuide1},{indentColor:editorIndentGuide2,indentColorActive:editorActiveIndentGuide2},{indentColor:editorIndentGuide3,indentColorActive:editorActiveIndentGuide3},{indentColor:editorIndentGuide4,indentColorActive:editorActiveIndentGuide4},{indentColor:editorIndentGuide5,indentColorActive:editorActiveIndentGuide5},{indentColor:editorIndentGuide6,indentColorActive:editorActiveIndentGuide6}];const colorValues=colors.map((c=>{var _a6,_b3;const bracketColor=theme.getColor(c.bracketColor);const guideColor=theme.getColor(c.guideColor);const guideColorActive=theme.getColor(c.guideColorActive);const effectiveGuideColor=transparentToUndefined((_a6=transparentToUndefined(guideColor))!==null&&_a6!==void 0?_a6:bracketColor===null||bracketColor===void 0?void 0:bracketColor.transparent(.3));const effectiveGuideColorActive=transparentToUndefined((_b3=transparentToUndefined(guideColorActive))!==null&&_b3!==void 0?_b3:bracketColor);if(!effectiveGuideColor||!effectiveGuideColorActive){return void 0}return{guideColor:effectiveGuideColor,guideColorActive:effectiveGuideColorActive}})).filter(isDefined);const indentColorValues=indentColors.map((c=>{const indentColor=theme.getColor(c.indentColor);const indentColorActive=theme.getColor(c.indentColorActive);const effectiveIndentColor=transparentToUndefined(indentColor);const effectiveIndentColorActive=transparentToUndefined(indentColorActive);if(!effectiveIndentColor||!effectiveIndentColorActive){return void 0}return{indentColor:effectiveIndentColor,indentColorActive:effectiveIndentColorActive}})).filter(isDefined);if(colorValues.length>0){for(let level=0;level<30;level++){const colors2=colorValues[level%colorValues.length];collector.addRule(`.monaco-editor .${colorProvider.getInlineClassNameOfLevel(level).replace(/ /g,".")} { --guide-color: ${colors2.guideColor}; --guide-color-active: ${colors2.guideColorActive}; }`)}collector.addRule(`.monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }`);collector.addRule(`.monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }`);collector.addRule(`.monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }`);collector.addRule(`.monaco-editor .vertical.${colorProvider.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`);collector.addRule(`.monaco-editor .horizontal-top.${colorProvider.activeClassName} { border-top: 1px solid var(--guide-color-active); }`);collector.addRule(`.monaco-editor .horizontal-bottom.${colorProvider.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(indentColorValues.length>0){for(let level=0;level<30;level++){const colors2=indentColorValues[level%indentColorValues.length];collector.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${level} { --indent-color: ${colors2.indentColor}; --indent-color-active: ${colors2.indentColorActive}; }`)}collector.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }`);collector.addRule(`.monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }`)}}))}});var init_12=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css"(){}});var DomReadingContext;var init_domReadingContext=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/domReadingContext.js"(){DomReadingContext=class{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=true;const rect=this._domNode.getBoundingClientRect();this.markDidDomLayout();this._clientRectDeltaLeft=rect.left;this._clientRectScale=rect.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){if(!this._clientRectRead){this.readClientRect()}return this._clientRectDeltaLeft}get clientRectScale(){if(!this._clientRectRead){this.readClientRect()}return this._clientRectScale}constructor(_domNode,endNode){this._domNode=_domNode;this.endNode=endNode;this._didDomLayout=false;this._clientRectDeltaLeft=0;this._clientRectScale=1;this._clientRectRead=false}markDidDomLayout(){this._didDomLayout=true}}}});var LastRenderedData,HorizontalRevealRangeRequest,HorizontalRevealSelectionsRequest,ViewLines;var init_viewLines=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.js"(){init_mouseCursor();init_async();init_platform();init_12();init_domFontInfo();init_renderingContext();init_viewLayer();init_viewPart();init_domReadingContext();init_viewLine();init_position();init_range();LastRenderedData=class{constructor(){this._currentVisibleRange=new Range(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(currentVisibleRange){this._currentVisibleRange=currentVisibleRange}};HorizontalRevealRangeRequest=class{constructor(minimalReveal,lineNumber,startColumn,endColumn,startScrollTop,stopScrollTop,scrollType){this.minimalReveal=minimalReveal;this.lineNumber=lineNumber;this.startColumn=startColumn;this.endColumn=endColumn;this.startScrollTop=startScrollTop;this.stopScrollTop=stopScrollTop;this.scrollType=scrollType;this.type="range";this.minLineNumber=lineNumber;this.maxLineNumber=lineNumber}};HorizontalRevealSelectionsRequest=class{constructor(minimalReveal,selections,startScrollTop,stopScrollTop,scrollType){this.minimalReveal=minimalReveal;this.selections=selections;this.startScrollTop=startScrollTop;this.stopScrollTop=stopScrollTop;this.scrollType=scrollType;this.type="selections";let minLineNumber=selections[0].startLineNumber;let maxLineNumber=selections[0].endLineNumber;for(let i=1,len=selections.length;i{this._updateLineWidthsSlow()}),200);this._asyncCheckMonospaceFontAssumptions=new RunOnceScheduler((()=>{this._checkMonospaceFontAssumptions()}),2e3);this._lastRenderedData=new LastRenderedData;this._horizontalRevealRequest=null;this._stickyScrollEnabled=options2.get(113).enabled;this._maxNumberStickyLines=options2.get(113).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose();this._asyncCheckMonospaceFontAssumptions.dispose();super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new ViewLine(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);if(e.hasChanged(143)){this._maxLineWidth=0}const options2=this._context.configuration.options;const fontInfo=options2.get(49);const wrappingInfo=options2.get(143);this._lineHeight=options2.get(65);this._typicalHalfwidthCharacterWidth=fontInfo.typicalHalfwidthCharacterWidth;this._isViewportWrapping=wrappingInfo.isViewportWrapping;this._revealHorizontalRightPadding=options2.get(98);this._cursorSurroundingLines=options2.get(28);this._cursorSurroundingLinesStyle=options2.get(29);this._canUseLayerHinting=!options2.get(31);this._stickyScrollEnabled=options2.get(113).enabled;this._maxNumberStickyLines=options2.get(113).maxLineCount;applyFontInfo(this.domNode,fontInfo);this._onOptionsMaybeChanged();if(e.hasChanged(142)){this._maxLineWidth=0}return true}_onOptionsMaybeChanged(){const conf80=this._context.configuration;const newViewLineOptions=new ViewLineOptions(conf80,this._context.theme.type);if(!this._viewLineOptions.equals(newViewLineOptions)){this._viewLineOptions=newViewLineOptions;const startLineNumber=this._visibleLines.getStartLineNumber();const endLineNumber=this._visibleLines.getEndLineNumber();for(let lineNumber=startLineNumber;lineNumber<=endLineNumber;lineNumber++){const line=this._visibleLines.getVisibleLine(lineNumber);line.onOptionsChanged(this._viewLineOptions)}return true}return false}onCursorStateChanged(e){const rendStartLineNumber=this._visibleLines.getStartLineNumber();const rendEndLineNumber=this._visibleLines.getEndLineNumber();let r=false;for(let lineNumber=rendStartLineNumber;lineNumber<=rendEndLineNumber;lineNumber++){r=this._visibleLines.getVisibleLine(lineNumber).onSelectionChanged()||r}return r}onDecorationsChanged(e){if(true){const rendStartLineNumber=this._visibleLines.getStartLineNumber();const rendEndLineNumber=this._visibleLines.getEndLineNumber();for(let lineNumber=rendStartLineNumber;lineNumber<=rendEndLineNumber;lineNumber++){this._visibleLines.getVisibleLine(lineNumber).onDecorationsChanged()}}return true}onFlushed(e){const shouldRender=this._visibleLines.onFlushed(e);this._maxLineWidth=0;return shouldRender}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const desiredScrollTop=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(desiredScrollTop===-1){return false}let newScrollPosition=this._context.viewLayout.validateScrollPosition({scrollTop:desiredScrollTop});if(e.revealHorizontal){if(e.range&&e.range.startLineNumber!==e.range.endLineNumber){newScrollPosition={scrollTop:newScrollPosition.scrollTop,scrollLeft:0}}else if(e.range){this._horizontalRevealRequest=new HorizontalRevealRangeRequest(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),newScrollPosition.scrollTop,e.scrollType)}else if(e.selections&&e.selections.length>0){this._horizontalRevealRequest=new HorizontalRevealSelectionsRequest(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),newScrollPosition.scrollTop,e.scrollType)}}else{this._horizontalRevealRequest=null}const scrollTopDelta=Math.abs(this._context.viewLayout.getCurrentScrollTop()-newScrollPosition.scrollTop);const scrollType=scrollTopDelta<=this._lineHeight?1:e.scrollType;this._context.viewModel.viewLayout.setScrollPosition(newScrollPosition,scrollType);return true}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged){this._horizontalRevealRequest=null}if(this._horizontalRevealRequest&&e.scrollTopChanged){const min=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);const max=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);if(e.scrollTopmax){this._horizontalRevealRequest=null}}this.domNode.setWidth(e.scrollWidth);return this._visibleLines.onScrollChanged(e)||true}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth);return this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(spanNode,offset){const viewLineDomNode=this._getViewLineDomNode(spanNode);if(viewLineDomNode===null){return null}const lineNumber=this._getLineNumberFor(viewLineDomNode);if(lineNumber===-1){return null}if(lineNumber<1||lineNumber>this._context.viewModel.getLineCount()){return null}if(this._context.viewModel.getLineMaxColumn(lineNumber)===1){return new Position(lineNumber,1)}const rendStartLineNumber=this._visibleLines.getStartLineNumber();const rendEndLineNumber=this._visibleLines.getEndLineNumber();if(lineNumberrendEndLineNumber){return null}let column=this._visibleLines.getVisibleLine(lineNumber).getColumnOfNodeOffset(spanNode,offset);const minColumn=this._context.viewModel.getLineMinColumn(lineNumber);if(columnrendEndLineNumber){return-1}const context=new DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);const result=this._visibleLines.getVisibleLine(lineNumber).getWidth(context);this._updateLineWidthsSlowIfDomDidLayout(context);return result}linesVisibleRangesForRange(_range,includeNewLines){if(this.shouldRender()){return null}const originalEndLineNumber=_range.endLineNumber;const range2=Range.intersectRanges(_range,this._lastRenderedData.getCurrentVisibleRange());if(!range2){return null}const visibleRanges=[];let visibleRangesLen=0;const domReadingContext=new DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let nextLineModelLineNumber=0;if(includeNewLines){nextLineModelLineNumber=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Position(range2.startLineNumber,1)).lineNumber}const rendStartLineNumber=this._visibleLines.getStartLineNumber();const rendEndLineNumber=this._visibleLines.getEndLineNumber();for(let lineNumber=range2.startLineNumber;lineNumber<=range2.endLineNumber;lineNumber++){if(lineNumberrendEndLineNumber){continue}const startColumn=lineNumber===range2.startLineNumber?range2.startColumn:1;const continuesInNextLine=lineNumber!==range2.endLineNumber;const endColumn=continuesInNextLine?this._context.viewModel.getLineMaxColumn(lineNumber):range2.endColumn;const visibleRangesForLine=this._visibleLines.getVisibleLine(lineNumber).getVisibleRangesForRange(lineNumber,startColumn,endColumn,domReadingContext);if(!visibleRangesForLine){continue}if(includeNewLines&&lineNumberthis._visibleLines.getEndLineNumber()){return null}const domReadingContext=new DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);const result=this._visibleLines.getVisibleLine(lineNumber).getVisibleRangesForRange(lineNumber,startColumn,endColumn,domReadingContext);this._updateLineWidthsSlowIfDomDidLayout(domReadingContext);return result}visibleRangeForPosition(position){const visibleRanges=this._visibleRangesForLineRange(position.lineNumber,position.column,position.column);if(!visibleRanges){return null}return new HorizontalPosition(visibleRanges.outsideRenderedLine,visibleRanges.ranges[0].left)}_updateLineWidthsFast(){return this._updateLineWidths(true)}_updateLineWidthsSlow(){this._updateLineWidths(false)}_updateLineWidthsSlowIfDomDidLayout(domReadingContext){if(!domReadingContext.didDomLayout){return}if(this._asyncUpdateLineWidths.isScheduled()){return}this._asyncUpdateLineWidths.cancel();this._updateLineWidthsSlow()}_updateLineWidths(fast){const rendStartLineNumber=this._visibleLines.getStartLineNumber();const rendEndLineNumber=this._visibleLines.getEndLineNumber();let localMaxLineWidth=1;let allWidthsComputed=true;for(let lineNumber=rendStartLineNumber;lineNumber<=rendEndLineNumber;lineNumber++){const visibleLine=this._visibleLines.getVisibleLine(lineNumber);if(fast&&!visibleLine.getWidthIsFast()){allWidthsComputed=false;continue}localMaxLineWidth=Math.max(localMaxLineWidth,visibleLine.getWidth(null))}if(allWidthsComputed&&rendStartLineNumber===1&&rendEndLineNumber===this._context.viewModel.getLineCount()){this._maxLineWidth=0}this._ensureMaxLineWidth(localMaxLineWidth);return allWidthsComputed}_checkMonospaceFontAssumptions(){let longestLineNumber=-1;let longestWidth=-1;const rendStartLineNumber=this._visibleLines.getStartLineNumber();const rendEndLineNumber=this._visibleLines.getEndLineNumber();for(let lineNumber=rendStartLineNumber;lineNumber<=rendEndLineNumber;lineNumber++){const visibleLine=this._visibleLines.getVisibleLine(lineNumber);if(visibleLine.needsMonospaceFontCheck()){const lineWidth=visibleLine.getWidth(null);if(lineWidth>longestWidth){longestWidth=lineWidth;longestLineNumber=lineNumber}}}if(longestLineNumber===-1){return}if(!this._visibleLines.getVisibleLine(longestLineNumber).monospaceAssumptionsAreValid()){for(let lineNumber=rendStartLineNumber;lineNumber<=rendEndLineNumber;lineNumber++){const visibleLine=this._visibleLines.getVisibleLine(lineNumber);visibleLine.onMonospaceAssumptionsInvalidated()}}}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(viewportData){this._visibleLines.renderLines(viewportData);this._lastRenderedData.setCurrentVisibleRange(viewportData.visibleRange);this.domNode.setWidth(this._context.viewLayout.getScrollWidth());this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6));if(this._horizontalRevealRequest){const horizontalRevealRequest=this._horizontalRevealRequest;if(viewportData.startLineNumber<=horizontalRevealRequest.minLineNumber&&horizontalRevealRequest.maxLineNumber<=viewportData.endLineNumber){this._horizontalRevealRequest=null;this.onDidRender();const newScrollLeft=this._computeScrollLeftToReveal(horizontalRevealRequest);if(newScrollLeft){if(!this._isViewportWrapping){this._ensureMaxLineWidth(newScrollLeft.maxHorizontalOffset)}this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:newScrollLeft.scrollLeft},horizontalRevealRequest.scrollType)}}}if(!this._updateLineWidthsFast()){this._asyncUpdateLineWidths.schedule()}else{this._asyncUpdateLineWidths.cancel()}if(isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const rendStartLineNumber=this._visibleLines.getStartLineNumber();const rendEndLineNumber=this._visibleLines.getEndLineNumber();for(let lineNumber=rendStartLineNumber;lineNumber<=rendEndLineNumber;lineNumber++){const visibleLine=this._visibleLines.getVisibleLine(lineNumber);if(visibleLine.needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}}this._linesContent.setLayerHinting(this._canUseLayerHinting);this._linesContent.setContain("strict");const adjustedScrollTop=this._context.viewLayout.getCurrentScrollTop()-viewportData.bigNumbersDelta;this._linesContent.setTop(-adjustedScrollTop);this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(lineWidth){const iLineWidth=Math.ceil(lineWidth);if(this._maxLineWidth0){let minLineNumber=selections[0].startLineNumber;let maxLineNumber=selections[0].endLineNumber;for(let i=1,len=selections.length;iviewportHeight){if(!boxIsSingleRange){return-1}newScrollTop=boxStartY}else if(verticalType===5||verticalType===6){if(verticalType===6&&viewportStartY<=boxStartY&&boxEndY<=viewportEndY){newScrollTop=viewportStartY}else{const desiredGapAbove=Math.max(5*this._lineHeight,viewportHeight*.2);const desiredScrollTop=boxStartY-desiredGapAbove;const minScrollTop=boxEndY-viewportHeight;newScrollTop=Math.max(minScrollTop,desiredScrollTop)}}else if(verticalType===1||verticalType===2){if(verticalType===2&&viewportStartY<=boxStartY&&boxEndY<=viewportEndY){newScrollTop=viewportStartY}else{const boxMiddleY=(boxStartY+boxEndY)/2;newScrollTop=Math.max(0,boxMiddleY-viewportHeight/2)}}else{newScrollTop=this._computeMinimumScrolling(viewportStartY,viewportEndY,boxStartY,boxEndY,verticalType===3,verticalType===4)}return newScrollTop}_computeScrollLeftToReveal(horizontalRevealRequest){const viewport=this._context.viewLayout.getCurrentViewport();const layoutInfo=this._context.configuration.options.get(142);const viewportStartX=viewport.left;const viewportEndX=viewportStartX+viewport.width-layoutInfo.verticalScrollbarWidth;let boxStartX=1073741824;let boxEndX=0;if(horizontalRevealRequest.type==="range"){const visibleRanges=this._visibleRangesForLineRange(horizontalRevealRequest.lineNumber,horizontalRevealRequest.startColumn,horizontalRevealRequest.endColumn);if(!visibleRanges){return null}for(const visibleRange of visibleRanges.ranges){boxStartX=Math.min(boxStartX,Math.round(visibleRange.left));boxEndX=Math.max(boxEndX,Math.round(visibleRange.left+visibleRange.width))}}else{for(const selection of horizontalRevealRequest.selections){if(selection.startLineNumber!==selection.endLineNumber){return null}const visibleRanges=this._visibleRangesForLineRange(selection.startLineNumber,selection.startColumn,selection.endColumn);if(!visibleRanges){return null}for(const visibleRange of visibleRanges.ranges){boxStartX=Math.min(boxStartX,Math.round(visibleRange.left));boxEndX=Math.max(boxEndX,Math.round(visibleRange.left+visibleRange.width))}}}if(!horizontalRevealRequest.minimalReveal){boxStartX=Math.max(0,boxStartX-ViewLines.HORIZONTAL_EXTRA_PX);boxEndX+=this._revealHorizontalRightPadding}if(horizontalRevealRequest.type==="selections"&&boxEndX-boxStartX>viewport.width){return null}const newScrollLeft=this._computeMinimumScrolling(viewportStartX,viewportEndX,boxStartX,boxEndX);return{scrollLeft:newScrollLeft,maxHorizontalOffset:boxEndX}}_computeMinimumScrolling(viewportStart,viewportEnd,boxStart,boxEnd,revealAtStart,revealAtEnd){viewportStart=viewportStart|0;viewportEnd=viewportEnd|0;boxStart=boxStart|0;boxEnd=boxEnd|0;revealAtStart=!!revealAtStart;revealAtEnd=!!revealAtEnd;const viewportLength=viewportEnd-viewportStart;const boxLength=boxEnd-boxStart;if(boxLengthviewportEnd){return Math.max(0,boxEnd-viewportLength)}}else{return boxStart}return viewportStart}};ViewLines.HORIZONTAL_EXTRA_PX=30}});var init_13=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css"(){}});var init_14=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css"(){}});var DecorationToRender,LineDecorationToRender,VisibleLineDecorationsToRender,DedupOverlay,GlyphMarginWidgets,DecorationBasedGlyphRenderRequest,WidgetBasedGlyphRenderRequest,DecorationBasedGlyph;var init_glyphMargin=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js"(){init_fastDomNode();init_arrays();init_14();init_dynamicViewOverlay();init_viewPart();init_range();DecorationToRender=class{constructor(startLineNumber,endLineNumber,className,zIndex){this._decorationToRenderBrand=void 0;this.startLineNumber=+startLineNumber;this.endLineNumber=+endLineNumber;this.className=String(className);this.zIndex=zIndex!==null&&zIndex!==void 0?zIndex:0}};LineDecorationToRender=class{constructor(className,zIndex){this.className=className;this.zIndex=zIndex}};VisibleLineDecorationsToRender=class{constructor(){this.decorations=[]}add(decoration2){this.decorations.push(decoration2)}getDecorations(){return this.decorations}};DedupOverlay=class extends DynamicViewOverlay{_render(visibleStartLineNumber,visibleEndLineNumber,decorations){const output=[];for(let lineNumber=visibleStartLineNumber;lineNumber<=visibleEndLineNumber;lineNumber++){const lineIndex=lineNumber-visibleStartLineNumber;output[lineIndex]=new VisibleLineDecorationsToRender}if(decorations.length===0){return output}decorations.sort(((a,b)=>{if(a.className===b.className){if(a.startLineNumber===b.startLineNumber){return a.endLineNumber-b.endLineNumber}return a.startLineNumber-b.startLineNumber}return a.classNamevisibleEndLineNumber){continue}const widgetLineNumber=Math.max(range2.startLineNumber,visibleStartLineNumber);const lane=Math.min(widget.preference.lane,this._glyphMarginDecorationLaneCount);requests.push(new WidgetBasedGlyphRenderRequest(widgetLineNumber,lane,widget.preference.zIndex,widget))}}_collectSortedGlyphRenderRequests(ctx){const requests=[];this._collectDecorationBasedGlyphRenderRequest(ctx,requests);this._collectWidgetBasedGlyphRenderRequest(ctx,requests);requests.sort(((a,b)=>{if(a.lineNumber===b.lineNumber){if(a.lane===b.lane){if(a.zIndex===b.zIndex){if(b.type===a.type){if(a.type===0&&b.type===0){return a.className0){const first2=requests.peek();if(!first2){break}const requestsAtLocation=requests.takeWhile((el=>el.lineNumber===first2.lineNumber&&el.lane===first2.lane));if(!requestsAtLocation||requestsAtLocation.length===0){break}const winner=requestsAtLocation[0];if(winner.type===0){const classNames=[];for(const request of requestsAtLocation){if(request.zIndex!==winner.zIndex||request.type!==winner.type){break}if(classNames.length===0||classNames[classNames.length-1]!==request.className){classNames.push(request.className)}}decorationGlyphsToRender.push(winner.accept(classNames.join(" ")))}else{winner.widget.renderInfo={lineNumber:winner.lineNumber,lane:winner.lane}}}this._decorationGlyphsToRender=decorationGlyphsToRender}render(ctx){if(!this._glyphMargin){for(const widget of Object.values(this._widgets)){widget.domNode.setDisplay("none")}while(this._managedDomNodes.length>0){const domNode=this._managedDomNodes.pop();domNode===null||domNode===void 0?void 0:domNode.domNode.remove()}return}const width=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const widget of Object.values(this._widgets)){if(!widget.renderInfo){widget.domNode.setDisplay("none")}else{const top=ctx.viewportData.relativeVerticalOffset[widget.renderInfo.lineNumber-ctx.viewportData.startLineNumber];const left=this._glyphMarginLeft+(widget.renderInfo.lane-1)*this._lineHeight;widget.domNode.setDisplay("block");widget.domNode.setTop(top);widget.domNode.setLeft(left);widget.domNode.setWidth(width);widget.domNode.setHeight(this._lineHeight)}}for(let i=0;ithis._decorationGlyphsToRender.length){const domNode=this._managedDomNodes.pop();domNode===null||domNode===void 0?void 0:domNode.domNode.remove()}}};DecorationBasedGlyphRenderRequest=class{constructor(lineNumber,lane,zIndex,className){this.lineNumber=lineNumber;this.lane=lane;this.zIndex=zIndex;this.className=className;this.type=0}accept(combinedClassName){return new DecorationBasedGlyph(this.lineNumber,this.lane,combinedClassName)}};WidgetBasedGlyphRenderRequest=class{constructor(lineNumber,lane,zIndex,widget){this.lineNumber=lineNumber;this.lane=lane;this.zIndex=zIndex;this.widget=widget;this.type=1}};DecorationBasedGlyph=class{constructor(lineNumber,lane,combinedClassName){this.lineNumber=lineNumber;this.lane=lane;this.combinedClassName=combinedClassName}}}});var LinesDecorationsOverlay;var init_linesDecorations=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js"(){init_13();init_glyphMargin();LinesDecorationsOverlay=class extends DedupOverlay{constructor(context){super();this._context=context;const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._decorationsLeft=layoutInfo.decorationsLeft;this._decorationsWidth=layoutInfo.decorationsWidth;this._renderResult=null;this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this);this._renderResult=null;super.dispose()}onConfigurationChanged(e){const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._decorationsLeft=layoutInfo.decorationsLeft;this._decorationsWidth=layoutInfo.decorationsWidth;return true}onDecorationsChanged(e){return true}onFlushed(e){return true}onLinesChanged(e){return true}onLinesDeleted(e){return true}onLinesInserted(e){return true}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return true}_getDecorations(ctx){const decorations=ctx.getDecorationsInViewport();const r=[];let rLen=0;for(let i=0,len=decorations.length;i';const output=[];for(let lineNumber=visibleStartLineNumber;lineNumber<=visibleEndLineNumber;lineNumber++){const lineIndex=lineNumber-visibleStartLineNumber;const decorations=toRender[lineIndex].getDecorations();let lineOutput="";for(const decoration2 of decorations){lineOutput+='
    '}output[lineIndex]=lineOutput}this._renderResult=output}render(startLineNumber,lineNumber){if(!this._renderResult){return""}return this._renderResult[lineNumber-startLineNumber]}}}});var init_16=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css"(){}});var RGBA8;var init_rgba=__esm({"node_modules/monaco-editor/esm/vs/editor/common/core/rgba.js"(){RGBA8=class{constructor(r,g,b,a){this._rgba8Brand=void 0;this.r=RGBA8._clamp(r);this.g=RGBA8._clamp(g);this.b=RGBA8._clamp(b);this.a=RGBA8._clamp(a)}equals(other){return this.r===other.r&&this.g===other.g&&this.b===other.b&&this.a===other.a}static _clamp(c){if(c<0){return 0}if(c>255){return 255}return c|0}};RGBA8.Empty=new RGBA8(0,0,0,0)}});var MinimapTokensColorTracker;var init_minimapTokensColorTracker=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewModel/minimapTokensColorTracker.js"(){init_event();init_lifecycle();init_rgba();init_languages();MinimapTokensColorTracker=class extends Disposable{static getInstance(){if(!this._INSTANCE){this._INSTANCE=markAsSingleton(new MinimapTokensColorTracker)}return this._INSTANCE}constructor(){super();this._onDidChange=new Emitter;this.onDidChange=this._onDidChange.event;this._updateColorMap();this._register(TokenizationRegistry2.onDidChange((e=>{if(e.changedColorMap){this._updateColorMap()}})))}_updateColorMap(){const colorMap=TokenizationRegistry2.getColorMap();if(!colorMap){this._colors=[RGBA8.Empty];this._backgroundIsLight=true;return}this._colors=[RGBA8.Empty];for(let colorId=1;colorId=.5;this._onDidChange.fire(void 0)}getColor(colorId){if(colorId<1||colorId>=this._colors.length){colorId=2}return this._colors[colorId]}backgroundIsLight(){return this._backgroundIsLight}};MinimapTokensColorTracker._INSTANCE=null}});var allCharCodes,getCharIndex;var init_minimapCharSheet=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharSheet.js"(){allCharCodes=(()=>{const v=[];for(let i=32;i<=126;i++){v.push(i)}v.push(65533);return v})();getCharIndex=(chCode,fontScale)=>{chCode-=32;if(chCode<0||chCode>96){if(fontScale<=2){return(chCode+96)%96}return 96-1}return chCode}}});var MinimapCharRenderer;var init_minimapCharRenderer=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRenderer.js"(){init_minimapCharSheet();init_uint();MinimapCharRenderer=class{constructor(charData,scale){this.scale=scale;this._minimapCharRendererBrand=void 0;this.charDataNormal=MinimapCharRenderer.soften(charData,12/15);this.charDataLight=MinimapCharRenderer.soften(charData,50/60)}static soften(input,ratio){const result=new Uint8ClampedArray(input.length);for(let i=0,len=input.length;itarget.width||dy+renderHeight>target.height){console.warn("bad render request outside image data");return}const charData=useLighterFont?this.charDataLight:this.charDataNormal;const charIndex=getCharIndex(chCode,fontScale);const destWidth=target.width*4;const backgroundR=backgroundColor.r;const backgroundG=backgroundColor.g;const backgroundB=backgroundColor.b;const deltaR=color.r-backgroundR;const deltaG=color.g-backgroundG;const deltaB=color.b-backgroundB;const destAlpha=Math.max(foregroundAlpha,backgroundAlpha);const dest=target.data;let sourceOffset=charIndex*charWidth*charHeight;let row=dy*destWidth+dx*4;for(let y=0;ytarget.width||dy+renderHeight>target.height){console.warn("bad render request outside image data");return}const destWidth=target.width*4;const c=.5*(foregroundAlpha/255);const backgroundR=backgroundColor.r;const backgroundG=backgroundColor.g;const backgroundB=backgroundColor.b;const deltaR=color.r-backgroundR;const deltaG=color.g-backgroundG;const deltaB=color.b-backgroundB;const colorR=backgroundR+deltaR*c;const colorG=backgroundG+deltaG*c;const colorB=backgroundB+deltaB*c;const destAlpha=Math.max(foregroundAlpha,backgroundAlpha);const dest=target.data;let row=dy*destWidth+dx*4;for(let y=0;y{const output=new Uint8ClampedArray(str.length/2);for(let i=0;i>1]=charTable[str[i]]<<4|charTable[str[i+1]]&15}return output};prebakedMiniMaps={1:once((()=>decodeData("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:once((()=>decodeData("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))}}});var MinimapCharRendererFactory;var init_minimapCharRendererFactory=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharRendererFactory.js"(){init_minimapCharRenderer();init_minimapCharSheet();init_minimapPreBaked();init_uint();MinimapCharRendererFactory=class{static create(scale,fontFamily){if(this.lastCreated&&scale===this.lastCreated.scale&&fontFamily===this.lastFontFamily){return this.lastCreated}let factory;if(prebakedMiniMaps[scale]){factory=new MinimapCharRenderer(prebakedMiniMaps[scale](),scale)}else{factory=MinimapCharRendererFactory.createFromSampleData(MinimapCharRendererFactory.createSampleData(fontFamily).data,scale)}this.lastFontFamily=fontFamily;this.lastCreated=factory;return factory}static createSampleData(fontFamily){const canvas=document.createElement("canvas");const ctx=canvas.getContext("2d");canvas.style.height=`${16}px`;canvas.height=16;canvas.width=96*10;canvas.style.width=96*10+"px";ctx.fillStyle="#ffffff";ctx.font=`bold ${16}px ${fontFamily}`;ctx.textBaseline="middle";let x=0;for(const code of allCharCodes){ctx.fillText(String.fromCharCode(code),x,16/2);x+=10}return ctx.getImageData(0,0,96*10,16)}static createFromSampleData(source,scale){const expectedLength=16*10*4*96;if(source.length!==expectedLength){throw new Error("Unexpected source in MinimapCharRenderer")}const charData=MinimapCharRendererFactory._downsample(source,scale);return new MinimapCharRenderer(charData,scale)}static _downsampleChar(source,sourceOffset,dest,destOffset,scale){const width=1*scale;const height=2*scale;let targetIndex=destOffset;let brightest=0;for(let y=0;y0){const adjust=255/brightest;for(let i=0;iMinimapCharRendererFactory.create(this.fontScale,fontInfo.fontFamily)));this.defaultBackgroundColor=tokensColorTracker.getColor(2);this.backgroundColor=MinimapOptions._getMinimapBackground(theme,this.defaultBackgroundColor);this.foregroundAlpha=MinimapOptions._getMinimapForegroundOpacity(theme)}static _getMinimapBackground(theme,defaultBackgroundColor){const themeColor=theme.getColor(minimapBackground);if(themeColor){return new RGBA8(themeColor.rgba.r,themeColor.rgba.g,themeColor.rgba.b,Math.round(255*themeColor.rgba.a))}return defaultBackgroundColor}static _getMinimapForegroundOpacity(theme){const themeColor=theme.getColor(minimapForegroundOpacity);if(themeColor){return RGBA8._clamp(Math.round(255*themeColor.rgba.a))}return 255}equals(other){return this.renderMinimap===other.renderMinimap&&this.size===other.size&&this.minimapHeightIsEditorHeight===other.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===other.scrollBeyondLastLine&&this.paddingTop===other.paddingTop&&this.paddingBottom===other.paddingBottom&&this.showSlider===other.showSlider&&this.autohide===other.autohide&&this.pixelRatio===other.pixelRatio&&this.typicalHalfwidthCharacterWidth===other.typicalHalfwidthCharacterWidth&&this.lineHeight===other.lineHeight&&this.minimapLeft===other.minimapLeft&&this.minimapWidth===other.minimapWidth&&this.minimapHeight===other.minimapHeight&&this.canvasInnerWidth===other.canvasInnerWidth&&this.canvasInnerHeight===other.canvasInnerHeight&&this.canvasOuterWidth===other.canvasOuterWidth&&this.canvasOuterHeight===other.canvasOuterHeight&&this.isSampling===other.isSampling&&this.editorHeight===other.editorHeight&&this.fontScale===other.fontScale&&this.minimapLineHeight===other.minimapLineHeight&&this.minimapCharWidth===other.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(other.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(other.backgroundColor)&&this.foregroundAlpha===other.foregroundAlpha}};MinimapLayout=class{constructor(scrollTop,scrollHeight,sliderNeeded,_computedSliderRatio,sliderTop,sliderHeight,topPaddingLineCount,startLineNumber,endLineNumber){this.scrollTop=scrollTop;this.scrollHeight=scrollHeight;this.sliderNeeded=sliderNeeded;this._computedSliderRatio=_computedSliderRatio;this.sliderTop=sliderTop;this.sliderHeight=sliderHeight;this.topPaddingLineCount=topPaddingLineCount;this.startLineNumber=startLineNumber;this.endLineNumber=endLineNumber}getDesiredScrollTopFromDelta(delta){return Math.round(this.scrollTop+delta/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(pageY){return Math.round((pageY-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(range2){const startLineNumber=Math.max(this.startLineNumber,range2.startLineNumber);const endLineNumber=Math.min(this.endLineNumber,range2.endLineNumber);if(startLineNumber>endLineNumber){return null}return[startLineNumber,endLineNumber]}getYForLineNumber(lineNumber,minimapLineHeight){return+(lineNumber-this.startLineNumber+this.topPaddingLineCount)*minimapLineHeight}static create(options2,viewportStartLineNumber,viewportEndLineNumber,viewportStartLineNumberVerticalOffset,viewportHeight,viewportContainsWhitespaceGaps,lineCount,realLineCount,scrollTop,scrollHeight,previousLayout){const pixelRatio=options2.pixelRatio;const minimapLineHeight=options2.minimapLineHeight;const minimapLinesFitting=Math.floor(options2.canvasInnerHeight/minimapLineHeight);const lineHeight=options2.lineHeight;if(options2.minimapHeightIsEditorHeight){let logicalScrollHeight=realLineCount*options2.lineHeight+options2.paddingTop+options2.paddingBottom;if(options2.scrollBeyondLastLine){logicalScrollHeight+=Math.max(0,viewportHeight-options2.lineHeight-options2.paddingBottom)}const sliderHeight2=Math.max(1,Math.floor(viewportHeight*viewportHeight/logicalScrollHeight));const maxMinimapSliderTop2=Math.max(0,options2.minimapHeight-sliderHeight2);const computedSliderRatio2=maxMinimapSliderTop2/(scrollHeight-viewportHeight);const sliderTop2=scrollTop*computedSliderRatio2;const sliderNeeded=maxMinimapSliderTop2>0;const maxLinesFitting=Math.floor(options2.canvasInnerHeight/options2.minimapLineHeight);const topPaddingLineCount=Math.floor(options2.paddingTop/options2.lineHeight);return new MinimapLayout(scrollTop,scrollHeight,sliderNeeded,computedSliderRatio2,sliderTop2,sliderHeight2,topPaddingLineCount,1,Math.min(lineCount,maxLinesFitting))}let sliderHeight;if(viewportContainsWhitespaceGaps&&viewportEndLineNumber!==lineCount){const viewportLineCount=viewportEndLineNumber-viewportStartLineNumber+1;sliderHeight=Math.floor(viewportLineCount*minimapLineHeight/pixelRatio)}else{const expectedViewportLineCount=viewportHeight/lineHeight;sliderHeight=Math.floor(expectedViewportLineCount*minimapLineHeight/pixelRatio)}const extraLinesAtTheTop=Math.floor(options2.paddingTop/lineHeight);let extraLinesAtTheBottom=Math.floor(options2.paddingBottom/lineHeight);if(options2.scrollBeyondLastLine){const expectedViewportLineCount=viewportHeight/lineHeight;extraLinesAtTheBottom=Math.max(extraLinesAtTheBottom,expectedViewportLineCount-1)}let maxMinimapSliderTop;if(extraLinesAtTheBottom>0){const expectedViewportLineCount=viewportHeight/lineHeight;maxMinimapSliderTop=(extraLinesAtTheTop+lineCount+extraLinesAtTheBottom-expectedViewportLineCount-1)*minimapLineHeight/pixelRatio}else{maxMinimapSliderTop=Math.max(0,(extraLinesAtTheTop+lineCount)*minimapLineHeight/pixelRatio-sliderHeight)}maxMinimapSliderTop=Math.min(options2.minimapHeight-sliderHeight,maxMinimapSliderTop);const computedSliderRatio=maxMinimapSliderTop/(scrollHeight-viewportHeight);const sliderTop=scrollTop*computedSliderRatio;if(minimapLinesFitting>=extraLinesAtTheTop+lineCount+extraLinesAtTheBottom){const sliderNeeded=maxMinimapSliderTop>0;return new MinimapLayout(scrollTop,scrollHeight,sliderNeeded,computedSliderRatio,sliderTop,sliderHeight,extraLinesAtTheTop,1,lineCount)}else{let consideringStartLineNumber;if(viewportStartLineNumber>1){consideringStartLineNumber=viewportStartLineNumber+extraLinesAtTheTop}else{consideringStartLineNumber=Math.max(1,scrollTop/lineHeight)}let topPaddingLineCount;let startLineNumber=Math.max(1,Math.floor(consideringStartLineNumber-sliderTop*pixelRatio/minimapLineHeight));if(startLineNumberscrollTop){startLineNumber=Math.min(startLineNumber,previousLayout.startLineNumber);topPaddingLineCount=Math.max(topPaddingLineCount,previousLayout.topPaddingLineCount)}if(previousLayout.scrollTop=options2.paddingTop){sliderTopAligned=(viewportStartLineNumber-startLineNumber+topPaddingLineCount+partialLine)*minimapLineHeight/pixelRatio}else{sliderTopAligned=scrollTop/options2.paddingTop*(topPaddingLineCount+partialLine)*minimapLineHeight/pixelRatio}return new MinimapLayout(scrollTop,scrollHeight,true,computedSliderRatio,sliderTopAligned,sliderHeight,topPaddingLineCount,startLineNumber,endLineNumber)}}};MinimapLine=class{constructor(dy){this.dy=dy}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}};MinimapLine.INVALID=new MinimapLine(-1);RenderData=class{constructor(renderedLayout,imageData,lines){this.renderedLayout=renderedLayout;this._imageData=imageData;this._renderedLines=new RenderedLinesCollection((()=>MinimapLine.INVALID));this._renderedLines._set(renderedLayout.startLineNumber,lines)}linesEquals(layout2){if(!this.scrollEquals(layout2)){return false}const tmp=this._renderedLines._get();const lines=tmp.lines;for(let i=0,len=lines.length;i1){for(let i=0,lastIndex=minimapLineCount-1;i0&&this.minimapLines[fromLineIndex-1]>=fromLineNumber){fromLineIndex--}let toLineIndex=this.modelLineToMinimapLine(toLineNumber)-1;while(toLineIndex+1toLineNumber){return null}}return[fromLineIndex+1,toLineIndex+1]}decorationLineRangeToMinimapLineRange(startLineNumber,endLineNumber){let minimapLineStart=this.modelLineToMinimapLine(startLineNumber);let minimapLineEnd=this.modelLineToMinimapLine(endLineNumber);if(startLineNumber!==endLineNumber&&minimapLineEnd===minimapLineStart){if(minimapLineEnd===this.minimapLines.length){if(minimapLineStart>1){minimapLineStart--}}else{minimapLineEnd++}}return[minimapLineStart,minimapLineEnd]}onLinesDeleted(e){const deletedLineCount=e.toLineNumber-e.fromLineNumber+1;let changeStartIndex=this.minimapLines.length;let changeEndIndex=0;for(let i=this.minimapLines.length-1;i>=0;i--){if(this.minimapLines[i]=0;i--){if(this.minimapLines[i]0,scrollWidth:ctx.scrollWidth,scrollHeight:ctx.scrollHeight,viewportStartLineNumber:viewportStartLineNumber,viewportEndLineNumber:viewportEndLineNumber,viewportStartLineNumberVerticalOffset:ctx.getVerticalOffsetForLineNumber(viewportStartLineNumber),scrollTop:ctx.scrollTop,scrollLeft:ctx.scrollLeft,viewportWidth:ctx.viewportWidth,viewportHeight:ctx.viewportHeight};this._actual.render(minimapCtx)}_recreateLineSampling(){this._minimapSelections=null;const wasSampling=Boolean(this._samplingState);const[samplingState,events]=MinimapSamplingState.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);this._samplingState=samplingState;if(wasSampling&&this._samplingState){for(const event of events){switch(event.type){case"deleted":this._actual.onLinesDeleted(event.deleteFromLineNumber,event.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(event.insertFromLineNumber,event.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}}}getLineCount(){if(this._samplingState){return this._samplingState.minimapLines.length}return this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(lineNumber){if(this._samplingState){return this._context.viewModel.getLineContent(this._samplingState.minimapLines[lineNumber-1])}return this._context.viewModel.getLineContent(lineNumber)}getLineMaxColumn(lineNumber){if(this._samplingState){return this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[lineNumber-1])}return this._context.viewModel.getLineMaxColumn(lineNumber)}getMinimapLinesRenderingData(startLineNumber,endLineNumber,needed){if(this._samplingState){const result=[];for(let lineIndex=0,lineCount=endLineNumber-startLineNumber+1;lineIndex{e.preventDefault();const renderMinimap=this._model.options.renderMinimap;if(renderMinimap===0){return}if(!this._lastRenderData){return}if(this._model.options.size!=="proportional"){if(e.button===0&&this._lastRenderData){const position=getDomNodePagePosition(this._slider.domNode);const initialPosY=position.top+position.height/2;this._startSliderDragging(e,initialPosY,this._lastRenderData.renderedLayout)}return}const minimapLineHeight=this._model.options.minimapLineHeight;const internalOffsetY=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.offsetY;const lineIndex=Math.floor(internalOffsetY/minimapLineHeight);let lineNumber=lineIndex+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;lineNumber=Math.min(lineNumber,this._model.getLineCount());this._model.revealLineNumber(lineNumber)}));this._sliderPointerMoveMonitor=new GlobalPointerMoveMonitor;this._sliderPointerDownListener=addStandardDisposableListener(this._slider.domNode,EventType.POINTER_DOWN,(e=>{e.preventDefault();e.stopPropagation();if(e.button===0&&this._lastRenderData){this._startSliderDragging(e,e.pageY,this._lastRenderData.renderedLayout)}}));this._gestureDisposable=Gesture.addTarget(this._domNode.domNode);this._sliderTouchStartListener=addDisposableListener(this._domNode.domNode,EventType2.Start,(e=>{e.preventDefault();e.stopPropagation();if(this._lastRenderData){this._slider.toggleClassName("active",true);this._gestureInProgress=true;this.scrollDueToTouchEvent(e)}}),{passive:false});this._sliderTouchMoveListener=addDisposableListener(this._domNode.domNode,EventType2.Change,(e=>{e.preventDefault();e.stopPropagation();if(this._lastRenderData&&this._gestureInProgress){this.scrollDueToTouchEvent(e)}}),{passive:false});this._sliderTouchEndListener=addStandardDisposableListener(this._domNode.domNode,EventType2.End,(e=>{e.preventDefault();e.stopPropagation();this._gestureInProgress=false;this._slider.toggleClassName("active",false)}))}_startSliderDragging(e,initialPosY,initialSliderState){if(!e.target||!(e.target instanceof Element)){return}const initialPosX=e.pageX;this._slider.toggleClassName("active",true);const handlePointerMove=(posy,posx)=>{const minimapPosition=getDomNodePagePosition(this._domNode.domNode);const pointerOrthogonalDelta=Math.min(Math.abs(posx-initialPosX),Math.abs(posx-minimapPosition.left),Math.abs(posx-minimapPosition.left-minimapPosition.width));if(isWindows&&pointerOrthogonalDelta>POINTER_DRAG_RESET_DISTANCE2){this._model.setScrollTop(initialSliderState.scrollTop);return}const pointerDelta=posy-initialPosY;this._model.setScrollTop(initialSliderState.getDesiredScrollTopFromDelta(pointerDelta))};if(e.pageY!==initialPosY){handlePointerMove(e.pageY,initialPosX)}this._sliderPointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,(pointerMoveData=>handlePointerMove(pointerMoveData.pageY,pointerMoveData.pageX)),(()=>{this._slider.toggleClassName("active",false)}))}scrollDueToTouchEvent(touch){const startY=this._domNode.domNode.getBoundingClientRect().top;const scrollTop=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(touch.pageY-startY);this._model.setScrollTop(scrollTop)}dispose(){this._pointerDownListener.dispose();this._sliderPointerMoveMonitor.dispose();this._sliderPointerDownListener.dispose();this._gestureDisposable.dispose();this._sliderTouchStartListener.dispose();this._sliderTouchMoveListener.dispose();this._sliderTouchEndListener.dispose();super.dispose()}_getMinimapDomNodeClassName(){const class_=["minimap"];if(this._model.options.showSlider==="always"){class_.push("slider-always")}else{class_.push("slider-mouseover")}if(this._model.options.autohide){class_.push("autohide")}return class_.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft);this._domNode.setWidth(this._model.options.minimapWidth);this._domNode.setHeight(this._model.options.minimapHeight);this._shadow.setHeight(this._model.options.minimapHeight);this._canvas.setWidth(this._model.options.canvasOuterWidth);this._canvas.setHeight(this._model.options.canvasOuterHeight);this._canvas.domNode.width=this._model.options.canvasInnerWidth;this._canvas.domNode.height=this._model.options.canvasInnerHeight;this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth);this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight);this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth;this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight;this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){if(!this._buffers){if(this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0){this._buffers=new MinimapBuffers(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)}}return this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null;this._buffers=null;this._applyLayout();this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){this._renderDecorations=true;return true}onDecorationsChanged(){this._renderDecorations=true;return true}onFlushed(){this._lastRenderData=null;return true}onLinesChanged(changeFromLineNumber,changeCount){if(this._lastRenderData){return this._lastRenderData.onLinesChanged(changeFromLineNumber,changeCount)}return false}onLinesDeleted(deleteFromLineNumber,deleteToLineNumber){var _a6;(_a6=this._lastRenderData)===null||_a6===void 0?void 0:_a6.onLinesDeleted(deleteFromLineNumber,deleteToLineNumber);return true}onLinesInserted(insertFromLineNumber,insertToLineNumber){var _a6;(_a6=this._lastRenderData)===null||_a6===void 0?void 0:_a6.onLinesInserted(insertFromLineNumber,insertToLineNumber);return true}onScrollChanged(){this._renderDecorations=true;return true}onThemeChanged(){this._selectionColor=this._theme.getColor(minimapSelection);this._renderDecorations=true;return true}onTokensChanged(ranges){if(this._lastRenderData){return this._lastRenderData.onTokensChanged(ranges)}return false}onTokensColorsChanged(){this._lastRenderData=null;this._buffers=null;return true}onZonesChanged(){this._lastRenderData=null;return true}render(renderingCtx){const renderMinimap=this._model.options.renderMinimap;if(renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden");this._sliderHorizontal.setWidth(0);this._sliderHorizontal.setHeight(0);return}if(renderingCtx.scrollLeft+renderingCtx.viewportWidth>=renderingCtx.scrollWidth){this._shadow.setClassName("minimap-shadow-hidden")}else{this._shadow.setClassName("minimap-shadow-visible")}const layout2=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);this._slider.setDisplay(layout2.sliderNeeded?"block":"none");this._slider.setTop(layout2.sliderTop);this._slider.setHeight(layout2.sliderHeight);this._sliderHorizontal.setLeft(0);this._sliderHorizontal.setWidth(this._model.options.minimapWidth);this._sliderHorizontal.setTop(0);this._sliderHorizontal.setHeight(layout2.sliderHeight);this.renderDecorations(layout2);this._lastRenderData=this.renderLines(layout2)}renderDecorations(layout2){if(this._renderDecorations){this._renderDecorations=false;const selections=this._model.getSelections();selections.sort(Range.compareRangesUsingStarts);const decorations=this._model.getMinimapDecorationsInViewport(layout2.startLineNumber,layout2.endLineNumber);decorations.sort(((a,b)=>(a.options.zIndex||0)-(b.options.zIndex||0)));const{canvasInnerWidth:canvasInnerWidth,canvasInnerHeight:canvasInnerHeight}=this._model.options;const minimapLineHeight=this._model.options.minimapLineHeight;const minimapCharWidth=this._model.options.minimapCharWidth;const tabSize=this._model.getOptions().tabSize;const canvasContext=this._decorationsCanvas.domNode.getContext("2d");canvasContext.clearRect(0,0,canvasInnerWidth,canvasInnerHeight);const highlightedLines=new ContiguousLineMap(layout2.startLineNumber,layout2.endLineNumber,false);this._renderSelectionLineHighlights(canvasContext,selections,highlightedLines,layout2,minimapLineHeight);this._renderDecorationsLineHighlights(canvasContext,decorations,highlightedLines,layout2,minimapLineHeight);const lineOffsetMap=new ContiguousLineMap(layout2.startLineNumber,layout2.endLineNumber,null);this._renderSelectionsHighlights(canvasContext,selections,lineOffsetMap,layout2,minimapLineHeight,tabSize,minimapCharWidth,canvasInnerWidth);this._renderDecorationsHighlights(canvasContext,decorations,lineOffsetMap,layout2,minimapLineHeight,tabSize,minimapCharWidth,canvasInnerWidth)}}_renderSelectionLineHighlights(canvasContext,selections,highlightedLines,layout2,minimapLineHeight){if(!this._selectionColor||this._selectionColor.isTransparent()){return}canvasContext.fillStyle=this._selectionColor.transparent(.5).toString();let y1=0;let y2=0;for(const selection of selections){const intersection=layout2.intersectWithViewport(selection);if(!intersection){continue}const[startLineNumber,endLineNumber]=intersection;for(let line=startLineNumber;line<=endLineNumber;line++){highlightedLines.set(line,true)}const yy1=layout2.getYForLineNumber(startLineNumber,minimapLineHeight);const yy2=layout2.getYForLineNumber(endLineNumber,minimapLineHeight);if(y2>=yy1){y2=yy2}else{if(y2>y1){canvasContext.fillRect(MINIMAP_GUTTER_WIDTH,y1,canvasContext.canvas.width,y2-y1)}y1=yy1;y2=yy2}}if(y2>y1){canvasContext.fillRect(MINIMAP_GUTTER_WIDTH,y1,canvasContext.canvas.width,y2-y1)}}_renderDecorationsLineHighlights(canvasContext,decorations,highlightedLines,layout2,minimapLineHeight){const highlightColors=new Map;for(let i=decorations.length-1;i>=0;i--){const decoration2=decorations[i];const minimapOptions=decoration2.options.minimap;if(!minimapOptions||minimapOptions.position!==MinimapPosition2.Inline){continue}const intersection=layout2.intersectWithViewport(decoration2.range);if(!intersection){continue}const[startLineNumber,endLineNumber]=intersection;const decorationColor=minimapOptions.getColor(this._theme.value);if(!decorationColor||decorationColor.isTransparent()){continue}let highlightColor=highlightColors.get(decorationColor.toString());if(!highlightColor){highlightColor=decorationColor.transparent(.5).toString();highlightColors.set(decorationColor.toString(),highlightColor)}canvasContext.fillStyle=highlightColor;for(let line=startLineNumber;line<=endLineNumber;line++){if(highlightedLines.has(line)){continue}highlightedLines.set(line,true);const y=layout2.getYForLineNumber(startLineNumber,minimapLineHeight);canvasContext.fillRect(MINIMAP_GUTTER_WIDTH,y,canvasContext.canvas.width,minimapLineHeight)}}}_renderSelectionsHighlights(canvasContext,selections,lineOffsetMap,layout2,lineHeight,tabSize,characterWidth,canvasInnerWidth){if(!this._selectionColor||this._selectionColor.isTransparent()){return}for(const selection of selections){const intersection=layout2.intersectWithViewport(selection);if(!intersection){continue}const[startLineNumber,endLineNumber]=intersection;for(let line=startLineNumber;line<=endLineNumber;line++){this.renderDecorationOnLine(canvasContext,lineOffsetMap,selection,this._selectionColor,layout2,line,lineHeight,lineHeight,tabSize,characterWidth,canvasInnerWidth)}}}_renderDecorationsHighlights(canvasContext,decorations,lineOffsetMap,layout2,minimapLineHeight,tabSize,characterWidth,canvasInnerWidth){for(const decoration2 of decorations){const minimapOptions=decoration2.options.minimap;if(!minimapOptions){continue}const intersection=layout2.intersectWithViewport(decoration2.range);if(!intersection){continue}const[startLineNumber,endLineNumber]=intersection;const decorationColor=minimapOptions.getColor(this._theme.value);if(!decorationColor||decorationColor.isTransparent()){continue}for(let line=startLineNumber;line<=endLineNumber;line++){switch(minimapOptions.position){case MinimapPosition2.Inline:this.renderDecorationOnLine(canvasContext,lineOffsetMap,decoration2.range,decorationColor,layout2,line,minimapLineHeight,minimapLineHeight,tabSize,characterWidth,canvasInnerWidth);continue;case MinimapPosition2.Gutter:{const y=layout2.getYForLineNumber(line,minimapLineHeight);const x=2;this.renderDecoration(canvasContext,decorationColor,x,y,GUTTER_DECORATION_WIDTH,minimapLineHeight);continue}}}}}renderDecorationOnLine(canvasContext,lineOffsetMap,decorationRange,decorationColor,layout2,lineNumber,height,minimapLineHeight,tabSize,charWidth,canvasInnerWidth){const y=layout2.getYForLineNumber(lineNumber,minimapLineHeight);if(y+height<0||y>this._model.options.canvasInnerHeight){return}const{startLineNumber:startLineNumber,endLineNumber:endLineNumber}=decorationRange;const startColumn=startLineNumber===lineNumber?decorationRange.startColumn:1;const endColumn=endLineNumber===lineNumber?decorationRange.endColumn:this._model.getLineMaxColumn(lineNumber);const x1=this.getXOffsetForPosition(lineOffsetMap,lineNumber,startColumn,tabSize,charWidth,canvasInnerWidth);const x2=this.getXOffsetForPosition(lineOffsetMap,lineNumber,endColumn,tabSize,charWidth,canvasInnerWidth);this.renderDecoration(canvasContext,decorationColor,x1,y,x2-x1,height)}getXOffsetForPosition(lineOffsetMap,lineNumber,column,tabSize,charWidth,canvasInnerWidth){if(column===1){return MINIMAP_GUTTER_WIDTH}const minimumXOffset=(column-1)*charWidth;if(minimumXOffset>=canvasInnerWidth){return canvasInnerWidth}let lineIndexToXOffset=lineOffsetMap.get(lineNumber);if(!lineIndexToXOffset){const lineData=this._model.getLineContent(lineNumber);lineIndexToXOffset=[MINIMAP_GUTTER_WIDTH];let prevx=MINIMAP_GUTTER_WIDTH;for(let i=1;i=canvasInnerWidth){lineIndexToXOffset[i]=canvasInnerWidth;break}lineIndexToXOffset[i]=x;prevx=x}lineOffsetMap.set(lineNumber,lineIndexToXOffset)}if(column-1renderMinimapLineHeight?Math.floor((minimapLineHeight-renderMinimapLineHeight)/2):0;const backgroundA=background.a/255;const renderBackground=new RGBA8(Math.round((background.r-defaultBackground.r)*backgroundA+defaultBackground.r),Math.round((background.g-defaultBackground.g)*backgroundA+defaultBackground.g),Math.round((background.b-defaultBackground.b)*backgroundA+defaultBackground.b),255);let dy=layout2.topPaddingLineCount*minimapLineHeight;const renderedLines=[];for(let lineIndex=0,lineCount=endLineNumber-startLineNumber+1;lineIndex=0&&lastLineIndexmaxDx){return}const charCode=content.charCodeAt(charIndex);if(charCode===9){const insertSpacesCount=tabSize-(charIndex+tabsCharDelta)%tabSize;tabsCharDelta+=insertSpacesCount-1;dx+=insertSpacesCount*charWidth}else if(charCode===32){dx+=charWidth}else{const count=isFullWidthCharacter(charCode)?2:1;for(let i=0;imaxDx){return}}}}}}};ContiguousLineMap=class{constructor(startLineNumber,endLineNumber,defaultValue){this._startLineNumber=startLineNumber;this._endLineNumber=endLineNumber;this._defaultValue=defaultValue;this._values=[];for(let i=0,count=this._endLineNumber-this._startLineNumber+1;ithis._endLineNumber){return}this._values[lineNumber-this._startLineNumber]=value}get(lineNumber){if(lineNumberthis._endLineNumber){return this._defaultValue}return this._values[lineNumber-this._startLineNumber]}}}});var init_17=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css"(){}});var ViewOverlayWidgets;var init_overlayWidgets=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js"(){init_17();init_fastDomNode();init_viewPart();ViewOverlayWidgets=class extends ViewPart{constructor(context){super(context);const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._widgets={};this._verticalScrollbarWidth=layoutInfo.verticalScrollbarWidth;this._minimapWidth=layoutInfo.minimap.minimapWidth;this._horizontalScrollbarHeight=layoutInfo.horizontalScrollbarHeight;this._editorHeight=layoutInfo.height;this._editorWidth=layoutInfo.width;this._domNode=createFastDomNode(document.createElement("div"));PartFingerprints.write(this._domNode,4);this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose();this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._verticalScrollbarWidth=layoutInfo.verticalScrollbarWidth;this._minimapWidth=layoutInfo.minimap.minimapWidth;this._horizontalScrollbarHeight=layoutInfo.horizontalScrollbarHeight;this._editorHeight=layoutInfo.height;this._editorWidth=layoutInfo.width;return true}addWidget(widget){const domNode=createFastDomNode(widget.getDomNode());this._widgets[widget.getId()]={widget:widget,preference:null,domNode:domNode};domNode.setPosition("absolute");domNode.setAttribute("widgetId",widget.getId());this._domNode.appendChild(domNode);this.setShouldRender();this._updateMaxMinWidth()}setWidgetPosition(widget,preference){const widgetData=this._widgets[widget.getId()];if(widgetData.preference===preference){this._updateMaxMinWidth();return false}widgetData.preference=preference;this.setShouldRender();this._updateMaxMinWidth();return true}removeWidget(widget){const widgetId=widget.getId();if(this._widgets.hasOwnProperty(widgetId)){const widgetData=this._widgets[widgetId];const domNode=widgetData.domNode.domNode;delete this._widgets[widgetId];domNode.parentNode.removeChild(domNode);this.setShouldRender();this._updateMaxMinWidth()}}_updateMaxMinWidth(){var _a6,_b3;let maxMinWidth=0;const keys=Object.keys(this._widgets);for(let i=0,len=keys.length;i=3){const leftWidth=Math.floor(remainingWidth/3);const rightWidth=Math.floor(remainingWidth/3);const centerWidth=remainingWidth-leftWidth-rightWidth;const leftOffset=canvasLeftOffset;const centerOffset=leftOffset+leftWidth;const rightOffset=leftOffset+leftWidth+centerWidth;return[[0,leftOffset,centerOffset,leftOffset,rightOffset,leftOffset,centerOffset,leftOffset],[0,leftWidth,centerWidth,leftWidth+centerWidth,rightWidth,leftWidth+centerWidth+rightWidth,centerWidth+rightWidth,leftWidth+centerWidth+rightWidth]]}else if(laneCount===2){const leftWidth=Math.floor(remainingWidth/2);const rightWidth=remainingWidth-leftWidth;const leftOffset=canvasLeftOffset;const rightOffset=leftOffset+leftWidth;return[[0,leftOffset,leftOffset,leftOffset,rightOffset,leftOffset,leftOffset,leftOffset],[0,leftWidth,leftWidth,leftWidth,rightWidth,leftWidth+rightWidth,leftWidth+rightWidth,leftWidth+rightWidth]]}else{const offset=canvasLeftOffset;const width=remainingWidth;return[[0,offset,offset,offset,offset,offset,offset,offset],[0,width,width,width,width,width,width,width]]}}equals(other){return this.lineHeight===other.lineHeight&&this.pixelRatio===other.pixelRatio&&this.overviewRulerLanes===other.overviewRulerLanes&&this.renderBorder===other.renderBorder&&this.borderColor===other.borderColor&&this.hideCursor===other.hideCursor&&this.cursorColor===other.cursorColor&&this.themeType===other.themeType&&Color.equals(this.backgroundColor,other.backgroundColor)&&this.top===other.top&&this.right===other.right&&this.domWidth===other.domWidth&&this.domHeight===other.domHeight&&this.canvasWidth===other.canvasWidth&&this.canvasHeight===other.canvasHeight}};DecorationsOverviewRuler=class extends ViewPart{constructor(context){super(context);this._domNode=createFastDomNode(document.createElement("canvas"));this._domNode.setClassName("decorationsOverviewRuler");this._domNode.setPosition("absolute");this._domNode.setLayerHinting(true);this._domNode.setContain("strict");this._domNode.setAttribute("aria-hidden","true");this._updateSettings(false);this._tokensColorTrackerListener=TokenizationRegistry2.onDidChange((e=>{if(e.changedColorMap){this._updateSettings(true)}}));this._cursorPositions=[]}dispose(){super.dispose();this._tokensColorTrackerListener.dispose()}_updateSettings(renderNow){const newSettings=new Settings(this._context.configuration,this._context.theme);if(this._settings&&this._settings.equals(newSettings)){return false}this._settings=newSettings;this._domNode.setTop(this._settings.top);this._domNode.setRight(this._settings.right);this._domNode.setWidth(this._settings.domWidth);this._domNode.setHeight(this._settings.domHeight);this._domNode.domNode.width=this._settings.canvasWidth;this._domNode.domNode.height=this._settings.canvasHeight;if(renderNow){this._render()}return true}onConfigurationChanged(e){return this._updateSettings(false)}onCursorStateChanged(e){this._cursorPositions=[];for(let i=0,len=e.selections.length;icanvasHeight){yCenter=canvasHeight-halfMinDecorationHeight}y1=yCenter-halfMinDecorationHeight;y2=yCenter+halfMinDecorationHeight}if(y1>prevY2+1||lane!==prevLane){if(i!==0){canvasCtx.fillRect(x[prevLane],prevY1,w[prevLane],prevY2-prevY1)}prevLane=lane;prevY1=y1;prevY2=y2}else{if(y2>prevY2){prevY2=y2}}}canvasCtx.fillRect(x[prevLane],prevY1,w[prevLane],prevY2-prevY1)}if(!this._settings.hideCursor&&this._settings.cursorColor){const cursorHeight=2*this._settings.pixelRatio|0;const halfCursorHeight=cursorHeight/2|0;const cursorX=this._settings.x[7];const cursorW=this._settings.w[7];canvasCtx.fillStyle=this._settings.cursorColor;let prevY1=-100;let prevY2=-100;for(let i=0,len=this._cursorPositions.length;icanvasHeight){yCenter=canvasHeight-halfCursorHeight}const y1=yCenter-halfCursorHeight;const y2=y1+cursorHeight;if(y1>prevY2+1){if(i!==0){canvasCtx.fillRect(cursorX,prevY1,cursorW,prevY2-prevY1)}prevY1=y1;prevY2=y2}else{if(y2>prevY2){prevY2=y2}}}canvasCtx.fillRect(cursorX,prevY1,cursorW,prevY2-prevY1)}if(this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0){canvasCtx.beginPath();canvasCtx.lineWidth=1;canvasCtx.strokeStyle=this._settings.borderColor;canvasCtx.moveTo(0,0);canvasCtx.lineTo(0,canvasHeight);canvasCtx.stroke();canvasCtx.moveTo(0,0);canvasCtx.lineTo(canvasWidth,0);canvasCtx.stroke()}}}}});var ColorZone,OverviewRulerZone,OverviewZoneManager;var init_overviewZoneManager=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewModel/overviewZoneManager.js"(){ColorZone=class{constructor(from,to,colorId){this._colorZoneBrand=void 0;this.from=from|0;this.to=to|0;this.colorId=colorId|0}static compare(a,b){if(a.colorId===b.colorId){if(a.from===b.from){return a.to-b.to}return a.from-b.from}return a.colorId-b.colorId}};OverviewRulerZone=class{constructor(startLineNumber,endLineNumber,heightInLines,color){this._overviewRulerZoneBrand=void 0;this.startLineNumber=startLineNumber;this.endLineNumber=endLineNumber;this.heightInLines=heightInLines;this.color=color;this._colorZone=null}static compare(a,b){if(a.color===b.color){if(a.startLineNumber===b.startLineNumber){if(a.heightInLines===b.heightInLines){return a.endLineNumber-b.endLineNumber}return a.heightInLines-b.heightInLines}return a.startLineNumber-b.startLineNumber}return a.colortotalHeight){ycenter=totalHeight-halfHeight}const color=zone.color;let colorId=this._color2Id[color];if(!colorId){colorId=++this._lastAssignedId;this._color2Id[color]=colorId;this._id2Color[colorId]=color}const colorZone=new ColorZone(ycenter-halfHeight,ycenter+halfHeight,colorId);zone.setColorZone(colorZone);allColorZones.push(colorZone)}this._colorZonesInvalid=false;allColorZones.sort(ColorZone.compare);return allColorZones}}}});var OverviewRuler;var init_overviewRuler=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js"(){init_fastDomNode();init_overviewZoneManager();init_viewEventHandler();OverviewRuler=class extends ViewEventHandler{constructor(context,cssClassName){super();this._context=context;const options2=this._context.configuration.options;this._domNode=createFastDomNode(document.createElement("canvas"));this._domNode.setClassName(cssClassName);this._domNode.setPosition("absolute");this._domNode.setLayerHinting(true);this._domNode.setContain("strict");this._zoneManager=new OverviewZoneManager((lineNumber=>this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber)));this._zoneManager.setDOMWidth(0);this._zoneManager.setDOMHeight(0);this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight());this._zoneManager.setLineHeight(options2.get(65));this._zoneManager.setPixelRatio(options2.get(140));this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this);super.dispose()}onConfigurationChanged(e){const options2=this._context.configuration.options;if(e.hasChanged(65)){this._zoneManager.setLineHeight(options2.get(65));this._render()}if(e.hasChanged(140)){this._zoneManager.setPixelRatio(options2.get(140));this._domNode.setWidth(this._zoneManager.getDOMWidth());this._domNode.setHeight(this._zoneManager.getDOMHeight());this._domNode.domNode.width=this._zoneManager.getCanvasWidth();this._domNode.domNode.height=this._zoneManager.getCanvasHeight();this._render()}return true}onFlushed(e){this._render();return true}onScrollChanged(e){if(e.scrollHeightChanged){this._zoneManager.setOuterHeight(e.scrollHeight);this._render()}return true}onZonesChanged(e){this._render();return true}getDomNode(){return this._domNode.domNode}setLayout(position){this._domNode.setTop(position.top);this._domNode.setRight(position.right);let hasChanged=false;hasChanged=this._zoneManager.setDOMWidth(position.width)||hasChanged;hasChanged=this._zoneManager.setDOMHeight(position.height)||hasChanged;if(hasChanged){this._domNode.setWidth(this._zoneManager.getDOMWidth());this._domNode.setHeight(this._zoneManager.getDOMHeight());this._domNode.domNode.width=this._zoneManager.getCanvasWidth();this._domNode.domNode.height=this._zoneManager.getCanvasHeight();this._render()}}setZones(zones){this._zoneManager.setZones(zones);this._render()}_render(){if(this._zoneManager.getOuterHeight()===0){return false}const width=this._zoneManager.getCanvasWidth();const height=this._zoneManager.getCanvasHeight();const colorZones=this._zoneManager.resolveColorZones();const id2Color=this._zoneManager.getId2Color();const ctx=this._domNode.domNode.getContext("2d");ctx.clearRect(0,0,width,height);if(colorZones.length>0){this._renderOneLane(ctx,colorZones,id2Color,width)}return true}_renderOneLane(ctx,colorZones,id2Color,width){let currentColorId=0;let currentFrom=0;let currentTo=0;for(const zone of colorZones){const zoneColorId=zone.colorId;const zoneFrom=zone.from;const zoneTo=zone.to;if(zoneColorId!==currentColorId){ctx.fillRect(0,currentFrom,width,currentTo-currentFrom);currentColorId=zoneColorId;ctx.fillStyle=id2Color[currentColorId];currentFrom=zoneFrom;currentTo=zoneTo}else{if(currentTo>=zoneFrom){currentTo=Math.max(currentTo,zoneTo)}else{ctx.fillRect(0,currentFrom,width,currentTo-currentFrom);currentFrom=zoneFrom;currentTo=zoneTo}}}ctx.fillRect(0,currentFrom,width,currentTo-currentFrom)}}}});var init_18=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css"(){}});var Rulers;var init_rulers=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.js"(){init_18();init_fastDomNode();init_viewPart();Rulers=class extends ViewPart{constructor(context){super(context);this.domNode=createFastDomNode(document.createElement("div"));this.domNode.setAttribute("role","presentation");this.domNode.setAttribute("aria-hidden","true");this.domNode.setClassName("view-rulers");this._renderedRulers=[];const options2=this._context.configuration.options;this._rulers=options2.get(100);this._typicalHalfwidthCharacterWidth=options2.get(49).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const options2=this._context.configuration.options;this._rulers=options2.get(100);this._typicalHalfwidthCharacterWidth=options2.get(49).typicalHalfwidthCharacterWidth;return true}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(ctx){}_ensureRulersCount(){const currentCount=this._renderedRulers.length;const desiredCount=this._rulers.length;if(currentCount===desiredCount){return}if(currentCount0){const node=createFastDomNode(document.createElement("div"));node.setClassName("view-ruler");node.setWidth(rulerWidth);this.domNode.appendChild(node);this._renderedRulers.push(node);addCount--}return}let removeCount=currentCount-desiredCount;while(removeCount>0){const node=this._renderedRulers.pop();this.domNode.removeChild(node);removeCount--}}render(ctx){this._ensureRulersCount();for(let i=0,len=this._rulers.length;i0;if(this._shouldShow!==newShouldShow){this._shouldShow=newShouldShow;return true}return false}getDomNode(){return this._domNode}_updateWidth(){const options2=this._context.configuration.options;const layoutInfo=options2.get(142);if(layoutInfo.minimap.renderMinimap===0||layoutInfo.minimap.minimapWidth>0&&layoutInfo.minimap.minimapLeft===0){this._width=layoutInfo.width}else{this._width=layoutInfo.width-layoutInfo.verticalScrollbarWidth}}onConfigurationChanged(e){const options2=this._context.configuration.options;const scrollbar=options2.get(101);this._useShadows=scrollbar.useShadows;this._updateWidth();this._updateShouldShow();return true}onScrollChanged(e){this._scrollTop=e.scrollTop;return this._updateShouldShow()}prepareRender(ctx){}render(ctx){this._domNode.setWidth(this._width);this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}}});var init_20=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css"(){}});function toStyledRange(item){return new HorizontalRangeWithStyle(item)}function toStyled(item){return new LineVisibleRangesWithStyle(item.lineNumber,item.ranges.map(toStyledRange))}function abs(n){return n<0?-n:n}var HorizontalRangeWithStyle,LineVisibleRangesWithStyle,SelectionsOverlay;var init_selections=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.js"(){init_20();init_dynamicViewOverlay();init_colorRegistry();init_themeService();HorizontalRangeWithStyle=class{constructor(other){this.left=other.left;this.width=other.width;this.startStyle=null;this.endStyle=null}};LineVisibleRangesWithStyle=class{constructor(lineNumber,ranges){this.lineNumber=lineNumber;this.ranges=ranges}};SelectionsOverlay=class extends DynamicViewOverlay{constructor(context){super();this._previousFrameVisibleRangesWithStyle=[];this._context=context;const options2=this._context.configuration.options;this._lineHeight=options2.get(65);this._roundedSelection=options2.get(99);this._typicalHalfwidthCharacterWidth=options2.get(49).typicalHalfwidthCharacterWidth;this._selections=[];this._renderResult=null;this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this);this._renderResult=null;super.dispose()}onConfigurationChanged(e){const options2=this._context.configuration.options;this._lineHeight=options2.get(65);this._roundedSelection=options2.get(99);this._typicalHalfwidthCharacterWidth=options2.get(49).typicalHalfwidthCharacterWidth;return true}onCursorStateChanged(e){this._selections=e.selections.slice(0);return true}onDecorationsChanged(e){return true}onFlushed(e){return true}onLinesChanged(e){return true}onLinesDeleted(e){return true}onLinesInserted(e){return true}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return true}_visibleRangesHaveGaps(linesVisibleRanges){for(let i=0,len=linesVisibleRanges.length;i1){return true}}return false}_enrichVisibleRangesWithStyle(viewport,linesVisibleRanges,previousFrame){const epsilon=this._typicalHalfwidthCharacterWidth/4;let previousFrameTop=null;let previousFrameBottom=null;if(previousFrame&&previousFrame.length>0&&linesVisibleRanges.length>0){const topLineNumber=linesVisibleRanges[0].lineNumber;if(topLineNumber===viewport.startLineNumber){for(let i=0;!previousFrameTop&&i=0;i--){if(previousFrame[i].lineNumber===bottomLineNumber){previousFrameBottom=previousFrame[i].ranges[0]}}}if(previousFrameTop&&!previousFrameTop.startStyle){previousFrameTop=null}if(previousFrameBottom&&!previousFrameBottom.startStyle){previousFrameBottom=null}}for(let i=0,len=linesVisibleRanges.length;i0){const prevLeft=linesVisibleRanges[i-1].ranges[0].left;const prevRight=linesVisibleRanges[i-1].ranges[0].left+linesVisibleRanges[i-1].ranges[0].width;if(abs(curLeft-prevLeft)prevLeft){startStyle.top=1}if(abs(curRight-prevRight)'}_actualRenderOneSelection(output2,visibleStartLineNumber,hasMultipleSelections,visibleRanges){if(visibleRanges.length===0){return}const visibleRangesHaveStyle=!!visibleRanges[0].ranges[0].startStyle;const fullLineHeight=this._lineHeight.toString();const reducedLineHeight=(this._lineHeight-1).toString();const firstLineNumber=visibleRanges[0].lineNumber;const lastLineNumber=visibleRanges[visibleRanges.length-1].lineNumber;for(let i=0,len=visibleRanges.length;i1,visibleRangesWithStyle)}this._previousFrameVisibleRangesWithStyle=thisFrameVisibleRangesWithStyle;this._renderResult=output.map((([internalCorners,restOfSelection])=>internalCorners+restOfSelection))}render(startLineNumber,lineNumber){if(!this._renderResult){return""}const lineIndex=lineNumber-startLineNumber;if(lineIndex<0||lineIndex>=this._renderResult.length){return""}return this._renderResult[lineIndex]}};SelectionsOverlay.SELECTION_CLASS_NAME="selected-text";SelectionsOverlay.SELECTION_TOP_LEFT="top-left-radius";SelectionsOverlay.SELECTION_BOTTOM_LEFT="bottom-left-radius";SelectionsOverlay.SELECTION_TOP_RIGHT="top-right-radius";SelectionsOverlay.SELECTION_BOTTOM_RIGHT="bottom-right-radius";SelectionsOverlay.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background";SelectionsOverlay.ROUNDED_PIECE_WIDTH=10;registerThemingParticipant(((theme,collector)=>{const editorSelectionForegroundColor=theme.getColor(editorSelectionForeground);if(editorSelectionForegroundColor&&!editorSelectionForegroundColor.isTransparent()){collector.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${editorSelectionForegroundColor}; }`)}}))}});var init_21=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css"(){}});var ViewCursorRenderData,ViewCursor;var init_viewCursor=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js"(){init_dom();init_fastDomNode();init_strings();init_domFontInfo();init_editorOptions();init_position();init_range();init_mouseCursor();ViewCursorRenderData=class{constructor(top,left,paddingLeft,width,height,textContent,textContentClassName){this.top=top;this.left=left;this.paddingLeft=paddingLeft;this.width=width;this.height=height;this.textContent=textContent;this.textContentClassName=textContentClassName}};ViewCursor=class{constructor(context){this._context=context;const options2=this._context.configuration.options;const fontInfo=options2.get(49);this._cursorStyle=options2.get(27);this._lineHeight=options2.get(65);this._typicalHalfwidthCharacterWidth=fontInfo.typicalHalfwidthCharacterWidth;this._lineCursorWidth=Math.min(options2.get(30),this._typicalHalfwidthCharacterWidth);this._isVisible=true;this._domNode=createFastDomNode(document.createElement("div"));this._domNode.setClassName(`cursor ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);this._domNode.setHeight(this._lineHeight);this._domNode.setTop(0);this._domNode.setLeft(0);applyFontInfo(this._domNode,fontInfo);this._domNode.setDisplay("none");this._position=new Position(1,1);this._lastRenderedContent="";this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){if(!this._isVisible){this._domNode.setVisibility("inherit");this._isVisible=true}}hide(){if(this._isVisible){this._domNode.setVisibility("hidden");this._isVisible=false}}onConfigurationChanged(e){const options2=this._context.configuration.options;const fontInfo=options2.get(49);this._cursorStyle=options2.get(27);this._lineHeight=options2.get(65);this._typicalHalfwidthCharacterWidth=fontInfo.typicalHalfwidthCharacterWidth;this._lineCursorWidth=Math.min(options2.get(30),this._typicalHalfwidthCharacterWidth);applyFontInfo(this._domNode,fontInfo);return true}onCursorPositionChanged(position,pauseAnimation){if(pauseAnimation){this._domNode.domNode.style.transitionProperty="none"}else{this._domNode.domNode.style.transitionProperty=""}this._position=position;return true}_getGraphemeAwarePosition(){const{lineNumber:lineNumber,column:column}=this._position;const lineContent=this._context.viewModel.getLineContent(lineNumber);const[startOffset,endOffset]=getCharContainingOffset(lineContent,column-1);return[new Position(lineNumber,startOffset+1),lineContent.substring(startOffset,endOffset)]}_prepareRender(ctx){let textContent="";let textContentClassName="";const[position,nextGrapheme]=this._getGraphemeAwarePosition();if(this._cursorStyle===TextEditorCursorStyle.Line||this._cursorStyle===TextEditorCursorStyle.LineThin){const visibleRange=ctx.visibleRangeForPosition(position);if(!visibleRange||visibleRange.outsideRenderedLine){return null}let width2;if(this._cursorStyle===TextEditorCursorStyle.Line){width2=computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2);if(width2>2){textContent=nextGrapheme;textContentClassName=this._getTokenClassName(position)}}else{width2=computeScreenAwareSize(1)}let left=visibleRange.left;let paddingLeft=0;if(width2>=2&&left>=1){paddingLeft=1;left-=paddingLeft}const top2=ctx.getVerticalOffsetForLineNumber(position.lineNumber)-ctx.bigNumbersDelta;return new ViewCursorRenderData(top2,left,paddingLeft,width2,this._lineHeight,textContent,textContentClassName)}const visibleRangeForCharacter=ctx.linesVisibleRangesForRange(new Range(position.lineNumber,position.column,position.lineNumber,position.column+nextGrapheme.length),false);if(!visibleRangeForCharacter||visibleRangeForCharacter.length===0){return null}const firstVisibleRangeForCharacter=visibleRangeForCharacter[0];if(firstVisibleRangeForCharacter.outsideRenderedLine||firstVisibleRangeForCharacter.ranges.length===0){return null}const range2=firstVisibleRangeForCharacter.ranges[0];const width=nextGrapheme==="\t"?this._typicalHalfwidthCharacterWidth:range2.width<1?this._typicalHalfwidthCharacterWidth:range2.width;if(this._cursorStyle===TextEditorCursorStyle.Block){textContent=nextGrapheme;textContentClassName=this._getTokenClassName(position)}let top=ctx.getVerticalOffsetForLineNumber(position.lineNumber)-ctx.bigNumbersDelta;let height=this._lineHeight;if(this._cursorStyle===TextEditorCursorStyle.Underline||this._cursorStyle===TextEditorCursorStyle.UnderlineThin){top+=this._lineHeight-2;height=2}return new ViewCursorRenderData(top,range2.left,0,width,height,textContent,textContentClassName)}_getTokenClassName(position){const lineData=this._context.viewModel.getViewLineData(position.lineNumber);const tokenIndex=lineData.tokens.findTokenIndexAtOffset(position.column-1);return lineData.tokens.getClassName(tokenIndex)}prepareRender(ctx){this._renderData=this._prepareRender(ctx)}render(ctx){if(!this._renderData){this._domNode.setDisplay("none");return null}if(this._lastRenderedContent!==this._renderData.textContent){this._lastRenderedContent=this._renderData.textContent;this._domNode.domNode.textContent=this._lastRenderedContent}this._domNode.setClassName(`cursor ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ${this._renderData.textContentClassName}`);this._domNode.setDisplay("block");this._domNode.setTop(this._renderData.top);this._domNode.setLeft(this._renderData.left);this._domNode.setPaddingLeft(this._renderData.paddingLeft);this._domNode.setWidth(this._renderData.width);this._domNode.setLineHeight(this._renderData.height);this._domNode.setHeight(this._renderData.height);return{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}}}}});var ViewCursors;var init_viewCursors=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js"(){init_21();init_fastDomNode();init_async();init_viewPart();init_viewCursor();init_editorOptions();init_editorColorRegistry();init_themeService();init_theme();ViewCursors=class extends ViewPart{constructor(context){super(context);const options2=this._context.configuration.options;this._readOnly=options2.get(89);this._cursorBlinking=options2.get(25);this._cursorStyle=options2.get(27);this._cursorSmoothCaretAnimation=options2.get(26);this._selectionIsEmpty=true;this._isComposingInput=false;this._isVisible=false;this._primaryCursor=new ViewCursor(this._context);this._secondaryCursors=[];this._renderData=[];this._domNode=createFastDomNode(document.createElement("div"));this._domNode.setAttribute("role","presentation");this._domNode.setAttribute("aria-hidden","true");this._updateDomClassName();this._domNode.appendChild(this._primaryCursor.getDomNode());this._startCursorBlinkAnimation=new TimeoutTimer;this._cursorFlatBlinkInterval=new IntervalTimer;this._blinkingEnabled=false;this._editorHasFocus=false;this._updateBlinking()}dispose(){super.dispose();this._startCursorBlinkAnimation.dispose();this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){this._isComposingInput=true;this._updateBlinking();return true}onCompositionEnd(e){this._isComposingInput=false;this._updateBlinking();return true}onConfigurationChanged(e){const options2=this._context.configuration.options;this._readOnly=options2.get(89);this._cursorBlinking=options2.get(25);this._cursorStyle=options2.get(27);this._cursorSmoothCaretAnimation=options2.get(26);this._updateBlinking();this._updateDomClassName();this._primaryCursor.onConfigurationChanged(e);for(let i=0,len=this._secondaryCursors.length;isecondaryPositions.length){const removeCnt=this._secondaryCursors.length-secondaryPositions.length;for(let i=0;i{for(let i=0,len=e.ranges.length;i{if(this._isVisible){this._hide()}else{this._show()}}),ViewCursors.BLINK_INTERVAL)}else{this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=true;this._updateDomClassName()}),ViewCursors.BLINK_INTERVAL)}}}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let result="cursors-layer";if(!this._selectionIsEmpty){result+=" has-selection"}switch(this._cursorStyle){case TextEditorCursorStyle.Line:result+=" cursor-line-style";break;case TextEditorCursorStyle.Block:result+=" cursor-block-style";break;case TextEditorCursorStyle.Underline:result+=" cursor-underline-style";break;case TextEditorCursorStyle.LineThin:result+=" cursor-line-thin-style";break;case TextEditorCursorStyle.BlockOutline:result+=" cursor-block-outline-style";break;case TextEditorCursorStyle.UnderlineThin:result+=" cursor-underline-thin-style";break;default:result+=" cursor-line-style"}if(this._blinkingEnabled){switch(this._getCursorBlinking()){case 1:result+=" cursor-blink";break;case 2:result+=" cursor-smooth";break;case 3:result+=" cursor-phase";break;case 4:result+=" cursor-expand";break;case 5:result+=" cursor-solid";break;default:result+=" cursor-solid"}}else{result+=" cursor-solid"}if(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit"){result+=" cursor-smooth-caret-animation"}return result}_show(){this._primaryCursor.show();for(let i=0,len=this._secondaryCursors.length;i{const caret=theme.getColor(editorCursorForeground);if(caret){let caretBackground=theme.getColor(editorCursorBackground);if(!caretBackground){caretBackground=caret.opposite()}collector.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${caret}; border-color: ${caret}; color: ${caretBackground}; }`);if(isHighContrast(theme.type)){collector.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${caretBackground}; border-right: 1px solid ${caretBackground}; }`)}}}))}});function safeInvoke1Arg(func,arg1){try{return func(arg1)}catch(e){onUnexpectedError(e)}}var invalidFunc,ViewZones;var init_viewZones=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewZones/viewZones.js"(){init_fastDomNode();init_errors();init_viewPart();init_position();invalidFunc=()=>{throw new Error(`Invalid change accessor`)};ViewZones=class extends ViewPart{constructor(context){super(context);const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this._lineHeight=options2.get(65);this._contentWidth=layoutInfo.contentWidth;this._contentLeft=layoutInfo.contentLeft;this.domNode=createFastDomNode(document.createElement("div"));this.domNode.setClassName("view-zones");this.domNode.setPosition("absolute");this.domNode.setAttribute("role","presentation");this.domNode.setAttribute("aria-hidden","true");this.marginDomNode=createFastDomNode(document.createElement("div"));this.marginDomNode.setClassName("margin-view-zones");this.marginDomNode.setPosition("absolute");this.marginDomNode.setAttribute("role","presentation");this.marginDomNode.setAttribute("aria-hidden","true");this._zones={}}dispose(){super.dispose();this._zones={}}_recomputeWhitespacesProps(){const whitespaces=this._context.viewLayout.getWhitespaces();const oldWhitespaces=new Map;for(const whitespace of whitespaces){oldWhitespaces.set(whitespace.id,whitespace)}let hadAChange=false;this._context.viewModel.changeWhitespace((whitespaceAccessor=>{const keys=Object.keys(this._zones);for(let i=0,len=keys.length;i{const changeAccessor={addZone:zone=>{zonesHaveChanged=true;return this._addZone(whitespaceAccessor,zone)},removeZone:id=>{if(!id){return}zonesHaveChanged=this._removeZone(whitespaceAccessor,id)||zonesHaveChanged},layoutZone:id=>{if(!id){return}zonesHaveChanged=this._layoutZone(whitespaceAccessor,id)||zonesHaveChanged}};safeInvoke1Arg(callback,changeAccessor);changeAccessor.addZone=invalidFunc;changeAccessor.removeZone=invalidFunc;changeAccessor.layoutZone=invalidFunc}));return zonesHaveChanged}_addZone(whitespaceAccessor,zone){const props=this._computeWhitespaceProps(zone);const whitespaceId=whitespaceAccessor.insertWhitespace(props.afterViewLineNumber,this._getZoneOrdinal(zone),props.heightInPx,props.minWidthInPx);const myZone={whitespaceId:whitespaceId,delegate:zone,isInHiddenArea:props.isInHiddenArea,isVisible:false,domNode:createFastDomNode(zone.domNode),marginDomNode:zone.marginDomNode?createFastDomNode(zone.marginDomNode):null};this._safeCallOnComputedHeight(myZone.delegate,props.heightInPx);myZone.domNode.setPosition("absolute");myZone.domNode.domNode.style.width="100%";myZone.domNode.setDisplay("none");myZone.domNode.setAttribute("monaco-view-zone",myZone.whitespaceId);this.domNode.appendChild(myZone.domNode);if(myZone.marginDomNode){myZone.marginDomNode.setPosition("absolute");myZone.marginDomNode.domNode.style.width="100%";myZone.marginDomNode.setDisplay("none");myZone.marginDomNode.setAttribute("monaco-view-zone",myZone.whitespaceId);this.marginDomNode.appendChild(myZone.marginDomNode)}this._zones[myZone.whitespaceId]=myZone;this.setShouldRender();return myZone.whitespaceId}_removeZone(whitespaceAccessor,id){if(this._zones.hasOwnProperty(id)){const zone=this._zones[id];delete this._zones[id];whitespaceAccessor.removeWhitespace(zone.whitespaceId);zone.domNode.removeAttribute("monaco-visible-view-zone");zone.domNode.removeAttribute("monaco-view-zone");zone.domNode.domNode.parentNode.removeChild(zone.domNode.domNode);if(zone.marginDomNode){zone.marginDomNode.removeAttribute("monaco-visible-view-zone");zone.marginDomNode.removeAttribute("monaco-view-zone");zone.marginDomNode.domNode.parentNode.removeChild(zone.marginDomNode.domNode)}this.setShouldRender();return true}return false}_layoutZone(whitespaceAccessor,id){if(this._zones.hasOwnProperty(id)){const zone=this._zones[id];const props=this._computeWhitespaceProps(zone.delegate);zone.isInHiddenArea=props.isInHiddenArea;whitespaceAccessor.changeOneWhitespace(zone.whitespaceId,props.afterViewLineNumber,props.heightInPx);this._safeCallOnComputedHeight(zone.delegate,props.heightInPx);this.setShouldRender();return true}return false}shouldSuppressMouseDownOnViewZone(id){if(this._zones.hasOwnProperty(id)){const zone=this._zones[id];return Boolean(zone.delegate.suppressMouseDown)}return false}_heightInPixels(zone){if(typeof zone.heightInPx==="number"){return zone.heightInPx}if(typeof zone.heightInLines==="number"){return this._lineHeight*zone.heightInLines}return this._lineHeight}_minWidthInPixels(zone){if(typeof zone.minWidthInPx==="number"){return zone.minWidthInPx}return 0}_safeCallOnComputedHeight(zone,height){if(typeof zone.onComputedHeight==="function"){try{zone.onComputedHeight(height)}catch(e){onUnexpectedError(e)}}}_safeCallOnDomNodeTop(zone,top){if(typeof zone.onDomNodeTop==="function"){try{zone.onDomNodeTop(top)}catch(e){onUnexpectedError(e)}}}prepareRender(ctx){}render(ctx){const visibleWhitespaces=ctx.viewportData.whitespaceViewportData;const visibleZones={};let hasVisibleZone=false;for(const visibleWhitespace of visibleWhitespaces){if(this._zones[visibleWhitespace.id].isInHiddenArea){continue}visibleZones[visibleWhitespace.id]=visibleWhitespace;hasVisibleZone=true}const keys=Object.keys(this._zones);for(let i=0,len=keys.length;ilineNumber){continue}const startColumn=selection.startLineNumber===lineNumber?selection.startColumn:lineData.minColumn;const endColumn=selection.endLineNumber===lineNumber?selection.endColumn:lineData.maxColumn;if(startColumn=currentSelection.endOffset){currentSelectionIndex++;currentSelection=selections&&selections[currentSelectionIndex]}if(chCode!==9&&chCode!==32){continue}if(onlyTrailing&&!lineIsEmptyOrWhitespace&&charIndex<=lastNonWhitespaceIndex2){continue}if(onlyBoundary&&charIndex>=firstNonWhitespaceIndex2&&charIndex<=lastNonWhitespaceIndex2&&chCode===32){const prevChCode=charIndex-1>=0?lineContent.charCodeAt(charIndex-1):0;const nextChCode=charIndex+1=0?lineContent.charCodeAt(charIndex-1):0;const isSingleTrailingSpace=chCode===32&&(prevCharCode!==32&&prevCharCode!==9);if(isSingleTrailingSpace){continue}}if(selections&&(!currentSelection||currentSelection.startOffset>charIndex||currentSelection.endOffset<=charIndex)){continue}const visibleRange=ctx.visibleRangeForPosition(new Position(lineNumber,charIndex+1));if(!visibleRange){continue}if(USE_SVG){maxLeft=Math.max(maxLeft,visibleRange.left);if(chCode===9){result+=this._renderArrow(lineHeight,spaceWidth,visibleRange.left)}else{result+=``}}else{if(chCode===9){result+=`
    ${canUseHalfwidthRightwardsArrow?String.fromCharCode(65515):String.fromCharCode(8594)}
    `}else{result+=`
    ${String.fromCharCode(renderSpaceCharCode)}
    `}}}if(USE_SVG){maxLeft=Math.round(maxLeft+spaceWidth);return``+result+``}return result}_renderArrow(lineHeight,spaceWidth,left){const strokeWidth=spaceWidth/7;const width=spaceWidth;const dy=lineHeight/2;const dx=left;const p1={x:0,y:strokeWidth/2};const p2={x:100/125*width,y:p1.y};const p3={x:p2.x-.2*p2.x,y:p2.y+.2*p2.x};const p4={x:p3.x+.1*p2.x,y:p3.y+.1*p2.x};const p5={x:p4.x+.35*p2.x,y:p4.y-.35*p2.x};const p6={x:p5.x,y:-p5.y};const p7={x:p4.x,y:-p4.y};const p8={x:p3.x,y:-p3.y};const p9={x:p2.x,y:-p2.y};const p10={x:p1.x,y:-p1.y};const p=[p1,p2,p3,p4,p5,p6,p7,p8,p9,p10];const parts=p.map((p11=>`${(dx+p11.x).toFixed(2)} ${(dy+p11.y).toFixed(2)}`)).join(" L ");return``}render(startLineNumber,lineNumber){if(!this._renderResult){return""}const lineIndex=lineNumber-startLineNumber;if(lineIndex<0||lineIndex>=this._renderResult.length){return""}return this._renderResult[lineIndex]}};WhitespaceOptions=class{constructor(config){const options2=config.options;const fontInfo=options2.get(49);const experimentalWhitespaceRendering=options2.get(37);if(experimentalWhitespaceRendering==="off"){this.renderWhitespace="none";this.renderWithSVG=false}else if(experimentalWhitespaceRendering==="svg"){this.renderWhitespace=options2.get(97);this.renderWithSVG=true}else{this.renderWhitespace=options2.get(97);this.renderWithSVG=false}this.spaceWidth=fontInfo.spaceWidth;this.middotWidth=fontInfo.middotWidth;this.wsmiddotWidth=fontInfo.wsmiddotWidth;this.canUseHalfwidthRightwardsArrow=fontInfo.canUseHalfwidthRightwardsArrow;this.lineHeight=options2.get(65);this.stopRenderingLineAfter=options2.get(115)}equals(other){return this.renderWhitespace===other.renderWhitespace&&this.renderWithSVG===other.renderWithSVG&&this.spaceWidth===other.spaceWidth&&this.middotWidth===other.middotWidth&&this.wsmiddotWidth===other.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===other.canUseHalfwidthRightwardsArrow&&this.lineHeight===other.lineHeight&&this.stopRenderingLineAfter===other.stopRenderingLineAfter}}}});function safeInvokeNoArg(func){try{return func()}catch(e){onUnexpectedError(e)}}var __decorate11,__param10,View;var init_view=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/view.js"(){init_dom();init_selection();init_range();init_fastDomNode();init_errors();init_pointerHandler();init_textAreaHandler();init_viewController();init_viewUserInputEvents();init_viewOverlays();init_viewPart();init_contentWidgets();init_currentLineHighlight();init_decorations();init_editorScrollbar();init_indentGuides();init_lineNumbers();init_viewLines();init_linesDecorations();init_margin();init_marginDecorations();init_minimap();init_overlayWidgets();init_decorationsOverviewRuler();init_overviewRuler();init_rulers();init_scrollDecoration();init_selections();init_viewCursors();init_viewZones();init_position();init_renderingContext();init_viewContext();init_viewLinesViewportData();init_viewEventHandler();init_themeService();init_mouseTarget();init_blockDecorations();init_performance();init_whitespace();init_glyphMargin();init_model();init_instantiation();__decorate11=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param10=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};View=class View2 extends ViewEventHandler{constructor(commandDelegate,configuration,colorTheme,model,userInputEvents,overflowWidgetsDomNode,_instantiationService){super();this._instantiationService=_instantiationService;this._shouldRecomputeGlyphMarginLanes=false;this._selections=[new Selection(1,1,1,1)];this._renderAnimationFrame=null;const viewController=new ViewController(configuration,model,userInputEvents,commandDelegate);this._context=new ViewContext(configuration,colorTheme,model);this._context.addEventHandler(this);this._viewParts=[];this._textAreaHandler=this._instantiationService.createInstance(TextAreaHandler,this._context,viewController,this._createTextAreaHandlerHelper());this._viewParts.push(this._textAreaHandler);this._linesContent=createFastDomNode(document.createElement("div"));this._linesContent.setClassName("lines-content monaco-editor-background");this._linesContent.setPosition("absolute");this.domNode=createFastDomNode(document.createElement("div"));this.domNode.setClassName(this._getEditorClassName());this.domNode.setAttribute("role","code");this._overflowGuardContainer=createFastDomNode(document.createElement("div"));PartFingerprints.write(this._overflowGuardContainer,3);this._overflowGuardContainer.setClassName("overflow-guard");this._scrollbar=new EditorScrollbar2(this._context,this._linesContent,this.domNode,this._overflowGuardContainer);this._viewParts.push(this._scrollbar);this._viewLines=new ViewLines(this._context,this._linesContent);this._viewZones=new ViewZones(this._context);this._viewParts.push(this._viewZones);const decorationsOverviewRuler=new DecorationsOverviewRuler(this._context);this._viewParts.push(decorationsOverviewRuler);const scrollDecoration=new ScrollDecorationViewPart(this._context);this._viewParts.push(scrollDecoration);const contentViewOverlays=new ContentViewOverlays(this._context);this._viewParts.push(contentViewOverlays);contentViewOverlays.addDynamicOverlay(new CurrentLineHighlightOverlay(this._context));contentViewOverlays.addDynamicOverlay(new SelectionsOverlay(this._context));contentViewOverlays.addDynamicOverlay(new IndentGuidesOverlay(this._context));contentViewOverlays.addDynamicOverlay(new DecorationsOverlay(this._context));contentViewOverlays.addDynamicOverlay(new WhitespaceOverlay(this._context));const marginViewOverlays=new MarginViewOverlays(this._context);this._viewParts.push(marginViewOverlays);marginViewOverlays.addDynamicOverlay(new CurrentLineMarginHighlightOverlay(this._context));marginViewOverlays.addDynamicOverlay(new MarginViewLineDecorationsOverlay(this._context));marginViewOverlays.addDynamicOverlay(new LinesDecorationsOverlay(this._context));marginViewOverlays.addDynamicOverlay(new LineNumbersOverlay(this._context));this._glyphMarginWidgets=new GlyphMarginWidgets(this._context);this._viewParts.push(this._glyphMarginWidgets);const margin=new Margin(this._context);margin.getDomNode().appendChild(this._viewZones.marginDomNode);margin.getDomNode().appendChild(marginViewOverlays.getDomNode());margin.getDomNode().appendChild(this._glyphMarginWidgets.domNode);this._viewParts.push(margin);this._contentWidgets=new ViewContentWidgets(this._context,this.domNode);this._viewParts.push(this._contentWidgets);this._viewCursors=new ViewCursors(this._context);this._viewParts.push(this._viewCursors);this._overlayWidgets=new ViewOverlayWidgets(this._context);this._viewParts.push(this._overlayWidgets);const rulers=new Rulers(this._context);this._viewParts.push(rulers);const blockOutline=new BlockDecorations(this._context);this._viewParts.push(blockOutline);const minimap=new Minimap(this._context);this._viewParts.push(minimap);if(decorationsOverviewRuler){const overviewRulerData=this._scrollbar.getOverviewRulerLayoutInfo();overviewRulerData.parent.insertBefore(decorationsOverviewRuler.getDomNode(),overviewRulerData.insertBefore)}this._linesContent.appendChild(contentViewOverlays.getDomNode());this._linesContent.appendChild(rulers.domNode);this._linesContent.appendChild(this._viewZones.domNode);this._linesContent.appendChild(this._viewLines.getDomNode());this._linesContent.appendChild(this._contentWidgets.domNode);this._linesContent.appendChild(this._viewCursors.getDomNode());this._overflowGuardContainer.appendChild(margin.getDomNode());this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode());this._overflowGuardContainer.appendChild(scrollDecoration.getDomNode());this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea);this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover);this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode());this._overflowGuardContainer.appendChild(minimap.getDomNode());this._overflowGuardContainer.appendChild(blockOutline.domNode);this.domNode.appendChild(this._overflowGuardContainer);if(overflowWidgetsDomNode){overflowWidgetsDomNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode)}else{this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode)}this._applyLayout();this._pointerHandler=this._register(new PointerHandler(this._context,viewController,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){if(this._shouldRecomputeGlyphMarginLanes){this._shouldRecomputeGlyphMarginLanes=false;this._context.configuration.setGlyphMarginDecorationLaneCount(this._computeGlyphMarginLaneCount())}inputLatency.onRenderStart();this._renderNow()}_computeGlyphMarginLaneCount(){const model=this._context.viewModel.model;let glyphs=[];glyphs=glyphs.concat(model.getAllMarginDecorations().map((decoration2=>{var _a6,_b3;const lane=(_b3=(_a6=decoration2.options.glyphMargin)===null||_a6===void 0?void 0:_a6.position)!==null&&_b3!==void 0?_b3:GlyphMarginLane2.Left;return{range:decoration2.range,lane:lane}})));glyphs=glyphs.concat(this._glyphMarginWidgets.getWidgets().map((widget=>{const range2=model.validateRange(widget.preference.range);return{range:range2,lane:widget.preference.lane}})));glyphs.sort(((a,b)=>Range.compareRangesUsingStarts(a.range,b.range)));let leftDecRange=null;let rightDecRange=null;for(const decoration2 of glyphs){if(decoration2.lane===GlyphMarginLane2.Left&&(!leftDecRange||Range.compareRangesUsingEnds(leftDecRange,decoration2.range)<0)){leftDecRange=decoration2.range}if(decoration2.lane===GlyphMarginLane2.Right&&(!rightDecRange||Range.compareRangesUsingEnds(rightDecRange,decoration2.range)<0)){rightDecRange=decoration2.range}if(leftDecRange&&rightDecRange){if(leftDecRange.endLineNumber{this.focus()},dispatchTextAreaEvent:event=>{this._textAreaHandler.textArea.domNode.dispatchEvent(event)},getLastRenderData:()=>{const lastViewCursorsRenderData=this._viewCursors.getLastRenderData()||[];const lastTextareaPosition=this._textAreaHandler.getLastRenderData();return new PointerHandlerLastRenderData(lastViewCursorsRenderData,lastTextareaPosition)},renderNow:()=>{this.render(true,false)},shouldSuppressMouseDownOnViewZone:viewZoneId=>this._viewZones.shouldSuppressMouseDownOnViewZone(viewZoneId),shouldSuppressMouseDownOnWidget:widgetId=>this._contentWidgets.shouldSuppressMouseDownOnWidget(widgetId),getPositionFromDOMInfo:(spanNode,offset)=>{this._flushAccumulatedAndRenderNow();return this._viewLines.getPositionFromDOMInfo(spanNode,offset)},visibleRangeForPosition:(lineNumber,column)=>{this._flushAccumulatedAndRenderNow();return this._viewLines.visibleRangeForPosition(new Position(lineNumber,column))},getLineWidth:lineNumber=>{this._flushAccumulatedAndRenderNow();return this._viewLines.getLineWidth(lineNumber)}}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:position=>{this._flushAccumulatedAndRenderNow();return this._viewLines.visibleRangeForPosition(position)}}}_applyLayout(){const options2=this._context.configuration.options;const layoutInfo=options2.get(142);this.domNode.setWidth(layoutInfo.width);this.domNode.setHeight(layoutInfo.height);this._overflowGuardContainer.setWidth(layoutInfo.width);this._overflowGuardContainer.setHeight(layoutInfo.height);this._linesContent.setWidth(1e6);this._linesContent.setHeight(1e6)}_getEditorClassName(){const focused=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(139)+" "+getThemeTypeSelector(this._context.theme.type)+focused}handleEvents(events){super.handleEvents(events);this._scheduleRender()}onConfigurationChanged(e){this.domNode.setClassName(this._getEditorClassName());this._applyLayout();return false}onCursorStateChanged(e){this._selections=e.selections;return false}onDecorationsChanged(e){if(e.affectsGlyphMargin){this._shouldRecomputeGlyphMarginLanes=true}return false}onFocusChanged(e){this.domNode.setClassName(this._getEditorClassName());return false}onThemeChanged(e){this._context.theme.update(e.theme);this.domNode.setClassName(this._getEditorClassName());return false}dispose(){if(this._renderAnimationFrame!==null){this._renderAnimationFrame.dispose();this._renderAnimationFrame=null}this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove();this._context.removeEventHandler(this);this._viewLines.dispose();for(const viewPart of this._viewParts){viewPart.dispose()}super.dispose()}_scheduleRender(){if(this._renderAnimationFrame===null){this._renderAnimationFrame=runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100)}}_onRenderScheduled(){this._renderAnimationFrame=null;this._flushAccumulatedAndRenderNow()}_renderNow(){safeInvokeNoArg((()=>this._actualRender()))}_getViewPartsToRender(){const result=[];let resultLen=0;for(const viewPart of this._viewParts){if(viewPart.shouldRender()){result[resultLen++]=viewPart}}return result}_actualRender(){if(!isInDOM(this.domNode.domNode)){return}let viewPartsToRender=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&viewPartsToRender.length===0){return}const partialViewportData=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(partialViewportData.startLineNumber,partialViewportData.endLineNumber,partialViewportData.centeredLineNumber);const viewportData=new ViewportData(this._selections,partialViewportData,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);if(this._contentWidgets.shouldRender()){this._contentWidgets.onBeforeRender(viewportData)}if(this._viewLines.shouldRender()){this._viewLines.renderText(viewportData);this._viewLines.onDidRender();viewPartsToRender=this._getViewPartsToRender()}const renderingContext=new RenderingContext(this._context.viewLayout,viewportData,this._viewLines);for(const viewPart of viewPartsToRender){viewPart.prepareRender(renderingContext)}for(const viewPart of viewPartsToRender){viewPart.render(renderingContext);viewPart.onDidRender()}}delegateVerticalScrollbarPointerDown(browserEvent){this._scrollbar.delegateVerticalScrollbarPointerDown(browserEvent)}delegateScrollFromMouseWheelEvent(browserEvent){this._scrollbar.delegateScrollFromMouseWheelEvent(browserEvent)}restoreState(scrollPosition){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:scrollPosition.scrollTop,scrollLeft:scrollPosition.scrollLeft},1);this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(modelLineNumber,modelColumn){const modelPosition=this._context.viewModel.model.validatePosition({lineNumber:modelLineNumber,column:modelColumn});const viewPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);this._flushAccumulatedAndRenderNow();const visibleRange=this._viewLines.visibleRangeForPosition(new Position(viewPosition.lineNumber,viewPosition.column));if(!visibleRange){return-1}return visibleRange.left}getTargetAtClientPoint(clientX,clientY){const mouseTarget=this._pointerHandler.getTargetAtClientPoint(clientX,clientY);if(!mouseTarget){return null}return ViewUserInputEvents.convertViewToModelMouseTarget(mouseTarget,this._context.viewModel.coordinatesConverter)}createOverviewRuler(cssClassName){return new OverviewRuler(this._context,cssClassName)}change(callback){this._viewZones.changeViewZones(callback);this._scheduleRender()}render(now,everything){if(everything){this._viewLines.forceShouldRender();for(const viewPart of this._viewParts){viewPart.forceShouldRender()}}if(now){this._flushAccumulatedAndRenderNow()}else{this._scheduleRender()}}writeScreenReaderContent(reason){this._textAreaHandler.writeScreenReaderContent(reason)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(options2){this._textAreaHandler.setAriaOptions(options2)}addContentWidget(widgetData){this._contentWidgets.addWidget(widgetData.widget);this.layoutContentWidget(widgetData);this._scheduleRender()}layoutContentWidget(widgetData){var _a6,_b3,_c2,_d2,_e2,_f2,_g2,_h2;this._contentWidgets.setWidgetPosition(widgetData.widget,(_b3=(_a6=widgetData.position)===null||_a6===void 0?void 0:_a6.position)!==null&&_b3!==void 0?_b3:null,(_d2=(_c2=widgetData.position)===null||_c2===void 0?void 0:_c2.secondaryPosition)!==null&&_d2!==void 0?_d2:null,(_f2=(_e2=widgetData.position)===null||_e2===void 0?void 0:_e2.preference)!==null&&_f2!==void 0?_f2:null,(_h2=(_g2=widgetData.position)===null||_g2===void 0?void 0:_g2.positionAffinity)!==null&&_h2!==void 0?_h2:null);this._scheduleRender()}removeContentWidget(widgetData){this._contentWidgets.removeWidget(widgetData.widget);this._scheduleRender()}addOverlayWidget(widgetData){this._overlayWidgets.addWidget(widgetData.widget);this.layoutOverlayWidget(widgetData);this._scheduleRender()}layoutOverlayWidget(widgetData){const newPreference=widgetData.position?widgetData.position.preference:null;const shouldRender=this._overlayWidgets.setWidgetPosition(widgetData.widget,newPreference);if(shouldRender){this._scheduleRender()}}removeOverlayWidget(widgetData){this._overlayWidgets.removeWidget(widgetData.widget);this._scheduleRender()}addGlyphMarginWidget(widgetData){this._glyphMarginWidgets.addWidget(widgetData.widget);this._shouldRecomputeGlyphMarginLanes=true;this._scheduleRender()}layoutGlyphMarginWidget(widgetData){const newPreference=widgetData.position;const shouldRender=this._glyphMarginWidgets.setWidgetPosition(widgetData.widget,newPreference);if(shouldRender){this._shouldRecomputeGlyphMarginLanes=true;this._scheduleRender()}}removeGlyphMarginWidget(widgetData){this._glyphMarginWidgets.removeWidget(widgetData.widget);this._shouldRecomputeGlyphMarginLanes=true;this._scheduleRender()}};View=__decorate11([__param10(6,IInstantiationService)],View)}});var InternalEditorAction;var init_editorAction=__esm({"node_modules/monaco-editor/esm/vs/editor/common/editorAction.js"(){InternalEditorAction=class{constructor(id,label,alias,precondition,run,contextKeyService){this.id=id;this.label=label;this.alias=alias;this._precondition=precondition;this._run=run;this._contextKeyService=contextKeyService}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(args){if(!this.isSupported()){return Promise.resolve(void 0)}return this._run(args)}}}});function countEOL(text2){let eolCount=0;let firstLineLength=0;let lastLineStart=0;let eol=0;for(let i=0,len=text2.length;i=factor){r=r-l1%factor}return r}function sumLengths(items,lengthFn){return items.reduce(((a,b)=>lengthAdd(a,lengthFn(b))),lengthZero)}function lengthEquals(length1,length2){return length1===length2}function lengthDiffNonNegative(length1,length2){const l1=length1;const l2=length2;const diff=l2-l1;if(diff<=0){return lengthZero}const lineCount1=Math.floor(l1/factor);const lineCount2=Math.floor(l2/factor);const colCount2=l2-lineCount2*factor;if(lineCount1===lineCount2){const colCount1=l1-lineCount1*factor;return toLength(0,colCount2-colCount1)}else{return toLength(lineCount2-lineCount1,colCount2)}}function lengthLessThan(length1,length2){return length1=length2}function positionToLength(position){return toLength(position.lineNumber-1,position.column-1)}function lengthsToRange(lengthStart,lengthEnd){const l=lengthStart;const lineCount=Math.floor(l/factor);const colCount=l-lineCount*factor;const l2=lengthEnd;const lineCount2=Math.floor(l2/factor);const colCount2=l2-lineCount2*factor;return new Range(lineCount+1,colCount+1,lineCount2+1,colCount2+1)}function lengthOfString(str){const lines=splitLines(str);return toLength(lines.length-1,lines[lines.length-1].length)}var LengthObj,lengthZero,factor;var init_length=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js"(){init_strings();init_range();LengthObj=class{constructor(lineCount,columnCount){this.lineCount=lineCount;this.columnCount=columnCount}toString(){return`${this.lineCount},${this.columnCount}`}};LengthObj.zero=new LengthObj(0,0);lengthZero=0;factor=Math.pow(2,26)}});var TextEditInfo,BeforeEditPositionMapper,TextEditInfoCache;var init_beforeEditPositionMapper=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper.js"(){init_range();init_length();TextEditInfo=class{static fromModelContentChanges(changes){const edits=changes.map((c=>{const range2=Range.lift(c.range);return new TextEditInfo(positionToLength(range2.getStartPosition()),positionToLength(range2.getEndPosition()),lengthOfString(c.text))})).reverse();return edits}constructor(startOffset,endOffset,newLength){this.startOffset=startOffset;this.endOffset=endOffset;this.newLength=newLength}toString(){return`[${lengthToObj(this.startOffset)}...${lengthToObj(this.endOffset)}) -> ${lengthToObj(this.newLength)}`}};BeforeEditPositionMapper=class{constructor(edits){this.nextEditIdx=0;this.deltaOldToNewLineCount=0;this.deltaOldToNewColumnCount=0;this.deltaLineIdxInOld=-1;this.edits=edits.map((edit=>TextEditInfoCache.from(edit)))}getOffsetBeforeChange(offset){this.adjustNextEdit(offset);return this.translateCurToOld(offset)}getDistanceToNextChange(offset){this.adjustNextEdit(offset);const nextEdit=this.edits[this.nextEditIdx];const nextChangeOffset=nextEdit?this.translateOldToCur(nextEdit.offsetObj):null;if(nextChangeOffset===null){return null}return lengthDiffNonNegative(offset,nextChangeOffset)}translateOldToCur(oldOffsetObj){if(oldOffsetObj.lineCount===this.deltaLineIdxInOld){return toLength(oldOffsetObj.lineCount+this.deltaOldToNewLineCount,oldOffsetObj.columnCount+this.deltaOldToNewColumnCount)}else{return toLength(oldOffsetObj.lineCount+this.deltaOldToNewLineCount,oldOffsetObj.columnCount)}}translateCurToOld(newOffset){const offsetObj=lengthToObj(newOffset);if(offsetObj.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld){return toLength(offsetObj.lineCount-this.deltaOldToNewLineCount,offsetObj.columnCount-this.deltaOldToNewColumnCount)}else{return toLength(offsetObj.lineCount-this.deltaOldToNewLineCount,offsetObj.columnCount)}}adjustNextEdit(offset){while(this.nextEditIdx>5;if(idx===0){const newItem=1<this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength){return null}if(this.line===null){this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1);this.line=this.lineTokens.getLineContent();this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)}const startLineIdx=this.lineIdx;const startLineCharOffset=this.lineCharOffset;let lengthHeuristic=0;while(true){const lineTokens=this.lineTokens;const tokenCount=lineTokens.getCount();let peekedBracketToken=null;if(this.lineTokenOffset1e3){break}}if(lengthHeuristic>1500){break}}const length2=lengthDiff(startLineIdx,startLineCharOffset,this.lineIdx,this.lineCharOffset);return new Token2(length2,0,-1,SmallImmutableSet.getEmpty(),new TextAstNode(length2))}};FastTokenizer=class{constructor(text2,brackets){this.text=text2;this._offset=lengthZero;this.idx=0;const regExpStr=brackets.getRegExpStr();const regexp=regExpStr?new RegExp(regExpStr+"|\n","gi"):null;const tokens=[];let match2;let curLineCount=0;let lastLineBreakOffset=0;let lastTokenEndOffset=0;let lastTokenEndLine=0;const smallTextTokens0Line=[];for(let i=0;i<60;i++){smallTextTokens0Line.push(new Token2(toLength(0,i),0,-1,SmallImmutableSet.getEmpty(),new TextAstNode(toLength(0,i))))}const smallTextTokens1Line=[];for(let i=0;i<60;i++){smallTextTokens1Line.push(new Token2(toLength(1,i),0,-1,SmallImmutableSet.getEmpty(),new TextAstNode(toLength(1,i))))}if(regexp){regexp.lastIndex=0;while((match2=regexp.exec(text2))!==null){const curOffset=match2.index;const value=match2[0];if(value==="\n"){curLineCount++;lastLineBreakOffset=curOffset+1}else{if(lastTokenEndOffset!==curOffset){let token;if(lastTokenEndLine===curLineCount){const colCount=curOffset-lastTokenEndOffset;if(colCountprepareBracketForRegExp2(k))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const regExpStr=this.getRegExpStr();this._regExpGlobal=regExpStr?new RegExp(regExpStr,"gi"):null;this.hasRegExp=true}return this._regExpGlobal}getToken(value){return this.map.get(value.toLowerCase())}findClosingTokenText(openingBracketIds){for(const[closingText,info]of this.map){if(info.kind===2&&info.bracketIds.intersects(openingBracketIds)){return closingText}}return void 0}get isEmpty(){return this.map.size===0}};LanguageAgnosticBracketTokens=class{constructor(denseKeyProvider,getLanguageConfiguration){this.denseKeyProvider=denseKeyProvider;this.getLanguageConfiguration=getLanguageConfiguration;this.languageIdToBracketTokens=new Map}didLanguageChange(languageId){return this.languageIdToBracketTokens.has(languageId)}getSingleLanguageBracketTokens(languageId){let singleLanguageBracketTokens=this.languageIdToBracketTokens.get(languageId);if(!singleLanguageBracketTokens){singleLanguageBracketTokens=BracketTokens.createFromLanguage(this.getLanguageConfiguration(languageId),this.denseKeyProvider);this.languageIdToBracketTokens.set(languageId,singleLanguageBracketTokens)}return singleLanguageBracketTokens}}}});function concat23Trees(items){if(items.length===0){return null}if(items.length===1){return items[0]}let i=0;function readNode(){if(i>=items.length){return null}const start=i;const height=items[start].listHeight;i++;while(i=2){return concat23TreesOfSameHeight(start===0&&i===items.length?items:items.slice(start,i),false)}else{return items[start]}}let first2=readNode();let second=readNode();if(!second){return first2}for(let item=readNode();item;item=readNode()){if(heightDiff(first2,second)<=heightDiff(second,item)){first2=concat(first2,second);second=item}else{second=concat(second,item)}}const result=concat(first2,second);return result}function concat23TreesOfSameHeight(items,createImmutableLists=false){if(items.length===0){return null}if(items.length===1){return items[0]}let length2=items.length;while(length2>3){const newLength=length2>>1;for(let i=0;i=3?items[2]:null,createImmutableLists)}function heightDiff(node1,node2){return Math.abs(node1.listHeight-node2.listHeight)}function concat(node1,node2){if(node1.listHeight===node2.listHeight){return ListAstNode.create23(node1,node2,null,false)}else if(node1.listHeight>node2.listHeight){return append2(node1,node2)}else{return prepend2(node2,node1)}}function append2(list,nodeToAppend){list=list.toMutable();let curNode=list;const parents=[];let nodeToAppendOfCorrectHeight;while(true){if(nodeToAppend.listHeight===curNode.listHeight){nodeToAppendOfCorrectHeight=nodeToAppend;break}if(curNode.kind!==4){throw new Error("unexpected")}parents.push(curNode);curNode=curNode.makeLastElementMutable()}for(let i=parents.length-1;i>=0;i--){const parent=parents[i];if(nodeToAppendOfCorrectHeight){if(parent.childrenLength>=3){nodeToAppendOfCorrectHeight=ListAstNode.create23(parent.unappendChild(),nodeToAppendOfCorrectHeight,null,false)}else{parent.appendChildOfSameHeight(nodeToAppendOfCorrectHeight);nodeToAppendOfCorrectHeight=void 0}}else{parent.handleChildrenChanged()}}if(nodeToAppendOfCorrectHeight){return ListAstNode.create23(list,nodeToAppendOfCorrectHeight,null,false)}else{return list}}function prepend2(list,nodeToAppend){list=list.toMutable();let curNode=list;const parents=[];while(nodeToAppend.listHeight!==curNode.listHeight){if(curNode.kind!==4){throw new Error("unexpected")}parents.push(curNode);curNode=curNode.makeFirstElementMutable()}let nodeToPrependOfCorrectHeight=nodeToAppend;for(let i=parents.length-1;i>=0;i--){const parent=parents[i];if(nodeToPrependOfCorrectHeight){if(parent.childrenLength>=3){nodeToPrependOfCorrectHeight=ListAstNode.create23(nodeToPrependOfCorrectHeight,parent.unprependChild(),null,false)}else{parent.prependChildOfSameHeight(nodeToPrependOfCorrectHeight);nodeToPrependOfCorrectHeight=void 0}}else{parent.handleChildrenChanged()}}if(nodeToPrependOfCorrectHeight){return ListAstNode.create23(nodeToPrependOfCorrectHeight,list,null,false)}else{return list}}var init_concat23Trees=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/concat23Trees.js"(){init_ast()}});function getNextChildIdx(node,curIdx=-1){while(true){curIdx++;if(curIdx>=node.childrenLength){return-1}if(node.getChild(curIdx)){return curIdx}}}function lastOrUndefined(arr){return arr.length>0?arr[arr.length-1]:void 0}var NodeReader;var init_nodeReader=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/nodeReader.js"(){init_length();NodeReader=class{constructor(node){this.lastOffset=lengthZero;this.nextNodes=[node];this.offsets=[lengthZero];this.idxs=[]}readLongestNodeAt(offset,predicate){if(lengthLessThan(offset,this.lastOffset)){throw new Error("Invalid offset")}this.lastOffset=offset;while(true){const curNode=lastOrUndefined(this.nextNodes);if(!curNode){return void 0}const curNodeOffset=lastOrUndefined(this.offsets);if(lengthLessThan(offset,curNodeOffset)){return void 0}if(lengthLessThan(curNodeOffset,offset)){if(lengthAdd(curNodeOffset,curNode.length)<=offset){this.nextNodeAfterCurrent()}else{const nextChildIdx=getNextChildIdx(curNode);if(nextChildIdx!==-1){this.nextNodes.push(curNode.getChild(nextChildIdx));this.offsets.push(curNodeOffset);this.idxs.push(nextChildIdx)}else{this.nextNodeAfterCurrent()}}}else{if(predicate(curNode)){this.nextNodeAfterCurrent();return curNode}else{const nextChildIdx=getNextChildIdx(curNode);if(nextChildIdx===-1){this.nextNodeAfterCurrent();return void 0}else{this.nextNodes.push(curNode.getChild(nextChildIdx));this.offsets.push(curNodeOffset);this.idxs.push(nextChildIdx)}}}}}nextNodeAfterCurrent(){while(true){const currentOffset=lastOrUndefined(this.offsets);const currentNode=lastOrUndefined(this.nextNodes);this.nextNodes.pop();this.offsets.pop();if(this.idxs.length===0){break}const parent=lastOrUndefined(this.nextNodes);const nextChildIdx=getNextChildIdx(parent,this.idxs[this.idxs.length-1]);if(nextChildIdx!==-1){this.nextNodes.push(parent.getChild(nextChildIdx));this.offsets.push(lengthAdd(currentOffset,currentNode.length));this.idxs[this.idxs.length-1]=nextChildIdx;break}else{this.idxs.pop()}}}}}});function parseDocument(tokenizer,edits,oldNode,createImmutableLists){const parser2=new Parser2(tokenizer,edits,oldNode,createImmutableLists);return parser2.parseDocument()}var Parser2;var init_parser=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/parser.js"(){init_ast();init_beforeEditPositionMapper();init_smallImmutableSet();init_length();init_concat23Trees();init_nodeReader();Parser2=class{constructor(tokenizer,edits,oldNode,createImmutableLists){this.tokenizer=tokenizer;this.createImmutableLists=createImmutableLists;this._itemsConstructed=0;this._itemsFromCache=0;if(oldNode&&createImmutableLists){throw new Error("Not supported")}this.oldNodeReader=oldNode?new NodeReader(oldNode):void 0;this.positionMapper=new BeforeEditPositionMapper(edits)}parseDocument(){this._itemsConstructed=0;this._itemsFromCache=0;let result=this.parseList(SmallImmutableSet.getEmpty(),0);if(!result){result=ListAstNode.getEmpty()}return result}parseList(openedBracketIds,level){const items=[];while(true){let child=this.tryReadChildFromCache(openedBracketIds);if(!child){const token=this.tokenizer.peek();if(!token||token.kind===2&&token.bracketIds.intersects(openedBracketIds)){break}child=this.parseChild(openedBracketIds,level+1)}if(child.kind===4&&child.childrenLength===0){continue}items.push(child)}const result=this.oldNodeReader?concat23Trees(items):concat23TreesOfSameHeight(items,this.createImmutableLists);return result}tryReadChildFromCache(openedBracketIds){if(this.oldNodeReader){const maxCacheableLength=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(maxCacheableLength===null||!lengthIsZero(maxCacheableLength)){const cachedNode=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(curNode=>{if(maxCacheableLength!==null&&!lengthLessThan(curNode.length,maxCacheableLength)){return false}const canBeReused=curNode.canBeReused(openedBracketIds);return canBeReused}));if(cachedNode){this._itemsFromCache++;this.tokenizer.skip(cachedNode.length);return cachedNode}}}return void 0}parseChild(openedBracketIds,level){this._itemsConstructed++;const token=this.tokenizer.read();switch(token.kind){case 2:return new InvalidBracketAstNode(token.bracketIds,token.length);case 0:return token.astNode;case 1:{if(level>300){return new TextAstNode(token.length)}const set=openedBracketIds.merge(token.bracketIds);const child=this.parseList(set,level+1);const nextToken=this.tokenizer.peek();if(nextToken&&nextToken.kind===2&&(nextToken.bracketId===token.bracketId||nextToken.bracketIds.intersects(token.bracketIds))){this.tokenizer.read();return PairAstNode.create(token.astNode,child,nextToken.astNode)}else{return PairAstNode.create(token.astNode,child,null)}}default:throw new Error("unexpected")}}}}});function combineTextEditInfos(textEditInfoFirst,textEditInfoSecond){if(textEditInfoFirst.length===0){return textEditInfoSecond}if(textEditInfoSecond.length===0){return textEditInfoFirst}const s0ToS1Map=new ArrayQueue(toLengthMapping(textEditInfoFirst));const s1ToS2Map=toLengthMapping(textEditInfoSecond);s1ToS2Map.push({modified:false,lengthBefore:void 0,lengthAfter:void 0});let curItem=s0ToS1Map.dequeue();function nextS0ToS1MapWithS1LengthOf(s1Length){if(s1Length===void 0){const arr=s0ToS1Map.takeWhile((v=>true))||[];if(curItem){arr.unshift(curItem)}return arr}const result2=[];while(curItem&&!lengthIsZero(s1Length)){const[item,remainingItem]=curItem.splitAt(s1Length);result2.push(item);s1Length=lengthDiffNonNegative(item.lengthAfter,s1Length);curItem=remainingItem!==null&&remainingItem!==void 0?remainingItem:s0ToS1Map.dequeue()}if(!lengthIsZero(s1Length)){result2.push(new LengthMapping(false,s1Length,s1Length))}return result2}const result=[];function pushEdit(startOffset,endOffset,newLength){if(result.length>0&&lengthEquals(result[result.length-1].endOffset,startOffset)){const lastResult=result[result.length-1];result[result.length-1]=new TextEditInfo(lastResult.startOffset,endOffset,lengthAdd(lastResult.newLength,newLength))}else{result.push({startOffset:startOffset,endOffset:endOffset,newLength:newLength})}}let s0offset=lengthZero;for(const s1ToS2 of s1ToS2Map){const s0ToS1Map2=nextS0ToS1MapWithS1LengthOf(s1ToS2.lengthBefore);if(s1ToS2.modified){const s0Length=sumLengths(s0ToS1Map2,(s=>s.lengthBefore));const s0EndOffset=lengthAdd(s0offset,s0Length);pushEdit(s0offset,s0EndOffset,s1ToS2.lengthAfter);s0offset=s0EndOffset}else{for(const s1 of s0ToS1Map2){const s0startOffset=s0offset;s0offset=lengthAdd(s0offset,s1.lengthBefore);if(s1.modified){pushEdit(s0startOffset,s0offset,s1.lengthAfter)}}}}return result}function toLengthMapping(textEditInfos){const result=[];let lastOffset=lengthZero;for(const textEditInfo of textEditInfos){const spaceLength=lengthDiffNonNegative(lastOffset,textEditInfo.startOffset);if(!lengthIsZero(spaceLength)){result.push(new LengthMapping(false,spaceLength,spaceLength))}const lengthBefore=lengthDiffNonNegative(textEditInfo.startOffset,textEditInfo.endOffset);result.push(new LengthMapping(true,lengthBefore,textEditInfo.newLength));lastOffset=textEditInfo.endOffset}return result}var LengthMapping;var init_combineTextEditInfos=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/combineTextEditInfos.js"(){init_arrays();init_beforeEditPositionMapper();init_length();LengthMapping=class{constructor(modified,lengthBefore,lengthAfter){this.modified=modified;this.lengthBefore=lengthBefore;this.lengthAfter=lengthAfter}splitAt(lengthAfter){const remainingLengthAfter=lengthDiffNonNegative(lengthAfter,this.lengthAfter);if(lengthEquals(remainingLengthAfter,lengthZero)){return[this,void 0]}else if(this.modified){return[new LengthMapping(this.modified,this.lengthBefore,lengthAfter),new LengthMapping(this.modified,lengthZero,remainingLengthAfter)]}else{return[new LengthMapping(this.modified,lengthAfter,lengthAfter),new LengthMapping(this.modified,remainingLengthAfter,remainingLengthAfter)]}}toString(){return`${this.modified?"M":"U"}:${lengthToObj(this.lengthBefore)} -> ${lengthToObj(this.lengthAfter)}`}}}});function getFirstBracketBefore(node,nodeOffsetStart,nodeOffsetEnd,position){if(node.kind===4||node.kind===2){const lengths=[];for(const child of node.children){nodeOffsetEnd=lengthAdd(nodeOffsetStart,child.length);lengths.push({nodeOffsetStart:nodeOffsetStart,nodeOffsetEnd:nodeOffsetEnd});nodeOffsetStart=nodeOffsetEnd}for(let i=lengths.length-1;i>=0;i--){const{nodeOffsetStart:nodeOffsetStart2,nodeOffsetEnd:nodeOffsetEnd2}=lengths[i];if(lengthLessThan(nodeOffsetStart2,position)){const result=getFirstBracketBefore(node.children[i],nodeOffsetStart2,nodeOffsetEnd2,position);if(result){return result}}}return null}else if(node.kind===3){return null}else if(node.kind===1){const range2=lengthsToRange(nodeOffsetStart,nodeOffsetEnd);return{bracketInfo:node.bracketInfo,range:range2}}return null}function getFirstBracketAfter(node,nodeOffsetStart,nodeOffsetEnd,position){if(node.kind===4||node.kind===2){for(const child of node.children){nodeOffsetEnd=lengthAdd(nodeOffsetStart,child.length);if(lengthLessThan(position,nodeOffsetEnd)){const result=getFirstBracketAfter(child,nodeOffsetStart,nodeOffsetEnd,position);if(result){return result}}nodeOffsetStart=nodeOffsetEnd}return null}else if(node.kind===3){return null}else if(node.kind===1){const range2=lengthsToRange(nodeOffsetStart,nodeOffsetEnd);return{bracketInfo:node.bracketInfo,range:range2}}return null}function collectBrackets(node,nodeOffsetStart,nodeOffsetEnd,startOffset,endOffset,push,level,nestingLevelOfEqualBracketType,levelPerBracketType,onlyColorizedBrackets,parentPairIsIncomplete=false){if(level>200){return true}whileLoop:while(true){switch(node.kind){case 4:{const childCount=node.childrenLength;for(let i=0;i200){return true}let shouldContinue=true;if(node.kind===2){let levelPerBracket=0;if(levelPerBracketType){let existing=levelPerBracketType.get(node.openingBracket.text);if(existing===void 0){existing=0}levelPerBracket=existing;existing++;levelPerBracketType.set(node.openingBracket.text,existing)}const openingBracketEnd=lengthAdd(nodeOffsetStart,node.openingBracket.length);let minIndentation=-1;if(context.includeMinIndentation){minIndentation=node.computeMinIndentation(nodeOffsetStart,context.textModel)}shouldContinue=context.push(new BracketPairWithMinIndentationInfo(lengthsToRange(nodeOffsetStart,nodeOffsetEnd),lengthsToRange(nodeOffsetStart,openingBracketEnd),node.closingBracket?lengthsToRange(lengthAdd(openingBracketEnd,((_a6=node.child)===null||_a6===void 0?void 0:_a6.length)||lengthZero),nodeOffsetEnd):void 0,level,levelPerBracket,node,minIndentation));nodeOffsetStart=openingBracketEnd;if(shouldContinue&&node.child){const child=node.child;nodeOffsetEnd=lengthAdd(nodeOffsetStart,child.length);if(lengthLessThanEqual(nodeOffsetStart,endOffset)&&lengthGreaterThanEqual(nodeOffsetEnd,startOffset)){shouldContinue=collectBracketPairs(child,nodeOffsetStart,nodeOffsetEnd,startOffset,endOffset,context,level+1,levelPerBracketType);if(!shouldContinue){return false}}}levelPerBracketType===null||levelPerBracketType===void 0?void 0:levelPerBracketType.set(node.openingBracket.text,levelPerBracket)}else{let curOffset=nodeOffsetStart;for(const child of node.children){const childOffset=curOffset;curOffset=lengthAdd(curOffset,child.length);if(lengthLessThanEqual(childOffset,endOffset)&&lengthLessThanEqual(startOffset,curOffset)){shouldContinue=collectBracketPairs(child,childOffset,curOffset,startOffset,endOffset,context,level,levelPerBracketType);if(!shouldContinue){return false}}}}return shouldContinue}var BracketPairsTree,CollectBracketPairsContext;var init_bracketPairsTree=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree.js"(){init_event();init_lifecycle();init_textModelBracketPairs();init_beforeEditPositionMapper();init_brackets();init_length();init_parser();init_smallImmutableSet();init_tokenizer();init_arrays();init_combineTextEditInfos();BracketPairsTree=class extends Disposable{didLanguageChange(languageId){return this.brackets.didLanguageChange(languageId)}constructor(textModel,getLanguageConfiguration){super();this.textModel=textModel;this.getLanguageConfiguration=getLanguageConfiguration;this.didChangeEmitter=new Emitter;this.denseKeyProvider=new DenseKeyProvider;this.brackets=new LanguageAgnosticBracketTokens(this.denseKeyProvider,this.getLanguageConfiguration);this.onDidChange=this.didChangeEmitter.event;this.queuedTextEditsForInitialAstWithoutTokens=[];this.queuedTextEdits=[];if(!textModel.tokenization.hasTokens){const brackets=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId());const tokenizer=new FastTokenizer(this.textModel.getValue(),brackets);this.initialAstWithoutTokens=parseDocument(tokenizer,[],void 0,true);this.astWithTokens=this.initialAstWithoutTokens}else if(textModel.tokenization.backgroundTokenizationState===2){this.initialAstWithoutTokens=void 0;this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,false)}else{this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,true);this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const wasUndefined=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0;if(!wasUndefined){this.didChangeEmitter.fire()}}}handleDidChangeTokens({ranges:ranges}){const edits=ranges.map((r=>new TextEditInfo(toLength(r.fromLineNumber-1,0),toLength(r.toLineNumber,0),toLength(r.toLineNumber-r.fromLineNumber+1,0))));this.handleEdits(edits,true);if(!this.initialAstWithoutTokens){this.didChangeEmitter.fire()}}handleContentChanged(change){const edits=TextEditInfo.fromModelContentChanges(change.changes);this.handleEdits(edits,false)}handleEdits(edits,tokenChange){const result=combineTextEditInfos(this.queuedTextEdits,edits);this.queuedTextEdits=result;if(this.initialAstWithoutTokens&&!tokenChange){this.queuedTextEditsForInitialAstWithoutTokens=combineTextEditInfos(this.queuedTextEditsForInitialAstWithoutTokens,edits)}}flushQueue(){if(this.queuedTextEdits.length>0){this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,false);this.queuedTextEdits=[]}if(this.queuedTextEditsForInitialAstWithoutTokens.length>0){if(this.initialAstWithoutTokens){this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,false)}this.queuedTextEditsForInitialAstWithoutTokens=[]}}parseDocumentFromTextBuffer(edits,previousAst,immutable){const isPure=false;const previousAstClone=isPure?previousAst===null||previousAst===void 0?void 0:previousAst.deepClone():previousAst;const tokenizer=new TextBufferTokenizer(this.textModel,this.brackets);const result=parseDocument(tokenizer,edits,previousAstClone,immutable);return result}getBracketsInRange(range2,onlyColorizedBrackets){this.flushQueue();const startOffset=toLength(range2.startLineNumber-1,range2.startColumn-1);const endOffset=toLength(range2.endLineNumber-1,range2.endColumn-1);return new CallbackIterable((cb=>{const node=this.initialAstWithoutTokens||this.astWithTokens;collectBrackets(node,lengthZero,node.length,startOffset,endOffset,cb,0,0,new Map,onlyColorizedBrackets)}))}getBracketPairsInRange(range2,includeMinIndentation){this.flushQueue();const startLength=positionToLength(range2.getStartPosition());const endLength=positionToLength(range2.getEndPosition());return new CallbackIterable((cb=>{const node=this.initialAstWithoutTokens||this.astWithTokens;const context=new CollectBracketPairsContext(cb,includeMinIndentation,this.textModel);collectBracketPairs(node,lengthZero,node.length,startLength,endLength,context,0,new Map)}))}getFirstBracketAfter(position){this.flushQueue();const node=this.initialAstWithoutTokens||this.astWithTokens;return getFirstBracketAfter(node,lengthZero,node.length,positionToLength(position))}getFirstBracketBefore(position){this.flushQueue();const node=this.initialAstWithoutTokens||this.astWithTokens;return getFirstBracketBefore(node,lengthZero,node.length,positionToLength(position))}};CollectBracketPairsContext=class{constructor(push,includeMinIndentation,textModel){this.push=push;this.includeMinIndentation=includeMinIndentation;this.textModel=textModel}}}});function createDisposableRef(object,disposable){return{object:object,dispose:()=>disposable===null||disposable===void 0?void 0:disposable.dispose()}}function createTimeBasedContinueBracketSearchPredicate(maxDuration){if(typeof maxDuration==="undefined"){return()=>true}else{const startTime=Date.now();return()=>Date.now()-startTime<=maxDuration}}function stripBracketSearchCanceled(result){if(result instanceof BracketSearchCanceled){return null}return result}var BracketPairsTextModelPart,BracketSearchCanceled;var init_bracketPairsImpl=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl.js"(){init_arrays();init_event();init_lifecycle();init_range();init_supports();init_richEditBrackets();init_bracketPairsTree();BracketPairsTextModelPart=class extends Disposable{get canBuildAST(){const maxSupportedDocumentLength=5e4*100;return this.textModel.getValueLength()<=maxSupportedDocumentLength}constructor(textModel,languageConfigurationService){super();this.textModel=textModel;this.languageConfigurationService=languageConfigurationService;this.bracketPairsTree=this._register(new MutableDisposable);this.onDidChangeEmitter=new Emitter;this.onDidChange=this.onDidChangeEmitter.event;this.bracketsRequested=false;this._register(this.languageConfigurationService.onDidChange((e=>{var _a6;if(!e.languageId||((_a6=this.bracketPairsTree.value)===null||_a6===void 0?void 0:_a6.object.didLanguageChange(e.languageId))){this.bracketPairsTree.clear();this.updateBracketPairsTree()}})))}handleDidChangeOptions(e){this.bracketPairsTree.clear();this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear();this.updateBracketPairsTree()}handleDidChangeContent(change){var _a6;(_a6=this.bracketPairsTree.value)===null||_a6===void 0?void 0:_a6.object.handleContentChanged(change)}handleDidChangeBackgroundTokenizationState(){var _a6;(_a6=this.bracketPairsTree.value)===null||_a6===void 0?void 0:_a6.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var _a6;(_a6=this.bracketPairsTree.value)===null||_a6===void 0?void 0:_a6.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const store=new DisposableStore;this.bracketPairsTree.value=createDisposableRef(store.add(new BracketPairsTree(this.textModel,(languageId=>this.languageConfigurationService.getLanguageConfiguration(languageId)))),store);store.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e))));this.onDidChangeEmitter.fire()}}else{if(this.bracketPairsTree.value){this.bracketPairsTree.clear();this.onDidChangeEmitter.fire()}}}getBracketPairsInRange(range2){var _a6;this.bracketsRequested=true;this.updateBracketPairsTree();return((_a6=this.bracketPairsTree.value)===null||_a6===void 0?void 0:_a6.object.getBracketPairsInRange(range2,false))||CallbackIterable.empty}getBracketPairsInRangeWithMinIndentation(range2){var _a6;this.bracketsRequested=true;this.updateBracketPairsTree();return((_a6=this.bracketPairsTree.value)===null||_a6===void 0?void 0:_a6.object.getBracketPairsInRange(range2,true))||CallbackIterable.empty}getBracketsInRange(range2,onlyColorizedBrackets=false){var _a6;this.bracketsRequested=true;this.updateBracketPairsTree();return((_a6=this.bracketPairsTree.value)===null||_a6===void 0?void 0:_a6.object.getBracketsInRange(range2,onlyColorizedBrackets))||CallbackIterable.empty}findMatchingBracketUp(_bracket,_position,maxDuration){const position=this.textModel.validatePosition(_position);const languageId=this.textModel.getLanguageIdAtPosition(position.lineNumber,position.column);if(this.canBuildAST){const closingBracketInfo=this.languageConfigurationService.getLanguageConfiguration(languageId).bracketsNew.getClosingBracketInfo(_bracket);if(!closingBracketInfo){return null}const bracketPair=this.getBracketPairsInRange(Range.fromPositions(_position,_position)).findLast((b=>closingBracketInfo.closes(b.openingBracketInfo)));if(bracketPair){return bracketPair.openingBracketRange}return null}else{const bracket=_bracket.toLowerCase();const bracketsSupport=this.languageConfigurationService.getLanguageConfiguration(languageId).brackets;if(!bracketsSupport){return null}const data=bracketsSupport.textIsBracket[bracket];if(!data){return null}return stripBracketSearchCanceled(this._findMatchingBracketUp(data,position,createTimeBasedContinueBracketSearchPredicate(maxDuration)))}}matchBracket(position,maxDuration){if(this.canBuildAST){const bracketPair=this.getBracketPairsInRange(Range.fromPositions(position,position)).filter((item=>item.closingBracketRange!==void 0&&(item.openingBracketRange.containsPosition(position)||item.closingBracketRange.containsPosition(position)))).findLastMaxBy(compareBy((item=>item.openingBracketRange.containsPosition(position)?item.openingBracketRange:item.closingBracketRange),Range.compareRangesUsingStarts));if(bracketPair){return[bracketPair.openingBracketRange,bracketPair.closingBracketRange]}return null}else{const continueSearchPredicate=createTimeBasedContinueBracketSearchPredicate(maxDuration);return this._matchBracket(this.textModel.validatePosition(position),continueSearchPredicate)}}_establishBracketSearchOffsets(position,lineTokens,modeBrackets,tokenIndex){const tokenCount=lineTokens.getCount();const currentLanguageId=lineTokens.getLanguageId(tokenIndex);let searchStartOffset=Math.max(0,position.column-1-modeBrackets.maxBracketLength);for(let i=tokenIndex-1;i>=0;i--){const tokenEndOffset=lineTokens.getEndOffset(i);if(tokenEndOffset<=searchStartOffset){break}if(ignoreBracketsInToken(lineTokens.getStandardTokenType(i))||lineTokens.getLanguageId(i)!==currentLanguageId){searchStartOffset=tokenEndOffset;break}}let searchEndOffset=Math.min(lineTokens.getLineContent().length,position.column-1+modeBrackets.maxBracketLength);for(let i=tokenIndex+1;i=searchEndOffset){break}if(ignoreBracketsInToken(lineTokens.getStandardTokenType(i))||lineTokens.getLanguageId(i)!==currentLanguageId){searchEndOffset=tokenStartOffset;break}}return{searchStartOffset:searchStartOffset,searchEndOffset:searchEndOffset}}_matchBracket(position,continueSearchPredicate){const lineNumber=position.lineNumber;const lineTokens=this.textModel.tokenization.getLineTokens(lineNumber);const lineText=this.textModel.getLineContent(lineNumber);const tokenIndex=lineTokens.findTokenIndexAtOffset(position.column-1);if(tokenIndex<0){return null}const currentModeBrackets=this.languageConfigurationService.getLanguageConfiguration(lineTokens.getLanguageId(tokenIndex)).brackets;if(currentModeBrackets&&!ignoreBracketsInToken(lineTokens.getStandardTokenType(tokenIndex))){let{searchStartOffset:searchStartOffset,searchEndOffset:searchEndOffset}=this._establishBracketSearchOffsets(position,lineTokens,currentModeBrackets,tokenIndex);let bestResult=null;while(true){const foundBracket=BracketsUtils.findNextBracketInRange(currentModeBrackets.forwardRegex,lineNumber,lineText,searchStartOffset,searchEndOffset);if(!foundBracket){break}if(foundBracket.startColumn<=position.column&&position.column<=foundBracket.endColumn){const foundBracketText=lineText.substring(foundBracket.startColumn-1,foundBracket.endColumn-1).toLowerCase();const r=this._matchFoundBracket(foundBracket,currentModeBrackets.textIsBracket[foundBracketText],currentModeBrackets.textIsOpenBracket[foundBracketText],continueSearchPredicate);if(r){if(r instanceof BracketSearchCanceled){return null}bestResult=r}}searchStartOffset=foundBracket.endColumn-1}if(bestResult){return bestResult}}if(tokenIndex>0&&lineTokens.getStartOffset(tokenIndex)===position.column-1){const prevTokenIndex=tokenIndex-1;const prevModeBrackets=this.languageConfigurationService.getLanguageConfiguration(lineTokens.getLanguageId(prevTokenIndex)).brackets;if(prevModeBrackets&&!ignoreBracketsInToken(lineTokens.getStandardTokenType(prevTokenIndex))){const{searchStartOffset:searchStartOffset,searchEndOffset:searchEndOffset}=this._establishBracketSearchOffsets(position,lineTokens,prevModeBrackets,prevTokenIndex);const foundBracket=BracketsUtils.findPrevBracketInRange(prevModeBrackets.reversedRegex,lineNumber,lineText,searchStartOffset,searchEndOffset);if(foundBracket&&foundBracket.startColumn<=position.column&&position.column<=foundBracket.endColumn){const foundBracketText=lineText.substring(foundBracket.startColumn-1,foundBracket.endColumn-1).toLowerCase();const r=this._matchFoundBracket(foundBracket,prevModeBrackets.textIsBracket[foundBracketText],prevModeBrackets.textIsOpenBracket[foundBracketText],continueSearchPredicate);if(r){if(r instanceof BracketSearchCanceled){return null}return r}}}}return null}_matchFoundBracket(foundBracket,data,isOpen,continueSearchPredicate){if(!data){return null}const matched=isOpen?this._findMatchingBracketDown(data,foundBracket.getEndPosition(),continueSearchPredicate):this._findMatchingBracketUp(data,foundBracket.getStartPosition(),continueSearchPredicate);if(!matched){return null}if(matched instanceof BracketSearchCanceled){return matched}return[foundBracket,matched]}_findMatchingBracketUp(bracket,position,continueSearchPredicate){const languageId=bracket.languageId;const reversedBracketRegex=bracket.reversedRegex;let count=-1;let totalCallCount=0;const searchPrevMatchingBracketInRange=(lineNumber,lineText,searchStartOffset,searchEndOffset)=>{while(true){if(continueSearchPredicate&&++totalCallCount%100===0&&!continueSearchPredicate()){return BracketSearchCanceled.INSTANCE}const r=BracketsUtils.findPrevBracketInRange(reversedBracketRegex,lineNumber,lineText,searchStartOffset,searchEndOffset);if(!r){break}const hitText=lineText.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(bracket.isOpen(hitText)){count++}else if(bracket.isClose(hitText)){count--}if(count===0){return r}searchEndOffset=r.startColumn-1}return null};for(let lineNumber=position.lineNumber;lineNumber>=1;lineNumber--){const lineTokens=this.textModel.tokenization.getLineTokens(lineNumber);const tokenCount=lineTokens.getCount();const lineText=this.textModel.getLineContent(lineNumber);let tokenIndex=tokenCount-1;let searchStartOffset=lineText.length;let searchEndOffset=lineText.length;if(lineNumber===position.lineNumber){tokenIndex=lineTokens.findTokenIndexAtOffset(position.column-1);searchStartOffset=position.column-1;searchEndOffset=position.column-1}let prevSearchInToken=true;for(;tokenIndex>=0;tokenIndex--){const searchInToken=lineTokens.getLanguageId(tokenIndex)===languageId&&!ignoreBracketsInToken(lineTokens.getStandardTokenType(tokenIndex));if(searchInToken){if(prevSearchInToken){searchStartOffset=lineTokens.getStartOffset(tokenIndex)}else{searchStartOffset=lineTokens.getStartOffset(tokenIndex);searchEndOffset=lineTokens.getEndOffset(tokenIndex)}}else{if(prevSearchInToken&&searchStartOffset!==searchEndOffset){const r=searchPrevMatchingBracketInRange(lineNumber,lineText,searchStartOffset,searchEndOffset);if(r){return r}}}prevSearchInToken=searchInToken}if(prevSearchInToken&&searchStartOffset!==searchEndOffset){const r=searchPrevMatchingBracketInRange(lineNumber,lineText,searchStartOffset,searchEndOffset);if(r){return r}}}return null}_findMatchingBracketDown(bracket,position,continueSearchPredicate){const languageId=bracket.languageId;const bracketRegex=bracket.forwardRegex;let count=1;let totalCallCount=0;const searchNextMatchingBracketInRange=(lineNumber,lineText,searchStartOffset,searchEndOffset)=>{while(true){if(continueSearchPredicate&&++totalCallCount%100===0&&!continueSearchPredicate()){return BracketSearchCanceled.INSTANCE}const r=BracketsUtils.findNextBracketInRange(bracketRegex,lineNumber,lineText,searchStartOffset,searchEndOffset);if(!r){break}const hitText=lineText.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(bracket.isOpen(hitText)){count++}else if(bracket.isClose(hitText)){count--}if(count===0){return r}searchStartOffset=r.endColumn-1}return null};const lineCount=this.textModel.getLineCount();for(let lineNumber=position.lineNumber;lineNumber<=lineCount;lineNumber++){const lineTokens=this.textModel.tokenization.getLineTokens(lineNumber);const tokenCount=lineTokens.getCount();const lineText=this.textModel.getLineContent(lineNumber);let tokenIndex=0;let searchStartOffset=0;let searchEndOffset=0;if(lineNumber===position.lineNumber){tokenIndex=lineTokens.findTokenIndexAtOffset(position.column-1);searchStartOffset=position.column-1;searchEndOffset=position.column-1}let prevSearchInToken=true;for(;tokenIndex=1;lineNumber--){const lineTokens=this.textModel.tokenization.getLineTokens(lineNumber);const tokenCount=lineTokens.getCount();const lineText=this.textModel.getLineContent(lineNumber);let tokenIndex=tokenCount-1;let searchStartOffset=lineText.length;let searchEndOffset=lineText.length;if(lineNumber===position.lineNumber){tokenIndex=lineTokens.findTokenIndexAtOffset(position.column-1);searchStartOffset=position.column-1;searchEndOffset=position.column-1;const tokenLanguageId=lineTokens.getLanguageId(tokenIndex);if(languageId!==tokenLanguageId){languageId=tokenLanguageId;modeBrackets=this.languageConfigurationService.getLanguageConfiguration(languageId).brackets;bracketConfig=this.languageConfigurationService.getLanguageConfiguration(languageId).bracketsNew}}let prevSearchInToken=true;for(;tokenIndex>=0;tokenIndex--){const tokenLanguageId=lineTokens.getLanguageId(tokenIndex);if(languageId!==tokenLanguageId){if(modeBrackets&&bracketConfig&&prevSearchInToken&&searchStartOffset!==searchEndOffset){const r=BracketsUtils.findPrevBracketInRange(modeBrackets.reversedRegex,lineNumber,lineText,searchStartOffset,searchEndOffset);if(r){return this._toFoundBracket(bracketConfig,r)}prevSearchInToken=false}languageId=tokenLanguageId;modeBrackets=this.languageConfigurationService.getLanguageConfiguration(languageId).brackets;bracketConfig=this.languageConfigurationService.getLanguageConfiguration(languageId).bracketsNew}const searchInToken=!!modeBrackets&&!ignoreBracketsInToken(lineTokens.getStandardTokenType(tokenIndex));if(searchInToken){if(prevSearchInToken){searchStartOffset=lineTokens.getStartOffset(tokenIndex)}else{searchStartOffset=lineTokens.getStartOffset(tokenIndex);searchEndOffset=lineTokens.getEndOffset(tokenIndex)}}else{if(bracketConfig&&modeBrackets&&prevSearchInToken&&searchStartOffset!==searchEndOffset){const r=BracketsUtils.findPrevBracketInRange(modeBrackets.reversedRegex,lineNumber,lineText,searchStartOffset,searchEndOffset);if(r){return this._toFoundBracket(bracketConfig,r)}}}prevSearchInToken=searchInToken}if(bracketConfig&&modeBrackets&&prevSearchInToken&&searchStartOffset!==searchEndOffset){const r=BracketsUtils.findPrevBracketInRange(modeBrackets.reversedRegex,lineNumber,lineText,searchStartOffset,searchEndOffset);if(r){return this._toFoundBracket(bracketConfig,r)}}}return null}findNextBracket(_position){var _a6;const position=this.textModel.validatePosition(_position);if(this.canBuildAST){this.bracketsRequested=true;this.updateBracketPairsTree();return((_a6=this.bracketPairsTree.value)===null||_a6===void 0?void 0:_a6.object.getFirstBracketAfter(position))||null}const lineCount=this.textModel.getLineCount();let languageId=null;let modeBrackets=null;let bracketConfig=null;for(let lineNumber=position.lineNumber;lineNumber<=lineCount;lineNumber++){const lineTokens=this.textModel.tokenization.getLineTokens(lineNumber);const tokenCount=lineTokens.getCount();const lineText=this.textModel.getLineContent(lineNumber);let tokenIndex=0;let searchStartOffset=0;let searchEndOffset=0;if(lineNumber===position.lineNumber){tokenIndex=lineTokens.findTokenIndexAtOffset(position.column-1);searchStartOffset=position.column-1;searchEndOffset=position.column-1;const tokenLanguageId=lineTokens.getLanguageId(tokenIndex);if(languageId!==tokenLanguageId){languageId=tokenLanguageId;modeBrackets=this.languageConfigurationService.getLanguageConfiguration(languageId).brackets;bracketConfig=this.languageConfigurationService.getLanguageConfiguration(languageId).bracketsNew}}let prevSearchInToken=true;for(;tokenIndexitem.closingBracketRange!==void 0&&item.range.strictContainsRange(range2)));if(bracketPair){return[bracketPair.openingBracketRange,bracketPair.closingBracketRange]}return null}const continueSearchPredicate=createTimeBasedContinueBracketSearchPredicate(maxDuration);const lineCount=this.textModel.getLineCount();const savedCounts=new Map;let counts=[];const resetCounts=(languageId2,modeBrackets2)=>{if(!savedCounts.has(languageId2)){const tmp=[];for(let i=0,len=modeBrackets2?modeBrackets2.brackets.length:0;i{while(true){if(continueSearchPredicate&&++totalCallCount%100===0&&!continueSearchPredicate()){return BracketSearchCanceled.INSTANCE}const r=BracketsUtils.findNextBracketInRange(modeBrackets2.forwardRegex,lineNumber,lineText,searchStartOffset,searchEndOffset);if(!r){break}const hitText=lineText.substring(r.startColumn-1,r.endColumn-1).toLowerCase();const bracket=modeBrackets2.textIsBracket[hitText];if(bracket){if(bracket.isOpen(hitText)){counts[bracket.index]++}else if(bracket.isClose(hitText)){counts[bracket.index]--}if(counts[bracket.index]===-1){return this._matchFoundBracket(r,bracket,false,continueSearchPredicate)}}searchStartOffset=r.endColumn-1}return null};let languageId=null;let modeBrackets=null;for(let lineNumber=position.lineNumber;lineNumber<=lineCount;lineNumber++){const lineTokens=this.textModel.tokenization.getLineTokens(lineNumber);const tokenCount=lineTokens.getCount();const lineText=this.textModel.getLineContent(lineNumber);let tokenIndex=0;let searchStartOffset=0;let searchEndOffset=0;if(lineNumber===position.lineNumber){tokenIndex=lineTokens.findTokenIndexAtOffset(position.column-1);searchStartOffset=position.column-1;searchEndOffset=position.column-1;const tokenLanguageId=lineTokens.getLanguageId(tokenIndex);if(languageId!==tokenLanguageId){languageId=tokenLanguageId;modeBrackets=this.languageConfigurationService.getLanguageConfiguration(languageId).brackets;resetCounts(languageId,modeBrackets)}}let prevSearchInToken=true;for(;tokenIndex{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(range2,ownerId,filterOutValidation,onlyMinimapDecorations){if(onlyMinimapDecorations){return[]}if(ownerId===void 0){return[]}if(!this.colorizationOptions.enabled){return[]}const result=this.textModel.bracketPairs.getBracketsInRange(range2,true).map((bracket=>({id:`bracket${bracket.range.toString()}-${bracket.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(bracket,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:bracket.range}))).toArray();return result}getAllDecorations(ownerId,filterOutValidation){if(ownerId===void 0){return[]}if(!this.colorizationOptions.enabled){return[]}return this.getDecorationsInRange(new Range(1,1,this.textModel.getLineCount(),1),ownerId,filterOutValidation)}};ColorProvider=class{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(bracket,independentColorPoolPerBracketType){if(bracket.isInvalid){return this.unexpectedClosingBracketClassName}return this.getInlineClassNameOfLevel(independentColorPoolPerBracketType?bracket.nestingLevelOfEqualBracketType:bracket.nestingLevel)}getInlineClassNameOfLevel(level){return`bracket-highlighting-${level%30}`}};registerThemingParticipant(((theme,collector)=>{const colors=[editorBracketHighlightingForeground1,editorBracketHighlightingForeground2,editorBracketHighlightingForeground3,editorBracketHighlightingForeground4,editorBracketHighlightingForeground5,editorBracketHighlightingForeground6];const colorProvider=new ColorProvider;collector.addRule(`.monaco-editor .${colorProvider.unexpectedClosingBracketClassName} { color: ${theme.getColor(editorBracketHighlightingUnexpectedBracketForeground)}; }`);const colorValues=colors.map((c=>theme.getColor(c))).filter((c=>!!c)).filter((c=>!c.isTransparent()));for(let level=0;level<30;level++){const color=colorValues[level%colorValues.length];collector.addRule(`.monaco-editor .${colorProvider.getInlineClassNameOfLevel(level)} { color: ${color}; }`)}}))}});function escapeNewLine(str){return str.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}function compressConsecutiveTextChanges(prevEdits,currEdits){if(prevEdits===null||prevEdits.length===0){return currEdits}const compressor=new TextChangeCompressor(prevEdits,currEdits);return compressor.compress()}var TextChange,TextChangeCompressor;var init_textChange=__esm({"node_modules/monaco-editor/esm/vs/editor/common/core/textChange.js"(){init_buffer();init_stringBuilder();TextChange=class{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(oldPosition,oldText,newPosition,newText){this.oldPosition=oldPosition;this.oldText=oldText;this.newPosition=newPosition;this.newText=newText}toString(){if(this.oldText.length===0){return`(insert@${this.oldPosition} "${escapeNewLine(this.newText)}")`}if(this.newText.length===0){return`(delete@${this.oldPosition} "${escapeNewLine(this.oldText)}")`}return`(replace@${this.oldPosition} "${escapeNewLine(this.oldText)}" with "${escapeNewLine(this.newText)}")`}static _writeStringSize(str){return 4+2*str.length}static _writeString(b,str,offset){const len=str.length;writeUInt32BE(b,len,offset);offset+=4;for(let i=0;ibase.length){return false}if(ignoreCase){const beginsWith=startsWithIgnoreCase(base,parentCandidate);if(!beginsWith){return false}if(parentCandidate.length===base.length){return true}let sepOffset=parentCandidate.length;if(parentCandidate.charAt(parentCandidate.length-1)===separator){sepOffset--}return base.charAt(sepOffset)===separator}if(parentCandidate.charAt(parentCandidate.length-1)!==separator){parentCandidate+=separator}return base.indexOf(parentCandidate)===0}function isWindowsDriveLetter(char0){return char0>=65&&char0<=90||char0>=97&&char0<=122}function hasDriveLetter(path,isWindowsOS=isWindows){if(isWindowsOS){return isWindowsDriveLetter(path.charCodeAt(0))&&path.charCodeAt(1)===58}return false}var init_extpath=__esm({"node_modules/monaco-editor/esm/vs/base/common/extpath.js"(){init_path();init_platform();init_strings()}});function originalFSPath(uri){return uriToFsPath(uri,true)}var ExtUri,extUri,extUriBiasedIgnorePathCase,extUriIgnorePathCase,isEqual,isEqualOrParent2,getComparisonKey,basenameOrAuthority,basename2,extname2,dirname2,joinPath,normalizePath,relativePath,resolvePath,isAbsolutePath,isEqualAuthority,hasTrailingPathSeparator,removeTrailingPathSeparator,addTrailingPathSeparator,DataUri;var init_resources=__esm({"node_modules/monaco-editor/esm/vs/base/common/resources.js"(){init_extpath();init_network();init_path();init_platform();init_strings();init_uri();ExtUri=class{constructor(_ignorePathCasing){this._ignorePathCasing=_ignorePathCasing}compare(uri1,uri2,ignoreFragment=false){if(uri1===uri2){return 0}return compare(this.getComparisonKey(uri1,ignoreFragment),this.getComparisonKey(uri2,ignoreFragment))}isEqual(uri1,uri2,ignoreFragment=false){if(uri1===uri2){return true}if(!uri1||!uri2){return false}return this.getComparisonKey(uri1,ignoreFragment)===this.getComparisonKey(uri2,ignoreFragment)}getComparisonKey(uri,ignoreFragment=false){return uri.with({path:this._ignorePathCasing(uri)?uri.path.toLowerCase():void 0,fragment:ignoreFragment?null:void 0}).toString()}isEqualOrParent(base,parentCandidate,ignoreFragment=false){if(base.scheme===parentCandidate.scheme){if(base.scheme===Schemas.file){return isEqualOrParent(originalFSPath(base),originalFSPath(parentCandidate),this._ignorePathCasing(base))&&base.query===parentCandidate.query&&(ignoreFragment||base.fragment===parentCandidate.fragment)}if(isEqualAuthority(base.authority,parentCandidate.authority)){return isEqualOrParent(base.path,parentCandidate.path,this._ignorePathCasing(base),"/")&&base.query===parentCandidate.query&&(ignoreFragment||base.fragment===parentCandidate.fragment)}}return false}joinPath(resource,...pathFragment){return URI.joinPath(resource,...pathFragment)}basenameOrAuthority(resource){return basename2(resource)||resource.authority}basename(resource){return posix.basename(resource.path)}extname(resource){return posix.extname(resource.path)}dirname(resource){if(resource.path.length===0){return resource}let dirname3;if(resource.scheme===Schemas.file){dirname3=URI.file(dirname(originalFSPath(resource))).path}else{dirname3=posix.dirname(resource.path);if(resource.authority&&dirname3.length&&dirname3.charCodeAt(0)!==47){console.error(`dirname("${resource.toString})) resulted in a relative path`);dirname3="/"}}return resource.with({path:dirname3})}normalizePath(resource){if(!resource.path.length){return resource}let normalizedPath;if(resource.scheme===Schemas.file){normalizedPath=URI.file(normalize(originalFSPath(resource))).path}else{normalizedPath=posix.normalize(resource.path)}return resource.with({path:normalizedPath})}relativePath(from,to){if(from.scheme!==to.scheme||!isEqualAuthority(from.authority,to.authority)){return void 0}if(from.scheme===Schemas.file){const relativePath2=relative(originalFSPath(from),originalFSPath(to));return isWindows?toSlashes(relativePath2):relativePath2}let fromPath=from.path||"/";const toPath=to.path||"/";if(this._ignorePathCasing(from)){let i=0;for(const len=Math.min(fromPath.length,toPath.length);igetRoot(fsp).length&&fsp[fsp.length-1]===sep2}else{const p=resource.path;return p.length>1&&p.charCodeAt(p.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(resource.fsPath)}}removeTrailingPathSeparator(resource,sep2=sep){if(hasTrailingPathSeparator(resource,sep2)){return resource.with({path:resource.path.substr(0,resource.path.length-1)})}return resource}addTrailingPathSeparator(resource,sep2=sep){let isRootSep=false;if(resource.scheme===Schemas.file){const fsp=originalFSPath(resource);isRootSep=fsp!==void 0&&fsp.length===getRoot(fsp).length&&fsp[fsp.length-1]===sep2}else{sep2="/";const p=resource.path;isRootSep=p.length===1&&p.charCodeAt(p.length-1)===47}if(!isRootSep&&!hasTrailingPathSeparator(resource,sep2)){return resource.with({path:resource.path+"/"})}return resource}};extUri=new ExtUri((()=>false));extUriBiasedIgnorePathCase=new ExtUri((uri=>uri.scheme===Schemas.file?!isLinux:true));extUriIgnorePathCase=new ExtUri((_=>true));isEqual=extUri.isEqual.bind(extUri);isEqualOrParent2=extUri.isEqualOrParent.bind(extUri);getComparisonKey=extUri.getComparisonKey.bind(extUri);basenameOrAuthority=extUri.basenameOrAuthority.bind(extUri);basename2=extUri.basename.bind(extUri);extname2=extUri.extname.bind(extUri);dirname2=extUri.dirname.bind(extUri);joinPath=extUri.joinPath.bind(extUri);normalizePath=extUri.normalizePath.bind(extUri);relativePath=extUri.relativePath.bind(extUri);resolvePath=extUri.resolvePath.bind(extUri);isAbsolutePath=extUri.isAbsolutePath.bind(extUri);isEqualAuthority=extUri.isEqualAuthority.bind(extUri);hasTrailingPathSeparator=extUri.hasTrailingPathSeparator.bind(extUri);removeTrailingPathSeparator=extUri.removeTrailingPathSeparator.bind(extUri);addTrailingPathSeparator=extUri.addTrailingPathSeparator.bind(extUri);(function(DataUri2){DataUri2.META_DATA_LABEL="label";DataUri2.META_DATA_DESCRIPTION="description";DataUri2.META_DATA_SIZE="size";DataUri2.META_DATA_MIME="mime";function parseMetaData(dataUri){const metadata=new Map;const meta=dataUri.path.substring(dataUri.path.indexOf(";")+1,dataUri.path.lastIndexOf(";"));meta.split(";").forEach((property=>{const[key,value]=property.split(":");if(key&&value){metadata.set(key,value)}}));const mime=dataUri.path.substring(0,dataUri.path.indexOf(";"));if(mime){metadata.set(DataUri2.META_DATA_MIME,mime)}return metadata}DataUri2.parseMetaData=parseMetaData})(DataUri||(DataUri={}))}});function uriGetComparisonKey(resource){return resource.toString()}function getModelEOL(model){const eol=model.getEOL();if(eol==="\n"){return 0}else{return 1}}function isEditStackElement(element){if(!element){return false}return element instanceof SingleModelEditStackElement||element instanceof MultiModelEditStackElement}var SingleModelEditStackData,SingleModelEditStackElement,MultiModelEditStackElement,EditStack;var init_editStack=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/editStack.js"(){init_nls();init_errors();init_selection();init_uri();init_textChange();init_buffer();init_resources();SingleModelEditStackData=class{static create(model,beforeCursorState){const alternativeVersionId=model.getAlternativeVersionId();const eol=getModelEOL(model);return new SingleModelEditStackData(alternativeVersionId,alternativeVersionId,eol,eol,beforeCursorState,beforeCursorState,[])}constructor(beforeVersionId,afterVersionId,beforeEOL,afterEOL,beforeCursorState,afterCursorState,changes){this.beforeVersionId=beforeVersionId;this.afterVersionId=afterVersionId;this.beforeEOL=beforeEOL;this.afterEOL=afterEOL;this.beforeCursorState=beforeCursorState;this.afterCursorState=afterCursorState;this.changes=changes}append(model,textChanges,afterEOL,afterVersionId,afterCursorState){if(textChanges.length>0){this.changes=compressConsecutiveTextChanges(this.changes,textChanges)}this.afterEOL=afterEOL;this.afterVersionId=afterVersionId;this.afterCursorState=afterCursorState}static _writeSelectionsSize(selections){return 4+4*4*(selections?selections.length:0)}static _writeSelections(b,selections,offset){writeUInt32BE(b,selections?selections.length:0,offset);offset+=4;if(selections){for(const selection of selections){writeUInt32BE(b,selection.selectionStartLineNumber,offset);offset+=4;writeUInt32BE(b,selection.selectionStartColumn,offset);offset+=4;writeUInt32BE(b,selection.positionLineNumber,offset);offset+=4;writeUInt32BE(b,selection.positionColumn,offset);offset+=4}}return offset}static _readSelections(b,offset,dest){const count=readUInt32BE(b,offset);offset+=4;for(let i=0;ichange.toString())).join(", ")}matchesResource(resource){const uri=URI.isUri(this.model)?this.model:this.model.uri;return uri.toString()===resource.toString()}setModel(model){this.model=model}canAppend(model){return this.model===model&&this._data instanceof SingleModelEditStackData}append(model,textChanges,afterEOL,afterVersionId,afterCursorState){if(this._data instanceof SingleModelEditStackData){this._data.append(model,textChanges,afterEOL,afterVersionId,afterCursorState)}}close(){if(this._data instanceof SingleModelEditStackData){this._data=this._data.serialize()}}open(){if(!(this._data instanceof SingleModelEditStackData)){this._data=SingleModelEditStackData.deserialize(this._data)}}undo(){if(URI.isUri(this.model)){throw new Error(`Invalid SingleModelEditStackElement`)}if(this._data instanceof SingleModelEditStackData){this._data=this._data.serialize()}const data=SingleModelEditStackData.deserialize(this._data);this.model._applyUndo(data.changes,data.beforeEOL,data.beforeVersionId,data.beforeCursorState)}redo(){if(URI.isUri(this.model)){throw new Error(`Invalid SingleModelEditStackElement`)}if(this._data instanceof SingleModelEditStackData){this._data=this._data.serialize()}const data=SingleModelEditStackData.deserialize(this._data);this.model._applyRedo(data.changes,data.afterEOL,data.afterVersionId,data.afterCursorState)}heapSize(){if(this._data instanceof SingleModelEditStackData){this._data=this._data.serialize()}return this._data.byteLength+168}};MultiModelEditStackElement=class{get resources(){return this._editStackElementsArr.map((editStackElement=>editStackElement.resource))}constructor(label,code,editStackElements){this.label=label;this.code=code;this.type=1;this._isOpen=true;this._editStackElementsArr=editStackElements.slice(0);this._editStackElementsMap=new Map;for(const editStackElement of this._editStackElementsArr){const key=uriGetComparisonKey(editStackElement.resource);this._editStackElementsMap.set(key,editStackElement)}this._delegate=null}prepareUndoRedo(){if(this._delegate){return this._delegate.prepareUndoRedo(this)}}matchesResource(resource){const key=uriGetComparisonKey(resource);return this._editStackElementsMap.has(key)}setModel(model){const key=uriGetComparisonKey(URI.isUri(model)?model:model.uri);if(this._editStackElementsMap.has(key)){this._editStackElementsMap.get(key).setModel(model)}}canAppend(model){if(!this._isOpen){return false}const key=uriGetComparisonKey(model.uri);if(this._editStackElementsMap.has(key)){const editStackElement=this._editStackElementsMap.get(key);return editStackElement.canAppend(model)}return false}append(model,textChanges,afterEOL,afterVersionId,afterCursorState){const key=uriGetComparisonKey(model.uri);const editStackElement=this._editStackElementsMap.get(key);editStackElement.append(model,textChanges,afterEOL,afterVersionId,afterCursorState)}close(){this._isOpen=false}open(){}undo(){this._isOpen=false;for(const editStackElement of this._editStackElementsArr){editStackElement.undo()}}redo(){for(const editStackElement of this._editStackElementsArr){editStackElement.redo()}}heapSize(resource){const key=uriGetComparisonKey(resource);if(this._editStackElementsMap.has(key)){const editStackElement=this._editStackElementsMap.get(key);return editStackElement.heapSize()}return 0}split(){return this._editStackElementsArr}toString(){const result=[];for(const editStackElement of this._editStackElementsArr){result.push(`${basename2(editStackElement.resource)}: ${editStackElement}`)}return`{${result.join(", ")}}`}};EditStack=class{constructor(model,undoRedoService){this._model=model;this._undoRedoService=undoRedoService}pushStackElement(){const lastElement=this._undoRedoService.getLastElement(this._model.uri);if(isEditStackElement(lastElement)){lastElement.close()}}popStackElement(){const lastElement=this._undoRedoService.getLastElement(this._model.uri);if(isEditStackElement(lastElement)){lastElement.open()}}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(beforeCursorState,group3){const lastElement=this._undoRedoService.getLastElement(this._model.uri);if(isEditStackElement(lastElement)&&lastElement.canAppend(this._model)){return lastElement}const newElement=new SingleModelEditStackElement(localize("edit","Typing"),"undoredo.textBufferEdit",this._model,beforeCursorState);this._undoRedoService.pushElement(newElement,group3);return newElement}pushEOL(eol){const editStackElement=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(eol);editStackElement.append(this._model,[],getModelEOL(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(beforeCursorState,editOperations,cursorStateComputer,group3){const editStackElement=this._getOrCreateEditStackElement(beforeCursorState,group3);const inverseEditOperations=this._model.applyEdits(editOperations,true);const afterCursorState=EditStack._computeCursorState(cursorStateComputer,inverseEditOperations);const textChanges=inverseEditOperations.map(((op,index)=>({index:index,textChange:op.textChange})));textChanges.sort(((a,b)=>{if(a.textChange.oldPosition===b.textChange.oldPosition){return a.index-b.index}return a.textChange.oldPosition-b.textChange.oldPosition}));editStackElement.append(this._model,textChanges.map((op=>op.textChange)),getModelEOL(this._model),this._model.getAlternativeVersionId(),afterCursorState);return afterCursorState}static _computeCursorState(cursorStateComputer,inverseEditOperations){try{return cursorStateComputer?cursorStateComputer(inverseEditOperations):null}catch(e){onUnexpectedError(e);return null}}}}});function spacesDiff(a,aLength,b,bLength,result){result.spacesDiff=0;result.looksLikeAlignment=false;let i;for(i=0;i0&&aTabsCount>0){return}if(bSpacesCnt>0&&bTabsCount>0){return}const tabsDiff=Math.abs(aTabsCount-bTabsCount);const spacesDiff2=Math.abs(aSpacesCnt-bSpacesCnt);if(tabsDiff===0){result.spacesDiff=spacesDiff2;if(spacesDiff2>0&&0<=bSpacesCnt-1&&bSpacesCnt-10){linesIndentedWithTabsCount++}else if(currentLineSpacesCount>1){linesIndentedWithSpacesCount++}spacesDiff(previousLineText,previousLineIndentation,currentLineText,currentLineIndentation,tmp);if(tmp.looksLikeAlignment){if(!(defaultInsertSpaces&&defaultTabSize===tmp.spacesDiff)){continue}}const currentSpacesDiff=tmp.spacesDiff;if(currentSpacesDiff<=MAX_ALLOWED_TAB_SIZE_GUESS){spacesDiffCount[currentSpacesDiff]++}previousLineText=currentLineText;previousLineIndentation=currentLineIndentation}let insertSpaces=defaultInsertSpaces;if(linesIndentedWithTabsCount!==linesIndentedWithSpacesCount){insertSpaces=linesIndentedWithTabsCount{const possibleTabSizeScore=spacesDiffCount[possibleTabSize];if(possibleTabSizeScore>tabSizeScore){tabSizeScore=possibleTabSizeScore;tabSize=possibleTabSize}}));if(tabSize===4&&spacesDiffCount[4]>0&&spacesDiffCount[2]>0&&spacesDiffCount[2]>=spacesDiffCount[4]/2){tabSize=2}}return{insertSpaces:insertSpaces,tabSize:tabSize}}var SpacesDiffResult;var init_indentationGuesser=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/indentationGuesser.js"(){SpacesDiffResult=class{constructor(){this.spacesDiff=0;this.looksLikeAlignment=false}}}});function getNodeColor(node){return(node.metadata&1)>>>0}function setNodeColor(node,color){node.metadata=node.metadata&254|color<<0}function getNodeIsVisited(node){return(node.metadata&2)>>>1===1}function setNodeIsVisited(node,value){node.metadata=node.metadata&253|(value?1:0)<<1}function getNodeIsForValidation(node){return(node.metadata&4)>>>2===1}function setNodeIsForValidation(node,value){node.metadata=node.metadata&251|(value?1:0)<<2}function getNodeIsInGlyphMargin(node){return(node.metadata&64)>>>6===1}function setNodeIsInGlyphMargin(node,value){node.metadata=node.metadata&191|(value?1:0)<<6}function getNodeStickiness(node){return(node.metadata&24)>>>3}function _setNodeStickiness(node,stickiness){node.metadata=node.metadata&231|stickiness<<3}function getCollapseOnReplaceEdit(node){return(node.metadata&32)>>>5===1}function setCollapseOnReplaceEdit(node,value){node.metadata=node.metadata&223|(value?1:0)<<5}function normalizeDelta(T){let node=T.root;let delta=0;while(node!==SENTINEL){if(node.left!==SENTINEL&&!getNodeIsVisited(node.left)){node=node.left;continue}if(node.right!==SENTINEL&&!getNodeIsVisited(node.right)){delta+=node.delta;node=node.right;continue}node.start=delta+node.start;node.end=delta+node.end;node.delta=0;recomputeMaxEnd(node);setNodeIsVisited(node,true);setNodeIsVisited(node.left,false);setNodeIsVisited(node.right,false);if(node===node.parent.right){delta-=node.parent.delta}node=node.parent}setNodeIsVisited(T.root,false)}function adjustMarkerBeforeColumn(markerOffset,markerStickToPreviousCharacter,checkOffset,moveSemantics){if(markerOffsetcheckOffset){return false}if(moveSemantics===1){return false}if(moveSemantics===2){return true}return markerStickToPreviousCharacter}function nodeAcceptEdit(node,start,end,textLength,forceMoveMarkers){const nodeStickiness=getNodeStickiness(node);const startStickToPreviousCharacter=nodeStickiness===0||nodeStickiness===2;const endStickToPreviousCharacter=nodeStickiness===1||nodeStickiness===2;const deletingCnt=end-start;const insertingCnt=textLength;const commonLength=Math.min(deletingCnt,insertingCnt);const nodeStart=node.start;let startDone=false;const nodeEnd=node.end;let endDone=false;if(start<=nodeStart&&nodeEnd<=end&&getCollapseOnReplaceEdit(node)){node.start=start;startDone=true;node.end=start;endDone=true}{const moveSemantics=forceMoveMarkers?1:deletingCnt>0?2:0;if(!startDone&&adjustMarkerBeforeColumn(nodeStart,startStickToPreviousCharacter,start,moveSemantics)){startDone=true}if(!endDone&&adjustMarkerBeforeColumn(nodeEnd,endStickToPreviousCharacter,start,moveSemantics)){endDone=true}}if(commonLength>0&&!forceMoveMarkers){const moveSemantics=deletingCnt>insertingCnt?2:0;if(!startDone&&adjustMarkerBeforeColumn(nodeStart,startStickToPreviousCharacter,start+commonLength,moveSemantics)){startDone=true}if(!endDone&&adjustMarkerBeforeColumn(nodeEnd,endStickToPreviousCharacter,start+commonLength,moveSemantics)){endDone=true}}{const moveSemantics=forceMoveMarkers?1:0;if(!startDone&&adjustMarkerBeforeColumn(nodeStart,startStickToPreviousCharacter,end,moveSemantics)){node.start=start+insertingCnt;startDone=true}if(!endDone&&adjustMarkerBeforeColumn(nodeEnd,endStickToPreviousCharacter,end,moveSemantics)){node.end=start+insertingCnt;endDone=true}}const deltaColumn=insertingCnt-deletingCnt;if(!startDone){node.start=Math.max(0,nodeStart+deltaColumn)}if(!endDone){node.end=Math.max(0,nodeEnd+deltaColumn)}if(node.start>node.end){node.end=node.start}}function searchForEditing(T,start,end){let node=T.root;let delta=0;let nodeMaxEnd=0;let nodeStart=0;let nodeEnd=0;const result=[];let resultLen=0;while(node!==SENTINEL){if(getNodeIsVisited(node)){setNodeIsVisited(node.left,false);setNodeIsVisited(node.right,false);if(node===node.parent.right){delta-=node.parent.delta}node=node.parent;continue}if(!getNodeIsVisited(node.left)){nodeMaxEnd=delta+node.maxEnd;if(nodeMaxEndend){setNodeIsVisited(node,true);continue}nodeEnd=delta+node.end;if(nodeEnd>=start){node.setCachedOffsets(nodeStart,nodeEnd,0);result[resultLen++]=node}setNodeIsVisited(node,true);if(node.right!==SENTINEL&&!getNodeIsVisited(node.right)){delta+=node.delta;node=node.right;continue}}setNodeIsVisited(T.root,false);return result}function noOverlapReplace(T,start,end,textLength){let node=T.root;let delta=0;let nodeMaxEnd=0;let nodeStart=0;const editDelta=textLength-(end-start);while(node!==SENTINEL){if(getNodeIsVisited(node)){setNodeIsVisited(node.left,false);setNodeIsVisited(node.right,false);if(node===node.parent.right){delta-=node.parent.delta}recomputeMaxEnd(node);node=node.parent;continue}if(!getNodeIsVisited(node.left)){nodeMaxEnd=delta+node.maxEnd;if(nodeMaxEndend){node.start+=editDelta;node.end+=editDelta;node.delta+=editDelta;if(node.delta<-1073741824||node.delta>1073741824){T.requestNormalizeDelta=true}setNodeIsVisited(node,true);continue}setNodeIsVisited(node,true);if(node.right!==SENTINEL&&!getNodeIsVisited(node.right)){delta+=node.delta;node=node.right;continue}}setNodeIsVisited(T.root,false)}function collectNodesFromOwner(T,ownerId){let node=T.root;const result=[];let resultLen=0;while(node!==SENTINEL){if(getNodeIsVisited(node)){setNodeIsVisited(node.left,false);setNodeIsVisited(node.right,false);node=node.parent;continue}if(node.left!==SENTINEL&&!getNodeIsVisited(node.left)){node=node.left;continue}if(node.ownerId===ownerId){result[resultLen++]=node}setNodeIsVisited(node,true);if(node.right!==SENTINEL&&!getNodeIsVisited(node.right)){node=node.right;continue}}setNodeIsVisited(T.root,false);return result}function collectNodesPostOrder(T){let node=T.root;const result=[];let resultLen=0;while(node!==SENTINEL){if(getNodeIsVisited(node)){setNodeIsVisited(node.left,false);setNodeIsVisited(node.right,false);node=node.parent;continue}if(node.left!==SENTINEL&&!getNodeIsVisited(node.left)){node=node.left;continue}if(node.right!==SENTINEL&&!getNodeIsVisited(node.right)){node=node.right;continue}result[resultLen++]=node;setNodeIsVisited(node,true)}setNodeIsVisited(T.root,false);return result}function search(T,filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations){let node=T.root;let delta=0;let nodeStart=0;let nodeEnd=0;const result=[];let resultLen=0;while(node!==SENTINEL){if(getNodeIsVisited(node)){setNodeIsVisited(node.left,false);setNodeIsVisited(node.right,false);if(node===node.parent.right){delta-=node.parent.delta}node=node.parent;continue}if(node.left!==SENTINEL&&!getNodeIsVisited(node.left)){node=node.left;continue}nodeStart=delta+node.start;nodeEnd=delta+node.end;node.setCachedOffsets(nodeStart,nodeEnd,cachedVersionId);let include=true;if(filterOwnerId&&node.ownerId&&node.ownerId!==filterOwnerId){include=false}if(filterOutValidation&&getNodeIsForValidation(node)){include=false}if(onlyMarginDecorations&&!getNodeIsInGlyphMargin(node)){include=false}if(include){result[resultLen++]=node}setNodeIsVisited(node,true);if(node.right!==SENTINEL&&!getNodeIsVisited(node.right)){delta+=node.delta;node=node.right;continue}}setNodeIsVisited(T.root,false);return result}function intervalSearch(T,intervalStart,intervalEnd,filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations){let node=T.root;let delta=0;let nodeMaxEnd=0;let nodeStart=0;let nodeEnd=0;const result=[];let resultLen=0;while(node!==SENTINEL){if(getNodeIsVisited(node)){setNodeIsVisited(node.left,false);setNodeIsVisited(node.right,false);if(node===node.parent.right){delta-=node.parent.delta}node=node.parent;continue}if(!getNodeIsVisited(node.left)){nodeMaxEnd=delta+node.maxEnd;if(nodeMaxEndintervalEnd){setNodeIsVisited(node,true);continue}nodeEnd=delta+node.end;if(nodeEnd>=intervalStart){node.setCachedOffsets(nodeStart,nodeEnd,cachedVersionId);let include=true;if(filterOwnerId&&node.ownerId&&node.ownerId!==filterOwnerId){include=false}if(filterOutValidation&&getNodeIsForValidation(node)){include=false}if(onlyMarginDecorations&&!getNodeIsInGlyphMargin(node)){include=false}if(include){result[resultLen++]=node}}setNodeIsVisited(node,true);if(node.right!==SENTINEL&&!getNodeIsVisited(node.right)){delta+=node.delta;node=node.right;continue}}setNodeIsVisited(T.root,false);return result}function rbTreeInsert(T,newNode){if(T.root===SENTINEL){newNode.parent=SENTINEL;newNode.left=SENTINEL;newNode.right=SENTINEL;setNodeColor(newNode,0);T.root=newNode;return T.root}treeInsert(T,newNode);recomputeMaxEndWalkToRoot(newNode.parent);let x=newNode;while(x!==T.root&&getNodeColor(x.parent)===1){if(x.parent===x.parent.parent.left){const y=x.parent.parent.right;if(getNodeColor(y)===1){setNodeColor(x.parent,0);setNodeColor(y,0);setNodeColor(x.parent.parent,1);x=x.parent.parent}else{if(x===x.parent.right){x=x.parent;leftRotate2(T,x)}setNodeColor(x.parent,0);setNodeColor(x.parent.parent,1);rightRotate(T,x.parent.parent)}}else{const y=x.parent.parent.left;if(getNodeColor(y)===1){setNodeColor(x.parent,0);setNodeColor(y,0);setNodeColor(x.parent.parent,1);x=x.parent.parent}else{if(x===x.parent.left){x=x.parent;rightRotate(T,x)}setNodeColor(x.parent,0);setNodeColor(x.parent.parent,1);leftRotate2(T,x.parent.parent)}}}setNodeColor(T.root,0);return newNode}function treeInsert(T,z){let delta=0;let x=T.root;const zAbsoluteStart=z.start;const zAbsoluteEnd=z.end;while(true){const cmp3=intervalCompare(zAbsoluteStart,zAbsoluteEnd,x.start+delta,x.end+delta);if(cmp3<0){if(x.left===SENTINEL){z.start-=delta;z.end-=delta;z.maxEnd-=delta;x.left=z;break}else{x=x.left}}else{if(x.right===SENTINEL){z.start-=delta+x.delta;z.end-=delta+x.delta;z.maxEnd-=delta+x.delta;x.right=z;break}else{delta+=x.delta;x=x.right}}}z.parent=x;z.left=SENTINEL;z.right=SENTINEL;setNodeColor(z,1)}function rbTreeDelete(T,z){let x;let y;if(z.left===SENTINEL){x=z.right;y=z;x.delta+=z.delta;if(x.delta<-1073741824||x.delta>1073741824){T.requestNormalizeDelta=true}x.start+=z.delta;x.end+=z.delta}else if(z.right===SENTINEL){x=z.left;y=z}else{y=leftest(z.right);x=y.right;x.start+=y.delta;x.end+=y.delta;x.delta+=y.delta;if(x.delta<-1073741824||x.delta>1073741824){T.requestNormalizeDelta=true}y.start+=z.delta;y.end+=z.delta;y.delta=z.delta;if(y.delta<-1073741824||y.delta>1073741824){T.requestNormalizeDelta=true}}if(y===T.root){T.root=x;setNodeColor(x,0);z.detach();resetSentinel();recomputeMaxEnd(x);T.root.parent=SENTINEL;return}const yWasRed=getNodeColor(y)===1;if(y===y.parent.left){y.parent.left=x}else{y.parent.right=x}if(y===z){x.parent=y.parent}else{if(y.parent===z){x.parent=y}else{x.parent=y.parent}y.left=z.left;y.right=z.right;y.parent=z.parent;setNodeColor(y,getNodeColor(z));if(z===T.root){T.root=y}else{if(z===z.parent.left){z.parent.left=y}else{z.parent.right=y}}if(y.left!==SENTINEL){y.left.parent=y}if(y.right!==SENTINEL){y.right.parent=y}}z.detach();if(yWasRed){recomputeMaxEndWalkToRoot(x.parent);if(y!==z){recomputeMaxEndWalkToRoot(y);recomputeMaxEndWalkToRoot(y.parent)}resetSentinel();return}recomputeMaxEndWalkToRoot(x);recomputeMaxEndWalkToRoot(x.parent);if(y!==z){recomputeMaxEndWalkToRoot(y);recomputeMaxEndWalkToRoot(y.parent)}let w;while(x!==T.root&&getNodeColor(x)===0){if(x===x.parent.left){w=x.parent.right;if(getNodeColor(w)===1){setNodeColor(w,0);setNodeColor(x.parent,1);leftRotate2(T,x.parent);w=x.parent.right}if(getNodeColor(w.left)===0&&getNodeColor(w.right)===0){setNodeColor(w,1);x=x.parent}else{if(getNodeColor(w.right)===0){setNodeColor(w.left,0);setNodeColor(w,1);rightRotate(T,w);w=x.parent.right}setNodeColor(w,getNodeColor(x.parent));setNodeColor(x.parent,0);setNodeColor(w.right,0);leftRotate2(T,x.parent);x=T.root}}else{w=x.parent.left;if(getNodeColor(w)===1){setNodeColor(w,0);setNodeColor(x.parent,1);rightRotate(T,x.parent);w=x.parent.left}if(getNodeColor(w.left)===0&&getNodeColor(w.right)===0){setNodeColor(w,1);x=x.parent}else{if(getNodeColor(w.left)===0){setNodeColor(w.right,0);setNodeColor(w,1);leftRotate2(T,w);w=x.parent.left}setNodeColor(w,getNodeColor(x.parent));setNodeColor(x.parent,0);setNodeColor(w.left,0);rightRotate(T,x.parent);x=T.root}}}setNodeColor(x,0);resetSentinel()}function leftest(node){while(node.left!==SENTINEL){node=node.left}return node}function resetSentinel(){SENTINEL.parent=SENTINEL;SENTINEL.delta=0;SENTINEL.start=0;SENTINEL.end=0}function leftRotate2(T,x){const y=x.right;y.delta+=x.delta;if(y.delta<-1073741824||y.delta>1073741824){T.requestNormalizeDelta=true}y.start+=x.delta;y.end+=x.delta;x.right=y.left;if(y.left!==SENTINEL){y.left.parent=x}y.parent=x.parent;if(x.parent===SENTINEL){T.root=y}else if(x===x.parent.left){x.parent.left=y}else{x.parent.right=y}y.left=x;x.parent=y;recomputeMaxEnd(x);recomputeMaxEnd(y)}function rightRotate(T,y){const x=y.left;y.delta-=x.delta;if(y.delta<-1073741824||y.delta>1073741824){T.requestNormalizeDelta=true}y.start-=x.delta;y.end-=x.delta;y.left=x.right;if(x.right!==SENTINEL){x.right.parent=y}x.parent=y.parent;if(y.parent===SENTINEL){T.root=x}else if(y===y.parent.right){y.parent.right=x}else{y.parent.left=x}x.right=y;y.parent=x;recomputeMaxEnd(y);recomputeMaxEnd(x)}function computeMaxEnd(node){let maxEnd=node.end;if(node.left!==SENTINEL){const leftMaxEnd=node.left.maxEnd;if(leftMaxEnd>maxEnd){maxEnd=leftMaxEnd}}if(node.right!==SENTINEL){const rightMaxEnd=node.right.maxEnd+node.delta;if(rightMaxEnd>maxEnd){maxEnd=rightMaxEnd}}return maxEnd}function recomputeMaxEnd(node){node.maxEnd=computeMaxEnd(node)}function recomputeMaxEndWalkToRoot(node){while(node!==SENTINEL){const maxEnd=computeMaxEnd(node);if(node.maxEnd===maxEnd){return}node.maxEnd=maxEnd;node=node.parent}}function intervalCompare(aStart,aEnd,bStart,bEnd){if(aStart===bStart){return aEnd-bEnd}return aStart-bStart}var IntervalNode,SENTINEL,IntervalTree;var init_intervalTree=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/intervalTree.js"(){IntervalNode=class{constructor(id,start,end){this.metadata=0;this.parent=this;this.left=this;this.right=this;setNodeColor(this,1);this.start=start;this.end=end;this.delta=0;this.maxEnd=end;this.id=id;this.ownerId=0;this.options=null;setNodeIsForValidation(this,false);setNodeIsInGlyphMargin(this,false);_setNodeStickiness(this,1);setCollapseOnReplaceEdit(this,false);this.cachedVersionId=0;this.cachedAbsoluteStart=start;this.cachedAbsoluteEnd=end;this.range=null;setNodeIsVisited(this,false)}reset(versionId,start,end,range2){this.start=start;this.end=end;this.maxEnd=end;this.cachedVersionId=versionId;this.cachedAbsoluteStart=start;this.cachedAbsoluteEnd=end;this.range=range2}setOptions(options2){this.options=options2;const className=this.options.className;setNodeIsForValidation(this,className==="squiggly-error"||className==="squiggly-warning"||className==="squiggly-info");setNodeIsInGlyphMargin(this,this.options.glyphMarginClassName!==null);_setNodeStickiness(this,this.options.stickiness);setCollapseOnReplaceEdit(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(absoluteStart,absoluteEnd,cachedVersionId){if(this.cachedVersionId!==cachedVersionId){this.range=null}this.cachedVersionId=cachedVersionId;this.cachedAbsoluteStart=absoluteStart;this.cachedAbsoluteEnd=absoluteEnd}detach(){this.parent=null;this.left=null;this.right=null}};SENTINEL=new IntervalNode(null,0,0);SENTINEL.parent=SENTINEL;SENTINEL.left=SENTINEL;SENTINEL.right=SENTINEL;setNodeColor(SENTINEL,0);IntervalTree=class{constructor(){this.root=SENTINEL;this.requestNormalizeDelta=false}intervalSearch(start,end,filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations){if(this.root===SENTINEL){return[]}return intervalSearch(this,start,end,filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations)}search(filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations){if(this.root===SENTINEL){return[]}return search(this,filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations)}collectNodesFromOwner(ownerId){return collectNodesFromOwner(this,ownerId)}collectNodesPostOrder(){return collectNodesPostOrder(this)}insert(node){rbTreeInsert(this,node);this._normalizeDeltaIfNecessary()}delete(node){rbTreeDelete(this,node);this._normalizeDeltaIfNecessary()}resolveNode(node,cachedVersionId){const initialNode=node;let delta=0;while(node!==this.root){if(node===node.parent.right){delta+=node.parent.delta}node=node.parent}const nodeStart=initialNode.start+delta;const nodeEnd=initialNode.end+delta;initialNode.setCachedOffsets(nodeStart,nodeEnd,cachedVersionId)}acceptReplace(offset,length2,textLength,forceMoveMarkers){const nodesOfInterest=searchForEditing(this,offset,offset+length2);for(let i=0,len=nodesOfInterest.length;i126)){isBasicASCII2=false}}}}const result=new LineStarts(createUintArray(r),cr,lf,crlf,isBasicASCII2);r.length=0;return result}var AverageBufferSize,LineStarts,Piece,StringBuffer,PieceTreeSnapshot,PieceTreeSearchCache,PieceTreeBase;var init_pieceTreeBase=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase.js"(){init_position();init_range();init_model();init_rbTreeBase();init_textModelSearch();AverageBufferSize=65535;LineStarts=class{constructor(lineStarts,cr,lf,crlf,isBasicASCII2){this.lineStarts=lineStarts;this.cr=cr;this.lf=lf;this.crlf=crlf;this.isBasicASCII=isBasicASCII2}};Piece=class{constructor(bufferIndex,start,end,lineFeedCnt,length2){this.bufferIndex=bufferIndex;this.start=start;this.end=end;this.lineFeedCnt=lineFeedCnt;this.length=length2}};StringBuffer=class{constructor(buffer,lineStarts){this.buffer=buffer;this.lineStarts=lineStarts}};PieceTreeSnapshot=class{constructor(tree,BOM){this._pieces=[];this._tree=tree;this._BOM=BOM;this._index=0;if(tree.root!==SENTINEL2){tree.iterate(tree.root,(node=>{if(node!==SENTINEL2){this._pieces.push(node.piece)}return true}))}}read(){if(this._pieces.length===0){if(this._index===0){this._index++;return this._BOM}else{return null}}if(this._index>this._pieces.length-1){return null}if(this._index===0){return this._BOM+this._tree.getPieceContent(this._pieces[this._index++])}return this._tree.getPieceContent(this._pieces[this._index++])}};PieceTreeSearchCache=class{constructor(limit){this._limit=limit;this._cache=[]}get(offset){for(let i=this._cache.length-1;i>=0;i--){const nodePos=this._cache[i];if(nodePos.nodeStartOffset<=offset&&nodePos.nodeStartOffset+nodePos.node.piece.length>=offset){return nodePos}}return null}get2(lineNumber){for(let i=this._cache.length-1;i>=0;i--){const nodePos=this._cache[i];if(nodePos.nodeStartLineNumber&&nodePos.nodeStartLineNumber=lineNumber){return nodePos}}return null}set(nodePosition){if(this._cache.length>=this._limit){this._cache.shift()}this._cache.push(nodePosition)}validate(offset){let hasInvalidVal=false;const tmp=this._cache;for(let i=0;i=offset){tmp[i]=null;hasInvalidVal=true;continue}}if(hasInvalidVal){const newArr=[];for(const entry of tmp){if(entry!==null){newArr.push(entry)}}this._cache=newArr}}};PieceTreeBase=class{constructor(chunks,eol,eolNormalized){this.create(chunks,eol,eolNormalized)}create(chunks,eol,eolNormalized){this._buffers=[new StringBuffer("",[0])];this._lastChangeBufferPos={line:0,column:0};this.root=SENTINEL2;this._lineCnt=1;this._length=0;this._EOL=eol;this._EOLLength=eol.length;this._EOLNormalized=eolNormalized;let lastNode=null;for(let i=0,len=chunks.length;i0){if(!chunks[i].lineStarts){chunks[i].lineStarts=createLineStartsFast(chunks[i].buffer)}const 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);this._buffers.push(chunks[i]);lastNode=this.rbInsertRight(lastNode,piece)}}this._searchCache=new PieceTreeSearchCache(1);this._lastVisitedLine={lineNumber:0,value:""};this.computeBufferMetadata()}normalizeEOL(eol){const averageBufferSize=AverageBufferSize;const min=averageBufferSize-Math.floor(averageBufferSize/3);const max=min*2;let tempChunk="";let tempChunkLen=0;const chunks=[];this.iterate(this.root,(node=>{const str=this.getNodeContent(node);const len=str.length;if(tempChunkLen<=min||tempChunkLen+len0){const text2=tempChunk.replace(/\r\n|\r|\n/g,eol);chunks.push(new StringBuffer(text2,createLineStartsFast(text2)))}this.create(chunks,eol,true)}getEOL(){return this._EOL}setEOL(newEOL){this._EOL=newEOL;this._EOLLength=this._EOL.length;this.normalizeEOL(newEOL)}createSnapshot(BOM){return new PieceTreeSnapshot(this,BOM)}getOffsetAt(lineNumber,column){let leftLen=0;let x=this.root;while(x!==SENTINEL2){if(x.left!==SENTINEL2&&x.lf_left+1>=lineNumber){x=x.left}else if(x.lf_left+x.piece.lineFeedCnt+1>=lineNumber){leftLen+=x.size_left;const accumualtedValInCurrentIndex=this.getAccumulatedValue(x,lineNumber-x.lf_left-2);return leftLen+=accumualtedValInCurrentIndex+column-1}else{lineNumber-=x.lf_left+x.piece.lineFeedCnt;leftLen+=x.size_left+x.piece.length;x=x.right}}return leftLen}getPositionAt(offset){offset=Math.floor(offset);offset=Math.max(0,offset);let x=this.root;let lfCnt=0;const originalOffset=offset;while(x!==SENTINEL2){if(x.size_left!==0&&x.size_left>=offset){x=x.left}else if(x.size_left+x.piece.length>=offset){const out=this.getIndexOf(x,offset-x.size_left);lfCnt+=x.lf_left+out.index;if(out.index===0){const lineStartOffset=this.getOffsetAt(lfCnt+1,1);const column=originalOffset-lineStartOffset;return new Position(lfCnt+1,column+1)}return new Position(lfCnt+1,out.remainder+1)}else{offset-=x.size_left+x.piece.length;lfCnt+=x.lf_left+x.piece.lineFeedCnt;if(x.right===SENTINEL2){const lineStartOffset=this.getOffsetAt(lfCnt+1,1);const column=originalOffset-offset-lineStartOffset;return new Position(lfCnt+1,column+1)}else{x=x.right}}}return new Position(1,1)}getValueInRange(range2,eol){if(range2.startLineNumber===range2.endLineNumber&&range2.startColumn===range2.endColumn){return""}const startPosition=this.nodeAt2(range2.startLineNumber,range2.startColumn);const endPosition=this.nodeAt2(range2.endLineNumber,range2.endColumn);const value=this.getValueInRange2(startPosition,endPosition);if(eol){if(eol!==this._EOL||!this._EOLNormalized){return value.replace(/\r\n|\r|\n/g,eol)}if(eol===this.getEOL()&&this._EOLNormalized){if(eol==="\r\n"){}return value}return value.replace(/\r\n|\r|\n/g,eol)}return value}getValueInRange2(startPosition,endPosition){if(startPosition.node===endPosition.node){const node=startPosition.node;const buffer2=this._buffers[node.piece.bufferIndex].buffer;const startOffset2=this.offsetInBuffer(node.piece.bufferIndex,node.piece.start);return buffer2.substring(startOffset2+startPosition.remainder,startOffset2+endPosition.remainder)}let x=startPosition.node;const buffer=this._buffers[x.piece.bufferIndex].buffer;const startOffset=this.offsetInBuffer(x.piece.bufferIndex,x.piece.start);let ret=buffer.substring(startOffset+startPosition.remainder,startOffset+x.piece.length);x=x.next();while(x!==SENTINEL2){const buffer2=this._buffers[x.piece.bufferIndex].buffer;const startOffset2=this.offsetInBuffer(x.piece.bufferIndex,x.piece.start);if(x===endPosition.node){ret+=buffer2.substring(startOffset2,startOffset2+endPosition.remainder);break}else{ret+=buffer2.substr(startOffset2,x.piece.length)}x=x.next()}return ret}getLinesContent(){const lines=[];let linesLength=0;let currentLine="";let danglingCR=false;this.iterate(this.root,(node=>{if(node===SENTINEL2){return true}const piece=node.piece;let pieceLength=piece.length;if(pieceLength===0){return true}const buffer=this._buffers[piece.bufferIndex].buffer;const lineStarts=this._buffers[piece.bufferIndex].lineStarts;const pieceStartLine=piece.start.line;const pieceEndLine=piece.end.line;let pieceStartOffset=lineStarts[pieceStartLine]+piece.start.column;if(danglingCR){if(buffer.charCodeAt(pieceStartOffset)===10){pieceStartOffset++;pieceLength--}lines[linesLength++]=currentLine;currentLine="";danglingCR=false;if(pieceLength===0){return true}}if(pieceStartLine===pieceEndLine){if(!this._EOLNormalized&&buffer.charCodeAt(pieceStartOffset+pieceLength-1)===13){danglingCR=true;currentLine+=buffer.substr(pieceStartOffset,pieceLength-1)}else{currentLine+=buffer.substr(pieceStartOffset,pieceLength)}return true}currentLine+=this._EOLNormalized?buffer.substring(pieceStartOffset,Math.max(pieceStartOffset,lineStarts[pieceStartLine+1]-this._EOLLength)):buffer.substring(pieceStartOffset,lineStarts[pieceStartLine+1]).replace(/(\r\n|\r|\n)$/,"");lines[linesLength++]=currentLine;for(let line=pieceStartLine+1;lineoffset+start;searcher.reset(0)}else{searchText=buffer.buffer;offsetInBuffer=offset=>offset;searcher.reset(start)}do{m=searcher.next(searchText);if(m){if(offsetInBuffer(m.index)>=end){return resultLen}this.positionInBuffer(node,offsetInBuffer(m.index)-startOffsetInBuffer,ret);const lineFeedCnt=this.getLineFeedCnt(node.piece.bufferIndex,startCursor,ret);const retStartColumn=ret.line===startCursor.line?ret.column-startCursor.column+startColumn:ret.column+1;const retEndColumn=retStartColumn+m[0].length;result[resultLen++]=createFindMatch(new Range(startLineNumber+lineFeedCnt,retStartColumn,startLineNumber+lineFeedCnt,retEndColumn),m,captureMatches);if(offsetInBuffer(m.index)+m[0].length>=end){return resultLen}if(resultLen>=limitResultCount){return resultLen}}}while(m);return resultLen}findMatchesLineByLine(searchRange,searchData,captureMatches,limitResultCount){const result=[];let resultLen=0;const searcher=new Searcher(searchData.wordSeparators,searchData.regex);let startPosition=this.nodeAt2(searchRange.startLineNumber,searchRange.startColumn);if(startPosition===null){return[]}const endPosition=this.nodeAt2(searchRange.endLineNumber,searchRange.endColumn);if(endPosition===null){return[]}let start=this.positionInBuffer(startPosition.node,startPosition.remainder);const end=this.positionInBuffer(endPosition.node,endPosition.remainder);if(startPosition.node===endPosition.node){this.findMatchesInNode(startPosition.node,searcher,searchRange.startLineNumber,searchRange.startColumn,start,end,searchData,captureMatches,limitResultCount,resultLen,result);return result}let startLineNumber=searchRange.startLineNumber;let currentNode=startPosition.node;while(currentNode!==endPosition.node){const lineBreakCnt=this.getLineFeedCnt(currentNode.piece.bufferIndex,start,currentNode.piece.end);if(lineBreakCnt>=1){const lineStarts=this._buffers[currentNode.piece.bufferIndex].lineStarts;const startOffsetInBuffer=this.offsetInBuffer(currentNode.piece.bufferIndex,currentNode.piece.start);const nextLineStartOffset=lineStarts[start.line+lineBreakCnt];const startColumn3=startLineNumber===searchRange.startLineNumber?searchRange.startColumn:1;resultLen=this.findMatchesInNode(currentNode,searcher,startLineNumber,startColumn3,start,this.positionInBuffer(currentNode,nextLineStartOffset-startOffsetInBuffer),searchData,captureMatches,limitResultCount,resultLen,result);if(resultLen>=limitResultCount){return result}startLineNumber+=lineBreakCnt}const startColumn2=startLineNumber===searchRange.startLineNumber?searchRange.startColumn-1:0;if(startLineNumber===searchRange.endLineNumber){const text2=this.getLineContent(startLineNumber).substring(startColumn2,searchRange.endColumn-1);resultLen=this._findMatchesInLine(searchData,searcher,text2,searchRange.endLineNumber,startColumn2,resultLen,result,captureMatches,limitResultCount);return result}resultLen=this._findMatchesInLine(searchData,searcher,this.getLineContent(startLineNumber).substr(startColumn2),startLineNumber,startColumn2,resultLen,result,captureMatches,limitResultCount);if(resultLen>=limitResultCount){return result}startLineNumber++;startPosition=this.nodeAt2(startLineNumber,1);currentNode=startPosition.node;start=this.positionInBuffer(startPosition.node,startPosition.remainder)}if(startLineNumber===searchRange.endLineNumber){const startColumn2=startLineNumber===searchRange.startLineNumber?searchRange.startColumn-1:0;const text2=this.getLineContent(startLineNumber).substring(startColumn2,searchRange.endColumn-1);resultLen=this._findMatchesInLine(searchData,searcher,text2,searchRange.endLineNumber,startColumn2,resultLen,result,captureMatches,limitResultCount);return result}const startColumn=startLineNumber===searchRange.startLineNumber?searchRange.startColumn:1;resultLen=this.findMatchesInNode(endPosition.node,searcher,startLineNumber,startColumn,start,end,searchData,captureMatches,limitResultCount,resultLen,result);return result}_findMatchesInLine(searchData,searcher,text2,lineNumber,deltaOffset,resultLen,result,captureMatches,limitResultCount){const wordSeparators2=searchData.wordSeparators;if(!captureMatches&&searchData.simpleSearch){const searchString=searchData.simpleSearch;const searchStringLen=searchString.length;const textLength=text2.length;let lastMatchIndex=-searchStringLen;while((lastMatchIndex=text2.indexOf(searchString,lastMatchIndex+searchStringLen))!==-1){if(!wordSeparators2||isValidMatch(wordSeparators2,text2,textLength,lastMatchIndex,searchStringLen)){result[resultLen++]=new FindMatch(new Range(lineNumber,lastMatchIndex+1+deltaOffset,lineNumber,lastMatchIndex+1+searchStringLen+deltaOffset),null);if(resultLen>=limitResultCount){return resultLen}}}return resultLen}let m;searcher.reset(0);do{m=searcher.next(text2);if(m){result[resultLen++]=createFindMatch(new Range(lineNumber,m.index+1+deltaOffset,lineNumber,m.index+1+m[0].length+deltaOffset),m,captureMatches);if(resultLen>=limitResultCount){return resultLen}}}while(m);return resultLen}insert(offset,value,eolNormalized=false){this._EOLNormalized=this._EOLNormalized&&eolNormalized;this._lastVisitedLine.lineNumber=0;this._lastVisitedLine.value="";if(this.root!==SENTINEL2){const{node:node,remainder:remainder,nodeStartOffset:nodeStartOffset}=this.nodeAt(offset);const piece=node.piece;const bufferIndex=piece.bufferIndex;const insertPosInBuffer=this.positionInBuffer(node,remainder);if(node.piece.bufferIndex===0&&piece.end.line===this._lastChangeBufferPos.line&&piece.end.column===this._lastChangeBufferPos.column&&nodeStartOffset+piece.length===offset&&value.lengthoffset){const nodesToDel=[];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));if(this.shouldCheckCRLF()&&this.endWithCR(value)){const headOfRight=this.nodeCharCodeAt(node,remainder);if(headOfRight===10){const newStart={line:newRightPiece.start.line+1,column:0};newRightPiece=new Piece(newRightPiece.bufferIndex,newStart,newRightPiece.end,this.getLineFeedCnt(newRightPiece.bufferIndex,newStart,newRightPiece.end),newRightPiece.length-1);value+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(value)){const tailOfLeft=this.nodeCharCodeAt(node,remainder-1);if(tailOfLeft===13){const previousPos=this.positionInBuffer(node,remainder-1);this.deleteNodeTail(node,previousPos);value="\r"+value;if(node.piece.length===0){nodesToDel.push(node)}}else{this.deleteNodeTail(node,insertPosInBuffer)}}else{this.deleteNodeTail(node,insertPosInBuffer)}const newPieces=this.createNewPieces(value);if(newRightPiece.length>0){this.rbInsertRight(node,newRightPiece)}let tmpNode=node;for(let k=0;k=0;k--){newNode=this.rbInsertLeft(newNode,newPieces[k])}this.validateCRLFWithPrevNode(newNode);this.deleteNodes(nodesToDel)}insertContentToNodeRight(value,node){if(this.adjustCarriageReturnFromNext(value,node)){value+="\n"}const newPieces=this.createNewPieces(value);const newNode=this.rbInsertRight(node,newPieces[0]);let tmpNode=newNode;for(let k=1;k=midStop){low=mid+1}else{break}}if(ret){ret.line=mid;ret.column=offset-midStart;return null}return{line:mid,column:offset-midStart}}getLineFeedCnt(bufferIndex,start,end){if(end.column===0){return end.line-start.line}const lineStarts=this._buffers[bufferIndex].lineStarts;if(end.line===lineStarts.length-1){return end.line-start.line}const nextLineStartOffset=lineStarts[end.line+1];const endOffset=lineStarts[end.line]+end.column;if(nextLineStartOffset>endOffset+1){return end.line-start.line}const previousCharOffset=endOffset-1;const buffer=this._buffers[bufferIndex].buffer;if(buffer.charCodeAt(previousCharOffset)===13){return end.line-start.line+1}else{return end.line-start.line}}offsetInBuffer(bufferIndex,cursor){const lineStarts=this._buffers[bufferIndex].lineStarts;return lineStarts[cursor.line]+cursor.column}deleteNodes(nodes){for(let i=0;iAverageBufferSize){const newPieces=[];while(text2.length>AverageBufferSize){const lastChar=text2.charCodeAt(AverageBufferSize-1);let splitText;if(lastChar===13||lastChar>=55296&&lastChar<=56319){splitText=text2.substring(0,AverageBufferSize-1);text2=text2.substring(AverageBufferSize-1)}else{splitText=text2.substring(0,AverageBufferSize);text2=text2.substring(AverageBufferSize)}const lineStarts3=createLineStartsFast(splitText);newPieces.push(new Piece(this._buffers.length,{line:0,column:0},{line:lineStarts3.length-1,column:splitText.length-lineStarts3[lineStarts3.length-1]},lineStarts3.length-1,splitText.length));this._buffers.push(new StringBuffer(splitText,lineStarts3))}const lineStarts2=createLineStartsFast(text2);newPieces.push(new Piece(this._buffers.length,{line:0,column:0},{line:lineStarts2.length-1,column:text2.length-lineStarts2[lineStarts2.length-1]},lineStarts2.length-1,text2.length));this._buffers.push(new StringBuffer(text2,lineStarts2));return newPieces}let startOffset=this._buffers[0].buffer.length;const lineStarts=createLineStartsFast(text2,false);let start=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===startOffset&&startOffset!==0&&this.startWithLF(text2)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1};start=this._lastChangeBufferPos;for(let i=0;i=lineNumber-1){x=x.left}else if(x.lf_left+x.piece.lineFeedCnt>lineNumber-1){const prevAccumulatedValue=this.getAccumulatedValue(x,lineNumber-x.lf_left-2);const accumulatedValue=this.getAccumulatedValue(x,lineNumber-x.lf_left-1);const buffer=this._buffers[x.piece.bufferIndex].buffer;const startOffset=this.offsetInBuffer(x.piece.bufferIndex,x.piece.start);nodeStartOffset+=x.size_left;this._searchCache.set({node:x,nodeStartOffset:nodeStartOffset,nodeStartLineNumber:originalLineNumber-(lineNumber-1-x.lf_left)});return buffer.substring(startOffset+prevAccumulatedValue,startOffset+accumulatedValue-endOffset)}else if(x.lf_left+x.piece.lineFeedCnt===lineNumber-1){const prevAccumulatedValue=this.getAccumulatedValue(x,lineNumber-x.lf_left-2);const buffer=this._buffers[x.piece.bufferIndex].buffer;const startOffset=this.offsetInBuffer(x.piece.bufferIndex,x.piece.start);ret=buffer.substring(startOffset+prevAccumulatedValue,startOffset+x.piece.length);break}else{lineNumber-=x.lf_left+x.piece.lineFeedCnt;nodeStartOffset+=x.size_left+x.piece.length;x=x.right}}}x=x.next();while(x!==SENTINEL2){const buffer=this._buffers[x.piece.bufferIndex].buffer;if(x.piece.lineFeedCnt>0){const accumulatedValue=this.getAccumulatedValue(x,0);const startOffset=this.offsetInBuffer(x.piece.bufferIndex,x.piece.start);ret+=buffer.substring(startOffset,startOffset+accumulatedValue-endOffset);return ret}else{const startOffset=this.offsetInBuffer(x.piece.bufferIndex,x.piece.start);ret+=buffer.substr(startOffset,x.piece.length)}x=x.next()}return ret}computeBufferMetadata(){let x=this.root;let lfCnt=1;let len=0;while(x!==SENTINEL2){lfCnt+=x.lf_left+x.piece.lineFeedCnt;len+=x.size_left+x.piece.length;x=x.right}this._lineCnt=lfCnt;this._length=len;this._searchCache.validate(this._length)}getIndexOf(node,accumulatedValue){const piece=node.piece;const pos=this.positionInBuffer(node,accumulatedValue);const lineCnt=pos.line-piece.start.line;if(this.offsetInBuffer(piece.bufferIndex,piece.end)-this.offsetInBuffer(piece.bufferIndex,piece.start)===accumulatedValue){const realLineCnt=this.getLineFeedCnt(node.piece.bufferIndex,piece.start,pos);if(realLineCnt!==lineCnt){return{index:realLineCnt,remainder:0}}}return{index:lineCnt,remainder:pos.column}}getAccumulatedValue(node,index){if(index<0){return 0}const piece=node.piece;const lineStarts=this._buffers[piece.bufferIndex].lineStarts;const expectedLineStartIndex=piece.start.line+index+1;if(expectedLineStartIndex>piece.end.line){return lineStarts[piece.end.line]+piece.end.column-lineStarts[piece.start.line]-piece.start.column}else{return lineStarts[expectedLineStartIndex]-lineStarts[piece.start.line]-piece.start.column}}deleteNodeTail(node,pos){const piece=node.piece;const originalLFCnt=piece.lineFeedCnt;const originalEndOffset=this.offsetInBuffer(piece.bufferIndex,piece.end);const newEnd=pos;const newEndOffset=this.offsetInBuffer(piece.bufferIndex,newEnd);const newLineFeedCnt=this.getLineFeedCnt(piece.bufferIndex,piece.start,newEnd);const lf_delta=newLineFeedCnt-originalLFCnt;const size_delta=newEndOffset-originalEndOffset;const newLength=piece.length+size_delta;node.piece=new Piece(piece.bufferIndex,piece.start,newEnd,newLineFeedCnt,newLength);updateTreeMetadata(this,node,size_delta,lf_delta)}deleteNodeHead(node,pos){const piece=node.piece;const originalLFCnt=piece.lineFeedCnt;const originalStartOffset=this.offsetInBuffer(piece.bufferIndex,piece.start);const newStart=pos;const newLineFeedCnt=this.getLineFeedCnt(piece.bufferIndex,newStart,piece.end);const newStartOffset=this.offsetInBuffer(piece.bufferIndex,newStart);const lf_delta=newLineFeedCnt-originalLFCnt;const size_delta=originalStartOffset-newStartOffset;const newLength=piece.length+size_delta;node.piece=new Piece(piece.bufferIndex,newStart,piece.end,newLineFeedCnt,newLength);updateTreeMetadata(this,node,size_delta,lf_delta)}shrinkNode(node,start,end){const piece=node.piece;const originalStartPos=piece.start;const originalEndPos=piece.end;const oldLength=piece.length;const oldLFCnt=piece.lineFeedCnt;const newEnd=start;const newLineFeedCnt=this.getLineFeedCnt(piece.bufferIndex,piece.start,newEnd);const newLength=this.offsetInBuffer(piece.bufferIndex,start)-this.offsetInBuffer(piece.bufferIndex,originalStartPos);node.piece=new Piece(piece.bufferIndex,piece.start,newEnd,newLineFeedCnt,newLength);updateTreeMetadata(this,node,newLength-oldLength,newLineFeedCnt-oldLFCnt);const newPiece=new Piece(piece.bufferIndex,end,originalEndPos,this.getLineFeedCnt(piece.bufferIndex,end,originalEndPos),this.offsetInBuffer(piece.bufferIndex,originalEndPos)-this.offsetInBuffer(piece.bufferIndex,end));const newNode=this.rbInsertRight(node,newPiece);this.validateCRLFWithPrevNode(newNode)}appendToNode(node,value){if(this.adjustCarriageReturnFromNext(value,node)){value+="\n"}const hitCRLF=this.shouldCheckCRLF()&&this.startWithLF(value)&&this.endWithCR(node);const startOffset=this._buffers[0].buffer.length;this._buffers[0].buffer+=value;const lineStarts=createLineStartsFast(value,false);for(let i=0;ioffset){x=x.left}else if(x.size_left+x.piece.length>=offset){nodeStartOffset+=x.size_left;const ret={node:x,remainder:offset-x.size_left,nodeStartOffset:nodeStartOffset};this._searchCache.set(ret);return ret}else{offset-=x.size_left+x.piece.length;nodeStartOffset+=x.size_left+x.piece.length;x=x.right}}return null}nodeAt2(lineNumber,column){let x=this.root;let nodeStartOffset=0;while(x!==SENTINEL2){if(x.left!==SENTINEL2&&x.lf_left>=lineNumber-1){x=x.left}else if(x.lf_left+x.piece.lineFeedCnt>lineNumber-1){const prevAccumualtedValue=this.getAccumulatedValue(x,lineNumber-x.lf_left-2);const accumulatedValue=this.getAccumulatedValue(x,lineNumber-x.lf_left-1);nodeStartOffset+=x.size_left;return{node:x,remainder:Math.min(prevAccumualtedValue+column-1,accumulatedValue),nodeStartOffset:nodeStartOffset}}else if(x.lf_left+x.piece.lineFeedCnt===lineNumber-1){const prevAccumualtedValue=this.getAccumulatedValue(x,lineNumber-x.lf_left-2);if(prevAccumualtedValue+column-1<=x.piece.length){return{node:x,remainder:prevAccumualtedValue+column-1,nodeStartOffset:nodeStartOffset}}else{column-=x.piece.length-prevAccumualtedValue;break}}else{lineNumber-=x.lf_left+x.piece.lineFeedCnt;nodeStartOffset+=x.size_left+x.piece.length;x=x.right}}x=x.next();while(x!==SENTINEL2){if(x.piece.lineFeedCnt>0){const accumulatedValue=this.getAccumulatedValue(x,0);const nodeStartOffset2=this.offsetOfNode(x);return{node:x,remainder:Math.min(column-1,accumulatedValue),nodeStartOffset:nodeStartOffset2}}else{if(x.piece.length>=column-1){const nodeStartOffset2=this.offsetOfNode(x);return{node:x,remainder:column-1,nodeStartOffset:nodeStartOffset2}}else{column-=x.piece.length}}x=x.next()}return null}nodeCharCodeAt(node,offset){if(node.piece.lineFeedCnt<1){return-1}const buffer=this._buffers[node.piece.bufferIndex];const newOffset=this.offsetInBuffer(node.piece.bufferIndex,node.piece.start)+offset;return buffer.buffer.charCodeAt(newOffset)}offsetOfNode(node){if(!node){return 0}let pos=node.size_left;while(node!==this.root){if(node.parent.right===node){pos+=node.parent.size_left+node.parent.piece.length}node=node.parent}return pos}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL==="\n")}startWithLF(val){if(typeof val==="string"){return val.charCodeAt(0)===10}if(val===SENTINEL2||val.piece.lineFeedCnt===0){return false}const piece=val.piece;const lineStarts=this._buffers[piece.bufferIndex].lineStarts;const line=piece.start.line;const startOffset=lineStarts[line]+piece.start.column;if(line===lineStarts.length-1){return false}const nextLineOffset=lineStarts[line+1];if(nextLineOffset>startOffset+1){return false}return this._buffers[piece.bufferIndex].buffer.charCodeAt(startOffset)===10}endWithCR(val){if(typeof val==="string"){return val.charCodeAt(val.length-1)===13}if(val===SENTINEL2||val.piece.lineFeedCnt===0){return false}return this.nodeCharCodeAt(val,val.piece.length-1)===13}validateCRLFWithPrevNode(nextNode){if(this.shouldCheckCRLF()&&this.startWithLF(nextNode)){const node=nextNode.prev();if(this.endWithCR(node)){this.fixCRLF(node,nextNode)}}}validateCRLFWithNextNode(node){if(this.shouldCheckCRLF()&&this.endWithCR(node)){const nextNode=node.next();if(this.startWithLF(nextNode)){this.fixCRLF(node,nextNode)}}}fixCRLF(prev,next){const nodesToDel=[];const lineStarts=this._buffers[prev.piece.bufferIndex].lineStarts;let newEnd;if(prev.piece.end.column===0){newEnd={line:prev.piece.end.line-1,column:lineStarts[prev.piece.end.line]-lineStarts[prev.piece.end.line-1]-1}}else{newEnd={line:prev.piece.end.line,column:prev.piece.end.column-1}}const prevNewLength=prev.piece.length-1;const prevNewLFCnt=prev.piece.lineFeedCnt-1;prev.piece=new Piece(prev.piece.bufferIndex,prev.piece.start,newEnd,prevNewLFCnt,prevNewLength);updateTreeMetadata(this,prev,-1,-1);if(prev.piece.length===0){nodesToDel.push(prev)}const newStart={line:next.piece.start.line+1,column:0};const newLength=next.piece.length-1;const newLineFeedCnt=this.getLineFeedCnt(next.piece.bufferIndex,newStart,next.piece.end);next.piece=new Piece(next.piece.bufferIndex,newStart,next.piece.end,newLineFeedCnt,newLength);updateTreeMetadata(this,next,-1,-1);if(next.piece.length===0){nodesToDel.push(next)}const pieces=this.createNewPieces("\r\n");this.rbInsertRight(prev,pieces[0]);for(let i=0;ia.sortIndex-b.sortIndex))}}this._mightContainRTL=mightContainRTL;this._mightContainUnusualLineTerminators=mightContainUnusualLineTerminators;this._mightContainNonBasicASCII=mightContainNonBasicASCII;const contentChanges=this._doApplyEdits(operations);let trimAutoWhitespaceLineNumbers=null;if(recordTrimAutoWhitespace&&newTrimAutoWhitespaceCandidates.length>0){newTrimAutoWhitespaceCandidates.sort(((a,b)=>b.lineNumber-a.lineNumber));trimAutoWhitespaceLineNumbers=[];for(let i=0,len=newTrimAutoWhitespaceCandidates.length;i0&&newTrimAutoWhitespaceCandidates[i-1].lineNumber===lineNumber){continue}const prevContent=newTrimAutoWhitespaceCandidates[i].oldContent;const lineContent=this.getLineContent(lineNumber);if(lineContent.length===0||lineContent===prevContent||firstNonWhitespaceIndex(lineContent)!==-1){continue}trimAutoWhitespaceLineNumbers.push(lineNumber)}}this._onDidChangeContent.fire();return new ApplyEditsResult(reverseOperations,contentChanges,trimAutoWhitespaceLineNumbers)}_reduceOperations(operations){if(operations.length<1e3){return operations}return[this._toSingleEditOperation(operations)]}_toSingleEditOperation(operations){let forceMoveMarkers=false;const firstEditRange=operations[0].range;const lastEditRange=operations[operations.length-1].range;const entireEditRange=new Range(firstEditRange.startLineNumber,firstEditRange.startColumn,lastEditRange.endLineNumber,lastEditRange.endColumn);let lastEndLineNumber=firstEditRange.startLineNumber;let lastEndColumn=firstEditRange.startColumn;const result=[];for(let i=0,len=operations.length;i0){result.push(operation.text)}lastEndLineNumber=range2.endLineNumber;lastEndColumn=range2.endColumn}const text2=result.join("");const[eolCount,firstLineLength,lastLineLength]=countEOL(text2);return{sortIndex:0,identifier:operations[0].identifier,range:entireEditRange,rangeOffset:this.getOffsetAt(entireEditRange.startLineNumber,entireEditRange.startColumn),rangeLength:this.getValueLengthInRange(entireEditRange,0),text:text2,eolCount:eolCount,firstLineLength:firstLineLength,lastLineLength:lastLineLength,forceMoveMarkers:forceMoveMarkers,isAutoWhitespaceEdit:false}}_doApplyEdits(operations){operations.sort(PieceTreeTextBuffer._sortOpsDescending);const contentChanges=[];for(let i=0;i0){const lineCount=op.eolCount+1;if(lineCount===1){resultRange=new Range(startLineNumber,startColumn,startLineNumber,startColumn+op.firstLineLength)}else{resultRange=new Range(startLineNumber,startColumn,startLineNumber+lineCount-1,op.lastLineLength+1)}}else{resultRange=new Range(startLineNumber,startColumn,startLineNumber,startColumn)}prevOpEndLineNumber=resultRange.endLineNumber;prevOpEndColumn=resultRange.endColumn;result.push(resultRange);prevOp=op}return result}static _sortOpsAscending(a,b){const r=Range.compareRangesUsingEnds(a.range,b.range);if(r===0){return a.sortIndex-b.sortIndex}return r}static _sortOpsDescending(a,b){const r=Range.compareRangesUsingEnds(a.range,b.range);if(r===0){return b.sortIndex-a.sortIndex}return-r}}}});var PieceTreeTextBufferFactory,PieceTreeTextBufferBuilder;var init_pieceTreeTextBufferBuilder=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder.js"(){init_strings();init_pieceTreeBase();init_pieceTreeTextBuffer();PieceTreeTextBufferFactory=class{constructor(_chunks,_bom,_cr,_lf,_crlf,_containsRTL,_containsUnusualLineTerminators,_isBasicASCII,_normalizeEOL){this._chunks=_chunks;this._bom=_bom;this._cr=_cr;this._lf=_lf;this._crlf=_crlf;this._containsRTL=_containsRTL;this._containsUnusualLineTerminators=_containsUnusualLineTerminators;this._isBasicASCII=_isBasicASCII;this._normalizeEOL=_normalizeEOL}_getEOL(defaultEOL){const totalEOLCount=this._cr+this._lf+this._crlf;const totalCRCount=this._cr+this._crlf;if(totalEOLCount===0){return defaultEOL===1?"\n":"\r\n"}if(totalCRCount>totalEOLCount/2){return"\r\n"}return"\n"}create(defaultEOL){const eol=this._getEOL(defaultEOL);const chunks=this._chunks;if(this._normalizeEOL&&(eol==="\r\n"&&(this._cr>0||this._lf>0)||eol==="\n"&&(this._cr>0||this._crlf>0))){for(let i=0,len=chunks.length;i=55296&&lastChar<=56319){this._acceptChunk1(chunk.substr(0,chunk.length-1),false);this._hasPreviousChar=true;this._previousChar=lastChar}else{this._acceptChunk1(chunk,false);this._hasPreviousChar=false;this._previousChar=lastChar}}_acceptChunk1(chunk,allowEmptyStrings){if(!allowEmptyStrings&&chunk.length===0){return}if(this._hasPreviousChar){this._acceptChunk2(String.fromCharCode(this._previousChar)+chunk)}else{this._acceptChunk2(chunk)}}_acceptChunk2(chunk){const lineStarts=createLineStarts(this._tmpLineStarts,chunk);this.chunks.push(new StringBuffer(chunk,lineStarts.lineStarts));this.cr+=lineStarts.cr;this.lf+=lineStarts.lf;this.crlf+=lineStarts.crlf;if(!lineStarts.isBasicASCII){this.isBasicASCII=false;if(!this.containsRTL){this.containsRTL=containsRTL(chunk)}if(!this.containsUnusualLineTerminators){this.containsUnusualLineTerminators=containsUnusualLineTerminators(chunk)}}}finish(normalizeEOL=true){this._finish();return new PieceTreeTextBufferFactory(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,normalizeEOL)}_finish(){if(this.chunks.length===0){this._acceptChunk1("",true)}if(this._hasPreviousChar){this._hasPreviousChar=false;const lastChunk=this.chunks[this.chunks.length-1];lastChunk.buffer+=String.fromCharCode(this._previousChar);const newLineStarts=createLineStartsFast(lastChunk.buffer);lastChunk.lineStarts=newLineStarts;if(this._previousChar===13){this.cr++}}}}}});function arrayFill(length2,value){const arr=[];for(let i=0;i=this._store.length){this._store[this._store.length]=this._default}this._store[index]=value}replace(index,oldLength,newLength){if(index>=this._store.length){return}if(oldLength===0){this.insert(index,newLength);return}else if(newLength===0){this.delete(index,oldLength);return}const before=this._store.slice(0,index);const after=this._store.slice(index+oldLength);const insertArr=arrayFill(newLength,this._default);this._store=before.concat(insertArr,after)}delete(deleteIndex,deleteCount){if(deleteCount===0||deleteIndex>=this._store.length){return}this._store.splice(deleteIndex,deleteCount)}insert(insertIndex,insertCount){if(insertCount===0||insertIndex>=this._store.length){return}const arr=[];for(let i=0;i0){const last=this._tokens[this._tokens.length-1];if(last.endLineNumber+1===lineNumber){last.appendLineTokens(lineTokens);return}}this._tokens.push(new ContiguousMultilineTokens(lineNumber,[lineTokens]))}finalize(){return this._tokens}}}});function safeTokenize(languageIdCodec,languageId,tokenizationSupport,text2,hasEOL,state){let r=null;if(tokenizationSupport){try{r=tokenizationSupport.tokenizeEncoded(text2,hasEOL,state.clone())}catch(e){onUnexpectedError(e)}}if(!r){r=nullTokenizeEncoded(languageIdCodec.encodeLanguageId(languageId),state)}LineTokens.convertToEndOffset(r.tokens,text2.length);return r}var TokenizerWithStateStore,TokenizerWithStateStoreAndTextModel,TrackingTokenizationStateStore,TokenizationStateStore,RangePriorityQueueImpl,DefaultBackgroundTokenizer;var init_textModelTokens=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/textModelTokens.js"(){init_async();init_errors();init_platform();init_stopwatch();init_eolCounter();init_lineRange();init_offsetRange();init_nullTokenize();init_fixedArray();init_contiguousMultilineTokensBuilder();init_lineTokens();TokenizerWithStateStore=class{constructor(lineCount,tokenizationSupport){this.tokenizationSupport=tokenizationSupport;this.initialState=this.tokenizationSupport.getInitialState();this.store=new TrackingTokenizationStateStore(lineCount)}getStartState(lineNumber){return this.store.getStartState(lineNumber,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}};TokenizerWithStateStoreAndTextModel=class extends TokenizerWithStateStore{constructor(lineCount,tokenizationSupport,_textModel,_languageIdCodec){super(lineCount,tokenizationSupport);this._textModel=_textModel;this._languageIdCodec=_languageIdCodec}updateTokensUntilLine(builder,lineNumber){const languageId=this._textModel.getLanguageId();while(true){const lineToTokenize=this.getFirstInvalidLine();if(!lineToTokenize||lineToTokenize.lineNumber>lineNumber){break}const text2=this._textModel.getLineContent(lineToTokenize.lineNumber);const r=safeTokenize(this._languageIdCodec,languageId,this.tokenizationSupport,text2,true,lineToTokenize.startState);builder.add(lineToTokenize.lineNumber,r.tokens);this.store.setEndState(lineToTokenize.lineNumber,r.endState)}}getTokenTypeIfInsertingCharacter(position,character){const lineStartState=this.getStartState(position.lineNumber);if(!lineStartState){return 0}const languageId=this._textModel.getLanguageId();const lineContent=this._textModel.getLineContent(position.lineNumber);const text2=lineContent.substring(0,position.column-1)+character+lineContent.substring(position.column-1);const r=safeTokenize(this._languageIdCodec,languageId,this.tokenizationSupport,text2,true,lineStartState);const lineTokens=new LineTokens(r.tokens,text2,this._languageIdCodec);if(lineTokens.getCount()===0){return 0}const tokenIndex=lineTokens.findTokenIndexAtOffset(position.column-1);return lineTokens.getStandardTokenType(tokenIndex)}tokenizeLineWithEdit(position,length2,newText){const lineNumber=position.lineNumber;const column=position.column;const lineStartState=this.getStartState(lineNumber);if(!lineStartState){return null}const curLineContent=this._textModel.getLineContent(lineNumber);const newLineContent=curLineContent.substring(0,column-1)+newText+curLineContent.substring(column-1+length2);const languageId=this._textModel.getLanguageIdAtPosition(lineNumber,0);const result=safeTokenize(this._languageIdCodec,languageId,this.tokenizationSupport,newLineContent,true,lineStartState);const lineTokens=new LineTokens(result.tokens,newLineContent,this._languageIdCodec);return lineTokens}isCheapToTokenize(lineNumber){const firstInvalidLineNumber=this.store.getFirstInvalidEndStateLineNumberOrMax();if(lineNumber1&&i>=1;i--){const newNonWhitespaceIndex=this._textModel.getLineFirstNonWhitespaceColumn(i);if(newNonWhitespaceIndex===0){continue}if(newNonWhitespaceIndex0&&length2>0){length2--;newLineCount--}this._lineEndStates.replace(range2.startLineNumber,length2,newLineCount)}};RangePriorityQueueImpl=class{constructor(){this._ranges=[]}get min(){if(this._ranges.length===0){return null}return this._ranges[0].start}delete(value){const idx=this._ranges.findIndex((r=>r.contains(value)));if(idx!==-1){const range2=this._ranges[idx];if(range2.start===value){if(range2.endExclusive===value+1){this._ranges.splice(idx,1)}else{this._ranges[idx]=new OffsetRange(value+1,range2.endExclusive)}}else{if(range2.endExclusive===value+1){this._ranges[idx]=new OffsetRange(range2.start,value)}else{this._ranges.splice(idx,1,new OffsetRange(range2.start,value),new OffsetRange(value+1,range2.endExclusive))}}}}addRange(range2){OffsetRange.addRange(range2,this._ranges)}addRangeAndResize(range2,newLength){let idxFirstMightBeIntersecting=0;while(!(idxFirstMightBeIntersecting>=this._ranges.length||range2.start<=this._ranges[idxFirstMightBeIntersecting].endExclusive)){idxFirstMightBeIntersecting++}let idxFirstIsAfter=idxFirstMightBeIntersecting;while(!(idxFirstIsAfter>=this._ranges.length||range2.endExclusiver.toString())).join(" + ")}};DefaultBackgroundTokenizer=class{constructor(_tokenizerWithStateStore,_backgroundTokenStore){this._tokenizerWithStateStore=_tokenizerWithStateStore;this._backgroundTokenStore=_backgroundTokenStore;this._isDisposed=false;this._isScheduled=false}dispose(){this._isDisposed=true}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){if(this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()){return}this._isScheduled=true;runWhenIdle((deadline=>{this._isScheduled=false;this._backgroundTokenizeWithDeadline(deadline)}))}_backgroundTokenizeWithDeadline(deadline){const endTime=Date.now()+deadline.timeRemaining();const execute=()=>{if(this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()){return}this._backgroundTokenizeForAtLeast1ms();if(Date.now()1){break}const tokenizedLineNumber=this._tokenizeOneInvalidLine(builder);if(tokenizedLineNumber>=lineCount){break}}while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(builder.finalize());this.checkFinished()}_hasLinesToTokenize(){if(!this._tokenizerWithStateStore){return false}return!this._tokenizerWithStateStore.store.allStatesValid()}_tokenizeOneInvalidLine(builder){var _a6;const firstInvalidLine=(_a6=this._tokenizerWithStateStore)===null||_a6===void 0?void 0:_a6.getFirstInvalidLine();if(!firstInvalidLine){return this._tokenizerWithStateStore._textModel.getLineCount()+1}this._tokenizerWithStateStore.updateTokensUntilLine(builder,firstInvalidLine.lineNumber);return firstInvalidLine.lineNumber}checkFinished(){if(this._isDisposed){return}if(this._tokenizerWithStateStore.store.allStatesValid()){this._backgroundTokenStore.backgroundTokenizationFinished()}}requestTokens(startLineNumber,endLineNumberExclusive){this._tokenizerWithStateStore.store.invalidateEndStateRange(new LineRange(startLineNumber,endLineNumberExclusive))}}}});function toUint32Array(arr){if(arr instanceof Uint32Array){return arr}else{return new Uint32Array(arr)}}var EMPTY_LINE_TOKENS,ContiguousTokensEditing;var init_contiguousTokensEditing=__esm({"node_modules/monaco-editor/esm/vs/editor/common/tokens/contiguousTokensEditing.js"(){init_lineTokens();EMPTY_LINE_TOKENS=new Uint32Array(0).buffer;ContiguousTokensEditing=class{static deleteBeginning(lineTokens,toChIndex){if(lineTokens===null||lineTokens===EMPTY_LINE_TOKENS){return lineTokens}return ContiguousTokensEditing.delete(lineTokens,0,toChIndex)}static deleteEnding(lineTokens,fromChIndex){if(lineTokens===null||lineTokens===EMPTY_LINE_TOKENS){return lineTokens}const tokens=toUint32Array(lineTokens);const lineTextLength=tokens[tokens.length-2];return ContiguousTokensEditing.delete(lineTokens,fromChIndex,lineTextLength)}static delete(lineTokens,fromChIndex,toChIndex){if(lineTokens===null||lineTokens===EMPTY_LINE_TOKENS||fromChIndex===toChIndex){return lineTokens}const tokens=toUint32Array(lineTokens);const tokensCount=tokens.length>>>1;if(fromChIndex===0&&tokens[tokens.length-2]===toChIndex){return EMPTY_LINE_TOKENS}const fromTokenIndex=LineTokens.findIndexInTokensArray(tokens,fromChIndex);const fromTokenStartOffset=fromTokenIndex>0?tokens[fromTokenIndex-1<<1]:0;const fromTokenEndOffset=tokens[fromTokenIndex<<1];if(toChIndexlastEnd){tokens[dest++]=tokenEndOffset;tokens[dest++]=tokens[(tokenIndex<<1)+1];lastEnd=tokenEndOffset}}if(dest===tokens.length){return lineTokens}const tmp=new Uint32Array(dest);tmp.set(tokens.subarray(0,dest),0);return tmp.buffer}static append(lineTokens,_otherTokens){if(_otherTokens===EMPTY_LINE_TOKENS){return lineTokens}if(lineTokens===EMPTY_LINE_TOKENS){return _otherTokens}if(lineTokens===null){return lineTokens}if(_otherTokens===null){return null}const myTokens=toUint32Array(lineTokens);const otherTokens=toUint32Array(_otherTokens);const otherTokensCount=otherTokens.length>>>1;const result=new Uint32Array(myTokens.length+otherTokens.length);result.set(myTokens,0);let dest=myTokens.length;const delta=myTokens[myTokens.length-2];for(let i=0;i>>1;let fromTokenIndex=LineTokens.findIndexInTokensArray(tokens,chIndex);if(fromTokenIndex>0){const fromTokenStartOffset=tokens[fromTokenIndex-1<<1];if(fromTokenStartOffset===chIndex){fromTokenIndex--}}for(let tokenIndex=fromTokenIndex;tokenIndex>>0}var ContiguousTokensStore;var init_contiguousTokensStore=__esm({"node_modules/monaco-editor/esm/vs/editor/common/tokens/contiguousTokensStore.js"(){init_arrays();init_position();init_contiguousTokensEditing();init_lineTokens();init_encodedTokenAttributes();ContiguousTokensStore=class{constructor(languageIdCodec){this._lineTokens=[];this._len=0;this._languageIdCodec=languageIdCodec}flush(){this._lineTokens=[];this._len=0}get hasTokens(){return this._lineTokens.length>0}getTokens(topLevelLanguageId,lineIndex,lineText){let rawLineTokens=null;if(lineIndex1){hasDifferentLanguageId=TokenMetadata.getLanguageId(tokens[1])!==topLevelLanguageId}if(!hasDifferentLanguageId){return EMPTY_LINE_TOKENS}}if(!tokens||tokens.length===0){const tokens2=new Uint32Array(2);tokens2[0]=lineTextLength;tokens2[1]=getDefaultMetadata(topLevelLanguageId);return tokens2.buffer}tokens[tokens.length-2]=lineTextLength;if(tokens.byteOffset===0&&tokens.byteLength===tokens.buffer.byteLength){return tokens.buffer}return tokens}_ensureLine(lineIndex){while(lineIndex>=this._len){this._lineTokens[this._len]=null;this._len++}}_deleteLines(start,deleteCount){if(deleteCount===0){return}if(start+deleteCount>this._len){deleteCount=this._len-start}this._lineTokens.splice(start,deleteCount);this._len-=deleteCount}_insertLines(insertIndex,insertCount){if(insertCount===0){return}const lineTokens=[];for(let i=0;i=this._len){return}if(range2.startLineNumber===range2.endLineNumber){if(range2.startColumn===range2.endColumn){return}this._lineTokens[firstLineIndex]=ContiguousTokensEditing.delete(this._lineTokens[firstLineIndex],range2.startColumn-1,range2.endColumn-1);return}this._lineTokens[firstLineIndex]=ContiguousTokensEditing.deleteEnding(this._lineTokens[firstLineIndex],range2.startColumn-1);const lastLineIndex=range2.endLineNumber-1;let lastLineTokens=null;if(lastLineIndex=this._len){return}if(eolCount===0){this._lineTokens[lineIndex]=ContiguousTokensEditing.insert(this._lineTokens[lineIndex],position.column-1,firstLineLength);return}this._lineTokens[lineIndex]=ContiguousTokensEditing.deleteEnding(this._lineTokens[lineIndex],position.column-1);this._lineTokens[lineIndex]=ContiguousTokensEditing.insert(this._lineTokens[lineIndex],position.column-1,firstLineLength);this._insertLines(position.lineNumber,eolCount)}setMultilineTokens(tokens,textModel){if(tokens.length===0){return{changes:[]}}const ranges=[];for(let i=0,len=tokens.length;i0){const _firstRange=pieces[0].getRange();const _lastRange=pieces[pieces.length-1].getRange();if(!_firstRange||!_lastRange){return _range}range2=_range.plusRange(_firstRange).plusRange(_lastRange)}let insertPosition=null;for(let i=0,len=this._pieces.length;irange2.endLineNumber){insertPosition=insertPosition||{index:i};break}piece.removeTokens(range2);if(piece.isEmpty()){this._pieces.splice(i,1);i--;len--;continue}if(piece.endLineNumberrange2.endLineNumber){insertPosition=insertPosition||{index:i};continue}const[a,b]=piece.split(range2);if(a.isEmpty()){insertPosition=insertPosition||{index:i};continue}if(b.isEmpty()){continue}this._pieces.splice(i,1,a,b);i++;len++;insertPosition=insertPosition||{index:i}}insertPosition=insertPosition||{index:this._pieces.length};if(pieces.length>0){this._pieces=arrayInsert(this._pieces,insertPosition.index,pieces)}return range2}isComplete(){return this._isComplete}addSparseTokens(lineNumber,aTokens){if(aTokens.getLineContent().length===0){return aTokens}const pieces=this._pieces;if(pieces.length===0){return aTokens}const pieceIndex=SparseTokensStore._findFirstPieceWithLine(pieces,lineNumber);const bTokens=pieces[pieceIndex].getLineTokens(lineNumber);if(!bTokens){return aTokens}const aLen=aTokens.getCount();const bLen=bTokens.getCount();let aIndex=0;const result=[];let resultLen=0;let lastEndOffset=0;const emitToken=(endOffset,metadata)=>{if(endOffset===lastEndOffset){return}lastEndOffset=endOffset;result[resultLen++]=endOffset;result[resultLen++]=metadata};for(let bIndex=0;bIndex>>0;const aMask=~bMask>>>0;while(aIndexlineNumber){high=mid-1}else{while(mid>low&&pieces[mid-1].startLineNumber<=lineNumber&&lineNumber<=pieces[mid-1].endLineNumber){mid--}return mid}}return low}acceptEdit(range2,eolCount,firstLineLength,lastLineLength,firstCharCode){for(const piece of this._pieces){piece.acceptEdit(range2,eolCount,firstLineLength,lastLineLength,firstCharCode)}}}}});var TokenizationTextModelPart,GrammarTokens,AttachedViewHandler;var init_tokenizationTextModelPart=__esm({"node_modules/monaco-editor/esm/vs/editor/common/model/tokenizationTextModelPart.js"(){init_arrays();init_async();init_errors();init_event();init_lifecycle();init_eolCounter();init_lineRange();init_position();init_wordHelper();init_languages();init_textModelPart();init_textModelTokens();init_contiguousMultilineTokensBuilder();init_contiguousTokensStore();init_sparseTokensStore();TokenizationTextModelPart=class extends TextModelPart{constructor(_languageService,_languageConfigurationService,_textModel,_bracketPairsTextModelPart,_languageId,_attachedViews){super();this._languageService=_languageService;this._languageConfigurationService=_languageConfigurationService;this._textModel=_textModel;this._bracketPairsTextModelPart=_bracketPairsTextModelPart;this._languageId=_languageId;this._attachedViews=_attachedViews;this._semanticTokens=new SparseTokensStore(this._languageService.languageIdCodec);this._onDidChangeLanguage=this._register(new Emitter);this.onDidChangeLanguage=this._onDidChangeLanguage.event;this._onDidChangeLanguageConfiguration=this._register(new Emitter);this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event;this._onDidChangeTokens=this._register(new Emitter);this.onDidChangeTokens=this._onDidChangeTokens.event;this.grammarTokens=this._register(new GrammarTokens(this._languageService.languageIdCodec,this._textModel,(()=>this._languageId),this._attachedViews));this._register(this._languageConfigurationService.onDidChange((e=>{if(e.affects(this._languageId)){this._onDidChangeLanguageConfiguration.fire({})}})));this._register(this.grammarTokens.onDidChangeTokens((e=>{this._emitModelTokensChangedEvent(e)})));this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState((e=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()})))}handleDidChangeContent(e){if(e.isFlush){this._semanticTokens.flush()}else if(!e.isEolChange){for(const c of e.changes){const[eolCount,firstLineLength,lastLineLength]=countEOL(c.text);this._semanticTokens.acceptEdit(c.range,eolCount,firstLineLength,lastLineLength,c.text.length>0?c.text.charCodeAt(0):0)}}this.grammarTokens.handleDidChangeContent(e)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(lineNumber){this.validateLineNumber(lineNumber);const syntacticTokens=this.grammarTokens.getLineTokens(lineNumber);return this._semanticTokens.addSparseTokens(lineNumber,syntacticTokens)}_emitModelTokensChangedEvent(e){if(!this._textModel._isDisposing()){this._bracketPairsTextModelPart.handleDidChangeTokens(e);this._onDidChangeTokens.fire(e)}}validateLineNumber(lineNumber){if(lineNumber<1||lineNumber>this._textModel.getLineCount()){throw new BugIndicatingError("Illegal value for lineNumber")}}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(lineNumber){this.validateLineNumber(lineNumber);this.grammarTokens.forceTokenization(lineNumber)}isCheapToTokenize(lineNumber){this.validateLineNumber(lineNumber);return this.grammarTokens.isCheapToTokenize(lineNumber)}tokenizeIfCheap(lineNumber){this.validateLineNumber(lineNumber);this.grammarTokens.tokenizeIfCheap(lineNumber)}getTokenTypeIfInsertingCharacter(lineNumber,column,character){return this.grammarTokens.getTokenTypeIfInsertingCharacter(lineNumber,column,character)}tokenizeLineWithEdit(position,length2,newText){return this.grammarTokens.tokenizeLineWithEdit(position,length2,newText)}setSemanticTokens(tokens,isComplete){this._semanticTokens.set(tokens,isComplete);this._emitModelTokensChangedEvent({semanticTokensApplied:tokens!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(range2,tokens){if(this.hasCompleteSemanticTokens()){return}const changedRange=this._textModel.validateRange(this._semanticTokens.setPartial(range2,tokens));this._emitModelTokensChangedEvent({semanticTokensApplied:true,ranges:[{fromLineNumber:changedRange.startLineNumber,toLineNumber:changedRange.endLineNumber}]})}getWordAtPosition(_position){this.assertNotDisposed();const position=this._textModel.validatePosition(_position);const lineContent=this._textModel.getLineContent(position.lineNumber);const lineTokens=this.getLineTokens(position.lineNumber);const tokenIndex=lineTokens.findTokenIndexAtOffset(position.column-1);const[rbStartOffset,rbEndOffset]=TokenizationTextModelPart._findLanguageBoundaries(lineTokens,tokenIndex);const rightBiasedWord=getWordAtText(position.column,this.getLanguageConfiguration(lineTokens.getLanguageId(tokenIndex)).getWordDefinition(),lineContent.substring(rbStartOffset,rbEndOffset),rbStartOffset);if(rightBiasedWord&&rightBiasedWord.startColumn<=_position.column&&_position.column<=rightBiasedWord.endColumn){return rightBiasedWord}if(tokenIndex>0&&rbStartOffset===position.column-1){const[lbStartOffset,lbEndOffset]=TokenizationTextModelPart._findLanguageBoundaries(lineTokens,tokenIndex-1);const leftBiasedWord=getWordAtText(position.column,this.getLanguageConfiguration(lineTokens.getLanguageId(tokenIndex-1)).getWordDefinition(),lineContent.substring(lbStartOffset,lbEndOffset),lbStartOffset);if(leftBiasedWord&&leftBiasedWord.startColumn<=_position.column&&_position.column<=leftBiasedWord.endColumn){return leftBiasedWord}}return null}getLanguageConfiguration(languageId){return this._languageConfigurationService.getLanguageConfiguration(languageId)}static _findLanguageBoundaries(lineTokens,tokenIndex){const languageId=lineTokens.getLanguageId(tokenIndex);let startOffset=0;for(let i=tokenIndex;i>=0&&lineTokens.getLanguageId(i)===languageId;i--){startOffset=lineTokens.getStartOffset(i)}let endOffset=lineTokens.getLineContent().length;for(let i=tokenIndex,tokenCount=lineTokens.getCount();i{const languageId=this.getLanguageId();if(e.changedLanguages.indexOf(languageId)===-1){return}this.resetTokenization()})));this.resetTokenization();this._register(attachedViews.onDidChangeVisibleRanges((({view:view,state:state})=>{if(state){let existing=this._attachedViewStates.get(view);if(!existing){existing=new AttachedViewHandler((()=>this.refreshRanges(existing.lineRanges)));this._attachedViewStates.set(view,existing)}existing.handleStateChange(state)}else{this._attachedViewStates.deleteAndDispose(view)}})))}resetTokenization(fireTokenChangeEvent=true){var _a6;this._tokens.flush();(_a6=this._debugBackgroundTokens)===null||_a6===void 0?void 0:_a6.flush();if(this._debugBackgroundStates){this._debugBackgroundStates=new TrackingTokenizationStateStore(this._textModel.getLineCount())}if(fireTokenChangeEvent){this._onDidChangeTokens.fire({semanticTokensApplied:false,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}const initializeTokenization=()=>{if(this._textModel.isTooLargeForTokenization()){return[null,null]}const tokenizationSupport2=TokenizationRegistry2.get(this.getLanguageId());if(!tokenizationSupport2){return[null,null]}let initialState2;try{initialState2=tokenizationSupport2.getInitialState()}catch(e){onUnexpectedError(e);return[null,null]}return[tokenizationSupport2,initialState2]};const[tokenizationSupport,initialState]=initializeTokenization();if(tokenizationSupport&&initialState){this._tokenizer=new TokenizerWithStateStoreAndTextModel(this._textModel.getLineCount(),tokenizationSupport,this._textModel,this._languageIdCodec)}else{this._tokenizer=null}this._backgroundTokenizer.clear();this._defaultBackgroundTokenizer=null;if(this._tokenizer){const b={setTokens:tokens=>{this.setTokens(tokens)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2){return}const newState=2;this._backgroundTokenizationState=newState;this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(lineNumber,state)=>{var _a7;if(!this._tokenizer){return}const firstInvalidEndStateLineNumber=this._tokenizer.store.getFirstInvalidEndStateLineNumber();if(firstInvalidEndStateLineNumber!==null&&lineNumber>=firstInvalidEndStateLineNumber){(_a7=this._tokenizer)===null||_a7===void 0?void 0:_a7.store.setEndState(lineNumber,state)}}};if(tokenizationSupport&&tokenizationSupport.createBackgroundTokenizer&&!tokenizationSupport.backgroundTokenizerShouldOnlyVerifyTokens){this._backgroundTokenizer.value=tokenizationSupport.createBackgroundTokenizer(this._textModel,b)}if(!this._backgroundTokenizer.value){this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new DefaultBackgroundTokenizer(this._tokenizer,b);this._defaultBackgroundTokenizer.handleChanges()}if((tokenizationSupport===null||tokenizationSupport===void 0?void 0:tokenizationSupport.backgroundTokenizerShouldOnlyVerifyTokens)&&tokenizationSupport.createBackgroundTokenizer){this._debugBackgroundTokens=new ContiguousTokensStore(this._languageIdCodec);this._debugBackgroundStates=new TrackingTokenizationStateStore(this._textModel.getLineCount());this._debugBackgroundTokenizer.clear();this._debugBackgroundTokenizer.value=tokenizationSupport.createBackgroundTokenizer(this._textModel,{setTokens:tokens=>{var _a7;(_a7=this._debugBackgroundTokens)===null||_a7===void 0?void 0:_a7.setMultilineTokens(tokens,this._textModel)},backgroundTokenizationFinished(){},setEndState:(lineNumber,state)=>{var _a7;(_a7=this._debugBackgroundStates)===null||_a7===void 0?void 0:_a7.setEndState(lineNumber,state)}})}else{this._debugBackgroundTokens=void 0;this._debugBackgroundStates=void 0;this._debugBackgroundTokenizer.value=void 0}}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var _a6;(_a6=this._defaultBackgroundTokenizer)===null||_a6===void 0?void 0:_a6.handleChanges()}handleDidChangeContent(e){var _a6,_b3,_c2;if(e.isFlush){this.resetTokenization(false)}else if(!e.isEolChange){for(const c of e.changes){const[eolCount,firstLineLength]=countEOL(c.text);this._tokens.acceptEdit(c.range,eolCount,firstLineLength);(_a6=this._debugBackgroundTokens)===null||_a6===void 0?void 0:_a6.acceptEdit(c.range,eolCount,firstLineLength)}(_b3=this._debugBackgroundStates)===null||_b3===void 0?void 0:_b3.acceptChanges(e.changes);if(this._tokenizer){this._tokenizer.store.acceptChanges(e.changes)}(_c2=this._defaultBackgroundTokenizer)===null||_c2===void 0?void 0:_c2.handleChanges()}}setTokens(tokens){const{changes:changes}=this._tokens.setMultilineTokens(tokens,this._textModel);if(changes.length>0){this._onDidChangeTokens.fire({semanticTokensApplied:false,ranges:changes})}return{changes:changes}}refreshAllVisibleLineTokens(){const ranges=LineRange.joinMany([...this._attachedViewStates].map((([_,s])=>s.lineRanges)));this.refreshRanges(ranges)}refreshRanges(ranges){for(const range2 of ranges){this.refreshRange(range2.startLineNumber,range2.endLineNumberExclusive-1)}}refreshRange(startLineNumber,endLineNumber){var _a6,_b3;if(!this._tokenizer){return}startLineNumber=Math.max(1,Math.min(this._textModel.getLineCount(),startLineNumber));endLineNumber=Math.min(this._textModel.getLineCount(),endLineNumber);const builder=new ContiguousMultilineTokensBuilder;const{heuristicTokens:heuristicTokens}=this._tokenizer.tokenizeHeuristically(builder,startLineNumber,endLineNumber);const changedTokens=this.setTokens(builder.finalize());if(heuristicTokens){for(const c of changedTokens.changes){(_a6=this._backgroundTokenizer.value)===null||_a6===void 0?void 0:_a6.requestTokens(c.fromLineNumber,c.toLineNumber+1)}}(_b3=this._defaultBackgroundTokenizer)===null||_b3===void 0?void 0:_b3.checkFinished()}forceTokenization(lineNumber){var _a6,_b3;const builder=new ContiguousMultilineTokensBuilder;(_a6=this._tokenizer)===null||_a6===void 0?void 0:_a6.updateTokensUntilLine(builder,lineNumber);this.setTokens(builder.finalize());(_b3=this._defaultBackgroundTokenizer)===null||_b3===void 0?void 0:_b3.checkFinished()}isCheapToTokenize(lineNumber){if(!this._tokenizer){return true}return this._tokenizer.isCheapToTokenize(lineNumber)}tokenizeIfCheap(lineNumber){if(this.isCheapToTokenize(lineNumber)){this.forceTokenization(lineNumber)}}getLineTokens(lineNumber){var _a6;const lineText=this._textModel.getLineContent(lineNumber);const result=this._tokens.getTokens(this._textModel.getLanguageId(),lineNumber-1,lineText);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer){if(this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>lineNumber&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>lineNumber){const backgroundResult=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),lineNumber-1,lineText);if(!result.equals(backgroundResult)&&((_a6=this._debugBackgroundTokenizer.value)===null||_a6===void 0?void 0:_a6.reportMismatchingTokens)){this._debugBackgroundTokenizer.value.reportMismatchingTokens(lineNumber)}}}return result}getTokenTypeIfInsertingCharacter(lineNumber,column,character){if(!this._tokenizer){return 0}const position=this._textModel.validatePosition(new Position(lineNumber,column));this.forceTokenization(position.lineNumber);return this._tokenizer.getTokenTypeIfInsertingCharacter(position,character)}tokenizeLineWithEdit(position,length2,newText){if(!this._tokenizer){return null}const validatedPosition=this._textModel.validatePosition(position);this.forceTokenization(validatedPosition.lineNumber);return this._tokenizer.tokenizeLineWithEdit(validatedPosition,length2,newText)}get hasTokens(){return this._tokens.hasTokens}};AttachedViewHandler=class extends Disposable{get lineRanges(){return this._lineRanges}constructor(_refreshTokens){super();this._refreshTokens=_refreshTokens;this.runner=this._register(new RunOnceScheduler((()=>this.update()),50));this._computedLineRanges=[];this._lineRanges=[]}update(){if(equals(this._computedLineRanges,this._lineRanges,((a,b)=>a.equals(b)))){return}this._computedLineRanges=this._lineRanges;this._refreshTokens()}handleStateChange(state){this._lineRanges=state.visibleLineRanges;if(state.stabilized){this.runner.cancel();this.update()}else{this.runner.schedule()}}}}});var ModelRawFlush,LineInjectedText,ModelRawLineChanged,ModelRawLinesDeleted,ModelRawLinesInserted,ModelRawEOLChanged,ModelRawContentChangedEvent,ModelInjectedTextChangedEvent,InternalModelContentChangeEvent;var init_textModelEvents=__esm({"node_modules/monaco-editor/esm/vs/editor/common/textModelEvents.js"(){ModelRawFlush=class{constructor(){this.changeType=1}};LineInjectedText=class{static applyInjectedText(lineText,injectedTexts){if(!injectedTexts||injectedTexts.length===0){return lineText}let result="";let lastOriginalOffset=0;for(const injectedText of injectedTexts){result+=lineText.substring(lastOriginalOffset,injectedText.column-1);lastOriginalOffset=injectedText.column-1;result+=injectedText.options.content}result+=lineText.substring(lastOriginalOffset);return result}static fromDecorations(decorations){const result=[];for(const decoration2 of decorations){if(decoration2.options.before&&decoration2.options.before.content.length>0){result.push(new LineInjectedText(decoration2.ownerId,decoration2.range.startLineNumber,decoration2.range.startColumn,decoration2.options.before,0))}if(decoration2.options.after&&decoration2.options.after.content.length>0){result.push(new LineInjectedText(decoration2.ownerId,decoration2.range.endLineNumber,decoration2.range.endColumn,decoration2.options.after,1))}}result.sort(((a,b)=>{if(a.lineNumber===b.lineNumber){if(a.column===b.column){return a.order-b.order}return a.column-b.column}return a.lineNumber-b.lineNumber}));return result}constructor(ownerId,lineNumber,column,options2,order){this.ownerId=ownerId;this.lineNumber=lineNumber;this.column=column;this.options=options2;this.order=order}};ModelRawLineChanged=class{constructor(lineNumber,detail,injectedText){this.changeType=2;this.lineNumber=lineNumber;this.detail=detail;this.injectedText=injectedText}};ModelRawLinesDeleted=class{constructor(fromLineNumber,toLineNumber){this.changeType=3;this.fromLineNumber=fromLineNumber;this.toLineNumber=toLineNumber}};ModelRawLinesInserted=class{constructor(fromLineNumber,toLineNumber,detail,injectedTexts){this.changeType=4;this.injectedTexts=injectedTexts;this.fromLineNumber=fromLineNumber;this.toLineNumber=toLineNumber;this.detail=detail}};ModelRawEOLChanged=class{constructor(){this.changeType=5}};ModelRawContentChangedEvent=class{constructor(changes,versionId,isUndoing,isRedoing){this.changes=changes;this.versionId=versionId;this.isUndoing=isUndoing;this.isRedoing=isRedoing;this.resultingSelection=null}containsEvent(type){for(let i=0,len=this.changes.length;i=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};__param11=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};MODEL_ID=0;LIMIT_FIND_COUNT2=999;LONG_LINE_BOUNDARY=1e4;TextModelSnapshot=class{constructor(source){this._source=source;this._eos=false}read(){if(this._eos){return null}const result=[];let resultCnt=0;let resultLength=0;do{const tmp=this._source.read();if(tmp===null){this._eos=true;if(resultCnt===0){return null}else{return result.join("")}}if(tmp.length>0){result[resultCnt++]=tmp;resultLength+=tmp.length}if(resultLength>=64*1024){return result.join("")}}while(true)}};invalidFunc2=()=>{throw new Error(`Invalid change accessor`)};TextModel=TextModel_1=class TextModel2 extends Disposable{static resolveOptions(textBuffer,options2){if(options2.detectIndentation){const guessedIndentation=guessIndentation(textBuffer,options2.tabSize,options2.insertSpaces);return new TextModelResolvedOptions({tabSize:guessedIndentation.tabSize,indentSize:"tabSize",insertSpaces:guessedIndentation.insertSpaces,trimAutoWhitespace:options2.trimAutoWhitespace,defaultEOL:options2.defaultEOL,bracketPairColorizationOptions:options2.bracketPairColorizationOptions})}return new TextModelResolvedOptions(options2)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(listener){return this._eventEmitter.slowEvent((e=>listener(e.contentChangedEvent)))}onDidChangeContentOrInjectedText(listener){return combinedDisposable(this._eventEmitter.fastEvent((e=>listener(e))),this._onDidChangeInjectedText.event((e=>listener(e))))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(source,languageIdOrSelection,creationOptions,associatedResource=null,_undoRedoService,_languageService,_languageConfigurationService){super();this._undoRedoService=_undoRedoService;this._languageService=_languageService;this._languageConfigurationService=_languageConfigurationService;this._onWillDispose=this._register(new Emitter);this.onWillDispose=this._onWillDispose.event;this._onDidChangeDecorations=this._register(new DidChangeDecorationsEmitter((affectedInjectedTextLines=>this.handleBeforeFireDecorationsChangedEvent(affectedInjectedTextLines))));this.onDidChangeDecorations=this._onDidChangeDecorations.event;this._onDidChangeOptions=this._register(new Emitter);this.onDidChangeOptions=this._onDidChangeOptions.event;this._onDidChangeAttached=this._register(new Emitter);this.onDidChangeAttached=this._onDidChangeAttached.event;this._onDidChangeInjectedText=this._register(new Emitter);this._eventEmitter=this._register(new DidChangeContentEmitter);this._languageSelectionListener=this._register(new MutableDisposable);this._deltaDecorationCallCnt=0;this._attachedViews=new AttachedViews;MODEL_ID++;this.id="$model"+MODEL_ID;this.isForSimpleWidget=creationOptions.isForSimpleWidget;if(typeof associatedResource==="undefined"||associatedResource===null){this._associatedResource=URI.parse("inmemory://model/"+MODEL_ID)}else{this._associatedResource=associatedResource}this._attachedEditorCount=0;const{textBuffer:textBuffer,disposable:disposable}=createTextBuffer(source,creationOptions.defaultEOL);this._buffer=textBuffer;this._bufferDisposable=disposable;this._options=TextModel_1.resolveOptions(this._buffer,creationOptions);const languageId=typeof languageIdOrSelection==="string"?languageIdOrSelection:languageIdOrSelection.languageId;if(typeof languageIdOrSelection!=="string"){this._languageSelectionListener.value=languageIdOrSelection.onDidChange((()=>this._setLanguage(languageIdOrSelection.languageId)))}this._bracketPairs=this._register(new BracketPairsTextModelPart(this,this._languageConfigurationService));this._guidesTextModelPart=this._register(new GuidesTextModelPart(this,this._languageConfigurationService));this._decorationProvider=this._register(new ColorizedBracketPairsDecorationProvider(this));this._tokenizationTextModelPart=new TokenizationTextModelPart(this._languageService,this._languageConfigurationService,this,this._bracketPairs,languageId,this._attachedViews);const bufferLineCount=this._buffer.getLineCount();const bufferTextLength=this._buffer.getValueLengthInRange(new Range(1,1,bufferLineCount,this._buffer.getLineLength(bufferLineCount)+1),0);if(creationOptions.largeFileOptimizations){this._isTooLargeForTokenization=bufferTextLength>TextModel_1.LARGE_FILE_SIZE_THRESHOLD||bufferLineCount>TextModel_1.LARGE_FILE_LINE_COUNT_THRESHOLD}else{this._isTooLargeForTokenization=false}this._isTooLargeForSyncing=bufferTextLength>TextModel_1._MODEL_SYNC_LIMIT;this._versionId=1;this._alternativeVersionId=1;this._initialUndoRedoSnapshot=null;this._isDisposed=false;this.__isDisposing=false;this._instanceId=singleLetterHash(MODEL_ID);this._lastDecorationId=0;this._decorations=Object.create(null);this._decorationsTree=new DecorationsTrees;this._commandManager=new EditStack(this,this._undoRedoService);this._isUndoing=false;this._isRedoing=false;this._trimAutoWhitespaceLines=null;this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit();this._onDidChangeDecorations.fire();this._onDidChangeDecorations.endDeferredEmit()})));this._languageService.requestRichLanguageFeatures(languageId)}dispose(){this.__isDisposing=true;this._onWillDispose.fire();this._tokenizationTextModelPart.dispose();this._isDisposed=true;super.dispose();this._bufferDisposable.dispose();this.__isDisposing=false;const emptyDisposedTextBuffer=new PieceTreeTextBuffer([],"","\n",false,false,true,true);emptyDisposedTextBuffer.dispose();this._buffer=emptyDisposedTextBuffer;this._bufferDisposable=Disposable.None}_assertNotDisposed(){if(this._isDisposed){throw new Error("Model is disposed!")}}_emitContentChangedEvent(rawChange,change){if(this.__isDisposing){return}this._tokenizationTextModelPart.handleDidChangeContent(change);this._bracketPairs.handleDidChangeContent(change);this._eventEmitter.fire(new InternalModelContentChangeEvent(rawChange,change))}setValue(value){this._assertNotDisposed();if(value===null||value===void 0){throw illegalArgument()}const{textBuffer:textBuffer,disposable:disposable}=createTextBuffer(value,this._options.defaultEOL);this._setValueFromTextBuffer(textBuffer,disposable)}_createContentChanged2(range2,rangeOffset,rangeLength,text2,isUndoing,isRedoing,isFlush,isEolChange){return{changes:[{range:range2,rangeOffset:rangeOffset,rangeLength:rangeLength,text:text2}],eol:this._buffer.getEOL(),isEolChange:isEolChange,versionId:this.getVersionId(),isUndoing:isUndoing,isRedoing:isRedoing,isFlush:isFlush}}_setValueFromTextBuffer(textBuffer,textBufferDisposable){this._assertNotDisposed();const oldFullModelRange=this.getFullModelRange();const oldModelValueLength=this.getValueLengthInRange(oldFullModelRange);const endLineNumber=this.getLineCount();const endColumn=this.getLineMaxColumn(endLineNumber);this._buffer=textBuffer;this._bufferDisposable.dispose();this._bufferDisposable=textBufferDisposable;this._increaseVersionId();this._decorations=Object.create(null);this._decorationsTree=new DecorationsTrees;this._commandManager.clear();this._trimAutoWhitespaceLines=null;this._emitContentChangedEvent(new ModelRawContentChangedEvent([new ModelRawFlush],this._versionId,false,false),this._createContentChanged2(new Range(1,1,endLineNumber,endColumn),0,oldModelValueLength,this.getValue(),false,false,true,false))}setEOL(eol){this._assertNotDisposed();const newEOL=eol===1?"\r\n":"\n";if(this._buffer.getEOL()===newEOL){return}const oldFullModelRange=this.getFullModelRange();const oldModelValueLength=this.getValueLengthInRange(oldFullModelRange);const endLineNumber=this.getLineCount();const endColumn=this.getLineMaxColumn(endLineNumber);this._onBeforeEOLChange();this._buffer.setEOL(newEOL);this._increaseVersionId();this._onAfterEOLChange();this._emitContentChangedEvent(new ModelRawContentChangedEvent([new ModelRawEOLChanged],this._versionId,false,false),this._createContentChanged2(new Range(1,1,endLineNumber,endColumn),0,oldModelValueLength,this.getValue(),false,false,false,true))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const versionId=this.getVersionId();const allDecorations=this._decorationsTree.collectNodesPostOrder();for(let i=0,len=allDecorations.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){this._assertNotDisposed();if(this.isTooLargeForTokenization()){return false}let smallLineCharCount=0;let longLineCharCount=0;const lineCount=this._buffer.getLineCount();for(let lineNumber=1;lineNumber<=lineCount;lineNumber++){const lineLength=this._buffer.getLineLength(lineNumber);if(lineLength>=LONG_LINE_BOUNDARY){longLineCharCount+=lineLength}else{smallLineCharCount+=lineLength}}return longLineCharCount>smallLineCharCount}get uri(){return this._associatedResource}getOptions(){this._assertNotDisposed();return this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(_newOpts){this._assertNotDisposed();const tabSize=typeof _newOpts.tabSize!=="undefined"?_newOpts.tabSize:this._options.tabSize;const indentSize=typeof _newOpts.indentSize!=="undefined"?_newOpts.indentSize:this._options.originalIndentSize;const insertSpaces=typeof _newOpts.insertSpaces!=="undefined"?_newOpts.insertSpaces:this._options.insertSpaces;const trimAutoWhitespace=typeof _newOpts.trimAutoWhitespace!=="undefined"?_newOpts.trimAutoWhitespace:this._options.trimAutoWhitespace;const bracketPairColorizationOptions=typeof _newOpts.bracketColorizationOptions!=="undefined"?_newOpts.bracketColorizationOptions:this._options.bracketPairColorizationOptions;const newOpts=new TextModelResolvedOptions({tabSize:tabSize,indentSize:indentSize,insertSpaces:insertSpaces,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:trimAutoWhitespace,bracketPairColorizationOptions:bracketPairColorizationOptions});if(this._options.equals(newOpts)){return}const e=this._options.createChangeEvent(newOpts);this._options=newOpts;this._bracketPairs.handleDidChangeOptions(e);this._decorationProvider.handleDidChangeOptions(e);this._onDidChangeOptions.fire(e)}detectIndentation(defaultInsertSpaces,defaultTabSize){this._assertNotDisposed();const guessedIndentation=guessIndentation(this._buffer,defaultTabSize,defaultInsertSpaces);this.updateOptions({insertSpaces:guessedIndentation.insertSpaces,tabSize:guessedIndentation.tabSize,indentSize:guessedIndentation.tabSize})}normalizeIndentation(str){this._assertNotDisposed();return normalizeIndentation(str,this._options.indentSize,this._options.insertSpaces)}getVersionId(){this._assertNotDisposed();return this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(selections=null){const matches=this.findMatches(UNUSUAL_LINE_TERMINATORS.source,false,true,false,null,false,1073741824);this._buffer.resetMightContainUnusualLineTerminators();this.pushEditOperations(selections,matches.map((m=>({range:m.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){this._assertNotDisposed();return this._alternativeVersionId}getInitialUndoRedoSnapshot(){this._assertNotDisposed();return this._initialUndoRedoSnapshot}getOffsetAt(rawPosition){this._assertNotDisposed();const position=this._validatePosition(rawPosition.lineNumber,rawPosition.column,0);return this._buffer.getOffsetAt(position.lineNumber,position.column)}getPositionAt(rawOffset){this._assertNotDisposed();const offset=Math.min(this._buffer.getLength(),Math.max(0,rawOffset));return this._buffer.getPositionAt(offset)}_increaseVersionId(){this._versionId=this._versionId+1;this._alternativeVersionId=this._versionId}_overwriteVersionId(versionId){this._versionId=versionId}_overwriteAlternativeVersionId(newAlternativeVersionId){this._alternativeVersionId=newAlternativeVersionId}_overwriteInitialUndoRedoSnapshot(newInitialUndoRedoSnapshot){this._initialUndoRedoSnapshot=newInitialUndoRedoSnapshot}getValue(eol,preserveBOM=false){this._assertNotDisposed();const fullModelRange=this.getFullModelRange();const fullModelValue=this.getValueInRange(fullModelRange,eol);if(preserveBOM){return this._buffer.getBOM()+fullModelValue}return fullModelValue}createSnapshot(preserveBOM=false){return new TextModelSnapshot(this._buffer.createSnapshot(preserveBOM))}getValueLength(eol,preserveBOM=false){this._assertNotDisposed();const fullModelRange=this.getFullModelRange();const fullModelValue=this.getValueLengthInRange(fullModelRange,eol);if(preserveBOM){return this._buffer.getBOM().length+fullModelValue}return fullModelValue}getValueInRange(rawRange,eol=0){this._assertNotDisposed();return this._buffer.getValueInRange(this.validateRange(rawRange),eol)}getValueLengthInRange(rawRange,eol=0){this._assertNotDisposed();return this._buffer.getValueLengthInRange(this.validateRange(rawRange),eol)}getCharacterCountInRange(rawRange,eol=0){this._assertNotDisposed();return this._buffer.getCharacterCountInRange(this.validateRange(rawRange),eol)}getLineCount(){this._assertNotDisposed();return this._buffer.getLineCount()}getLineContent(lineNumber){this._assertNotDisposed();if(lineNumber<1||lineNumber>this.getLineCount()){throw new BugIndicatingError("Illegal value for lineNumber")}return this._buffer.getLineContent(lineNumber)}getLineLength(lineNumber){this._assertNotDisposed();if(lineNumber<1||lineNumber>this.getLineCount()){throw new BugIndicatingError("Illegal value for lineNumber")}return this._buffer.getLineLength(lineNumber)}getLinesContent(){this._assertNotDisposed();return this._buffer.getLinesContent()}getEOL(){this._assertNotDisposed();return this._buffer.getEOL()}getEndOfLineSequence(){this._assertNotDisposed();return this._buffer.getEOL()==="\n"?0:1}getLineMinColumn(lineNumber){this._assertNotDisposed();return 1}getLineMaxColumn(lineNumber){this._assertNotDisposed();if(lineNumber<1||lineNumber>this.getLineCount()){throw new BugIndicatingError("Illegal value for lineNumber")}return this._buffer.getLineLength(lineNumber)+1}getLineFirstNonWhitespaceColumn(lineNumber){this._assertNotDisposed();if(lineNumber<1||lineNumber>this.getLineCount()){throw new BugIndicatingError("Illegal value for lineNumber")}return this._buffer.getLineFirstNonWhitespaceColumn(lineNumber)}getLineLastNonWhitespaceColumn(lineNumber){this._assertNotDisposed();if(lineNumber<1||lineNumber>this.getLineCount()){throw new BugIndicatingError("Illegal value for lineNumber")}return this._buffer.getLineLastNonWhitespaceColumn(lineNumber)}_validateRangeRelaxedNoAllocations(range2){const linesCount=this._buffer.getLineCount();const initialStartLineNumber=range2.startLineNumber;const initialStartColumn=range2.startColumn;let startLineNumber=Math.floor(typeof initialStartLineNumber==="number"&&!isNaN(initialStartLineNumber)?initialStartLineNumber:1);let startColumn=Math.floor(typeof initialStartColumn==="number"&&!isNaN(initialStartColumn)?initialStartColumn:1);if(startLineNumber<1){startLineNumber=1;startColumn=1}else if(startLineNumber>linesCount){startLineNumber=linesCount;startColumn=this.getLineMaxColumn(startLineNumber)}else{if(startColumn<=1){startColumn=1}else{const maxColumn=this.getLineMaxColumn(startLineNumber);if(startColumn>=maxColumn){startColumn=maxColumn}}}const initialEndLineNumber=range2.endLineNumber;const initialEndColumn=range2.endColumn;let endLineNumber=Math.floor(typeof initialEndLineNumber==="number"&&!isNaN(initialEndLineNumber)?initialEndLineNumber:1);let endColumn=Math.floor(typeof initialEndColumn==="number"&&!isNaN(initialEndColumn)?initialEndColumn:1);if(endLineNumber<1){endLineNumber=1;endColumn=1}else if(endLineNumber>linesCount){endLineNumber=linesCount;endColumn=this.getLineMaxColumn(endLineNumber)}else{if(endColumn<=1){endColumn=1}else{const maxColumn=this.getLineMaxColumn(endLineNumber);if(endColumn>=maxColumn){endColumn=maxColumn}}}if(initialStartLineNumber===startLineNumber&&initialStartColumn===startColumn&&initialEndLineNumber===endLineNumber&&initialEndColumn===endColumn&&range2 instanceof Range&&!(range2 instanceof Selection)){return range2}return new Range(startLineNumber,startColumn,endLineNumber,endColumn)}_isValidPosition(lineNumber,column,validationType){if(typeof lineNumber!=="number"||typeof column!=="number"){return false}if(isNaN(lineNumber)||isNaN(column)){return false}if(lineNumber<1||column<1){return false}if((lineNumber|0)!==lineNumber||(column|0)!==column){return false}const lineCount=this._buffer.getLineCount();if(lineNumber>lineCount){return false}if(column===1){return true}const maxColumn=this.getLineMaxColumn(lineNumber);if(column>maxColumn){return false}if(validationType===1){const charCodeBefore=this._buffer.getLineCharCode(lineNumber,column-2);if(isHighSurrogate(charCodeBefore)){return false}}return true}_validatePosition(_lineNumber,_column,validationType){const lineNumber=Math.floor(typeof _lineNumber==="number"&&!isNaN(_lineNumber)?_lineNumber:1);const column=Math.floor(typeof _column==="number"&&!isNaN(_column)?_column:1);const lineCount=this._buffer.getLineCount();if(lineNumber<1){return new Position(1,1)}if(lineNumber>lineCount){return new Position(lineCount,this.getLineMaxColumn(lineCount))}if(column<=1){return new Position(lineNumber,1)}const maxColumn=this.getLineMaxColumn(lineNumber);if(column>=maxColumn){return new Position(lineNumber,maxColumn)}if(validationType===1){const charCodeBefore=this._buffer.getLineCharCode(lineNumber,column-2);if(isHighSurrogate(charCodeBefore)){return new Position(lineNumber,column-1)}}return new Position(lineNumber,column)}validatePosition(position){const validationType=1;this._assertNotDisposed();if(position instanceof Position){if(this._isValidPosition(position.lineNumber,position.column,validationType)){return position}}return this._validatePosition(position.lineNumber,position.column,validationType)}_isValidRange(range2,validationType){const startLineNumber=range2.startLineNumber;const startColumn=range2.startColumn;const endLineNumber=range2.endLineNumber;const endColumn=range2.endColumn;if(!this._isValidPosition(startLineNumber,startColumn,0)){return false}if(!this._isValidPosition(endLineNumber,endColumn,0)){return false}if(validationType===1){const charCodeBeforeStart=startColumn>1?this._buffer.getLineCharCode(startLineNumber,startColumn-2):0;const charCodeBeforeEnd=endColumn>1&&endColumn<=this._buffer.getLineLength(endLineNumber)?this._buffer.getLineCharCode(endLineNumber,endColumn-2):0;const startInsideSurrogatePair=isHighSurrogate(charCodeBeforeStart);const endInsideSurrogatePair=isHighSurrogate(charCodeBeforeEnd);if(!startInsideSurrogatePair&&!endInsideSurrogatePair){return true}return false}return true}validateRange(_range){const validationType=1;this._assertNotDisposed();if(_range instanceof Range&&!(_range instanceof Selection)){if(this._isValidRange(_range,validationType)){return _range}}const start=this._validatePosition(_range.startLineNumber,_range.startColumn,0);const end=this._validatePosition(_range.endLineNumber,_range.endColumn,0);const startLineNumber=start.lineNumber;const startColumn=start.column;const endLineNumber=end.lineNumber;const endColumn=end.column;if(validationType===1){const charCodeBeforeStart=startColumn>1?this._buffer.getLineCharCode(startLineNumber,startColumn-2):0;const charCodeBeforeEnd=endColumn>1&&endColumn<=this._buffer.getLineLength(endLineNumber)?this._buffer.getLineCharCode(endLineNumber,endColumn-2):0;const startInsideSurrogatePair=isHighSurrogate(charCodeBeforeStart);const endInsideSurrogatePair=isHighSurrogate(charCodeBeforeEnd);if(!startInsideSurrogatePair&&!endInsideSurrogatePair){return new Range(startLineNumber,startColumn,endLineNumber,endColumn)}if(startLineNumber===endLineNumber&&startColumn===endColumn){return new Range(startLineNumber,startColumn-1,endLineNumber,endColumn-1)}if(startInsideSurrogatePair&&endInsideSurrogatePair){return new Range(startLineNumber,startColumn-1,endLineNumber,endColumn+1)}if(startInsideSurrogatePair){return new Range(startLineNumber,startColumn-1,endLineNumber,endColumn)}return new Range(startLineNumber,startColumn,endLineNumber,endColumn+1)}return new Range(startLineNumber,startColumn,endLineNumber,endColumn)}modifyPosition(rawPosition,offset){this._assertNotDisposed();const candidate=this.getOffsetAt(rawPosition)+offset;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,candidate)))}getFullModelRange(){this._assertNotDisposed();const lineCount=this.getLineCount();return new Range(1,1,lineCount,this.getLineMaxColumn(lineCount))}findMatchesLineByLine(searchRange,searchData,captureMatches,limitResultCount){return this._buffer.findMatchesLineByLine(searchRange,searchData,captureMatches,limitResultCount)}findMatches(searchString,rawSearchScope,isRegex,matchCase,wordSeparators2,captureMatches,limitResultCount=LIMIT_FIND_COUNT2){this._assertNotDisposed();let searchRanges=null;if(rawSearchScope!==null){if(!Array.isArray(rawSearchScope)){rawSearchScope=[rawSearchScope]}if(rawSearchScope.every((searchScope=>Range.isIRange(searchScope)))){searchRanges=rawSearchScope.map((searchScope=>this.validateRange(searchScope)))}}if(searchRanges===null){searchRanges=[this.getFullModelRange()]}searchRanges=searchRanges.sort(((d1,d2)=>d1.startLineNumber-d2.startLineNumber||d1.startColumn-d2.startColumn));const uniqueSearchRanges=[];uniqueSearchRanges.push(searchRanges.reduce(((prev,curr)=>{if(Range.areIntersecting(prev,curr)){return prev.plusRange(curr)}uniqueSearchRanges.push(prev);return curr})));let matchMapper;if(!isRegex&&searchString.indexOf("\n")<0){const searchParams=new SearchParams(searchString,isRegex,matchCase,wordSeparators2);const searchData=searchParams.parseSearchRequest();if(!searchData){return[]}matchMapper=searchRange=>this.findMatchesLineByLine(searchRange,searchData,captureMatches,limitResultCount)}else{matchMapper=searchRange=>TextModelSearch.findMatches(this,new SearchParams(searchString,isRegex,matchCase,wordSeparators2),searchRange,captureMatches,limitResultCount)}return uniqueSearchRanges.map(matchMapper).reduce(((arr,matches)=>arr.concat(matches)),[])}findNextMatch(searchString,rawSearchStart,isRegex,matchCase,wordSeparators2,captureMatches){this._assertNotDisposed();const searchStart=this.validatePosition(rawSearchStart);if(!isRegex&&searchString.indexOf("\n")<0){const searchParams=new SearchParams(searchString,isRegex,matchCase,wordSeparators2);const searchData=searchParams.parseSearchRequest();if(!searchData){return null}const lineCount=this.getLineCount();let searchRange=new Range(searchStart.lineNumber,searchStart.column,lineCount,this.getLineMaxColumn(lineCount));let ret=this.findMatchesLineByLine(searchRange,searchData,captureMatches,1);TextModelSearch.findNextMatch(this,new SearchParams(searchString,isRegex,matchCase,wordSeparators2),searchStart,captureMatches);if(ret.length>0){return ret[0]}searchRange=new Range(1,1,searchStart.lineNumber,this.getLineMaxColumn(searchStart.lineNumber));ret=this.findMatchesLineByLine(searchRange,searchData,captureMatches,1);if(ret.length>0){return ret[0]}return null}return TextModelSearch.findNextMatch(this,new SearchParams(searchString,isRegex,matchCase,wordSeparators2),searchStart,captureMatches)}findPreviousMatch(searchString,rawSearchStart,isRegex,matchCase,wordSeparators2,captureMatches){this._assertNotDisposed();const searchStart=this.validatePosition(rawSearchStart);return TextModelSearch.findPreviousMatch(this,new SearchParams(searchString,isRegex,matchCase,wordSeparators2),searchStart,captureMatches)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(eol){const currentEOL=this.getEOL()==="\n"?0:1;if(currentEOL===eol){return}try{this._onDidChangeDecorations.beginDeferredEmit();this._eventEmitter.beginDeferredEmit();if(this._initialUndoRedoSnapshot===null){this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)}this._commandManager.pushEOL(eol)}finally{this._eventEmitter.endDeferredEmit();this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(rawOperation){if(rawOperation instanceof ValidAnnotatedEditOperation){return rawOperation}return new ValidAnnotatedEditOperation(rawOperation.identifier||null,this.validateRange(rawOperation.range),rawOperation.text,rawOperation.forceMoveMarkers||false,rawOperation.isAutoWhitespaceEdit||false,rawOperation._isTracked||false)}_validateEditOperations(rawOperations){const result=[];for(let i=0,len=rawOperations.length;i({range:this.validateRange(op.range),text:op.text})));let editsAreNearCursors=true;if(beforeCursorState){for(let i=0,len=beforeCursorState.length;isel.endLineNumber;const selIsBelow=sel.startLineNumber>editRange.endLineNumber;if(!selIsAbove&&!selIsBelow){foundEditNearSel=true;break}}if(!foundEditNearSel){editsAreNearCursors=false;break}}}if(editsAreNearCursors){for(let i=0,len=this._trimAutoWhitespaceLines.length;ieditRange.endLineNumber){continue}if(trimLineNumber===editRange.startLineNumber&&editRange.startColumn===maxLineColumn&&editRange.isEmpty()&&editText&&editText.length>0&&editText.charAt(0)==="\n"){continue}if(trimLineNumber===editRange.startLineNumber&&editRange.startColumn===1&&editRange.isEmpty()&&editText&&editText.length>0&&editText.charAt(editText.length-1)==="\n"){continue}allowTrimLine=false;break}if(allowTrimLine){const trimRange=new Range(trimLineNumber,1,trimLineNumber,maxLineColumn);editOperations.push(new ValidAnnotatedEditOperation(null,trimRange,null,false,false,false))}}}this._trimAutoWhitespaceLines=null}if(this._initialUndoRedoSnapshot===null){this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)}return this._commandManager.pushEditOperation(beforeCursorState,editOperations,cursorStateComputer,group3)}_applyUndo(changes,eol,resultingAlternativeVersionId,resultingSelection){const edits=changes.map((change=>{const rangeStart=this.getPositionAt(change.newPosition);const rangeEnd=this.getPositionAt(change.newEnd);return{range:new Range(rangeStart.lineNumber,rangeStart.column,rangeEnd.lineNumber,rangeEnd.column),text:change.oldText}}));this._applyUndoRedoEdits(edits,eol,true,false,resultingAlternativeVersionId,resultingSelection)}_applyRedo(changes,eol,resultingAlternativeVersionId,resultingSelection){const edits=changes.map((change=>{const rangeStart=this.getPositionAt(change.oldPosition);const rangeEnd=this.getPositionAt(change.oldEnd);return{range:new Range(rangeStart.lineNumber,rangeStart.column,rangeEnd.lineNumber,rangeEnd.column),text:change.newText}}));this._applyUndoRedoEdits(edits,eol,false,true,resultingAlternativeVersionId,resultingSelection)}_applyUndoRedoEdits(edits,eol,isUndoing,isRedoing,resultingAlternativeVersionId,resultingSelection){try{this._onDidChangeDecorations.beginDeferredEmit();this._eventEmitter.beginDeferredEmit();this._isUndoing=isUndoing;this._isRedoing=isRedoing;this.applyEdits(edits,false);this.setEOL(eol);this._overwriteAlternativeVersionId(resultingAlternativeVersionId)}finally{this._isUndoing=false;this._isRedoing=false;this._eventEmitter.endDeferredEmit(resultingSelection);this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(rawOperations,computeUndoEdits=false){try{this._onDidChangeDecorations.beginDeferredEmit();this._eventEmitter.beginDeferredEmit();const operations=this._validateEditOperations(rawOperations);return this._doApplyEdits(operations,computeUndoEdits)}finally{this._eventEmitter.endDeferredEmit();this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(rawOperations,computeUndoEdits){const oldLineCount=this._buffer.getLineCount();const result=this._buffer.applyEdits(rawOperations,this._options.trimAutoWhitespace,computeUndoEdits);const newLineCount=this._buffer.getLineCount();const contentChanges=result.changes;this._trimAutoWhitespaceLines=result.trimAutoWhitespaceLineNumbers;if(contentChanges.length!==0){for(let i=0,len=contentChanges.length;i=0;j--){const editLineNumber=startLineNumber+j;const currentEditLineNumber=currentEditStartLineNumber+j;injectedTextInEditedRangeQueue.takeFromEndWhile((r=>r.lineNumber>currentEditLineNumber));const decorationsInCurrentLine=injectedTextInEditedRangeQueue.takeFromEndWhile((r=>r.lineNumber===currentEditLineNumber));rawContentChanges.push(new ModelRawLineChanged(editLineNumber,this.getLineContent(currentEditLineNumber),decorationsInCurrentLine))}if(editingLinesCntr.lineNumberr.lineNumber===lineNumber))}rawContentChanges.push(new ModelRawLinesInserted(spliceLineNumber+1,startLineNumber+insertingLinesCnt,newLines,injectedTexts))}lineCount+=changeLineCountDelta}this._emitContentChangedEvent(new ModelRawContentChangedEvent(rawContentChanges,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:contentChanges,eol:this._buffer.getEOL(),isEolChange:false,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:false})}return result.reverseEdits===null?void 0:result.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(affectedInjectedTextLines){if(affectedInjectedTextLines===null||affectedInjectedTextLines.size===0){return}const affectedLines=Array.from(affectedInjectedTextLines);const lineChangeEvents=affectedLines.map((lineNumber=>new ModelRawLineChanged(lineNumber,this.getLineContent(lineNumber),this._getInjectedTextInLine(lineNumber))));this._onDidChangeInjectedText.fire(new ModelInjectedTextChangedEvent(lineChangeEvents))}changeDecorations(callback,ownerId=0){this._assertNotDisposed();try{this._onDidChangeDecorations.beginDeferredEmit();return this._changeDecorations(ownerId,callback)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(ownerId,callback){const changeAccessor={addDecoration:(range2,options2)=>this._deltaDecorationsImpl(ownerId,[],[{range:range2,options:options2}])[0],changeDecoration:(id,newRange)=>{this._changeDecorationImpl(id,newRange)},changeDecorationOptions:(id,options2)=>{this._changeDecorationOptionsImpl(id,_normalizeOptions(options2))},removeDecoration:id=>{this._deltaDecorationsImpl(ownerId,[id],[])},deltaDecorations:(oldDecorations,newDecorations)=>{if(oldDecorations.length===0&&newDecorations.length===0){return[]}return this._deltaDecorationsImpl(ownerId,oldDecorations,newDecorations)}};let result=null;try{result=callback(changeAccessor)}catch(e){onUnexpectedError(e)}changeAccessor.addDecoration=invalidFunc2;changeAccessor.changeDecoration=invalidFunc2;changeAccessor.changeDecorationOptions=invalidFunc2;changeAccessor.removeDecoration=invalidFunc2;changeAccessor.deltaDecorations=invalidFunc2;return result}deltaDecorations(oldDecorations,newDecorations,ownerId=0){this._assertNotDisposed();if(!oldDecorations){oldDecorations=[]}if(oldDecorations.length===0&&newDecorations.length===0){return[]}try{this._deltaDecorationCallCnt++;if(this._deltaDecorationCallCnt>1){console.warn(`Invoking deltaDecorations recursively could lead to leaking decorations.`);onUnexpectedError(new Error(`Invoking deltaDecorations recursively could lead to leaking decorations.`))}this._onDidChangeDecorations.beginDeferredEmit();return this._deltaDecorationsImpl(ownerId,oldDecorations,newDecorations)}finally{this._onDidChangeDecorations.endDeferredEmit();this._deltaDecorationCallCnt--}}_getTrackedRange(id){return this.getDecorationRange(id)}_setTrackedRange(id,newRange,newStickiness){const node=id?this._decorations[id]:null;if(!node){if(!newRange){return null}return this._deltaDecorationsImpl(0,[],[{range:newRange,options:TRACKED_RANGE_OPTIONS[newStickiness]}],true)[0]}if(!newRange){this._decorationsTree.delete(node);delete this._decorations[node.id];return null}const range2=this._validateRangeRelaxedNoAllocations(newRange);const startOffset=this._buffer.getOffsetAt(range2.startLineNumber,range2.startColumn);const endOffset=this._buffer.getOffsetAt(range2.endLineNumber,range2.endColumn);this._decorationsTree.delete(node);node.reset(this.getVersionId(),startOffset,endOffset,range2);node.setOptions(TRACKED_RANGE_OPTIONS[newStickiness]);this._decorationsTree.insert(node);return node.id}removeAllDecorationsWithOwnerId(ownerId){if(this._isDisposed){return}const nodes=this._decorationsTree.collectNodesFromOwner(ownerId);for(let i=0,len=nodes.length;ithis.getLineCount()){return[]}return this.getLinesDecorations(lineNumber,lineNumber,ownerId,filterOutValidation)}getLinesDecorations(_startLineNumber,_endLineNumber,ownerId=0,filterOutValidation=false,onlyMarginDecorations=false){const lineCount=this.getLineCount();const startLineNumber=Math.min(lineCount,Math.max(1,_startLineNumber));const endLineNumber=Math.min(lineCount,Math.max(1,_endLineNumber));const endColumn=this.getLineMaxColumn(endLineNumber);const range2=new Range(startLineNumber,1,endLineNumber,endColumn);const decorations=this._getDecorationsInRange(range2,ownerId,filterOutValidation,onlyMarginDecorations);pushMany(decorations,this._decorationProvider.getDecorationsInRange(range2,ownerId,filterOutValidation));return decorations}getDecorationsInRange(range2,ownerId=0,filterOutValidation=false,onlyMinimapDecorations=false,onlyMarginDecorations=false){const validatedRange=this.validateRange(range2);const decorations=this._getDecorationsInRange(validatedRange,ownerId,filterOutValidation,onlyMarginDecorations);pushMany(decorations,this._decorationProvider.getDecorationsInRange(validatedRange,ownerId,filterOutValidation,onlyMinimapDecorations));return decorations}getOverviewRulerDecorations(ownerId=0,filterOutValidation=false){return this._decorationsTree.getAll(this,ownerId,filterOutValidation,true,false)}getInjectedTextDecorations(ownerId=0){return this._decorationsTree.getAllInjectedText(this,ownerId)}_getInjectedTextInLine(lineNumber){const startOffset=this._buffer.getOffsetAt(lineNumber,1);const endOffset=startOffset+this._buffer.getLineLength(lineNumber);const result=this._decorationsTree.getInjectedTextInInterval(this,startOffset,endOffset,0);return LineInjectedText.fromDecorations(result).filter((t2=>t2.lineNumber===lineNumber))}getAllDecorations(ownerId=0,filterOutValidation=false){let result=this._decorationsTree.getAll(this,ownerId,filterOutValidation,false,false);result=result.concat(this._decorationProvider.getAllDecorations(ownerId,filterOutValidation));return result}getAllMarginDecorations(ownerId=0){return this._decorationsTree.getAll(this,ownerId,false,false,true)}_getDecorationsInRange(filterRange,filterOwnerId,filterOutValidation,onlyMarginDecorations){const startOffset=this._buffer.getOffsetAt(filterRange.startLineNumber,filterRange.startColumn);const endOffset=this._buffer.getOffsetAt(filterRange.endLineNumber,filterRange.endColumn);return this._decorationsTree.getAllInInterval(this,startOffset,endOffset,filterOwnerId,filterOutValidation,onlyMarginDecorations)}getRangeAt(start,end){return this._buffer.getRangeAt(start,end-start)}_changeDecorationImpl(decorationId,_range){const node=this._decorations[decorationId];if(!node){return}if(node.options.after){const oldRange=this.getDecorationRange(decorationId);this._onDidChangeDecorations.recordLineAffectedByInjectedText(oldRange.endLineNumber)}if(node.options.before){const oldRange=this.getDecorationRange(decorationId);this._onDidChangeDecorations.recordLineAffectedByInjectedText(oldRange.startLineNumber)}const range2=this._validateRangeRelaxedNoAllocations(_range);const startOffset=this._buffer.getOffsetAt(range2.startLineNumber,range2.startColumn);const endOffset=this._buffer.getOffsetAt(range2.endLineNumber,range2.endColumn);this._decorationsTree.delete(node);node.reset(this.getVersionId(),startOffset,endOffset,range2);this._decorationsTree.insert(node);this._onDidChangeDecorations.checkAffectedAndFire(node.options);if(node.options.after){this._onDidChangeDecorations.recordLineAffectedByInjectedText(range2.endLineNumber)}if(node.options.before){this._onDidChangeDecorations.recordLineAffectedByInjectedText(range2.startLineNumber)}}_changeDecorationOptionsImpl(decorationId,options2){const node=this._decorations[decorationId];if(!node){return}const nodeWasInOverviewRuler=node.options.overviewRuler&&node.options.overviewRuler.color?true:false;const nodeIsInOverviewRuler=options2.overviewRuler&&options2.overviewRuler.color?true:false;this._onDidChangeDecorations.checkAffectedAndFire(node.options);this._onDidChangeDecorations.checkAffectedAndFire(options2);if(node.options.after||options2.after){const nodeRange=this._decorationsTree.getNodeRange(this,node);this._onDidChangeDecorations.recordLineAffectedByInjectedText(nodeRange.endLineNumber)}if(node.options.before||options2.before){const nodeRange=this._decorationsTree.getNodeRange(this,node);this._onDidChangeDecorations.recordLineAffectedByInjectedText(nodeRange.startLineNumber)}if(nodeWasInOverviewRuler!==nodeIsInOverviewRuler){this._decorationsTree.delete(node);node.setOptions(options2);this._decorationsTree.insert(node)}else{node.setOptions(options2)}}_deltaDecorationsImpl(ownerId,oldDecorationsIds,newDecorations,suppressEvents=false){const versionId=this.getVersionId();const oldDecorationsLen=oldDecorationsIds.length;let oldDecorationIndex=0;const newDecorationsLen=newDecorations.length;let newDecorationIndex=0;this._onDidChangeDecorations.beginDeferredEmit();try{const result=new Array(newDecorationsLen);while(oldDecorationIndexthis._setLanguage(languageIdOrSelection.languageId,source)));this._setLanguage(languageIdOrSelection.languageId,source)}}_setLanguage(languageId,source){this.tokenization.setLanguageId(languageId,source);this._languageService.requestRichLanguageFeatures(languageId)}getLanguageIdAtPosition(lineNumber,column){return this.tokenization.getLanguageIdAtPosition(lineNumber,column)}getWordAtPosition(position){return this._tokenizationTextModelPart.getWordAtPosition(position)}getWordUntilPosition(position){return this._tokenizationTextModelPart.getWordUntilPosition(position)}normalizePosition(position,affinity){return position}getLineIndentColumn(lineNumber){return indentOfLine(this.getLineContent(lineNumber))+1}};TextModel._MODEL_SYNC_LIMIT=50*1024*1024;TextModel.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024;TextModel.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3;TextModel.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:false,tabSize:EDITOR_MODEL_DEFAULTS.tabSize,indentSize:EDITOR_MODEL_DEFAULTS.indentSize,insertSpaces:EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:false,defaultEOL:1,trimAutoWhitespace:EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:EDITOR_MODEL_DEFAULTS.largeFileOptimizations,bracketPairColorizationOptions:EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions};TextModel=TextModel_1=__decorate12([__param11(4,IUndoRedoService),__param11(5,ILanguageService),__param11(6,ILanguageConfigurationService)],TextModel);DecorationsTrees=class{constructor(){this._decorationsTree0=new IntervalTree;this._decorationsTree1=new IntervalTree;this._injectedTextDecorationsTree=new IntervalTree}ensureAllNodesHaveRanges(host){this.getAll(host,0,false,false,false)}_ensureNodesHaveRanges(host,nodes){for(const node of nodes){if(node.range===null){node.range=host.getRangeAt(node.cachedAbsoluteStart,node.cachedAbsoluteEnd)}}return nodes}getAllInInterval(host,start,end,filterOwnerId,filterOutValidation,onlyMarginDecorations){const versionId=host.getVersionId();const result=this._intervalSearch(start,end,filterOwnerId,filterOutValidation,versionId,onlyMarginDecorations);return this._ensureNodesHaveRanges(host,result)}_intervalSearch(start,end,filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations){const r0=this._decorationsTree0.intervalSearch(start,end,filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations);const r1=this._decorationsTree1.intervalSearch(start,end,filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations);const r2=this._injectedTextDecorationsTree.intervalSearch(start,end,filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations);return r0.concat(r1).concat(r2)}getInjectedTextInInterval(host,start,end,filterOwnerId){const versionId=host.getVersionId();const result=this._injectedTextDecorationsTree.intervalSearch(start,end,filterOwnerId,false,versionId,false);return this._ensureNodesHaveRanges(host,result).filter((i=>i.options.showIfCollapsed||!i.range.isEmpty()))}getAllInjectedText(host,filterOwnerId){const versionId=host.getVersionId();const result=this._injectedTextDecorationsTree.search(filterOwnerId,false,versionId,false);return this._ensureNodesHaveRanges(host,result).filter((i=>i.options.showIfCollapsed||!i.range.isEmpty()))}getAll(host,filterOwnerId,filterOutValidation,overviewRulerOnly,onlyMarginDecorations){const versionId=host.getVersionId();const result=this._search(filterOwnerId,filterOutValidation,overviewRulerOnly,versionId,onlyMarginDecorations);return this._ensureNodesHaveRanges(host,result)}_search(filterOwnerId,filterOutValidation,overviewRulerOnly,cachedVersionId,onlyMarginDecorations){if(overviewRulerOnly){return this._decorationsTree1.search(filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations)}else{const r0=this._decorationsTree0.search(filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations);const r1=this._decorationsTree1.search(filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations);const r2=this._injectedTextDecorationsTree.search(filterOwnerId,filterOutValidation,cachedVersionId,onlyMarginDecorations);return r0.concat(r1).concat(r2)}}collectNodesFromOwner(ownerId){const r0=this._decorationsTree0.collectNodesFromOwner(ownerId);const r1=this._decorationsTree1.collectNodesFromOwner(ownerId);const r2=this._injectedTextDecorationsTree.collectNodesFromOwner(ownerId);return r0.concat(r1).concat(r2)}collectNodesPostOrder(){const r0=this._decorationsTree0.collectNodesPostOrder();const r1=this._decorationsTree1.collectNodesPostOrder();const r2=this._injectedTextDecorationsTree.collectNodesPostOrder();return r0.concat(r1).concat(r2)}insert(node){if(isNodeInjectedText(node)){this._injectedTextDecorationsTree.insert(node)}else if(isNodeInOverviewRuler(node)){this._decorationsTree1.insert(node)}else{this._decorationsTree0.insert(node)}}delete(node){if(isNodeInjectedText(node)){this._injectedTextDecorationsTree.delete(node)}else if(isNodeInOverviewRuler(node)){this._decorationsTree1.delete(node)}else{this._decorationsTree0.delete(node)}}getNodeRange(host,node){const versionId=host.getVersionId();if(node.cachedVersionId!==versionId){this._resolveNode(node,versionId)}if(node.range===null){node.range=host.getRangeAt(node.cachedAbsoluteStart,node.cachedAbsoluteEnd)}return node.range}_resolveNode(node,cachedVersionId){if(isNodeInjectedText(node)){this._injectedTextDecorationsTree.resolveNode(node,cachedVersionId)}else if(isNodeInOverviewRuler(node)){this._decorationsTree1.resolveNode(node,cachedVersionId)}else{this._decorationsTree0.resolveNode(node,cachedVersionId)}}acceptReplace(offset,length2,textLength,forceMoveMarkers){this._decorationsTree0.acceptReplace(offset,length2,textLength,forceMoveMarkers);this._decorationsTree1.acceptReplace(offset,length2,textLength,forceMoveMarkers);this._injectedTextDecorationsTree.acceptReplace(offset,length2,textLength,forceMoveMarkers)}};DecorationOptions=class{constructor(options2){this.color=options2.color||"";this.darkColor=options2.darkColor||""}};ModelDecorationOverviewRulerOptions=class extends DecorationOptions{constructor(options2){super(options2);this._resolvedColor=null;this.position=typeof options2.position==="number"?options2.position:OverviewRulerLane2.Center}getColor(theme){if(!this._resolvedColor){if(theme.type!=="light"&&this.darkColor){this._resolvedColor=this._resolveColor(this.darkColor,theme)}else{this._resolvedColor=this._resolveColor(this.color,theme)}}return this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(color,theme){if(typeof color==="string"){return color}const c=color?theme.getColor(color.id):null;if(!c){return""}return c.toString()}};ModelDecorationGlyphMarginOptions=class{constructor(options2){var _a6;this.position=(_a6=options2===null||options2===void 0?void 0:options2.position)!==null&&_a6!==void 0?_a6:GlyphMarginLane2.Left}};ModelDecorationMinimapOptions=class extends DecorationOptions{constructor(options2){super(options2);this.position=options2.position}getColor(theme){if(!this._resolvedColor){if(theme.type!=="light"&&this.darkColor){this._resolvedColor=this._resolveColor(this.darkColor,theme)}else{this._resolvedColor=this._resolveColor(this.color,theme)}}return this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(color,theme){if(typeof color==="string"){return Color.fromHex(color)}return theme.getColor(color.id)}};ModelDecorationInjectedTextOptions=class{static from(options2){if(options2 instanceof ModelDecorationInjectedTextOptions){return options2}return new ModelDecorationInjectedTextOptions(options2)}constructor(options2){this.content=options2.content||"";this.inlineClassName=options2.inlineClassName||null;this.inlineClassNameAffectsLetterSpacing=options2.inlineClassNameAffectsLetterSpacing||false;this.attachedData=options2.attachedData||null;this.cursorStops=options2.cursorStops||null}};ModelDecorationOptions=class{static register(options2){return new ModelDecorationOptions(options2)}static createDynamic(options2){return new ModelDecorationOptions(options2)}constructor(options2){var _a6,_b3,_c2,_d2,_e2,_f2;this.description=options2.description;this.blockClassName=options2.blockClassName?cleanClassName(options2.blockClassName):null;this.blockDoesNotCollapse=(_a6=options2.blockDoesNotCollapse)!==null&&_a6!==void 0?_a6:null;this.blockIsAfterEnd=(_b3=options2.blockIsAfterEnd)!==null&&_b3!==void 0?_b3:null;this.blockPadding=(_c2=options2.blockPadding)!==null&&_c2!==void 0?_c2:null;this.stickiness=options2.stickiness||0;this.zIndex=options2.zIndex||0;this.className=options2.className?cleanClassName(options2.className):null;this.shouldFillLineOnLineBreak=(_d2=options2.shouldFillLineOnLineBreak)!==null&&_d2!==void 0?_d2:null;this.hoverMessage=options2.hoverMessage||null;this.glyphMarginHoverMessage=options2.glyphMarginHoverMessage||null;this.isWholeLine=options2.isWholeLine||false;this.showIfCollapsed=options2.showIfCollapsed||false;this.collapseOnReplaceEdit=options2.collapseOnReplaceEdit||false;this.overviewRuler=options2.overviewRuler?new ModelDecorationOverviewRulerOptions(options2.overviewRuler):null;this.minimap=options2.minimap?new ModelDecorationMinimapOptions(options2.minimap):null;this.glyphMargin=options2.glyphMarginClassName?new ModelDecorationGlyphMarginOptions(options2.glyphMargin):null;this.glyphMarginClassName=options2.glyphMarginClassName?cleanClassName(options2.glyphMarginClassName):null;this.linesDecorationsClassName=options2.linesDecorationsClassName?cleanClassName(options2.linesDecorationsClassName):null;this.firstLineDecorationClassName=options2.firstLineDecorationClassName?cleanClassName(options2.firstLineDecorationClassName):null;this.marginClassName=options2.marginClassName?cleanClassName(options2.marginClassName):null;this.inlineClassName=options2.inlineClassName?cleanClassName(options2.inlineClassName):null;this.inlineClassNameAffectsLetterSpacing=options2.inlineClassNameAffectsLetterSpacing||false;this.beforeContentClassName=options2.beforeContentClassName?cleanClassName(options2.beforeContentClassName):null;this.afterContentClassName=options2.afterContentClassName?cleanClassName(options2.afterContentClassName):null;this.after=options2.after?ModelDecorationInjectedTextOptions.from(options2.after):null;this.before=options2.before?ModelDecorationInjectedTextOptions.from(options2.before):null;this.hideInCommentTokens=(_e2=options2.hideInCommentTokens)!==null&&_e2!==void 0?_e2:false;this.hideInStringTokens=(_f2=options2.hideInStringTokens)!==null&&_f2!==void 0?_f2:false}};ModelDecorationOptions.EMPTY=ModelDecorationOptions.register({description:"empty"});TRACKED_RANGE_OPTIONS=[ModelDecorationOptions.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),ModelDecorationOptions.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),ModelDecorationOptions.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),ModelDecorationOptions.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];DidChangeDecorationsEmitter=class extends Disposable{constructor(handleBeforeFire){super();this.handleBeforeFire=handleBeforeFire;this._actual=this._register(new Emitter);this.event=this._actual.event;this._affectedInjectedTextLines=null;this._deferredCnt=0;this._shouldFireDeferred=false;this._affectsMinimap=false;this._affectsOverviewRuler=false;this._affectsGlyphMargin=false}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var _a6;this._deferredCnt--;if(this._deferredCnt===0){if(this._shouldFireDeferred){this.doFire()}(_a6=this._affectedInjectedTextLines)===null||_a6===void 0?void 0:_a6.clear();this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(lineNumber){if(!this._affectedInjectedTextLines){this._affectedInjectedTextLines=new Set}this._affectedInjectedTextLines.add(lineNumber)}checkAffectedAndFire(options2){if(!this._affectsMinimap){this._affectsMinimap=options2.minimap&&options2.minimap.position?true:false}if(!this._affectsOverviewRuler){this._affectsOverviewRuler=options2.overviewRuler&&options2.overviewRuler.color?true:false}if(!this._affectsGlyphMargin){this._affectsGlyphMargin=options2.glyphMarginClassName?true:false}this.tryFire()}fire(){this._affectsMinimap=true;this._affectsOverviewRuler=true;this._affectsGlyphMargin=true;this.tryFire()}tryFire(){if(this._deferredCnt===0){this.doFire()}else{this._shouldFireDeferred=true}}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const event={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin};this._shouldFireDeferred=false;this._affectsMinimap=false;this._affectsOverviewRuler=false;this._affectsGlyphMargin=false;this._actual.fire(event)}};DidChangeContentEmitter=class extends Disposable{constructor(){super();this._fastEmitter=this._register(new Emitter);this.fastEvent=this._fastEmitter.event;this._slowEmitter=this._register(new Emitter);this.slowEvent=this._slowEmitter.event;this._deferredCnt=0;this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(resultingSelection=null){this._deferredCnt--;if(this._deferredCnt===0){if(this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=resultingSelection;const e=this._deferredEvent;this._deferredEvent=null;this._fastEmitter.fire(e);this._slowEmitter.fire(e)}}}fire(e){if(this._deferredCnt>0){if(this._deferredEvent){this._deferredEvent=this._deferredEvent.merge(e)}else{this._deferredEvent=e}return}this._fastEmitter.fire(e);this._slowEmitter.fire(e)}};AttachedViews=class{constructor(){this._onDidChangeVisibleRanges=new Emitter;this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event;this._views=new Set}attachView(){const view=new AttachedViewImpl((state=>{this._onDidChangeVisibleRanges.fire({view:view,state:state})}));this._views.add(view);return view}detachView(view){this._views.delete(view);this._onDidChangeVisibleRanges.fire({view:view,state:void 0})}};AttachedViewImpl=class{constructor(handleStateChange){this.handleStateChange=handleStateChange}setVisibleLines(visibleLines,stabilized){const visibleLineRanges=visibleLines.map((line=>new LineRange(line.startLineNumber,line.endLineNumber+1)));this.handleStateChange({visibleLineRanges:visibleLineRanges,stabilized:stabilized})}}}});var Cursor;var init_oneCursor=__esm({"node_modules/monaco-editor/esm/vs/editor/common/cursor/oneCursor.js"(){init_cursorCommon();init_position();init_range();init_selection();Cursor=class{constructor(context){this._selTrackedRange=null;this._trackSelection=true;this._setState(context,new SingleCursorState(new Range(1,1,1,1),0,0,new Position(1,1),0),new SingleCursorState(new Range(1,1,1,1),0,0,new Position(1,1),0))}dispose(context){this._removeTrackedRange(context)}startTrackingSelection(context){this._trackSelection=true;this._updateTrackedRange(context)}stopTrackingSelection(context){this._trackSelection=false;this._removeTrackedRange(context)}_updateTrackedRange(context){if(!this._trackSelection){return}this._selTrackedRange=context.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0)}_removeTrackedRange(context){this._selTrackedRange=context.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new CursorState(this.modelState,this.viewState)}readSelectionFromMarkers(context){const range2=context.model._getTrackedRange(this._selTrackedRange);if(this.modelState.selection.isEmpty()&&!range2.isEmpty()){return Selection.fromRange(range2.collapseToEnd(),this.modelState.selection.getDirection())}return Selection.fromRange(range2,this.modelState.selection.getDirection())}ensureValidState(context){this._setState(context,this.modelState,this.viewState)}setState(context,modelState,viewState){this._setState(context,modelState,viewState)}static _validatePositionWithCache(viewModel,position,cacheInput,cacheOutput){if(position.equals(cacheInput)){return cacheOutput}return viewModel.normalizePosition(position,2)}static _validateViewState(viewModel,viewState){const position=viewState.position;const sStartPosition=viewState.selectionStart.getStartPosition();const sEndPosition=viewState.selectionStart.getEndPosition();const validPosition=viewModel.normalizePosition(position,2);const validSStartPosition=this._validatePositionWithCache(viewModel,sStartPosition,position,validPosition);const validSEndPosition=this._validatePositionWithCache(viewModel,sEndPosition,sStartPosition,validSStartPosition);if(position.equals(validPosition)&&sStartPosition.equals(validSStartPosition)&&sEndPosition.equals(validSEndPosition)){return viewState}return new SingleCursorState(Range.fromPositions(validSStartPosition,validSEndPosition),viewState.selectionStartKind,viewState.selectionStartLeftoverVisibleColumns+sStartPosition.column-validSStartPosition.column,validPosition,viewState.leftoverVisibleColumns+position.column-validPosition.column)}_setState(context,modelState,viewState){if(viewState){viewState=Cursor._validateViewState(context.viewModel,viewState)}if(!modelState){if(!viewState){return}const selectionStart=context.model.validateRange(context.coordinatesConverter.convertViewRangeToModelRange(viewState.selectionStart));const position=context.model.validatePosition(context.coordinatesConverter.convertViewPositionToModelPosition(viewState.position));modelState=new SingleCursorState(selectionStart,viewState.selectionStartKind,viewState.selectionStartLeftoverVisibleColumns,position,viewState.leftoverVisibleColumns)}else{const selectionStart=context.model.validateRange(modelState.selectionStart);const selectionStartLeftoverVisibleColumns=modelState.selectionStart.equalsRange(selectionStart)?modelState.selectionStartLeftoverVisibleColumns:0;const position=context.model.validatePosition(modelState.position);const leftoverVisibleColumns=modelState.position.equals(position)?modelState.leftoverVisibleColumns:0;modelState=new SingleCursorState(selectionStart,modelState.selectionStartKind,selectionStartLeftoverVisibleColumns,position,leftoverVisibleColumns)}if(!viewState){const viewSelectionStart1=context.coordinatesConverter.convertModelPositionToViewPosition(new Position(modelState.selectionStart.startLineNumber,modelState.selectionStart.startColumn));const viewSelectionStart2=context.coordinatesConverter.convertModelPositionToViewPosition(new Position(modelState.selectionStart.endLineNumber,modelState.selectionStart.endColumn));const viewSelectionStart=new Range(viewSelectionStart1.lineNumber,viewSelectionStart1.column,viewSelectionStart2.lineNumber,viewSelectionStart2.column);const viewPosition=context.coordinatesConverter.convertModelPositionToViewPosition(modelState.position);viewState=new SingleCursorState(viewSelectionStart,modelState.selectionStartKind,modelState.selectionStartLeftoverVisibleColumns,viewPosition,modelState.leftoverVisibleColumns)}else{const viewSelectionStart=context.coordinatesConverter.validateViewRange(viewState.selectionStart,modelState.selectionStart);const viewPosition=context.coordinatesConverter.validateViewPosition(viewState.position,modelState.position);viewState=new SingleCursorState(viewSelectionStart,modelState.selectionStartKind,modelState.selectionStartLeftoverVisibleColumns,viewPosition,modelState.leftoverVisibleColumns)}this.modelState=modelState;this.viewState=viewState;this._updateTrackedRange(context)}}}});var CursorCollection;var init_cursorCollection=__esm({"node_modules/monaco-editor/esm/vs/editor/common/cursor/cursorCollection.js"(){init_arrays();init_cursorCommon();init_oneCursor();init_position();init_range();init_selection();CursorCollection=class{constructor(context){this.context=context;this.cursors=[new Cursor(context)];this.lastAddedCursorIndex=0}dispose(){for(const cursor of this.cursors){cursor.dispose(this.context)}}startTrackingSelections(){for(const cursor of this.cursors){cursor.startTrackingSelection(this.context)}}stopTrackingSelections(){for(const cursor of this.cursors){cursor.stopTrackingSelection(this.context)}}updateContext(context){this.context=context}ensureValidState(){for(const cursor of this.cursors){cursor.ensureValidState(this.context)}}readSelectionFromMarkers(){return this.cursors.map((c=>c.readSelectionFromMarkers(this.context)))}getAll(){return this.cursors.map((c=>c.asCursorState()))}getViewPositions(){return this.cursors.map((c=>c.viewState.position))}getTopMostViewPosition(){return findMinBy(this.cursors,compareBy((c=>c.viewState.position),Position.compare)).viewState.position}getBottomMostViewPosition(){return findLastMaxBy(this.cursors,compareBy((c=>c.viewState.position),Position.compare)).viewState.position}getSelections(){return this.cursors.map((c=>c.modelState.selection))}getViewSelections(){return this.cursors.map((c=>c.viewState.selection))}setSelections(selections){this.setStates(CursorState.fromModelSelections(selections))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(states){if(states===null){return}this.cursors[0].setState(this.context,states[0].modelState,states[0].viewState);this._setSecondaryStates(states.slice(1))}_setSecondaryStates(secondaryStates){const secondaryCursorsLength=this.cursors.length-1;const secondaryStatesLength=secondaryStates.length;if(secondaryCursorsLengthsecondaryStatesLength){const removeCnt=secondaryCursorsLength-secondaryStatesLength;for(let i=0;i=removeIndex+1){this.lastAddedCursorIndex--}this.cursors[removeIndex+1].dispose(this.context);this.cursors.splice(removeIndex+1,1)}normalize(){if(this.cursors.length===1){return}const cursors=this.cursors.slice(0);const sortedCursors=[];for(let i=0,len=cursors.length;is.selection),Range.compareRangesUsingStarts));for(let sortedCursorIndex=0;sortedCursorIndexlooserIndex){sortedCursor.index--}}cursors.splice(looserIndex,1);sortedCursors.splice(looserSortedCursorIndex,1);this._removeSecondaryCursor(looserIndex-1);sortedCursorIndex--}}}}}});var CursorContext;var init_cursorContext=__esm({"node_modules/monaco-editor/esm/vs/editor/common/cursor/cursorContext.js"(){CursorContext=class{constructor(model,viewModel,coordinatesConverter,cursorConfig){this._cursorContextBrand=void 0;this.model=model;this.viewModel=viewModel;this.coordinatesConverter=coordinatesConverter;this.cursorConfig=cursorConfig}}}});var ViewCompositionStartEvent,ViewCompositionEndEvent,ViewConfigurationChangedEvent,ViewCursorStateChangedEvent,ViewDecorationsChangedEvent,ViewFlushedEvent,ViewFocusChangedEvent,ViewLanguageConfigurationEvent,ViewLineMappingChangedEvent,ViewLinesChangedEvent,ViewLinesDeletedEvent,ViewLinesInsertedEvent,ViewRevealRangeRequestEvent,ViewScrollChangedEvent,ViewThemeChangedEvent,ViewTokensChangedEvent,ViewTokensColorsChangedEvent,ViewZonesChangedEvent;var init_viewEvents=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewEvents.js"(){ViewCompositionStartEvent=class{constructor(){this.type=0}};ViewCompositionEndEvent=class{constructor(){this.type=1}};ViewConfigurationChangedEvent=class{constructor(source){this.type=2;this._source=source}hasChanged(id){return this._source.hasChanged(id)}};ViewCursorStateChangedEvent=class{constructor(selections,modelSelections,reason){this.selections=selections;this.modelSelections=modelSelections;this.reason=reason;this.type=3}};ViewDecorationsChangedEvent=class{constructor(source){this.type=4;if(source){this.affectsMinimap=source.affectsMinimap;this.affectsOverviewRuler=source.affectsOverviewRuler;this.affectsGlyphMargin=source.affectsGlyphMargin}else{this.affectsMinimap=true;this.affectsOverviewRuler=true;this.affectsGlyphMargin=true}}};ViewFlushedEvent=class{constructor(){this.type=5}};ViewFocusChangedEvent=class{constructor(isFocused){this.type=6;this.isFocused=isFocused}};ViewLanguageConfigurationEvent=class{constructor(){this.type=7}};ViewLineMappingChangedEvent=class{constructor(){this.type=8}};ViewLinesChangedEvent=class{constructor(fromLineNumber,count){this.fromLineNumber=fromLineNumber;this.count=count;this.type=9}};ViewLinesDeletedEvent=class{constructor(fromLineNumber,toLineNumber){this.type=10;this.fromLineNumber=fromLineNumber;this.toLineNumber=toLineNumber}};ViewLinesInsertedEvent=class{constructor(fromLineNumber,toLineNumber){this.type=11;this.fromLineNumber=fromLineNumber;this.toLineNumber=toLineNumber}};ViewRevealRangeRequestEvent=class{constructor(source,minimalReveal,range2,selections,verticalType,revealHorizontal,scrollType){this.source=source;this.minimalReveal=minimalReveal;this.range=range2;this.selections=selections;this.verticalType=verticalType;this.revealHorizontal=revealHorizontal;this.scrollType=scrollType;this.type=12}};ViewScrollChangedEvent=class{constructor(source){this.type=13;this.scrollWidth=source.scrollWidth;this.scrollLeft=source.scrollLeft;this.scrollHeight=source.scrollHeight;this.scrollTop=source.scrollTop;this.scrollWidthChanged=source.scrollWidthChanged;this.scrollLeftChanged=source.scrollLeftChanged;this.scrollHeightChanged=source.scrollHeightChanged;this.scrollTopChanged=source.scrollTopChanged}};ViewThemeChangedEvent=class{constructor(theme){this.theme=theme;this.type=14}};ViewTokensChangedEvent=class{constructor(ranges){this.type=15;this.ranges=ranges}};ViewTokensColorsChangedEvent=class{constructor(){this.type=16}};ViewZonesChangedEvent=class{constructor(){this.type=17}}}});var ViewModelEventDispatcher,ViewModelEventsCollector,ContentSizeChangedEvent,FocusChangedEvent,ScrollChangedEvent,ViewZonesChangedEvent2,HiddenAreasChangedEvent,CursorStateChangedEvent,ReadOnlyEditAttemptEvent,ModelDecorationsChangedEvent,ModelLanguageChangedEvent,ModelLanguageConfigurationChangedEvent,ModelContentChangedEvent,ModelOptionsChangedEvent,ModelTokensChangedEvent;var init_viewModelEventDispatcher=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewModelEventDispatcher.js"(){init_event();init_lifecycle();ViewModelEventDispatcher=class extends Disposable{constructor(){super();this._onEvent=this._register(new Emitter);this.onEvent=this._onEvent.event;this._eventHandlers=[];this._viewEventQueue=null;this._isConsumingViewEventQueue=false;this._collector=null;this._collectorCnt=0;this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e);this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let i=0,len=this._outgoingEvents.length;i0){if(this._collector||this._isConsumingViewEventQueue){return}const event=this._outgoingEvents.shift();if(event.isNoOp()){continue}this._onEvent.fire(event)}}addViewEventHandler(eventHandler){for(let i=0,len=this._eventHandlers.length;i0){this._emitMany(viewEvents)}}this._emitOutgoingEvents()}emitSingleViewEvent(event){try{const eventsCollector=this.beginEmitViewEvents();eventsCollector.emitViewEvent(event)}finally{this.endEmitViewEvents()}}_emitMany(events){if(this._viewEventQueue){this._viewEventQueue=this._viewEventQueue.concat(events)}else{this._viewEventQueue=events}if(!this._isConsumingViewEventQueue){this._consumeViewEventQueue()}}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=true;this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=false}}_doConsumeQueue(){while(this._viewEventQueue){const events=this._viewEventQueue;this._viewEventQueue=null;const eventHandlers=this._eventHandlers.slice(0);for(const eventHandler of eventHandlers){eventHandler.handleEvents(events)}}}};ViewModelEventsCollector=class{constructor(){this.viewEvents=[];this.outgoingEvents=[]}emitViewEvent(event){this.viewEvents.push(event)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}};ContentSizeChangedEvent=class{constructor(oldContentWidth,oldContentHeight,contentWidth,contentHeight){this.kind=0;this._oldContentWidth=oldContentWidth;this._oldContentHeight=oldContentHeight;this.contentWidth=contentWidth;this.contentHeight=contentHeight;this.contentWidthChanged=this._oldContentWidth!==this.contentWidth;this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(other){if(other.kind!==this.kind){return null}return new ContentSizeChangedEvent(this._oldContentWidth,this._oldContentHeight,other.contentWidth,other.contentHeight)}};FocusChangedEvent=class{constructor(oldHasFocus,hasFocus){this.kind=1;this.oldHasFocus=oldHasFocus;this.hasFocus=hasFocus}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(other){if(other.kind!==this.kind){return null}return new FocusChangedEvent(this.oldHasFocus,other.hasFocus)}};ScrollChangedEvent=class{constructor(oldScrollWidth,oldScrollLeft,oldScrollHeight,oldScrollTop,scrollWidth,scrollLeft,scrollHeight,scrollTop){this.kind=2;this._oldScrollWidth=oldScrollWidth;this._oldScrollLeft=oldScrollLeft;this._oldScrollHeight=oldScrollHeight;this._oldScrollTop=oldScrollTop;this.scrollWidth=scrollWidth;this.scrollLeft=scrollLeft;this.scrollHeight=scrollHeight;this.scrollTop=scrollTop;this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth;this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft;this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight;this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(other){if(other.kind!==this.kind){return null}return new ScrollChangedEvent(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,other.scrollWidth,other.scrollLeft,other.scrollHeight,other.scrollTop)}};ViewZonesChangedEvent2=class{constructor(){this.kind=3}isNoOp(){return false}attemptToMerge(other){if(other.kind!==this.kind){return null}return this}};HiddenAreasChangedEvent=class{constructor(){this.kind=4}isNoOp(){return false}attemptToMerge(other){if(other.kind!==this.kind){return null}return this}};CursorStateChangedEvent=class{constructor(oldSelections,selections,oldModelVersionId,modelVersionId,source,reason,reachedMaxCursorCount){this.kind=6;this.oldSelections=oldSelections;this.selections=selections;this.oldModelVersionId=oldModelVersionId;this.modelVersionId=modelVersionId;this.source=source;this.reason=reason;this.reachedMaxCursorCount=reachedMaxCursorCount}static _selectionsAreEqual(a,b){if(!a&&!b){return true}if(!a||!b){return false}const aLen=a.length;const bLen=b.length;if(aLen!==bLen){return false}for(let i=0;i0){const selections=this._cursors.getSelections();for(let i=0;imultiCursorLimit){states=states.slice(0,multiCursorLimit);reachedMaxCursorCount=true}const oldState=CursorModelState.from(this._model,this);this._cursors.setStates(states);this._cursors.normalize();this._columnSelectData=null;this._validateAutoClosedActions();return this._emitStateChangedIfNecessary(eventsCollector,source,reason,oldState,reachedMaxCursorCount)}setCursorColumnSelectData(columnSelectData){this._columnSelectData=columnSelectData}revealPrimary(eventsCollector,source,minimalReveal,verticalType,revealHorizontal,scrollType){const viewPositions=this._cursors.getViewPositions();let revealViewRange=null;let revealViewSelections=null;if(viewPositions.length>1){revealViewSelections=this._cursors.getViewSelections()}else{revealViewRange=Range.fromPositions(viewPositions[0],viewPositions[0])}eventsCollector.emitViewEvent(new ViewRevealRangeRequestEvent(source,minimalReveal,revealViewRange,revealViewSelections,verticalType,revealHorizontal,scrollType))}saveState(){const result=[];const selections=this._cursors.getSelections();for(let i=0,len=selections.length;i0){const cursorState=CursorState.fromModelSelections(e.resultingSelection);if(this.setStates(eventsCollector,"modelChange",e.isUndoing?5:e.isRedoing?6:2,cursorState)){this.revealPrimary(eventsCollector,"modelChange",false,0,true,0)}}else{const selectionsFromMarkers=this._cursors.readSelectionFromMarkers();this.setStates(eventsCollector,"modelChange",2,CursorState.fromModelSelections(selectionsFromMarkers))}}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData){return this._columnSelectData}const primaryCursor=this._cursors.getPrimaryCursor();const viewSelectionStart=primaryCursor.viewState.selectionStart.getStartPosition();const viewPosition=primaryCursor.viewState.position;return{isReal:false,fromViewLineNumber:viewSelectionStart.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,viewSelectionStart),toViewLineNumber:viewPosition.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,viewPosition)}}getSelections(){return this._cursors.getSelections()}setSelections(eventsCollector,source,selections,reason){this.setStates(eventsCollector,source,reason,CursorState.fromModelSelections(selections))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(type){this._prevEditOperationType=type}_pushAutoClosedAction(autoClosedCharactersRanges,autoClosedEnclosingRanges){const autoClosedCharactersDeltaDecorations=[];const autoClosedEnclosingDeltaDecorations=[];for(let i=0,len=autoClosedCharactersRanges.length;i0){this._pushAutoClosedAction(autoClosedCharactersRanges,autoClosedEnclosingRanges)}this._prevEditOperationType=opResult.type}if(opResult.shouldPushStackElementAfter){this._model.pushStackElement()}}_interpretCommandResult(cursorState){if(!cursorState||cursorState.length===0){cursorState=this._cursors.readSelectionFromMarkers()}this._columnSelectData=null;this._cursors.setSelections(cursorState);this._cursors.normalize()}_emitStateChangedIfNecessary(eventsCollector,source,reason,oldState,reachedMaxCursorCount){const newState=CursorModelState.from(this._model,this);if(newState.equals(oldState)){return false}const selections=this._cursors.getSelections();const viewSelections=this._cursors.getViewSelections();eventsCollector.emitViewEvent(new ViewCursorStateChangedEvent(viewSelections,selections,reason));if(!oldState||oldState.cursorState.length!==newState.cursorState.length||newState.cursorState.some(((newCursorState,i)=>!newCursorState.modelState.equals(oldState.cursorState[i].modelState)))){const oldSelections=oldState?oldState.cursorState.map((s=>s.modelState.selection)):null;const oldModelVersionId=oldState?oldState.modelVersionId:0;eventsCollector.emitOutgoingEvent(new CursorStateChangedEvent(oldSelections,selections,oldModelVersionId,newState.modelVersionId,source||"keyboard",reason,reachedMaxCursorCount))}return true}_findAutoClosingPairs(edits){if(!edits.length){return null}const indices=[];for(let i=0,len=edits.length;i=0){return null}const m=edit.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!m){return null}const closeChar=m[1];const autoClosingPairsCandidates=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(closeChar);if(!autoClosingPairsCandidates||autoClosingPairsCandidates.length!==1){return null}const openChar=autoClosingPairsCandidates[0].open;const closeCharIndex=edit.text.length-m[2].length-1;const openCharIndex=edit.text.lastIndexOf(openChar,closeCharIndex-1);if(openCharIndex===-1){return null}indices.push([openCharIndex,closeCharIndex])}return indices}executeEdits(eventsCollector,source,edits,cursorStateComputer){let autoClosingIndices=null;if(source==="snippet"){autoClosingIndices=this._findAutoClosingPairs(edits)}if(autoClosingIndices){edits[0]._isTracked=true}const autoClosedCharactersRanges=[];const autoClosedEnclosingRanges=[];const selections=this._model.pushEditOperations(this.getSelections(),edits,(undoEdits=>{if(autoClosingIndices){for(let i=0,len=autoClosingIndices.length;i0){this._pushAutoClosedAction(autoClosedCharactersRanges,autoClosedEnclosingRanges)}}_executeEdit(callback,eventsCollector,source,cursorChangeReason=0){if(this.context.cursorConfig.readOnly){return}const oldState=CursorModelState.from(this._model,this);this._cursors.stopTrackingSelections();this._isHandling=true;try{this._cursors.ensureValidState();callback()}catch(err){onUnexpectedError(err)}this._isHandling=false;this._cursors.startTrackingSelections();this._validateAutoClosedActions();if(this._emitStateChangedIfNecessary(eventsCollector,source,cursorChangeReason,oldState,false)){this.revealPrimary(eventsCollector,source,false,0,true,0)}}getAutoClosedCharacters(){return AutoClosedAction.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(eventsCollector){this._compositionState=new CompositionState(this._model,this.getSelections())}endComposition(eventsCollector,source){const compositionOutcome=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null;this._executeEdit((()=>{if(source==="keyboard"){this._executeEditOperation(TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,compositionOutcome,this.getSelections(),this.getAutoClosedCharacters()))}}),eventsCollector,source)}type(eventsCollector,text2,source){this._executeEdit((()=>{if(source==="keyboard"){const len=text2.length;let offset=0;while(offset{const position=selection.getPosition();return new Selection(position.lineNumber,position.column+positionDelta,position.lineNumber,position.column+positionDelta)}));this.setSelections(eventsCollector,source,newSelections,0)}return}this._executeEdit((()=>{this._executeEditOperation(TypeOperations.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),text2,replacePrevCharCnt,replaceNextCharCnt,positionDelta))}),eventsCollector,source)}paste(eventsCollector,text2,pasteOnNewLine,multicursorText,source){this._executeEdit((()=>{this._executeEditOperation(TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),text2,pasteOnNewLine,multicursorText||[]))}),eventsCollector,source,4)}cut(eventsCollector,source){this._executeEdit((()=>{this._executeEditOperation(DeleteOperations.cut(this.context.cursorConfig,this._model,this.getSelections()))}),eventsCollector,source)}executeCommand(eventsCollector,command,source){this._executeEdit((()=>{this._cursors.killSecondaryCursors();this._executeEditOperation(new EditOperationResult(0,[command],{shouldPushStackElementBefore:false,shouldPushStackElementAfter:false}))}),eventsCollector,source)}executeCommands(eventsCollector,commands,source){this._executeEdit((()=>{this._executeEditOperation(new EditOperationResult(0,commands,{shouldPushStackElementBefore:false,shouldPushStackElementAfter:false}))}),eventsCollector,source)}};CursorModelState=class{static from(model,cursor){return new CursorModelState(model.getVersionId(),cursor.getCursorStates())}constructor(modelVersionId,cursorState){this.modelVersionId=modelVersionId;this.cursorState=cursorState}equals(other){if(!other){return false}if(this.modelVersionId!==other.modelVersionId){return false}if(this.cursorState.length!==other.cursorState.length){return false}for(let i=0,len=this.cursorState.length;i=enclosingRanges.length){return false}if(!enclosingRanges[i].strictContainsRange(selections[i])){return false}}return true}};CommandExecutor=class{static executeCommands(model,selectionsBefore,commands){const ctx={model:model,selectionsBefore:selectionsBefore,trackedRanges:[],trackedRangesDirection:[]};const result=this._innerExecuteCommands(ctx,commands);for(let i=0,len=ctx.trackedRanges.length;i0){filteredOperations[0]._isTracked=true}let selectionsAfter=ctx.model.pushEditOperations(ctx.selectionsBefore,filteredOperations,(inverseEditOperations=>{const groupedInverseEditOperations=[];for(let i=0;ia.identifier.minor-b.identifier.minor;const cursorSelections=[];for(let i=0;i0){groupedInverseEditOperations[i].sort(minorBasedSorter);cursorSelections[i]=commands[i].computeCursorState(ctx.model,{getInverseEditOperations:()=>groupedInverseEditOperations[i],getTrackedSelection:id=>{const idx=parseInt(id,10);const range2=ctx.model._getTrackedRange(ctx.trackedRanges[idx]);if(ctx.trackedRangesDirection[idx]===0){return new Selection(range2.startLineNumber,range2.startColumn,range2.endLineNumber,range2.endColumn)}return new Selection(range2.endLineNumber,range2.endColumn,range2.startLineNumber,range2.startColumn)}})}else{cursorSelections[i]=ctx.selectionsBefore[i]}}return cursorSelections}));if(!selectionsAfter){selectionsAfter=ctx.selectionsBefore}const losingCursors=[];for(const losingCursorIndex in loserCursorsMap){if(loserCursorsMap.hasOwnProperty(losingCursorIndex)){losingCursors.push(parseInt(losingCursorIndex,10))}}losingCursors.sort(((a,b)=>b-a));for(const losingCursor of losingCursors){selectionsAfter.splice(losingCursor,1)}return selectionsAfter}static _arrayIsEmpty(commands){for(let i=0,len=commands.length;i{if(Range.isEmpty(range2)&&text2===""){return}operations.push({identifier:{major:majorIdentifier,minor:operationMinor++},range:range2,text:text2,forceMoveMarkers:forceMoveMarkers,isAutoWhitespaceEdit:command.insertsAutoWhitespace})};let hadTrackedEditOperation=false;const addTrackedEditOperation=(selection,text2,forceMoveMarkers)=>{hadTrackedEditOperation=true;addEditOperation(selection,text2,forceMoveMarkers)};const trackSelection=(_selection,trackPreviousOnEmpty)=>{const selection=Selection.liftSelection(_selection);let stickiness;if(selection.isEmpty()){if(typeof trackPreviousOnEmpty==="boolean"){if(trackPreviousOnEmpty){stickiness=2}else{stickiness=3}}else{const maxLineColumn=ctx.model.getLineMaxColumn(selection.startLineNumber);if(selection.startColumn===maxLineColumn){stickiness=2}else{stickiness=3}}}else{stickiness=1}const l=ctx.trackedRanges.length;const id=ctx.model._setTrackedRange(null,selection,stickiness);ctx.trackedRanges[l]=id;ctx.trackedRangesDirection[l]=selection.getDirection();return l.toString()};const editOperationBuilder={addEditOperation:addEditOperation,addTrackedEditOperation:addTrackedEditOperation,trackSelection:trackSelection};try{command.getEditOperations(ctx.model,editOperationBuilder)}catch(e){onUnexpectedError(e);return{operations:[],hadTrackedEditOperation:false}}return{operations:operations,hadTrackedEditOperation:hadTrackedEditOperation}}static _getLoserCursorMap(operations){operations=operations.slice(0);operations.sort(((a,b)=>-Range.compareRangesUsingEnds(a.range,b.range)));const loserCursorsMap={};for(let i=1;icurrentOp.identifier.major){loserMajor=previousOp.identifier.major}else{loserMajor=currentOp.identifier.major}loserCursorsMap[loserMajor.toString()]=true;for(let j=0;j0){i--}}}return loserCursorsMap}};CompositionLineState=class{constructor(text2,startSelection,endSelection){this.text=text2;this.startSelection=startSelection;this.endSelection=endSelection}};CompositionState=class{static _capture(textModel,selections){const result=[];for(const selection of selections){if(selection.startLineNumber!==selection.endLineNumber){return null}result.push(new CompositionLineState(textModel.getLineContent(selection.startLineNumber),selection.startColumn-1,selection.endColumn-1))}return result}constructor(textModel,selections){this._original=CompositionState._capture(textModel,selections)}deduceOutcome(textModel,selections){if(!this._original){return null}const current=CompositionState._capture(textModel,selections);if(!current){return null}if(this._original.length!==current.length){return null}const result=[];for(let i=0,len=this._original.length;i`;let charIndex=startOffset;let tabsCharDelta=0;let prevIsSpace=true;for(let tokenIndex=0,tokenCount=viewLineTokens.getCount();tokenIndex0){if(useNbsp&&prevIsSpace){partContent+=" ";prevIsSpace=false}else{partContent+=" ";prevIsSpace=true}insertSpacesCount--}break}case 60:partContent+="<";prevIsSpace=false;break;case 62:partContent+=">";prevIsSpace=false;break;case 38:partContent+="&";prevIsSpace=false;break;case 0:partContent+="�";prevIsSpace=false;break;case 65279:case 8232:case 8233:case 133:partContent+="�";prevIsSpace=false;break;case 13:partContent+="​";prevIsSpace=false;break;case 32:if(useNbsp&&prevIsSpace){partContent+=" ";prevIsSpace=false}else{partContent+=" ";prevIsSpace=true}break;default:partContent+=String.fromCharCode(charCode);prevIsSpace=false}}result+=`${partContent}`;if(tokenEndIndex>endOffset||charIndex>=endOffset){break}}result+=``;return result}function _tokenizeToString(text2,languageIdCodec,tokenizationSupport){let result=`
    `;const lines=splitLines(text2);let currentState=tokenizationSupport.getInitialState();for(let i=0,len=lines.length;i0){result+=`
    `}const tokenizationResult=tokenizationSupport.tokenizeEncoded(line,true,currentState);LineTokens.convertToEndOffset(tokenizationResult.tokens,line.length);const lineTokens=new LineTokens(tokenizationResult.tokens,line,languageIdCodec);const viewLineTokens=lineTokens.inflate();let startOffset=0;for(let j=0,lenJ=viewLineTokens.getCount();j${escape(line.substring(startOffset,endIndex))}`;startOffset=endIndex}currentState=tokenizationResult.endState}result+=`
    `;return result}var __awaiter7,fallback;var init_textToHtmlTokenizer=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languages/textToHtmlTokenizer.js"(){init_strings();init_lineTokens();init_languages();init_nullTokenize();__awaiter7=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};fallback={getInitialState:()=>NullState,tokenizeEncoded:(buffer,hasEOL,state)=>nullTokenizeEncoded(0,state)}}});var PendingChanges,EditorWhitespace,LinesLayout;var init_linesLayout=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewLayout/linesLayout.js"(){init_strings();PendingChanges=class{constructor(){this._hasPending=false;this._inserts=[];this._changes=[];this._removes=[]}insert(x){this._hasPending=true;this._inserts.push(x)}change(x){this._hasPending=true;this._changes.push(x)}remove(x){this._hasPending=true;this._removes.push(x)}mustCommit(){return this._hasPending}commit(linesLayout){if(!this._hasPending){return}const inserts=this._inserts;const changes=this._changes;const removes=this._removes;this._hasPending=false;this._inserts=[];this._changes=[];this._removes=[];linesLayout._commitPendingChanges(inserts,changes,removes)}};EditorWhitespace=class{constructor(id,afterLineNumber,ordinal,height,minWidth){this.id=id;this.afterLineNumber=afterLineNumber;this.ordinal=ordinal;this.height=height;this.minWidth=minWidth;this.prefixSum=0}};LinesLayout=class{constructor(lineCount,lineHeight,paddingTop,paddingBottom){this._instanceId=singleLetterHash(++LinesLayout.INSTANCE_COUNT);this._pendingChanges=new PendingChanges;this._lastWhitespaceId=0;this._arr=[];this._prefixSumValidIndex=-1;this._minWidth=-1;this._lineCount=lineCount;this._lineHeight=lineHeight;this._paddingTop=paddingTop;this._paddingBottom=paddingBottom}static findInsertionIndex(arr,afterLineNumber,ordinal){let low=0;let high=arr.length;while(low>>1;if(afterLineNumber===arr[mid].afterLineNumber){if(ordinal{hadAChange=true;afterLineNumber=afterLineNumber|0;ordinal=ordinal|0;heightInPx=heightInPx|0;minWidth=minWidth|0;const id=this._instanceId+ ++this._lastWhitespaceId;this._pendingChanges.insert(new EditorWhitespace(id,afterLineNumber,ordinal,heightInPx,minWidth));return id},changeOneWhitespace:(id,newAfterLineNumber,newHeight)=>{hadAChange=true;newAfterLineNumber=newAfterLineNumber|0;newHeight=newHeight|0;this._pendingChanges.change({id:id,newAfterLineNumber:newAfterLineNumber,newHeight:newHeight})},removeWhitespace:id=>{hadAChange=true;this._pendingChanges.remove({id:id})}};callback(accessor)}finally{this._pendingChanges.commit(this)}return hadAChange}_commitPendingChanges(inserts,changes,removes){if(inserts.length>0||removes.length>0){this._minWidth=-1}if(inserts.length+changes.length+removes.length<=1){for(const insert of inserts){this._insertWhitespace(insert)}for(const change of changes){this._changeOneWhitespace(change.id,change.newAfterLineNumber,change.newHeight)}for(const remove of removes){const index=this._findWhitespaceIndex(remove.id);if(index===-1){continue}this._removeWhitespace(index)}return}const toRemove=new Set;for(const remove of removes){toRemove.add(remove.id)}const toChange=new Map;for(const change of changes){toChange.set(change.id,change)}const applyRemoveAndChange=whitespaces=>{const result2=[];for(const whitespace of whitespaces){if(toRemove.has(whitespace.id)){continue}if(toChange.has(whitespace.id)){const change=toChange.get(whitespace.id);whitespace.afterLineNumber=change.newAfterLineNumber;whitespace.height=change.newHeight}result2.push(whitespace)}return result2};const result=applyRemoveAndChange(this._arr).concat(applyRemoveAndChange(inserts));result.sort(((a,b)=>{if(a.afterLineNumber===b.afterLineNumber){return a.ordinal-b.ordinal}return a.afterLineNumber-b.afterLineNumber}));this._arr=result;this._prefixSumValidIndex=-1}_checkPendingChanges(){if(this._pendingChanges.mustCommit()){this._pendingChanges.commit(this)}}_insertWhitespace(whitespace){const insertIndex=LinesLayout.findInsertionIndex(this._arr,whitespace.afterLineNumber,whitespace.ordinal);this._arr.splice(insertIndex,0,whitespace);this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,insertIndex-1)}_findWhitespaceIndex(id){const arr=this._arr;for(let i=0,len=arr.length;itoLineNumber){this._arr[i].afterLineNumber-=toLineNumber-fromLineNumber+1}}}onLinesInserted(fromLineNumber,toLineNumber){this._checkPendingChanges();fromLineNumber=fromLineNumber|0;toLineNumber=toLineNumber|0;this._lineCount+=toLineNumber-fromLineNumber+1;for(let i=0,len=this._arr.length;i=arr.length||arr[mid+1].afterLineNumber>=lineNumber){return mid}else{low=mid+1|0}}else{high=mid-1|0}}return-1}_findFirstWhitespaceAfterLineNumber(lineNumber){lineNumber=lineNumber|0;const lastWhitespaceBeforeLineNumber=this._findLastWhitespaceBeforeLineNumber(lineNumber);const firstWhitespaceAfterLineNumber=lastWhitespaceBeforeLineNumber+1;if(firstWhitespaceAfterLineNumber1){previousLinesHeight=this._lineHeight*(lineNumber-1)}else{previousLinesHeight=0}const previousWhitespacesHeight=this.getWhitespaceAccumulatedHeightBeforeLineNumber(lineNumber-(includeViewZones?1:0));return previousLinesHeight+previousWhitespacesHeight+this._paddingTop}getVerticalOffsetAfterLineNumber(lineNumber,includeViewZones=false){this._checkPendingChanges();lineNumber=lineNumber|0;const previousLinesHeight=this._lineHeight*lineNumber;const previousWhitespacesHeight=this.getWhitespaceAccumulatedHeightBeforeLineNumber(lineNumber+(includeViewZones?1:0));return previousLinesHeight+previousWhitespacesHeight+this._paddingTop}getWhitespaceMinWidth(){this._checkPendingChanges();if(this._minWidth===-1){let minWidth=0;for(let i=0,len=this._arr.length;itotalHeight}isInTopPadding(verticalOffset){if(this._paddingTop===0){return false}this._checkPendingChanges();return verticalOffset=totalHeight-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(verticalOffset){this._checkPendingChanges();verticalOffset=verticalOffset|0;if(verticalOffset<0){return 1}const linesCount=this._lineCount|0;const lineHeight=this._lineHeight;let minLineNumber=1;let maxLineNumber=linesCount;while(minLineNumber=midLineNumberVerticalOffset+lineHeight){minLineNumber=midLineNumber+1}else if(verticalOffset>=midLineNumberVerticalOffset){return midLineNumber}else{maxLineNumber=midLineNumber}}if(minLineNumber>linesCount){return linesCount}return minLineNumber}getLinesViewportData(verticalOffset1,verticalOffset2){this._checkPendingChanges();verticalOffset1=verticalOffset1|0;verticalOffset2=verticalOffset2|0;const lineHeight=this._lineHeight;const startLineNumber=this.getLineNumberAtOrAfterVerticalOffset(verticalOffset1)|0;const startLineNumberVerticalOffset=this.getVerticalOffsetForLineNumber(startLineNumber)|0;let endLineNumber=this._lineCount|0;let whitespaceIndex=this.getFirstWhitespaceIndexAfterLineNumber(startLineNumber)|0;const whitespaceCount=this.getWhitespacesCount()|0;let currentWhitespaceHeight;let currentWhitespaceAfterLineNumber;if(whitespaceIndex===-1){whitespaceIndex=whitespaceCount;currentWhitespaceAfterLineNumber=endLineNumber+1;currentWhitespaceHeight=0}else{currentWhitespaceAfterLineNumber=this.getAfterLineNumberForWhitespaceIndex(whitespaceIndex)|0;currentWhitespaceHeight=this.getHeightForWhitespaceIndex(whitespaceIndex)|0}let currentVerticalOffset=startLineNumberVerticalOffset;let currentLineRelativeOffset=currentVerticalOffset;const STEP_SIZE=5e5;let bigNumbersDelta=0;if(startLineNumberVerticalOffset>=STEP_SIZE){bigNumbersDelta=Math.floor(startLineNumberVerticalOffset/STEP_SIZE)*STEP_SIZE;bigNumbersDelta=Math.floor(bigNumbersDelta/lineHeight)*lineHeight;currentLineRelativeOffset-=bigNumbersDelta}const linesOffsets=[];const verticalCenter=verticalOffset1+(verticalOffset2-verticalOffset1)/2;let centeredLineNumber=-1;for(let lineNumber=startLineNumber;lineNumber<=endLineNumber;lineNumber++){if(centeredLineNumber===-1){const currentLineTop=currentVerticalOffset;const currentLineBottom=currentVerticalOffset+lineHeight;if(currentLineTop<=verticalCenter&&verticalCenterverticalCenter){centeredLineNumber=lineNumber}}currentVerticalOffset+=lineHeight;linesOffsets[lineNumber-startLineNumber]=currentLineRelativeOffset;currentLineRelativeOffset+=lineHeight;while(currentWhitespaceAfterLineNumber===lineNumber){currentLineRelativeOffset+=currentWhitespaceHeight;currentVerticalOffset+=currentWhitespaceHeight;whitespaceIndex++;if(whitespaceIndex>=whitespaceCount){currentWhitespaceAfterLineNumber=endLineNumber+1}else{currentWhitespaceAfterLineNumber=this.getAfterLineNumberForWhitespaceIndex(whitespaceIndex)|0;currentWhitespaceHeight=this.getHeightForWhitespaceIndex(whitespaceIndex)|0}}if(currentVerticalOffset>=verticalOffset2){endLineNumber=lineNumber;break}}if(centeredLineNumber===-1){centeredLineNumber=endLineNumber}const endLineNumberVerticalOffset=this.getVerticalOffsetForLineNumber(endLineNumber)|0;let completelyVisibleStartLineNumber=startLineNumber;let completelyVisibleEndLineNumber=endLineNumber;if(completelyVisibleStartLineNumberverticalOffset2){completelyVisibleEndLineNumber--}}return{bigNumbersDelta:bigNumbersDelta,startLineNumber:startLineNumber,endLineNumber:endLineNumber,relativeVerticalOffset:linesOffsets,centeredLineNumber:centeredLineNumber,completelyVisibleStartLineNumber:completelyVisibleStartLineNumber,completelyVisibleEndLineNumber:completelyVisibleEndLineNumber}}getVerticalOffsetForWhitespaceIndex(whitespaceIndex){this._checkPendingChanges();whitespaceIndex=whitespaceIndex|0;const afterLineNumber=this.getAfterLineNumberForWhitespaceIndex(whitespaceIndex);let previousLinesHeight;if(afterLineNumber>=1){previousLinesHeight=this._lineHeight*afterLineNumber}else{previousLinesHeight=0}let previousWhitespacesHeight;if(whitespaceIndex>0){previousWhitespacesHeight=this.getWhitespacesAccumulatedHeight(whitespaceIndex-1)}else{previousWhitespacesHeight=0}return previousLinesHeight+previousWhitespacesHeight+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset){this._checkPendingChanges();verticalOffset=verticalOffset|0;let minWhitespaceIndex=0;let maxWhitespaceIndex=this.getWhitespacesCount()-1;if(maxWhitespaceIndex<0){return-1}const maxWhitespaceVerticalOffset=this.getVerticalOffsetForWhitespaceIndex(maxWhitespaceIndex);const maxWhitespaceHeight=this.getHeightForWhitespaceIndex(maxWhitespaceIndex);if(verticalOffset>=maxWhitespaceVerticalOffset+maxWhitespaceHeight){return-1}while(minWhitespaceIndex=midWhitespaceVerticalOffset+midWhitespaceHeight){minWhitespaceIndex=midWhitespaceIndex+1}else if(verticalOffset>=midWhitespaceVerticalOffset){return midWhitespaceIndex}else{maxWhitespaceIndex=midWhitespaceIndex}}return minWhitespaceIndex}getWhitespaceAtVerticalOffset(verticalOffset){this._checkPendingChanges();verticalOffset=verticalOffset|0;const candidateIndex=this.getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset);if(candidateIndex<0){return null}if(candidateIndex>=this.getWhitespacesCount()){return null}const candidateTop=this.getVerticalOffsetForWhitespaceIndex(candidateIndex);if(candidateTop>verticalOffset){return null}const candidateHeight=this.getHeightForWhitespaceIndex(candidateIndex);const candidateId=this.getIdForWhitespaceIndex(candidateIndex);const candidateAfterLineNumber=this.getAfterLineNumberForWhitespaceIndex(candidateIndex);return{id:candidateId,afterLineNumber:candidateAfterLineNumber,verticalOffset:candidateTop,height:candidateHeight}}getWhitespaceViewportData(verticalOffset1,verticalOffset2){this._checkPendingChanges();verticalOffset1=verticalOffset1|0;verticalOffset2=verticalOffset2|0;const startIndex=this.getWhitespaceIndexAtOrAfterVerticallOffset(verticalOffset1);const endIndex=this.getWhitespacesCount()-1;if(startIndex<0){return[]}const result=[];for(let i=startIndex;i<=endIndex;i++){const top=this.getVerticalOffsetForWhitespaceIndex(i);const height=this.getHeightForWhitespaceIndex(i);if(top>=verticalOffset2){break}result.push({id:this.getIdForWhitespaceIndex(i),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(i),verticalOffset:top,height:height})}return result}getWhitespaces(){this._checkPendingChanges();return this._arr.slice(0)}getWhitespacesCount(){this._checkPendingChanges();return this._arr.length}getIdForWhitespaceIndex(index){this._checkPendingChanges();index=index|0;return this._arr[index].id}getAfterLineNumberForWhitespaceIndex(index){this._checkPendingChanges();index=index|0;return this._arr[index].afterLineNumber}getHeightForWhitespaceIndex(index){this._checkPendingChanges();index=index|0;return this._arr[index].height}};LinesLayout.INSTANCE_COUNT=0}});var SMOOTH_SCROLLING_TIME,EditorScrollDimensions,EditorScrollable,ViewLayout;var init_viewLayout=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewLayout/viewLayout.js"(){init_event();init_lifecycle();init_scrollable();init_linesLayout();init_viewModel();init_viewModelEventDispatcher();SMOOTH_SCROLLING_TIME=125;EditorScrollDimensions=class{constructor(width,contentWidth,height,contentHeight){width=width|0;contentWidth=contentWidth|0;height=height|0;contentHeight=contentHeight|0;if(width<0){width=0}if(contentWidth<0){contentWidth=0}if(height<0){height=0}if(contentHeight<0){contentHeight=0}this.width=width;this.contentWidth=contentWidth;this.scrollWidth=Math.max(width,contentWidth);this.height=height;this.contentHeight=contentHeight;this.scrollHeight=Math.max(height,contentHeight)}equals(other){return this.width===other.width&&this.contentWidth===other.contentWidth&&this.height===other.height&&this.contentHeight===other.contentHeight}};EditorScrollable=class extends Disposable{constructor(smoothScrollDuration,scheduleAtNextAnimationFrame2){super();this._onDidContentSizeChange=this._register(new Emitter);this.onDidContentSizeChange=this._onDidContentSizeChange.event;this._dimensions=new EditorScrollDimensions(0,0,0,0);this._scrollable=this._register(new Scrollable({forceIntegerValues:true,smoothScrollDuration:smoothScrollDuration,scheduleAtNextAnimationFrame:scheduleAtNextAnimationFrame2}));this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(smoothScrollDuration){this._scrollable.setSmoothScrollDuration(smoothScrollDuration)}validateScrollPosition(scrollPosition){return this._scrollable.validateScrollPosition(scrollPosition)}getScrollDimensions(){return this._dimensions}setScrollDimensions(dimensions){if(this._dimensions.equals(dimensions)){return}const oldDimensions=this._dimensions;this._dimensions=dimensions;this._scrollable.setScrollDimensions({width:dimensions.width,scrollWidth:dimensions.scrollWidth,height:dimensions.height,scrollHeight:dimensions.scrollHeight},true);const contentWidthChanged=oldDimensions.contentWidth!==dimensions.contentWidth;const contentHeightChanged=oldDimensions.contentHeight!==dimensions.contentHeight;if(contentWidthChanged||contentHeightChanged){this._onDidContentSizeChange.fire(new ContentSizeChangedEvent(oldDimensions.contentWidth,oldDimensions.contentHeight,dimensions.contentWidth,dimensions.contentHeight))}}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(update){this._scrollable.setScrollPositionNow(update)}setScrollPositionSmooth(update){this._scrollable.setScrollPositionSmooth(update)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}};ViewLayout=class extends Disposable{constructor(configuration,lineCount,scheduleAtNextAnimationFrame2){super();this._configuration=configuration;const options2=this._configuration.options;const layoutInfo=options2.get(142);const padding=options2.get(82);this._linesLayout=new LinesLayout(lineCount,options2.get(65),padding.top,padding.bottom);this._maxLineWidth=0;this._overlayWidgetsMinWidth=0;this._scrollable=this._register(new EditorScrollable(0,scheduleAtNextAnimationFrame2));this._configureSmoothScrollDuration();this._scrollable.setScrollDimensions(new EditorScrollDimensions(layoutInfo.contentWidth,0,layoutInfo.height,0));this.onDidScroll=this._scrollable.onDidScroll;this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange;this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(112)?SMOOTH_SCROLLING_TIME:0)}onConfigurationChanged(e){const options2=this._configuration.options;if(e.hasChanged(65)){this._linesLayout.setLineHeight(options2.get(65))}if(e.hasChanged(82)){const padding=options2.get(82);this._linesLayout.setPadding(padding.top,padding.bottom)}if(e.hasChanged(142)){const layoutInfo=options2.get(142);const width=layoutInfo.contentWidth;const height=layoutInfo.height;const scrollDimensions=this._scrollable.getScrollDimensions();const contentWidth=scrollDimensions.contentWidth;this._scrollable.setScrollDimensions(new EditorScrollDimensions(width,scrollDimensions.contentWidth,height,this._getContentHeight(width,height,contentWidth)))}else{this._updateHeight()}if(e.hasChanged(112)){this._configureSmoothScrollDuration()}}onFlushed(lineCount){this._linesLayout.onFlushed(lineCount)}onLinesDeleted(fromLineNumber,toLineNumber){this._linesLayout.onLinesDeleted(fromLineNumber,toLineNumber)}onLinesInserted(fromLineNumber,toLineNumber){this._linesLayout.onLinesInserted(fromLineNumber,toLineNumber)}_getHorizontalScrollbarHeight(width,scrollWidth){const options2=this._configuration.options;const scrollbar=options2.get(101);if(scrollbar.horizontal===2){return 0}if(width>=scrollWidth){return 0}return scrollbar.horizontalScrollbarSize}_getContentHeight(width,height,contentWidth){const options2=this._configuration.options;let result=this._linesLayout.getLinesTotalHeight();if(options2.get(103)){result+=Math.max(0,height-options2.get(65)-options2.get(82).bottom)}else{result+=this._getHorizontalScrollbarHeight(width,contentWidth)}return result}_updateHeight(){const scrollDimensions=this._scrollable.getScrollDimensions();const width=scrollDimensions.width;const height=scrollDimensions.height;const contentWidth=scrollDimensions.contentWidth;this._scrollable.setScrollDimensions(new EditorScrollDimensions(width,scrollDimensions.contentWidth,height,this._getContentHeight(width,height,contentWidth)))}getCurrentViewport(){const scrollDimensions=this._scrollable.getScrollDimensions();const currentScrollPosition=this._scrollable.getCurrentScrollPosition();return new Viewport(currentScrollPosition.scrollTop,currentScrollPosition.scrollLeft,scrollDimensions.width,scrollDimensions.height)}getFutureViewport(){const scrollDimensions=this._scrollable.getScrollDimensions();const currentScrollPosition=this._scrollable.getFutureScrollPosition();return new Viewport(currentScrollPosition.scrollTop,currentScrollPosition.scrollLeft,scrollDimensions.width,scrollDimensions.height)}_computeContentWidth(){const options2=this._configuration.options;const maxLineWidth=this._maxLineWidth;const wrappingInfo=options2.get(143);const fontInfo=options2.get(49);const layoutInfo=options2.get(142);if(wrappingInfo.isViewportWrapping){const minimap=options2.get(71);if(maxLineWidth>layoutInfo.contentWidth+fontInfo.typicalHalfwidthCharacterWidth){if(minimap.enabled&&minimap.side==="right"){return maxLineWidth+layoutInfo.verticalScrollbarWidth}}return maxLineWidth}else{const extraHorizontalSpace=options2.get(102)*fontInfo.typicalHalfwidthCharacterWidth;const whitespaceMinWidth=this._linesLayout.getWhitespaceMinWidth();return Math.max(maxLineWidth+extraHorizontalSpace+layoutInfo.verticalScrollbarWidth,whitespaceMinWidth,this._overlayWidgetsMinWidth)}}setMaxLineWidth(maxLineWidth){this._maxLineWidth=maxLineWidth;this._updateContentWidth()}setOverlayWidgetsMinWidth(maxMinWidth){this._overlayWidgetsMinWidth=maxMinWidth;this._updateContentWidth()}_updateContentWidth(){const scrollDimensions=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new EditorScrollDimensions(scrollDimensions.width,this._computeContentWidth(),scrollDimensions.height,scrollDimensions.contentHeight));this._updateHeight()}saveState(){const currentScrollPosition=this._scrollable.getFutureScrollPosition();const scrollTop=currentScrollPosition.scrollTop;const firstLineNumberInViewport=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(scrollTop);const whitespaceAboveFirstLine=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(firstLineNumberInViewport);return{scrollTop:scrollTop,scrollTopWithoutViewZones:scrollTop-whitespaceAboveFirstLine,scrollLeft:currentScrollPosition.scrollLeft}}changeWhitespace(callback){const hadAChange=this._linesLayout.changeWhitespace(callback);if(hadAChange){this.onHeightMaybeChanged()}return hadAChange}getVerticalOffsetForLineNumber(lineNumber,includeViewZones=false){return this._linesLayout.getVerticalOffsetForLineNumber(lineNumber,includeViewZones)}getVerticalOffsetAfterLineNumber(lineNumber,includeViewZones=false){return this._linesLayout.getVerticalOffsetAfterLineNumber(lineNumber,includeViewZones)}isAfterLines(verticalOffset){return this._linesLayout.isAfterLines(verticalOffset)}isInTopPadding(verticalOffset){return this._linesLayout.isInTopPadding(verticalOffset)}isInBottomPadding(verticalOffset){return this._linesLayout.isInBottomPadding(verticalOffset)}getLineNumberAtVerticalOffset(verticalOffset){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(verticalOffset)}getWhitespaceAtVerticalOffset(verticalOffset){return this._linesLayout.getWhitespaceAtVerticalOffset(verticalOffset)}getLinesViewportData(){const visibleBox=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(visibleBox.top,visibleBox.top+visibleBox.height)}getLinesViewportDataAtScrollTop(scrollTop){const scrollDimensions=this._scrollable.getScrollDimensions();if(scrollTop+scrollDimensions.height>scrollDimensions.scrollHeight){scrollTop=scrollDimensions.scrollHeight-scrollDimensions.height}if(scrollTop<0){scrollTop=0}return this._linesLayout.getLinesViewportData(scrollTop,scrollTop+scrollDimensions.height)}getWhitespaceViewportData(){const visibleBox=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(visibleBox.top,visibleBox.top+visibleBox.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){const scrollDimensions=this._scrollable.getScrollDimensions();return scrollDimensions.contentWidth}getScrollWidth(){const scrollDimensions=this._scrollable.getScrollDimensions();return scrollDimensions.scrollWidth}getContentHeight(){const scrollDimensions=this._scrollable.getScrollDimensions();return scrollDimensions.contentHeight}getScrollHeight(){const scrollDimensions=this._scrollable.getScrollDimensions();return scrollDimensions.scrollHeight}getCurrentScrollLeft(){const currentScrollPosition=this._scrollable.getCurrentScrollPosition();return currentScrollPosition.scrollLeft}getCurrentScrollTop(){const currentScrollPosition=this._scrollable.getCurrentScrollPosition();return currentScrollPosition.scrollTop}validateScrollPosition(scrollPosition){return this._scrollable.validateScrollPosition(scrollPosition)}setScrollPosition(position,type){if(type===1){this._scrollable.setScrollPositionNow(position)}else{this._scrollable.setScrollPositionSmooth(position)}}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(deltaScrollLeft,deltaScrollTop){const currentScrollPosition=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:currentScrollPosition.scrollLeft+deltaScrollLeft,scrollTop:currentScrollPosition.scrollTop+deltaScrollTop})}}}});function isModelDecorationVisible(model,decoration2){if(decoration2.options.hideInCommentTokens&&isModelDecorationInComment(model,decoration2)){return false}if(decoration2.options.hideInStringTokens&&isModelDecorationInString(model,decoration2)){return false}return true}function isModelDecorationInComment(model,decoration2){return testTokensInRange(model,decoration2.range,(tokenType=>tokenType===1))}function isModelDecorationInString(model,decoration2){return testTokensInRange(model,decoration2.range,(tokenType=>tokenType===2))}function testTokensInRange(model,range2,callback){for(let lineNumber=range2.startLineNumber;lineNumber<=range2.endLineNumber;lineNumber++){const lineTokens=model.tokenization.getLineTokens(lineNumber);const isFirstLine=lineNumber===range2.startLineNumber;const isEndLine=lineNumber===range2.endLineNumber;let tokenIdx=isFirstLine?lineTokens.findTokenIndexAtOffset(range2.startColumn-1):0;while(tokenIdxrange2.endColumn-1){break}}const callbackResult=callback(lineTokens.getStandardTokenType(tokenIdx));if(!callbackResult){return false}tokenIdx++}}return true}var ViewModelDecorations;var init_viewModelDecorations=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelDecorations.js"(){init_position();init_range();init_viewModel();init_editorOptions();ViewModelDecorations=class{constructor(editorId,model,configuration,linesCollection,coordinatesConverter){this.editorId=editorId;this.model=model;this.configuration=configuration;this._linesCollection=linesCollection;this._coordinatesConverter=coordinatesConverter;this._decorationsCache=Object.create(null);this._cachedModelDecorationsResolver=null;this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null;this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null);this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null);this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null);this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null);this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(modelDecoration){const id=modelDecoration.id;let r=this._decorationsCache[id];if(!r){const modelRange=modelDecoration.range;const options2=modelDecoration.options;let viewRange;if(options2.isWholeLine){const start=this._coordinatesConverter.convertModelPositionToViewPosition(new Position(modelRange.startLineNumber,1),0,false,true);const end=this._coordinatesConverter.convertModelPositionToViewPosition(new Position(modelRange.endLineNumber,this.model.getLineMaxColumn(modelRange.endLineNumber)),1);viewRange=new Range(start.lineNumber,start.column,end.lineNumber,end.column)}else{viewRange=this._coordinatesConverter.convertModelRangeToViewRange(modelRange,1)}r=new ViewModelDecoration(viewRange,options2);this._decorationsCache[id]=r}return r}getMinimapDecorationsInRange(range2){return this._getDecorationsInRange(range2,true,false).decorations}getDecorationsViewportData(viewRange){let cacheIsValid=this._cachedModelDecorationsResolver!==null;cacheIsValid=cacheIsValid&&viewRange.equalsRange(this._cachedModelDecorationsResolverViewRange);if(!cacheIsValid){this._cachedModelDecorationsResolver=this._getDecorationsInRange(viewRange,false,false);this._cachedModelDecorationsResolverViewRange=viewRange}return this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(lineNumber,onlyMinimapDecorations=false,onlyMarginDecorations=false){const range2=new Range(lineNumber,this._linesCollection.getViewLineMinColumn(lineNumber),lineNumber,this._linesCollection.getViewLineMaxColumn(lineNumber));return this._getDecorationsInRange(range2,onlyMinimapDecorations,onlyMarginDecorations).inlineDecorations[0]}_getDecorationsInRange(viewRange,onlyMinimapDecorations,onlyMarginDecorations){const modelDecorations=this._linesCollection.getDecorationsInRange(viewRange,this.editorId,filterValidationDecorations(this.configuration.options),onlyMinimapDecorations,onlyMarginDecorations);const startLineNumber=viewRange.startLineNumber;const endLineNumber=viewRange.endLineNumber;const decorationsInViewport=[];let decorationsInViewportLen=0;const inlineDecorations=[];for(let j=startLineNumber;j<=endLineNumber;j++){inlineDecorations[j-startLineNumber]=[]}for(let i=0,len=modelDecorations.length;i=_spaces.length){for(let i=1;i<=count;i++){_spaces[i]=_makeSpaces(i)}}return _spaces[count]}function _makeSpaces(count){return new Array(count+1).join(" ")}var ModelLineProjection,IdentityModelLineProjection,HiddenModelLineProjection,_spaces;var init_modelLineProjection=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewModel/modelLineProjection.js"(){init_lineTokens();init_position();init_textModelEvents();init_viewModel();ModelLineProjection=class{constructor(lineBreakData,isVisible){this._projectionData=lineBreakData;this._isVisible=isVisible}isVisible(){return this._isVisible}setVisible(isVisible){this._isVisible=isVisible;return this}getProjectionData(){return this._projectionData}getViewLineCount(){if(!this._isVisible){return 0}return this._projectionData.getOutputLineCount()}getViewLineContent(model,modelLineNumber,outputLineIndex){this._assertVisible();const startOffsetInInputWithInjections=outputLineIndex>0?this._projectionData.breakOffsets[outputLineIndex-1]:0;const endOffsetInInputWithInjections=this._projectionData.breakOffsets[outputLineIndex];let r;if(this._projectionData.injectionOffsets!==null){const injectedTexts=this._projectionData.injectionOffsets.map(((offset,idx)=>new LineInjectedText(0,0,offset+1,this._projectionData.injectionOptions[idx],0)));const lineWithInjections=LineInjectedText.applyInjectedText(model.getLineContent(modelLineNumber),injectedTexts);r=lineWithInjections.substring(startOffsetInInputWithInjections,endOffsetInInputWithInjections)}else{r=model.getValueInRange({startLineNumber:modelLineNumber,startColumn:startOffsetInInputWithInjections+1,endLineNumber:modelLineNumber,endColumn:endOffsetInInputWithInjections+1})}if(outputLineIndex>0){r=spaces(this._projectionData.wrappedTextIndentLength)+r}return r}getViewLineLength(model,modelLineNumber,outputLineIndex){this._assertVisible();return this._projectionData.getLineLength(outputLineIndex)}getViewLineMinColumn(_model,_modelLineNumber,outputLineIndex){this._assertVisible();return this._projectionData.getMinOutputOffset(outputLineIndex)+1}getViewLineMaxColumn(model,modelLineNumber,outputLineIndex){this._assertVisible();return this._projectionData.getMaxOutputOffset(outputLineIndex)+1}getViewLineData(model,modelLineNumber,outputLineIndex){const arr=new Array;this.getViewLinesData(model,modelLineNumber,outputLineIndex,1,0,[true],arr);return arr[0]}getViewLinesData(model,modelLineNumber,outputLineIdx,lineCount,globalStartIndex,needed,result){this._assertVisible();const lineBreakData=this._projectionData;const injectionOffsets=lineBreakData.injectionOffsets;const injectionOptions=lineBreakData.injectionOptions;let inlineDecorationsPerOutputLine=null;if(injectionOffsets){inlineDecorationsPerOutputLine=[];let totalInjectedTextLengthBefore=0;let currentInjectedOffset=0;for(let outputLineIndex=0;outputLineIndex0?lineBreakData.breakOffsets[outputLineIndex-1]:0;const lineEndOffsetInInputWithInjections=lineBreakData.breakOffsets[outputLineIndex];while(currentInjectedOffsetlineEndOffsetInInputWithInjections){break}if(lineStartOffsetInInputWithInjections0?lineBreakData.wrappedTextIndentLength:0;const start=offset+Math.max(injectedTextStartOffsetInInputWithInjections-lineStartOffsetInInputWithInjections,0);const end=offset+Math.min(injectedTextEndOffsetInInputWithInjections-lineStartOffsetInInputWithInjections,lineEndOffsetInInputWithInjections-lineStartOffsetInInputWithInjections);if(start!==end){inlineDecorations.push(new SingleLineInlineDecoration(start,end,options2.inlineClassName,options2.inlineClassNameAffectsLetterSpacing))}}}if(injectedTextEndOffsetInInputWithInjections<=lineEndOffsetInInputWithInjections){totalInjectedTextLengthBefore+=length2;currentInjectedOffset++}else{break}}}}let lineWithInjections;if(injectionOffsets){lineWithInjections=model.tokenization.getLineTokens(modelLineNumber).withInserted(injectionOffsets.map(((offset,idx)=>({offset:offset,text:injectionOptions[idx].content,tokenMetadata:LineTokens.defaultTokenMetadata}))))}else{lineWithInjections=model.tokenization.getLineTokens(modelLineNumber)}for(let outputLineIndex=outputLineIdx;outputLineIndex0?lineBreakData.wrappedTextIndentLength:0;const lineStartOffsetInInputWithInjections=outputLineIndex>0?lineBreakData.breakOffsets[outputLineIndex-1]:0;const lineEndOffsetInInputWithInjections=lineBreakData.breakOffsets[outputLineIndex];const tokens=lineWithInjections.sliceAndInflate(lineStartOffsetInInputWithInjections,lineEndOffsetInInputWithInjections,deltaStartIndex);let lineContent=tokens.getLineContent();if(outputLineIndex>0){lineContent=spaces(lineBreakData.wrappedTextIndentLength)+lineContent}const minColumn=this._projectionData.getMinOutputOffset(outputLineIndex)+1;const maxColumn=lineContent.length+1;const continuesWithWrappedLine=outputLineIndex+1currentRangeEnd+1){result.push(new Range(currentRangeStart,1,currentRangeEnd,1));currentRangeStart=range2.startLineNumber;currentRangeEnd=range2.endLineNumber}else if(range2.endLineNumber>currentRangeEnd){currentRangeEnd=range2.endLineNumber}}result.push(new Range(currentRangeStart,1,currentRangeEnd,1));return result}var ViewModelLinesFromProjectedModel,ViewLineInfo,ViewLineInfoGroupedByModelRange,CoordinatesConverter,ViewModelLinesFromModelAsIs,IdentityCoordinatesConverter;var init_viewModelLines=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewModel/viewModelLines.js"(){init_arrays();init_position();init_range();init_textModelGuides();init_textModel();init_textModelEvents();init_viewEvents();init_modelLineProjection();init_prefixSumComputer();init_viewModel();ViewModelLinesFromProjectedModel=class{constructor(editorId,model,domLineBreaksComputerFactory,monospaceLineBreaksComputerFactory,fontInfo,tabSize,wrappingStrategy,wrappingColumn,wrappingIndent,wordBreak){this._editorId=editorId;this.model=model;this._validModelVersionId=-1;this._domLineBreaksComputerFactory=domLineBreaksComputerFactory;this._monospaceLineBreaksComputerFactory=monospaceLineBreaksComputerFactory;this.fontInfo=fontInfo;this.tabSize=tabSize;this.wrappingStrategy=wrappingStrategy;this.wrappingColumn=wrappingColumn;this.wrappingIndent=wrappingIndent;this.wordBreak=wordBreak;this._constructLines(true,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new CoordinatesConverter(this)}_constructLines(resetHiddenAreas,previousLineBreaks){this.modelLineProjections=[];if(resetHiddenAreas){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}const linesContent=this.model.getLinesContent();const injectedTextDecorations=this.model.getInjectedTextDecorations(this._editorId);const lineCount=linesContent.length;const lineBreaksComputer=this.createLineBreaksComputer();const injectedTextQueue=new ArrayQueue(LineInjectedText.fromDecorations(injectedTextDecorations));for(let i=0;it2.lineNumber===i+1));lineBreaksComputer.addRequest(linesContent[i],lineInjectedText,previousLineBreaks?previousLineBreaks[i]:null)}const linesBreaks=lineBreaksComputer.finalize();const values=[];const hiddenAreas=this.hiddenAreasDecorationIds.map((areaId=>this.model.getDecorationRange(areaId))).sort(Range.compareRangesUsingStarts);let hiddenAreaStart=1,hiddenAreaEnd=0;let hiddenAreaIdx=-1;let nextLineNumberToUpdateHiddenArea=hiddenAreaIdx+1=hiddenAreaStart&&lineNumber<=hiddenAreaEnd;const line=createModelLineProjection(linesBreaks[i],!isInHiddenArea);values[i]=line.getViewLineCount();this.modelLineProjections[i]=line}this._validModelVersionId=this.model.getVersionId();this.projectedModelLineLineCounts=new ConstantTimePrefixSumComputer(values)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((decId=>this.model.getDecorationRange(decId)))}setHiddenAreas(_ranges){const validatedRanges=_ranges.map((r=>this.model.validateRange(r)));const newRanges=normalizeLineRanges(validatedRanges);const oldRanges=this.hiddenAreasDecorationIds.map((areaId=>this.model.getDecorationRange(areaId))).sort(Range.compareRangesUsingStarts);if(newRanges.length===oldRanges.length){let hasDifference=false;for(let i=0;i({range:r,options:ModelDecorationOptions.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,newDecorations);const hiddenAreas=newRanges;let hiddenAreaStart=1,hiddenAreaEnd=0;let hiddenAreaIdx=-1;let nextLineNumberToUpdateHiddenArea=hiddenAreaIdx+1=hiddenAreaStart&&lineNumber<=hiddenAreaEnd){if(this.modelLineProjections[i].isVisible()){this.modelLineProjections[i]=this.modelLineProjections[i].setVisible(false);lineChanged=true}}else{hasVisibleLine=true;if(!this.modelLineProjections[i].isVisible()){this.modelLineProjections[i]=this.modelLineProjections[i].setVisible(true);lineChanged=true}}if(lineChanged){const newOutputLineCount=this.modelLineProjections[i].getViewLineCount();this.projectedModelLineLineCounts.setValue(i,newOutputLineCount)}}if(!hasVisibleLine){this.setHiddenAreas([])}return true}modelPositionIsVisible(modelLineNumber,_modelColumn){if(modelLineNumber<1||modelLineNumber>this.modelLineProjections.length){return false}return this.modelLineProjections[modelLineNumber-1].isVisible()}getModelLineViewLineCount(modelLineNumber){if(modelLineNumber<1||modelLineNumber>this.modelLineProjections.length){return 1}return this.modelLineProjections[modelLineNumber-1].getViewLineCount()}setTabSize(newTabSize){if(this.tabSize===newTabSize){return false}this.tabSize=newTabSize;this._constructLines(false,null);return true}setWrappingSettings(fontInfo,wrappingStrategy,wrappingColumn,wrappingIndent,wordBreak){const equalFontInfo=this.fontInfo.equals(fontInfo);const equalWrappingStrategy=this.wrappingStrategy===wrappingStrategy;const equalWrappingColumn=this.wrappingColumn===wrappingColumn;const equalWrappingIndent=this.wrappingIndent===wrappingIndent;const equalWordBreak=this.wordBreak===wordBreak;if(equalFontInfo&&equalWrappingStrategy&&equalWrappingColumn&&equalWrappingIndent&&equalWordBreak){return false}const onlyWrappingColumnChanged=equalFontInfo&&equalWrappingStrategy&&!equalWrappingColumn&&equalWrappingIndent&&equalWordBreak;this.fontInfo=fontInfo;this.wrappingStrategy=wrappingStrategy;this.wrappingColumn=wrappingColumn;this.wrappingIndent=wrappingIndent;this.wordBreak=wordBreak;let previousLineBreaks=null;if(onlyWrappingColumnChanged){previousLineBreaks=[];for(let i=0,len=this.modelLineProjections.length;i2&&!this.modelLineProjections[fromLineNumber-2].isVisible();const outputFromLineNumber=fromLineNumber===1?1:this.projectedModelLineLineCounts.getPrefixSum(fromLineNumber-1)+1;let totalOutputLineCount=0;const insertLines=[];const insertPrefixSumValues=[];for(let i=0,len=lineBreaks.length;inewOutputLineCount){changeFrom=this.projectedModelLineLineCounts.getPrefixSum(lineNumber-1)+1;changeTo=changeFrom+newOutputLineCount-1;deleteFrom=changeTo+1;deleteTo=deleteFrom+(oldOutputLineCount-newOutputLineCount)-1;lineMappingChanged=true}else if(oldOutputLineCountviewLineCount){return viewLineCount}return viewLineNumber|0}getActiveIndentGuide(viewLineNumber,minLineNumber,maxLineNumber){viewLineNumber=this._toValidViewLineNumber(viewLineNumber);minLineNumber=this._toValidViewLineNumber(minLineNumber);maxLineNumber=this._toValidViewLineNumber(maxLineNumber);const modelPosition=this.convertViewPositionToModelPosition(viewLineNumber,this.getViewLineMinColumn(viewLineNumber));const modelMinPosition=this.convertViewPositionToModelPosition(minLineNumber,this.getViewLineMinColumn(minLineNumber));const modelMaxPosition=this.convertViewPositionToModelPosition(maxLineNumber,this.getViewLineMinColumn(maxLineNumber));const result=this.model.guides.getActiveIndentGuide(modelPosition.lineNumber,modelMinPosition.lineNumber,modelMaxPosition.lineNumber);const viewStartPosition=this.convertModelPositionToViewPosition(result.startLineNumber,1);const viewEndPosition=this.convertModelPositionToViewPosition(result.endLineNumber,this.model.getLineMaxColumn(result.endLineNumber));return{startLineNumber:viewStartPosition.lineNumber,endLineNumber:viewEndPosition.lineNumber,indent:result.indent}}getViewLineInfo(viewLineNumber){viewLineNumber=this._toValidViewLineNumber(viewLineNumber);const r=this.projectedModelLineLineCounts.getIndexOf(viewLineNumber-1);const lineIndex=r.index;const remainder=r.remainder;return new ViewLineInfo(lineIndex+1,remainder)}getMinColumnOfViewLine(viewLineInfo){return this.modelLineProjections[viewLineInfo.modelLineNumber-1].getViewLineMinColumn(this.model,viewLineInfo.modelLineNumber,viewLineInfo.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(viewLineInfo){return this.modelLineProjections[viewLineInfo.modelLineNumber-1].getViewLineMaxColumn(this.model,viewLineInfo.modelLineNumber,viewLineInfo.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(viewLineInfo){const line=this.modelLineProjections[viewLineInfo.modelLineNumber-1];const minViewColumn=line.getViewLineMinColumn(this.model,viewLineInfo.modelLineNumber,viewLineInfo.modelLineWrappedLineIdx);const column=line.getModelColumnOfViewPosition(viewLineInfo.modelLineWrappedLineIdx,minViewColumn);return new Position(viewLineInfo.modelLineNumber,column)}getModelEndPositionOfViewLine(viewLineInfo){const line=this.modelLineProjections[viewLineInfo.modelLineNumber-1];const maxViewColumn=line.getViewLineMaxColumn(this.model,viewLineInfo.modelLineNumber,viewLineInfo.modelLineWrappedLineIdx);const column=line.getModelColumnOfViewPosition(viewLineInfo.modelLineWrappedLineIdx,maxViewColumn);return new Position(viewLineInfo.modelLineNumber,column)}getViewLineInfosGroupedByModelRanges(viewStartLineNumber,viewEndLineNumber){const startViewLine=this.getViewLineInfo(viewStartLineNumber);const endViewLine=this.getViewLineInfo(viewEndLineNumber);const result=new Array;let lastVisibleModelPos=this.getModelStartPositionOfViewLine(startViewLine);let viewLines=new Array;for(let curModelLine=startViewLine.modelLineNumber;curModelLine<=endViewLine.modelLineNumber;curModelLine++){const line=this.modelLineProjections[curModelLine-1];if(line.isVisible()){const startOffset=curModelLine===startViewLine.modelLineNumber?startViewLine.modelLineWrappedLineIdx:0;const endOffset=curModelLine===endViewLine.modelLineNumber?endViewLine.modelLineWrappedLineIdx+1:line.getViewLineCount();for(let i=startOffset;i{if(g.forWrappedLinesAfterColumn!==-1){const p2=this.modelLineProjections[viewLineInfo.modelLineNumber-1].getViewPositionOfModelPosition(0,g.forWrappedLinesAfterColumn);if(p2.lineNumber>=viewLineInfo.modelLineWrappedLineIdx){return void 0}}if(g.forWrappedLinesBeforeOrAtColumn!==-1){const p2=this.modelLineProjections[viewLineInfo.modelLineNumber-1].getViewPositionOfModelPosition(0,g.forWrappedLinesBeforeOrAtColumn);if(p2.lineNumberviewLineInfo.modelLineWrappedLineIdx){return void 0}}const viewPosition=this.convertModelPositionToViewPosition(viewLineInfo.modelLineNumber,g.horizontalLine.endColumn);const p=this.modelLineProjections[viewLineInfo.modelLineNumber-1].getViewPositionOfModelPosition(0,g.horizontalLine.endColumn);if(p.lineNumber===viewLineInfo.modelLineWrappedLineIdx){return new IndentGuide(g.visibleColumn,column,g.className,new IndentGuideHorizontalLine(g.horizontalLine.top,viewPosition.column),-1,-1)}else if(p.lineNumber!!r)))}}return resultPerViewLine}getViewLinesIndentGuides(viewStartLineNumber,viewEndLineNumber){viewStartLineNumber=this._toValidViewLineNumber(viewStartLineNumber);viewEndLineNumber=this._toValidViewLineNumber(viewEndLineNumber);const modelStart=this.convertViewPositionToModelPosition(viewStartLineNumber,this.getViewLineMinColumn(viewStartLineNumber));const modelEnd=this.convertViewPositionToModelPosition(viewEndLineNumber,this.getViewLineMaxColumn(viewEndLineNumber));let result=[];const resultRepeatCount=[];const resultRepeatOption=[];const modelStartLineIndex=modelStart.lineNumber-1;const modelEndLineIndex=modelEnd.lineNumber-1;let reqStart=null;for(let modelLineIndex=modelStartLineIndex;modelLineIndex<=modelEndLineIndex;modelLineIndex++){const line=this.modelLineProjections[modelLineIndex];if(line.isVisible()){const viewLineStartIndex=line.getViewLineNumberOfModelPosition(0,modelLineIndex===modelStartLineIndex?modelStart.column:1);const viewLineEndIndex=line.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(modelLineIndex+1));const count=viewLineEndIndex-viewLineStartIndex+1;let option=0;if(count>1&&line.getViewLineMinColumn(this.model,modelLineIndex+1,viewLineEndIndex)===1){option=viewLineStartIndex===0?1:2}resultRepeatCount.push(count);resultRepeatOption.push(option);if(reqStart===null){reqStart=new Position(modelLineIndex+1,0)}}else{if(reqStart!==null){result=result.concat(this.model.guides.getLinesIndentGuides(reqStart.lineNumber,modelLineIndex));reqStart=null}}}if(reqStart!==null){result=result.concat(this.model.guides.getLinesIndentGuides(reqStart.lineNumber,modelEnd.lineNumber));reqStart=null}const viewLineCount=viewEndLineNumber-viewStartLineNumber+1;const viewIndents=new Array(viewLineCount);let currIndex=0;for(let i=0,len=result.length;iviewEndLineNumber){lastLine=true;remainingViewLineCount=viewEndLineNumber-viewLineNumber+1}line.getViewLinesData(this.model,modelLineIndex+1,fromViewLineIndex,remainingViewLineCount,viewLineNumber-viewStartLineNumber,needed,result);viewLineNumber+=remainingViewLineCount;if(lastLine){break}}return result}validateViewPosition(viewLineNumber,viewColumn,expectedModelPosition){viewLineNumber=this._toValidViewLineNumber(viewLineNumber);const r=this.projectedModelLineLineCounts.getIndexOf(viewLineNumber-1);const lineIndex=r.index;const remainder=r.remainder;const line=this.modelLineProjections[lineIndex];const minColumn=line.getViewLineMinColumn(this.model,lineIndex+1,remainder);const maxColumn=line.getViewLineMaxColumn(this.model,lineIndex+1,remainder);if(viewColumnmaxColumn){viewColumn=maxColumn}const computedModelColumn=line.getModelColumnOfViewPosition(remainder,viewColumn);const computedModelPosition=this.model.validatePosition(new Position(lineIndex+1,computedModelColumn));if(computedModelPosition.equals(expectedModelPosition)){return new Position(viewLineNumber,viewColumn)}return this.convertModelPositionToViewPosition(expectedModelPosition.lineNumber,expectedModelPosition.column)}validateViewRange(viewRange,expectedModelRange){const validViewStart=this.validateViewPosition(viewRange.startLineNumber,viewRange.startColumn,expectedModelRange.getStartPosition());const validViewEnd=this.validateViewPosition(viewRange.endLineNumber,viewRange.endColumn,expectedModelRange.getEndPosition());return new Range(validViewStart.lineNumber,validViewStart.column,validViewEnd.lineNumber,validViewEnd.column)}convertViewPositionToModelPosition(viewLineNumber,viewColumn){const info=this.getViewLineInfo(viewLineNumber);const inputColumn=this.modelLineProjections[info.modelLineNumber-1].getModelColumnOfViewPosition(info.modelLineWrappedLineIdx,viewColumn);return this.model.validatePosition(new Position(info.modelLineNumber,inputColumn))}convertViewRangeToModelRange(viewRange){const start=this.convertViewPositionToModelPosition(viewRange.startLineNumber,viewRange.startColumn);const end=this.convertViewPositionToModelPosition(viewRange.endLineNumber,viewRange.endColumn);return new Range(start.lineNumber,start.column,end.lineNumber,end.column)}convertModelPositionToViewPosition(_modelLineNumber,_modelColumn,affinity=2,allowZeroLineNumber=false,belowHiddenRanges=false){const validPosition=this.model.validatePosition(new Position(_modelLineNumber,_modelColumn));const inputLineNumber=validPosition.lineNumber;const inputColumn=validPosition.column;let lineIndex=inputLineNumber-1,lineIndexChanged=false;if(belowHiddenRanges){while(lineIndex0&&!this.modelLineProjections[lineIndex].isVisible()){lineIndex--;lineIndexChanged=true}}if(lineIndex===0&&!this.modelLineProjections[lineIndex].isVisible()){return new Position(allowZeroLineNumber?0:1,1)}const deltaLineNumber=1+this.projectedModelLineLineCounts.getPrefixSum(lineIndex);let r;if(lineIndexChanged){if(belowHiddenRanges){r=this.modelLineProjections[lineIndex].getViewPositionOfModelPosition(deltaLineNumber,1,affinity)}else{r=this.modelLineProjections[lineIndex].getViewPositionOfModelPosition(deltaLineNumber,this.model.getLineMaxColumn(lineIndex+1),affinity)}}else{r=this.modelLineProjections[inputLineNumber-1].getViewPositionOfModelPosition(deltaLineNumber,inputColumn,affinity)}return r}convertModelRangeToViewRange(modelRange,affinity=0){if(modelRange.isEmpty()){const start=this.convertModelPositionToViewPosition(modelRange.startLineNumber,modelRange.startColumn,affinity);return Range.fromPositions(start)}else{const start=this.convertModelPositionToViewPosition(modelRange.startLineNumber,modelRange.startColumn,1);const end=this.convertModelPositionToViewPosition(modelRange.endLineNumber,modelRange.endColumn,0);return new Range(start.lineNumber,start.column,end.lineNumber,end.column)}}getViewLineNumberOfModelPosition(modelLineNumber,modelColumn){let lineIndex=modelLineNumber-1;if(this.modelLineProjections[lineIndex].isVisible()){const deltaLineNumber2=1+this.projectedModelLineLineCounts.getPrefixSum(lineIndex);return this.modelLineProjections[lineIndex].getViewLineNumberOfModelPosition(deltaLineNumber2,modelColumn)}while(lineIndex>0&&!this.modelLineProjections[lineIndex].isVisible()){lineIndex--}if(lineIndex===0&&!this.modelLineProjections[lineIndex].isVisible()){return 1}const deltaLineNumber=1+this.projectedModelLineLineCounts.getPrefixSum(lineIndex);return this.modelLineProjections[lineIndex].getViewLineNumberOfModelPosition(deltaLineNumber,this.model.getLineMaxColumn(lineIndex+1))}getDecorationsInRange(range2,ownerId,filterOutValidation,onlyMinimapDecorations,onlyMarginDecorations){const modelStart=this.convertViewPositionToModelPosition(range2.startLineNumber,range2.startColumn);const modelEnd=this.convertViewPositionToModelPosition(range2.endLineNumber,range2.endColumn);if(modelEnd.lineNumber-modelStart.lineNumber<=range2.endLineNumber-range2.startLineNumber){return this.model.getDecorationsInRange(new Range(modelStart.lineNumber,1,modelEnd.lineNumber,modelEnd.column),ownerId,filterOutValidation,onlyMinimapDecorations,onlyMarginDecorations)}let result=[];const modelStartLineIndex=modelStart.lineNumber-1;const modelEndLineIndex=modelEnd.lineNumber-1;let reqStart=null;for(let modelLineIndex=modelStartLineIndex;modelLineIndex<=modelEndLineIndex;modelLineIndex++){const line=this.modelLineProjections[modelLineIndex];if(line.isVisible()){if(reqStart===null){reqStart=new Position(modelLineIndex+1,modelLineIndex===modelStartLineIndex?modelStart.column:1)}}else{if(reqStart!==null){const maxLineColumn=this.model.getLineMaxColumn(modelLineIndex);result=result.concat(this.model.getDecorationsInRange(new Range(reqStart.lineNumber,reqStart.column,modelLineIndex,maxLineColumn),ownerId,filterOutValidation,onlyMinimapDecorations));reqStart=null}}}if(reqStart!==null){result=result.concat(this.model.getDecorationsInRange(new Range(reqStart.lineNumber,reqStart.column,modelEnd.lineNumber,modelEnd.column),ownerId,filterOutValidation,onlyMinimapDecorations));reqStart=null}result.sort(((a,b)=>{const res=Range.compareRangesUsingStarts(a.range,b.range);if(res===0){if(a.idb.id){return 1}return 0}return res}));const finalResult=[];let finalResultLen=0;let prevDecId=null;for(const dec of result){const decId=dec.id;if(prevDecId===decId){continue}prevDecId=decId;finalResult[finalResultLen++]=dec}return finalResult}getInjectedTextAt(position){const info=this.getViewLineInfo(position.lineNumber);return this.modelLineProjections[info.modelLineNumber-1].getInjectedTextAt(info.modelLineWrappedLineIdx,position.column)}normalizePosition(position,affinity){const info=this.getViewLineInfo(position.lineNumber);return this.modelLineProjections[info.modelLineNumber-1].normalizePosition(info.modelLineWrappedLineIdx,position,affinity)}getLineIndentColumn(lineNumber){const info=this.getViewLineInfo(lineNumber);if(info.modelLineWrappedLineIdx===0){return this.model.getLineIndentColumn(info.modelLineNumber)}return 0}};ViewLineInfo=class{constructor(modelLineNumber,modelLineWrappedLineIdx){this.modelLineNumber=modelLineNumber;this.modelLineWrappedLineIdx=modelLineWrappedLineIdx}};ViewLineInfoGroupedByModelRange=class{constructor(modelRange,viewLines){this.modelRange=modelRange;this.viewLines=viewLines}};CoordinatesConverter=class{constructor(lines){this._lines=lines}convertViewPositionToModelPosition(viewPosition){return this._lines.convertViewPositionToModelPosition(viewPosition.lineNumber,viewPosition.column)}convertViewRangeToModelRange(viewRange){return this._lines.convertViewRangeToModelRange(viewRange)}validateViewPosition(viewPosition,expectedModelPosition){return this._lines.validateViewPosition(viewPosition.lineNumber,viewPosition.column,expectedModelPosition)}validateViewRange(viewRange,expectedModelRange){return this._lines.validateViewRange(viewRange,expectedModelRange)}convertModelPositionToViewPosition(modelPosition,affinity,allowZero,belowHiddenRanges){return this._lines.convertModelPositionToViewPosition(modelPosition.lineNumber,modelPosition.column,affinity,allowZero,belowHiddenRanges)}convertModelRangeToViewRange(modelRange,affinity){return this._lines.convertModelRangeToViewRange(modelRange,affinity)}modelPositionIsVisible(modelPosition){return this._lines.modelPositionIsVisible(modelPosition.lineNumber,modelPosition.column)}getModelLineViewLineCount(modelLineNumber){return this._lines.getModelLineViewLineCount(modelLineNumber)}getViewLineNumberOfModelPosition(modelLineNumber,modelColumn){return this._lines.getViewLineNumberOfModelPosition(modelLineNumber,modelColumn)}};ViewModelLinesFromModelAsIs=class{constructor(model){this.model=model}dispose(){}createCoordinatesConverter(){return new IdentityCoordinatesConverter(this)}getHiddenAreas(){return[]}setHiddenAreas(_ranges){return false}setTabSize(_newTabSize){return false}setWrappingSettings(_fontInfo,_wrappingStrategy,_wrappingColumn,_wrappingIndent){return false}createLineBreaksComputer(){const result=[];return{addRequest:(lineText,injectedText,previousLineBreakData)=>{result.push(null)},finalize:()=>result}}onModelFlushed(){}onModelLinesDeleted(_versionId,fromLineNumber,toLineNumber){return new ViewLinesDeletedEvent(fromLineNumber,toLineNumber)}onModelLinesInserted(_versionId,fromLineNumber,toLineNumber,lineBreaks){return new ViewLinesInsertedEvent(fromLineNumber,toLineNumber)}onModelLineChanged(_versionId,lineNumber,lineBreakData){return[false,new ViewLinesChangedEvent(lineNumber,1),null,null]}acceptVersionId(_versionId){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(viewLineNumber,_minLineNumber,_maxLineNumber){return{startLineNumber:viewLineNumber,endLineNumber:viewLineNumber,indent:0}}getViewLinesBracketGuides(startLineNumber,endLineNumber,activePosition){return new Array(endLineNumber-startLineNumber+1).fill([])}getViewLinesIndentGuides(viewStartLineNumber,viewEndLineNumber){const viewLineCount=viewEndLineNumber-viewStartLineNumber+1;const result=new Array(viewLineCount);for(let i=0;ilineCount){return false}return true}getModelLineViewLineCount(modelLineNumber){return 1}getViewLineNumberOfModelPosition(modelLineNumber,modelColumn){return modelLineNumber}}}});function mergeLineRangeArray(arr1,arr2){const result=[];let i=0;let j=0;while(ithis._updateConfigurationViewLineCountNow()),0));this._hasFocus=false;this._viewportStart=ViewportStart.create(this.model);if(USE_IDENTITY_LINES_COLLECTION&&this.model.isTooLargeForTokenization()){this._lines=new ViewModelLinesFromModelAsIs(this.model)}else{const options2=this._configuration.options;const fontInfo=options2.get(49);const wrappingStrategy=options2.get(136);const wrappingInfo=options2.get(143);const wrappingIndent=options2.get(135);const wordBreak=options2.get(127);this._lines=new ViewModelLinesFromProjectedModel(this._editorId,this.model,domLineBreaksComputerFactory,monospaceLineBreaksComputerFactory,fontInfo,this.model.getOptions().tabSize,wrappingStrategy,wrappingInfo.wrappingColumn,wrappingIndent,wordBreak)}this.coordinatesConverter=this._lines.createCoordinatesConverter();this._cursor=this._register(new CursorsController(model,this,this.coordinatesConverter,this.cursorConfig));this.viewLayout=this._register(new ViewLayout(this._configuration,this.getLineCount(),scheduleAtNextAnimationFrame2));this._register(this.viewLayout.onDidScroll((e=>{if(e.scrollTopChanged){this._handleVisibleLinesChanged()}if(e.scrollTopChanged){this._viewportStart.invalidate()}this._eventDispatcher.emitSingleViewEvent(new ViewScrollChangedEvent(e));this._eventDispatcher.emitOutgoingEvent(new ScrollChangedEvent(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))})));this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)})));this._decorations=new ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter);this._registerModelEvents();this._register(this._configuration.onDidChangeFast((e=>{try{const eventsCollector=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(eventsCollector,e)}finally{this._eventDispatcher.endEmitViewEvents()}})));this._register(MinimapTokensColorTracker.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new ViewTokensColorsChangedEvent)})));this._register(this._themeService.onDidColorThemeChange((theme=>{this._invalidateDecorationsColorCache();this._eventDispatcher.emitSingleViewEvent(new ViewThemeChangedEvent(theme))})));this._updateConfigurationViewLineCountNow()}dispose(){super.dispose();this._decorations.dispose();this._lines.dispose();this._viewportStart.dispose();this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(eventHandler){this._eventDispatcher.addViewEventHandler(eventHandler)}removeViewEventHandler(eventHandler){this._eventDispatcher.removeViewEventHandler(eventHandler)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const linesViewportData=this.viewLayout.getLinesViewportData();const viewVisibleRange=new Range(linesViewportData.startLineNumber,this.getLineMinColumn(linesViewportData.startLineNumber),linesViewportData.endLineNumber,this.getLineMaxColumn(linesViewportData.endLineNumber));const modelVisibleRanges=this._toModelVisibleRanges(viewVisibleRange);return modelVisibleRanges}visibleLinesStabilized(){const modelVisibleRanges=this.getModelVisibleRanges();this._attachedView.setVisibleLines(modelVisibleRanges,true)}_handleVisibleLinesChanged(){const modelVisibleRanges=this.getModelVisibleRanges();this._attachedView.setVisibleLines(modelVisibleRanges,false)}setHasFocus(hasFocus){this._hasFocus=hasFocus;this._cursor.setHasFocus(hasFocus);this._eventDispatcher.emitSingleViewEvent(new ViewFocusChangedEvent(hasFocus));this._eventDispatcher.emitOutgoingEvent(new FocusChangedEvent(!hasFocus,hasFocus))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new ViewCompositionStartEvent)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new ViewCompositionEndEvent)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const previousViewportStartViewPosition=new Position(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber));const previousViewportStartModelPosition=this.coordinatesConverter.convertViewPositionToModelPosition(previousViewportStartViewPosition);return new StableViewport(previousViewportStartModelPosition,this._viewportStart.startLineDelta)}return new StableViewport(null,0)}_onConfigurationChanged(eventsCollector,e){const stableViewport=this._captureStableViewport();const options2=this._configuration.options;const fontInfo=options2.get(49);const wrappingStrategy=options2.get(136);const wrappingInfo=options2.get(143);const wrappingIndent=options2.get(135);const wordBreak=options2.get(127);if(this._lines.setWrappingSettings(fontInfo,wrappingStrategy,wrappingInfo.wrappingColumn,wrappingIndent,wordBreak)){eventsCollector.emitViewEvent(new ViewFlushedEvent);eventsCollector.emitViewEvent(new ViewLineMappingChangedEvent);eventsCollector.emitViewEvent(new ViewDecorationsChangedEvent(null));this._cursor.onLineMappingChanged(eventsCollector);this._decorations.onLineMappingChanged();this.viewLayout.onFlushed(this.getLineCount());this._updateConfigurationViewLineCount.schedule()}if(e.hasChanged(89)){this._decorations.reset();eventsCollector.emitViewEvent(new ViewDecorationsChangedEvent(null))}eventsCollector.emitViewEvent(new ViewConfigurationChangedEvent(e));this.viewLayout.onConfigurationChanged(e);stableViewport.recoverViewportStart(this.coordinatesConverter,this.viewLayout);if(CursorConfiguration.shouldRecreate(e)){this.cursorConfig=new CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService);this._cursor.updateConfiguration(this.cursorConfig)}}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const eventsCollector=this._eventDispatcher.beginEmitViewEvents();let hadOtherModelChange=false;let hadModelLineChangeThatChangedLineMapping=false;const changes=e instanceof InternalModelContentChangeEvent?e.rawContentChangedEvent.changes:e.changes;const versionId=e instanceof InternalModelContentChangeEvent?e.rawContentChangedEvent.versionId:null;const lineBreaksComputer=this._lines.createLineBreaksComputer();for(const change of changes){switch(change.changeType){case 4:{for(let lineIdx=0;lineIdx!element.ownerId||element.ownerId===this._editorId))}lineBreaksComputer.addRequest(line,injectedText,null)}break}case 2:{let injectedText=null;if(change.injectedText){injectedText=change.injectedText.filter((element=>!element.ownerId||element.ownerId===this._editorId))}lineBreaksComputer.addRequest(change.detail,injectedText,null);break}}}const lineBreaks=lineBreaksComputer.finalize();const lineBreakQueue=new ArrayQueue(lineBreaks);for(const change of changes){switch(change.changeType){case 1:{this._lines.onModelFlushed();eventsCollector.emitViewEvent(new ViewFlushedEvent);this._decorations.reset();this.viewLayout.onFlushed(this.getLineCount());hadOtherModelChange=true;break}case 3:{const linesDeletedEvent=this._lines.onModelLinesDeleted(versionId,change.fromLineNumber,change.toLineNumber);if(linesDeletedEvent!==null){eventsCollector.emitViewEvent(linesDeletedEvent);this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber,linesDeletedEvent.toLineNumber)}hadOtherModelChange=true;break}case 4:{const insertedLineBreaks=lineBreakQueue.takeCount(change.detail.length);const linesInsertedEvent=this._lines.onModelLinesInserted(versionId,change.fromLineNumber,change.toLineNumber,insertedLineBreaks);if(linesInsertedEvent!==null){eventsCollector.emitViewEvent(linesInsertedEvent);this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber,linesInsertedEvent.toLineNumber)}hadOtherModelChange=true;break}case 2:{const changedLineBreakData=lineBreakQueue.dequeue();const[lineMappingChanged,linesChangedEvent,linesInsertedEvent,linesDeletedEvent]=this._lines.onModelLineChanged(versionId,change.lineNumber,changedLineBreakData);hadModelLineChangeThatChangedLineMapping=lineMappingChanged;if(linesChangedEvent){eventsCollector.emitViewEvent(linesChangedEvent)}if(linesInsertedEvent){eventsCollector.emitViewEvent(linesInsertedEvent);this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber,linesInsertedEvent.toLineNumber)}if(linesDeletedEvent){eventsCollector.emitViewEvent(linesDeletedEvent);this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber,linesDeletedEvent.toLineNumber)}break}case 5:{break}}}if(versionId!==null){this._lines.acceptVersionId(versionId)}this.viewLayout.onHeightMaybeChanged();if(!hadOtherModelChange&&hadModelLineChangeThatChangedLineMapping){eventsCollector.emitViewEvent(new ViewLineMappingChangedEvent);eventsCollector.emitViewEvent(new ViewDecorationsChangedEvent(null));this._cursor.onLineMappingChanged(eventsCollector);this._decorations.onLineMappingChanged()}}finally{this._eventDispatcher.endEmitViewEvents()}const viewportStartWasValid=this._viewportStart.isValid;this._viewportStart.invalidate();this._configuration.setModelLineCount(this.model.getLineCount());this._updateConfigurationViewLineCountNow();if(!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&viewportStartWasValid){const modelRange=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(modelRange){const viewPosition=this.coordinatesConverter.convertModelPositionToViewPosition(modelRange.getStartPosition());const viewPositionTop=this.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber);this.viewLayout.setScrollPosition({scrollTop:viewPositionTop+this._viewportStart.startLineDelta},1)}}try{const eventsCollector=this._eventDispatcher.beginEmitViewEvents();if(e instanceof InternalModelContentChangeEvent){eventsCollector.emitOutgoingEvent(new ModelContentChangedEvent(e.contentChangedEvent))}this._cursor.onModelContentChanged(eventsCollector,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})));this._register(this.model.onDidChangeTokens((e=>{const viewRanges=[];for(let j=0,lenJ=e.ranges.length;j{this._eventDispatcher.emitSingleViewEvent(new ViewLanguageConfigurationEvent);this.cursorConfig=new CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService);this._cursor.updateConfiguration(this.cursorConfig);this._eventDispatcher.emitOutgoingEvent(new ModelLanguageConfigurationChangedEvent(e))})));this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService);this._cursor.updateConfiguration(this.cursorConfig);this._eventDispatcher.emitOutgoingEvent(new ModelLanguageChangedEvent(e))})));this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const eventsCollector=this._eventDispatcher.beginEmitViewEvents();eventsCollector.emitViewEvent(new ViewFlushedEvent);eventsCollector.emitViewEvent(new ViewLineMappingChangedEvent);eventsCollector.emitViewEvent(new ViewDecorationsChangedEvent(null));this._cursor.onLineMappingChanged(eventsCollector);this._decorations.onLineMappingChanged();this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService);this._cursor.updateConfiguration(this.cursorConfig);this._eventDispatcher.emitOutgoingEvent(new ModelOptionsChangedEvent(e))})));this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged();this._eventDispatcher.emitSingleViewEvent(new ViewDecorationsChangedEvent(e));this._eventDispatcher.emitOutgoingEvent(new ModelDecorationsChangedEvent(e))})))}setHiddenAreas(ranges,source){this.hiddenAreasModel.setHiddenAreas(source,ranges);const mergedRanges=this.hiddenAreasModel.getMergedRanges();if(mergedRanges===this.previousHiddenAreas){return}this.previousHiddenAreas=mergedRanges;const stableViewport=this._captureStableViewport();let lineMappingChanged=false;try{const eventsCollector=this._eventDispatcher.beginEmitViewEvents();lineMappingChanged=this._lines.setHiddenAreas(mergedRanges);if(lineMappingChanged){eventsCollector.emitViewEvent(new ViewFlushedEvent);eventsCollector.emitViewEvent(new ViewLineMappingChangedEvent);eventsCollector.emitViewEvent(new ViewDecorationsChangedEvent(null));this._cursor.onLineMappingChanged(eventsCollector);this._decorations.onLineMappingChanged();this.viewLayout.onFlushed(this.getLineCount());this.viewLayout.onHeightMaybeChanged()}stableViewport.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule();if(lineMappingChanged){this._eventDispatcher.emitOutgoingEvent(new HiddenAreasChangedEvent)}}getVisibleRangesPlusViewportAboveBelow(){const layoutInfo=this._configuration.options.get(142);const lineHeight=this._configuration.options.get(65);const linesAround=Math.max(20,Math.round(layoutInfo.height/lineHeight));const partialData=this.viewLayout.getLinesViewportData();const startViewLineNumber=Math.max(1,partialData.completelyVisibleStartLineNumber-linesAround);const endViewLineNumber=Math.min(this.getLineCount(),partialData.completelyVisibleEndLineNumber+linesAround);return this._toModelVisibleRanges(new Range(startViewLineNumber,this.getLineMinColumn(startViewLineNumber),endViewLineNumber,this.getLineMaxColumn(endViewLineNumber)))}getVisibleRanges(){const visibleViewRange=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(visibleViewRange)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(visibleViewRange){const visibleRange=this.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange);const hiddenAreas=this._lines.getHiddenAreas();if(hiddenAreas.length===0){return[visibleRange]}const result=[];let resultLen=0;let startLineNumber=visibleRange.startLineNumber;let startColumn=visibleRange.startColumn;const endLineNumber=visibleRange.endLineNumber;const endColumn=visibleRange.endColumn;for(let i=0,len=hiddenAreas.length;iendLineNumber){continue}if(startLineNumberd.toInlineDecoration(lineNumber)))]}return new ViewLineRenderingData(lineData.minColumn,lineData.maxColumn,lineData.content,lineData.continuesWithWrappedLine,mightContainRTL,mightContainNonBasicASCII,lineData.tokens,inlineDecorations,tabSize,lineData.startVisibleColumn)}getViewLineData(lineNumber){return this._lines.getViewLineData(lineNumber)}getMinimapLinesRenderingData(startLineNumber,endLineNumber,needed){const result=this._lines.getViewLinesData(startLineNumber,endLineNumber,needed);return new MinimapLinesRenderingData(this.getTabSize(),result)}getAllOverviewRulerDecorations(theme){const decorations=this.model.getOverviewRulerDecorations(this._editorId,filterValidationDecorations(this._configuration.options));const result=new OverviewRulerDecorations;for(const decoration2 of decorations){const decorationOptions=decoration2.options;const opts=decorationOptions.overviewRuler;if(!opts){continue}const lane=opts.position;if(lane===0){continue}const color=opts.getColor(theme.value);const viewStartLineNumber=this.coordinatesConverter.getViewLineNumberOfModelPosition(decoration2.range.startLineNumber,decoration2.range.startColumn);const viewEndLineNumber=this.coordinatesConverter.getViewLineNumberOfModelPosition(decoration2.range.endLineNumber,decoration2.range.endColumn);result.accept(color,decorationOptions.zIndex,viewStartLineNumber,viewEndLineNumber,lane)}return result.asArray}_invalidateDecorationsColorCache(){const decorations=this.model.getOverviewRulerDecorations();for(const decoration2 of decorations){const opts1=decoration2.options.overviewRuler;opts1===null||opts1===void 0?void 0:opts1.invalidateCachedColor();const opts2=decoration2.options.minimap;opts2===null||opts2===void 0?void 0:opts2.invalidateCachedColor()}}getValueInRange(range2,eol){const modelRange=this.coordinatesConverter.convertViewRangeToModelRange(range2);return this.model.getValueInRange(modelRange,eol)}getValueLengthInRange(range2,eol){const modelRange=this.coordinatesConverter.convertViewRangeToModelRange(range2);return this.model.getValueLengthInRange(modelRange,eol)}modifyPosition(position,offset){const modelPosition=this.coordinatesConverter.convertViewPositionToModelPosition(position);return this.model.modifyPosition(modelPosition,offset)}deduceModelPositionRelativeToViewPosition(viewAnchorPosition,deltaOffset,lineFeedCnt){const modelAnchor=this.coordinatesConverter.convertViewPositionToModelPosition(viewAnchorPosition);if(this.model.getEOL().length===2){if(deltaOffset<0){deltaOffset-=lineFeedCnt}else{deltaOffset+=lineFeedCnt}}const modelAnchorOffset=this.model.getOffsetAt(modelAnchor);const resultOffset=modelAnchorOffset+deltaOffset;return this.model.getPositionAt(resultOffset)}getPlainTextToCopy(modelRanges,emptySelectionClipboard,forceCRLF){const newLineCharacter=forceCRLF?"\r\n":this.model.getEOL();modelRanges=modelRanges.slice(0);modelRanges.sort(Range.compareRangesUsingStarts);let hasEmptyRange=false;let hasNonEmptyRange=false;for(const range2 of modelRanges){if(range2.isEmpty()){hasEmptyRange=true}else{hasNonEmptyRange=true}}if(!hasNonEmptyRange){if(!emptySelectionClipboard){return""}const modelLineNumbers=modelRanges.map((r=>r.startLineNumber));let result2="";for(let i=0;i0&&modelLineNumbers[i-1]===modelLineNumbers[i]){continue}result2+=this.model.getLineContent(modelLineNumbers[i])+newLineCharacter}return result2}if(hasEmptyRange&&emptySelectionClipboard){const result2=[];let prevModelLineNumber=0;for(const modelRange of modelRanges){const modelLineNumber=modelRange.startLineNumber;if(modelRange.isEmpty()){if(modelLineNumber!==prevModelLineNumber){result2.push(this.model.getLineContent(modelLineNumber))}}else{result2.push(this.model.getValueInRange(modelRange,forceCRLF?2:0))}prevModelLineNumber=modelLineNumber}return result2.length===1?result2[0]:result2}const result=[];for(const modelRange of modelRanges){if(!modelRange.isEmpty()){result.push(this.model.getValueInRange(modelRange,forceCRLF?2:0))}}return result.length===1?result[0]:result}getRichTextToCopy(modelRanges,emptySelectionClipboard){const languageId=this.model.getLanguageId();if(languageId===PLAINTEXT_LANGUAGE_ID){return null}if(modelRanges.length!==1){return null}let range2=modelRanges[0];if(range2.isEmpty()){if(!emptySelectionClipboard){return null}const lineNumber=range2.startLineNumber;range2=new Range(lineNumber,this.model.getLineMinColumn(lineNumber),lineNumber,this.model.getLineMaxColumn(lineNumber))}const fontInfo=this._configuration.options.get(49);const colorMap=this._getColorMap();const hasBadChars=/[:;\\\/<>]/.test(fontInfo.fontFamily);const useDefaultFontFamily=hasBadChars||fontInfo.fontFamily===EDITOR_FONT_DEFAULTS.fontFamily;let fontFamily;if(useDefaultFontFamily){fontFamily=EDITOR_FONT_DEFAULTS.fontFamily}else{fontFamily=fontInfo.fontFamily;fontFamily=fontFamily.replace(/"/g,"'");const hasQuotesOrIsList=/[,']/.test(fontFamily);if(!hasQuotesOrIsList){const needsQuotes=/[+ ]/.test(fontFamily);if(needsQuotes){fontFamily=`'${fontFamily}'`}}fontFamily=`${fontFamily}, ${EDITOR_FONT_DEFAULTS.fontFamily}`}return{mode:languageId,html:`
    `+this._getHTMLToCopy(range2,colorMap)+"
    "}}_getHTMLToCopy(modelRange,colorMap){const startLineNumber=modelRange.startLineNumber;const startColumn=modelRange.startColumn;const endLineNumber=modelRange.endLineNumber;const endColumn=modelRange.endColumn;const tabSize=this.getTabSize();let result="";for(let lineNumber=startLineNumber;lineNumber<=endLineNumber;lineNumber++){const lineTokens=this.model.tokenization.getLineTokens(lineNumber);const lineContent=lineTokens.getLineContent();const startOffset=lineNumber===startLineNumber?startColumn-1:0;const endOffset=lineNumber===endLineNumber?endColumn-1:lineContent.length;if(lineContent===""){result+="
    "}else{result+=tokenizeLineToHTML(lineContent,lineTokens.inflate(),colorMap,startOffset,endOffset,tabSize,isWindows)}}return result}_getColorMap(){const colorMap=TokenizationRegistry2.getColorMap();const result=["#000000"];if(colorMap){for(let i=1,len=colorMap.length;ithis._cursor.setStates(eventsCollector,source,reason,states)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(columnSelectData){this._cursor.setCursorColumnSelectData(columnSelectData)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(type){this._cursor.setPrevEditOperationType(type)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(source,selections,reason=0){this._withViewEventsCollector((eventsCollector=>this._cursor.setSelections(eventsCollector,source,selections,reason)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(states){this._withViewEventsCollector((eventsCollector=>this._cursor.restoreState(eventsCollector,states)))}_executeCursorEdit(callback){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new ReadOnlyEditAttemptEvent);return}this._withViewEventsCollector(callback)}executeEdits(source,edits,cursorStateComputer){this._executeCursorEdit((eventsCollector=>this._cursor.executeEdits(eventsCollector,source,edits,cursorStateComputer)))}startComposition(){this._executeCursorEdit((eventsCollector=>this._cursor.startComposition(eventsCollector)))}endComposition(source){this._executeCursorEdit((eventsCollector=>this._cursor.endComposition(eventsCollector,source)))}type(text2,source){this._executeCursorEdit((eventsCollector=>this._cursor.type(eventsCollector,text2,source)))}compositionType(text2,replacePrevCharCnt,replaceNextCharCnt,positionDelta,source){this._executeCursorEdit((eventsCollector=>this._cursor.compositionType(eventsCollector,text2,replacePrevCharCnt,replaceNextCharCnt,positionDelta,source)))}paste(text2,pasteOnNewLine,multicursorText,source){this._executeCursorEdit((eventsCollector=>this._cursor.paste(eventsCollector,text2,pasteOnNewLine,multicursorText,source)))}cut(source){this._executeCursorEdit((eventsCollector=>this._cursor.cut(eventsCollector,source)))}executeCommand(command,source){this._executeCursorEdit((eventsCollector=>this._cursor.executeCommand(eventsCollector,command,source)))}executeCommands(commands,source){this._executeCursorEdit((eventsCollector=>this._cursor.executeCommands(eventsCollector,commands,source)))}revealPrimaryCursor(source,revealHorizontal,minimalReveal=false){this._withViewEventsCollector((eventsCollector=>this._cursor.revealPrimary(eventsCollector,source,minimalReveal,0,revealHorizontal,0)))}revealTopMostCursor(source){const viewPosition=this._cursor.getTopMostViewPosition();const viewRange=new Range(viewPosition.lineNumber,viewPosition.column,viewPosition.lineNumber,viewPosition.column);this._withViewEventsCollector((eventsCollector=>eventsCollector.emitViewEvent(new ViewRevealRangeRequestEvent(source,false,viewRange,null,0,true,0))))}revealBottomMostCursor(source){const viewPosition=this._cursor.getBottomMostViewPosition();const viewRange=new Range(viewPosition.lineNumber,viewPosition.column,viewPosition.lineNumber,viewPosition.column);this._withViewEventsCollector((eventsCollector=>eventsCollector.emitViewEvent(new ViewRevealRangeRequestEvent(source,false,viewRange,null,0,true,0))))}revealRange(source,revealHorizontal,viewRange,verticalType,scrollType){this._withViewEventsCollector((eventsCollector=>eventsCollector.emitViewEvent(new ViewRevealRangeRequestEvent(source,false,viewRange,null,verticalType,revealHorizontal,scrollType))))}changeWhitespace(callback){const hadAChange=this.viewLayout.changeWhitespace(callback);if(hadAChange){this._eventDispatcher.emitSingleViewEvent(new ViewZonesChangedEvent);this._eventDispatcher.emitOutgoingEvent(new ViewZonesChangedEvent2)}}_withViewEventsCollector(callback){try{const eventsCollector=this._eventDispatcher.beginEmitViewEvents();return callback(eventsCollector)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(position,affinity){return this._lines.normalizePosition(position,affinity)}getLineIndentColumn(lineNumber){return this._lines.getLineIndentColumn(lineNumber)}};ViewportStart=class{static create(model){const viewportStartLineTrackedRange=model._setTrackedRange(null,new Range(1,1,1,1),1);return new ViewportStart(model,1,false,viewportStartLineTrackedRange,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(_model,_viewLineNumber,_isValid,_modelTrackedRange,_startLineDelta){this._model=_model;this._viewLineNumber=_viewLineNumber;this._isValid=_isValid;this._modelTrackedRange=_modelTrackedRange;this._startLineDelta=_startLineDelta}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(viewModel,startLineNumber){const position=viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Position(startLineNumber,viewModel.getLineMinColumn(startLineNumber)));const viewportStartLineTrackedRange=viewModel.model._setTrackedRange(this._modelTrackedRange,new Range(position.lineNumber,position.column,position.lineNumber,position.column),1);const viewportStartLineTop=viewModel.viewLayout.getVerticalOffsetForLineNumber(startLineNumber);const scrollTop=viewModel.viewLayout.getCurrentScrollTop();this._viewLineNumber=startLineNumber;this._isValid=true;this._modelTrackedRange=viewportStartLineTrackedRange;this._startLineDelta=scrollTop-viewportStartLineTop}invalidate(){this._isValid=false}};OverviewRulerDecorations=class{constructor(){this._asMap=Object.create(null);this.asArray=[]}accept(color,zIndex,startLineNumber,endLineNumber,lane){const prevGroup=this._asMap[color];if(prevGroup){const prevData=prevGroup.data;const prevLane=prevData[prevData.length-3];const prevEndLineNumber=prevData[prevData.length-1];if(prevLane===lane&&prevEndLineNumber+1>=startLineNumber){if(endLineNumber>prevEndLineNumber){prevData[prevData.length-1]=endLineNumber}return}prevData.push(lane,startLineNumber,endLineNumber)}else{const group3=new OverviewRulerDecorationsGroup(color,zIndex,[lane,startLineNumber,endLineNumber]);this._asMap[color]=group3;this.asArray.push(group3)}}};HiddenAreasModel=class{constructor(){this.hiddenAreas=new Map;this.shouldRecompute=false;this.ranges=[]}setHiddenAreas(source,ranges){const existing=this.hiddenAreas.get(source);if(existing&&rangeArraysEqual(existing,ranges)){return}this.hiddenAreas.set(source,ranges);this.shouldRecompute=true}getMergedRanges(){if(!this.shouldRecompute){return this.ranges}this.shouldRecompute=false;const newRanges=Array.from(this.hiddenAreas.values()).reduce(((r,hiddenAreas)=>mergeLineRangeArray(r,hiddenAreas)),[]);if(rangeArraysEqual(this.ranges,newRanges)){return this.ranges}this.ranges=newRanges;return this.ranges}};StableViewport=class{constructor(viewportStartModelPosition,startLineDelta){this.viewportStartModelPosition=viewportStartModelPosition;this.startLineDelta=startLineDelta}recoverViewportStart(coordinatesConverter,viewLayout){if(!this.viewportStartModelPosition){return}const viewPosition=coordinatesConverter.convertModelPositionToViewPosition(this.viewportStartModelPosition);const viewPositionTop=viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber);viewLayout.setScrollPosition({scrollTop:viewPositionTop+this.startLineDelta},1)}}}});var ServiceCollection;var init_serviceCollection=__esm({"node_modules/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js"(){ServiceCollection=class{constructor(...entries2){this._entries=new Map;for(const[id,service]of entries2){this.set(id,service)}}set(id,instanceOrDescriptor){const result=this._entries.get(id);this._entries.set(id,instanceOrDescriptor);return result}get(id){return this._entries.get(id)}}}});var Severity,severity_default;var init_severity=__esm({"node_modules/monaco-editor/esm/vs/base/common/severity.js"(){init_strings();(function(Severity3){Severity3[Severity3["Ignore"]=0]="Ignore";Severity3[Severity3["Info"]=1]="Info";Severity3[Severity3["Warning"]=2]="Warning";Severity3[Severity3["Error"]=3]="Error"})(Severity||(Severity={}));(function(Severity3){const _error="error";const _warning="warning";const _warn="warn";const _info="info";const _ignore="ignore";function fromValue(value){if(!value){return Severity3.Ignore}if(equalsIgnoreCase(_error,value)){return Severity3.Error}if(equalsIgnoreCase(_warning,value)||equalsIgnoreCase(_warn,value)){return Severity3.Warning}if(equalsIgnoreCase(_info,value)){return Severity3.Info}return Severity3.Ignore}Severity3.fromValue=fromValue;function toString(severity){switch(severity){case Severity3.Error:return _error;case Severity3.Warning:return _warning;case Severity3.Info:return _info;default:return _ignore}}Severity3.toString=toString})(Severity||(Severity={}));severity_default=Severity}});var Severity2,INotificationService,NoOpNotification;var init_notification=__esm({"node_modules/monaco-editor/esm/vs/platform/notification/common/notification.js"(){init_severity();init_instantiation();Severity2=severity_default;INotificationService=createDecorator("notificationService");NoOpNotification=class{}}});function hasRightCursorStop(cursorStop){if(cursorStop===null||cursorStop===void 0){return true}return cursorStop===InjectedTextCursorStops2.Right||cursorStop===InjectedTextCursorStops2.Both}function hasLeftCursorStop(cursorStop){if(cursorStop===null||cursorStop===void 0){return true}return cursorStop===InjectedTextCursorStops2.Left||cursorStop===InjectedTextCursorStops2.Both}var ModelLineProjectionData,OutputPosition;var init_modelLineProjectionData=__esm({"node_modules/monaco-editor/esm/vs/editor/common/modelLineProjectionData.js"(){init_assert();init_position();init_model();ModelLineProjectionData=class{constructor(injectionOffsets,injectionOptions,breakOffsets,breakOffsetsVisibleColumn,wrappedTextIndentLength){this.injectionOffsets=injectionOffsets;this.injectionOptions=injectionOptions;this.breakOffsets=breakOffsets;this.breakOffsetsVisibleColumn=breakOffsetsVisibleColumn;this.wrappedTextIndentLength=wrappedTextIndentLength}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(outputLineIndex){if(outputLineIndex>0){return this.wrappedTextIndentLength}return 0}getLineLength(outputLineIndex){const startOffset=outputLineIndex>0?this.breakOffsets[outputLineIndex-1]:0;const endOffset=this.breakOffsets[outputLineIndex];let lineLength=endOffset-startOffset;if(outputLineIndex>0){lineLength+=this.wrappedTextIndentLength}return lineLength}getMaxOutputOffset(outputLineIndex){return this.getLineLength(outputLineIndex)}translateToInputOffset(outputLineIndex,outputOffset){if(outputLineIndex>0){outputOffset=Math.max(0,outputOffset-this.wrappedTextIndentLength)}const offsetInInputWithInjection=outputLineIndex===0?outputOffset:this.breakOffsets[outputLineIndex-1]+outputOffset;let offsetInInput=offsetInInputWithInjection;if(this.injectionOffsets!==null){for(let i=0;ithis.injectionOffsets[i]){if(offsetInInput0?this.breakOffsets[mid-1]:0;if(affinity===0){if(offsetInInputWithInjections<=midStart){high=mid-1}else if(offsetInInputWithInjections>midStop){low=mid+1}else{break}}else{if(offsetInInputWithInjections=midStop){low=mid+1}else{break}}}let outputOffset=offsetInInputWithInjections-midStart;if(mid>0){outputOffset+=this.wrappedTextIndentLength}return new OutputPosition(mid,outputOffset)}normalizeOutputPosition(outputLineIndex,outputOffset,affinity){if(this.injectionOffsets!==null){const offsetInInputWithInjections=this.outputPositionToOffsetInInputWithInjections(outputLineIndex,outputOffset);const normalizedOffsetInUnwrappedLine=this.normalizeOffsetInInputWithInjectionsAroundInjections(offsetInInputWithInjections,affinity);if(normalizedOffsetInUnwrappedLine!==offsetInInputWithInjections){return this.offsetInInputWithInjectionsToOutputPosition(normalizedOffsetInUnwrappedLine,affinity)}}if(affinity===0){if(outputLineIndex>0&&outputOffset===this.getMinOutputOffset(outputLineIndex)){return new OutputPosition(outputLineIndex-1,this.getMaxOutputOffset(outputLineIndex-1))}}else if(affinity===1){const maxOutputLineIndex=this.getOutputLineCount()-1;if(outputLineIndex0){outputOffset=Math.max(0,outputOffset-this.wrappedTextIndentLength)}const result=(outputLineIndex>0?this.breakOffsets[outputLineIndex-1]:0)+outputOffset;return result}normalizeOffsetInInputWithInjectionsAroundInjections(offsetInInputWithInjections,affinity){const injectedText=this.getInjectedTextAtOffset(offsetInInputWithInjections);if(!injectedText){return offsetInInputWithInjections}if(affinity===2){if(offsetInInputWithInjections===injectedText.offsetInInputWithInjections+injectedText.length&&hasRightCursorStop(this.injectionOptions[injectedText.injectedTextIndex].cursorStops)){return injectedText.offsetInInputWithInjections+injectedText.length}else{let result=injectedText.offsetInInputWithInjections;if(hasLeftCursorStop(this.injectionOptions[injectedText.injectedTextIndex].cursorStops)){return result}let index=injectedText.injectedTextIndex-1;while(index>=0&&this.injectionOffsets[index]===this.injectionOffsets[injectedText.injectedTextIndex]){if(hasRightCursorStop(this.injectionOptions[index].cursorStops)){break}result-=this.injectionOptions[index].content.length;if(hasLeftCursorStop(this.injectionOptions[index].cursorStops)){break}index--}return result}}else if(affinity===1||affinity===4){let result=injectedText.offsetInInputWithInjections+injectedText.length;let index=injectedText.injectedTextIndex;while(index+1=0&&this.injectionOffsets[index-1]===this.injectionOffsets[index]){result-=this.injectionOptions[index-1].content.length;index--}return result}assertNever(affinity)}getInjectedText(outputLineIndex,outputOffset){const offset=this.outputPositionToOffsetInInputWithInjections(outputLineIndex,outputOffset);const injectedText=this.getInjectedTextAtOffset(offset);if(!injectedText){return null}return{options:this.injectionOptions[injectedText.injectedTextIndex]}}getInjectedTextAtOffset(offsetInInputWithInjections){const injectionOffsets=this.injectionOffsets;const injectionOptions=this.injectionOptions;if(injectionOffsets!==null){let totalInjectedTextLengthBefore=0;for(let i=0;ioffsetInInputWithInjections){break}if(offsetInInputWithInjections<=injectedTextEndOffsetInInputWithInjections){return{injectedTextIndex:i,offsetInInputWithInjections:injectedTextStartOffsetInInputWithInjections,length:length2}}totalInjectedTextLengthBefore+=length2}}return void 0}};OutputPosition=class{constructor(outputLineIndex,outputOffset){this.outputLineIndex=outputLineIndex;this.outputOffset=outputOffset}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(baseLineNumber){return new Position(baseLineNumber+this.outputLineIndex,this.outputOffset+1)}}}});function createLineBreaksFromPreviousLineBreaks(classifier,previousBreakingData,lineText,tabSize,firstLineBreakColumn,columnsForFullWidthChar,wrappingIndent,wordBreak){if(firstLineBreakColumn===-1){return null}const len=lineText.length;if(len<=1){return null}const isKeepAll=wordBreak==="keepAll";const prevBreakingOffsets=previousBreakingData.breakOffsets;const prevBreakingOffsetsVisibleColumn=previousBreakingData.breakOffsetsVisibleColumn;const wrappedTextIndentLength=computeWrappedTextIndentLength(lineText,tabSize,firstLineBreakColumn,columnsForFullWidthChar,wrappingIndent);const wrappedLineBreakColumn=firstLineBreakColumn-wrappedTextIndentLength;const breakingOffsets=arrPool1;const breakingOffsetsVisibleColumn=arrPool2;let breakingOffsetsCount=0;let lastBreakingOffset=0;let lastBreakingOffsetVisibleColumn=0;let breakingColumn=firstLineBreakColumn;const prevLen=prevBreakingOffsets.length;let prevIndex=0;if(prevIndex>=0){let bestDistance=Math.abs(prevBreakingOffsetsVisibleColumn[prevIndex]-breakingColumn);while(prevIndex+1=bestDistance){break}bestDistance=distance;prevIndex++}}while(prevIndexprevBreakOffset){prevBreakOffset=lastBreakingOffset;prevBreakOffsetVisibleColumn=lastBreakingOffsetVisibleColumn}let breakOffset=0;let breakOffsetVisibleColumn=0;let forcedBreakOffset=0;let forcedBreakOffsetVisibleColumn=0;if(prevBreakOffsetVisibleColumn<=breakingColumn){let visibleColumn=prevBreakOffsetVisibleColumn;let prevCharCode=prevBreakOffset===0?0:lineText.charCodeAt(prevBreakOffset-1);let prevCharCodeClass=prevBreakOffset===0?0:classifier.get(prevCharCode);let entireLineFits=true;for(let i=prevBreakOffset;ilastBreakingOffset&&canBreak(prevCharCode,prevCharCodeClass,charCode,charCodeClass,isKeepAll)){breakOffset=charStartOffset;breakOffsetVisibleColumn=visibleColumn}visibleColumn+=charWidth;if(visibleColumn>breakingColumn){if(charStartOffset>lastBreakingOffset){forcedBreakOffset=charStartOffset;forcedBreakOffsetVisibleColumn=visibleColumn-charWidth}else{forcedBreakOffset=i+1;forcedBreakOffsetVisibleColumn=visibleColumn}if(visibleColumn-breakOffsetVisibleColumn>wrappedLineBreakColumn){breakOffset=0}entireLineFits=false;break}prevCharCode=charCode;prevCharCodeClass=charCodeClass}if(entireLineFits){if(breakingOffsetsCount>0){breakingOffsets[breakingOffsetsCount]=prevBreakingOffsets[prevBreakingOffsets.length-1];breakingOffsetsVisibleColumn[breakingOffsetsCount]=prevBreakingOffsetsVisibleColumn[prevBreakingOffsets.length-1];breakingOffsetsCount++}break}}if(breakOffset===0){let visibleColumn=prevBreakOffsetVisibleColumn;let charCode=lineText.charCodeAt(prevBreakOffset);let charCodeClass=classifier.get(charCode);let hitATabCharacter=false;for(let i=prevBreakOffset-1;i>=lastBreakingOffset;i--){const charStartOffset=i+1;const prevCharCode=lineText.charCodeAt(i);if(prevCharCode===9){hitATabCharacter=true;break}let prevCharCodeClass;let prevCharWidth;if(isLowSurrogate(prevCharCode)){i--;prevCharCodeClass=0;prevCharWidth=2}else{prevCharCodeClass=classifier.get(prevCharCode);prevCharWidth=isFullWidthCharacter(prevCharCode)?columnsForFullWidthChar:1}if(visibleColumn<=breakingColumn){if(forcedBreakOffset===0){forcedBreakOffset=charStartOffset;forcedBreakOffsetVisibleColumn=visibleColumn}if(visibleColumn<=breakingColumn-wrappedLineBreakColumn){break}if(canBreak(prevCharCode,prevCharCodeClass,charCode,charCodeClass,isKeepAll)){breakOffset=charStartOffset;breakOffsetVisibleColumn=visibleColumn;break}}visibleColumn-=prevCharWidth;charCode=prevCharCode;charCodeClass=prevCharCodeClass}if(breakOffset!==0){const remainingWidthOfNextLine=wrappedLineBreakColumn-(forcedBreakOffsetVisibleColumn-breakOffsetVisibleColumn);if(remainingWidthOfNextLine<=tabSize){const charCodeAtForcedBreakOffset=lineText.charCodeAt(forcedBreakOffset);let charWidth;if(isHighSurrogate(charCodeAtForcedBreakOffset)){charWidth=2}else{charWidth=computeCharWidth(charCodeAtForcedBreakOffset,forcedBreakOffsetVisibleColumn,tabSize,columnsForFullWidthChar)}if(remainingWidthOfNextLine-charWidth<0){breakOffset=0}}}if(hitATabCharacter){prevIndex--;continue}}if(breakOffset===0){breakOffset=forcedBreakOffset;breakOffsetVisibleColumn=forcedBreakOffsetVisibleColumn}if(breakOffset<=lastBreakingOffset){const charCode=lineText.charCodeAt(lastBreakingOffset);if(isHighSurrogate(charCode)){breakOffset=lastBreakingOffset+2;breakOffsetVisibleColumn=lastBreakingOffsetVisibleColumn+2}else{breakOffset=lastBreakingOffset+1;breakOffsetVisibleColumn=lastBreakingOffsetVisibleColumn+computeCharWidth(charCode,lastBreakingOffsetVisibleColumn,tabSize,columnsForFullWidthChar)}}lastBreakingOffset=breakOffset;breakingOffsets[breakingOffsetsCount]=breakOffset;lastBreakingOffsetVisibleColumn=breakOffsetVisibleColumn;breakingOffsetsVisibleColumn[breakingOffsetsCount]=breakOffsetVisibleColumn;breakingOffsetsCount++;breakingColumn=breakOffsetVisibleColumn+wrappedLineBreakColumn;while(prevIndex<0||prevIndex=bestDistance){break}bestDistance=distance;prevIndex++}}if(breakingOffsetsCount===0){return null}breakingOffsets.length=breakingOffsetsCount;breakingOffsetsVisibleColumn.length=breakingOffsetsCount;arrPool1=previousBreakingData.breakOffsets;arrPool2=previousBreakingData.breakOffsetsVisibleColumn;previousBreakingData.breakOffsets=breakingOffsets;previousBreakingData.breakOffsetsVisibleColumn=breakingOffsetsVisibleColumn;previousBreakingData.wrappedTextIndentLength=wrappedTextIndentLength;return previousBreakingData}function createLineBreaks(classifier,_lineText,injectedTexts,tabSize,firstLineBreakColumn,columnsForFullWidthChar,wrappingIndent,wordBreak){const lineText=LineInjectedText.applyInjectedText(_lineText,injectedTexts);let injectionOptions;let injectionOffsets;if(injectedTexts&&injectedTexts.length>0){injectionOptions=injectedTexts.map((t2=>t2.options));injectionOffsets=injectedTexts.map((text2=>text2.column-1))}else{injectionOptions=null;injectionOffsets=null}if(firstLineBreakColumn===-1){if(!injectionOptions){return null}return new ModelLineProjectionData(injectionOffsets,injectionOptions,[lineText.length],[],0)}const len=lineText.length;if(len<=1){if(!injectionOptions){return null}return new ModelLineProjectionData(injectionOffsets,injectionOptions,[lineText.length],[],0)}const isKeepAll=wordBreak==="keepAll";const wrappedTextIndentLength=computeWrappedTextIndentLength(lineText,tabSize,firstLineBreakColumn,columnsForFullWidthChar,wrappingIndent);const wrappedLineBreakColumn=firstLineBreakColumn-wrappedTextIndentLength;const breakingOffsets=[];const breakingOffsetsVisibleColumn=[];let breakingOffsetsCount=0;let breakOffset=0;let breakOffsetVisibleColumn=0;let breakingColumn=firstLineBreakColumn;let prevCharCode=lineText.charCodeAt(0);let prevCharCodeClass=classifier.get(prevCharCode);let visibleColumn=computeCharWidth(prevCharCode,0,tabSize,columnsForFullWidthChar);let startOffset=1;if(isHighSurrogate(prevCharCode)){visibleColumn+=1;prevCharCode=lineText.charCodeAt(1);prevCharCodeClass=classifier.get(prevCharCode);startOffset++}for(let i=startOffset;ibreakingColumn){if(breakOffset===0||visibleColumn-breakOffsetVisibleColumn>wrappedLineBreakColumn){breakOffset=charStartOffset;breakOffsetVisibleColumn=visibleColumn-charWidth}breakingOffsets[breakingOffsetsCount]=breakOffset;breakingOffsetsVisibleColumn[breakingOffsetsCount]=breakOffsetVisibleColumn;breakingOffsetsCount++;breakingColumn=breakOffsetVisibleColumn+wrappedLineBreakColumn;breakOffset=0}prevCharCode=charCode;prevCharCodeClass=charCodeClass}if(breakingOffsetsCount===0&&(!injectedTexts||injectedTexts.length===0)){return null}breakingOffsets[breakingOffsetsCount]=len;breakingOffsetsVisibleColumn[breakingOffsetsCount]=visibleColumn;return new ModelLineProjectionData(injectionOffsets,injectionOptions,breakingOffsets,breakingOffsetsVisibleColumn,wrappedTextIndentLength)}function computeCharWidth(charCode,visibleColumn,tabSize,columnsForFullWidthChar){if(charCode===9){return tabSize-visibleColumn%tabSize}if(isFullWidthCharacter(charCode)){return columnsForFullWidthChar}if(charCode<32){return columnsForFullWidthChar}return 1}function tabCharacterWidth(visibleColumn,tabSize){return tabSize-visibleColumn%tabSize}function canBreak(prevCharCode,prevCharCodeClass,charCode,charCodeClass,isKeepAll){return charCode!==32&&(prevCharCodeClass===2&&charCodeClass!==2||prevCharCodeClass!==1&&charCodeClass===1||!isKeepAll&&prevCharCodeClass===3&&charCodeClass!==2||!isKeepAll&&charCodeClass===3&&prevCharCodeClass!==1)}function computeWrappedTextIndentLength(lineText,tabSize,firstLineBreakColumn,columnsForFullWidthChar,wrappingIndent){let wrappedTextIndentLength=0;if(wrappingIndent!==0){const firstNonWhitespaceIndex2=firstNonWhitespaceIndex(lineText);if(firstNonWhitespaceIndex2!==-1){for(let i=0;ifirstLineBreakColumn){wrappedTextIndentLength=0}}}return wrappedTextIndentLength}var MonospaceLineBreaksComputerFactory,WrappingCharacterClassifier,arrPool1,arrPool2;var init_monospaceLineBreaksComputer=__esm({"node_modules/monaco-editor/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js"(){init_strings();init_characterClassifier();init_textModelEvents();init_modelLineProjectionData();MonospaceLineBreaksComputerFactory=class{static create(options2){return new MonospaceLineBreaksComputerFactory(options2.get(131),options2.get(130))}constructor(breakBeforeChars,breakAfterChars){this.classifier=new WrappingCharacterClassifier(breakBeforeChars,breakAfterChars)}createLineBreaksComputer(fontInfo,tabSize,wrappingColumn,wrappingIndent,wordBreak){const requests=[];const injectedTexts=[];const previousBreakingData=[];return{addRequest:(lineText,injectedText,previousLineBreakData)=>{requests.push(lineText);injectedTexts.push(injectedText);previousBreakingData.push(previousLineBreakData)},finalize:()=>{const columnsForFullWidthChar=fontInfo.typicalFullwidthCharacterWidth/fontInfo.typicalHalfwidthCharacterWidth;const result=[];for(let i=0,len=requests.length;i=0&&charCode<256){return this._asciiMap[charCode]}else{if(charCode>=12352&&charCode<=12543||charCode>=13312&&charCode<=19903||charCode>=19968&&charCode<=40959){return 3}return this._map.get(charCode)||this._defaultValue}}};arrPool1=[];arrPool2=[]}});function createLineBreaks2(requests,fontInfo,tabSize,firstLineBreakColumn,wrappingIndent,wordBreak,injectedTextsPerLine){var _a6;function createEmptyLineBreakWithPossiblyInjectedText(requestIdx){const injectedTexts=injectedTextsPerLine[requestIdx];if(injectedTexts){const lineText=LineInjectedText.applyInjectedText(requests[requestIdx],injectedTexts);const injectionOptions=injectedTexts.map((t2=>t2.options));const injectionOffsets=injectedTexts.map((text2=>text2.column-1));return new ModelLineProjectionData(injectionOffsets,injectionOptions,[lineText.length],[],0)}else{return null}}if(firstLineBreakColumn===-1){const result2=[];for(let i=0,len=requests.length;ioverallWidth){firstNonWhitespaceIndex2=0;wrappedTextIndentLength=0}else{width=overallWidth-indentWidth}}}const renderLineContent=lineContent.substr(firstNonWhitespaceIndex2);const tmp=renderLine(renderLineContent,wrappedTextIndentLength,tabSize,width,sb,additionalIndentLength);firstNonWhitespaceIndices[i]=firstNonWhitespaceIndex2;wrappedTextIndentLengths[i]=wrappedTextIndentLength;renderLineContents[i]=renderLineContent;allCharOffsets[i]=tmp[0];allVisibleColumns[i]=tmp[1]}const html2=sb.build();const trustedhtml=(_a6=ttPolicy3===null||ttPolicy3===void 0?void 0:ttPolicy3.createHTML(html2))!==null&&_a6!==void 0?_a6:html2;containerDomNode.innerHTML=trustedhtml;containerDomNode.style.position="absolute";containerDomNode.style.top="10000";if(wordBreak==="keepAll"){containerDomNode.style.wordBreak="keep-all";containerDomNode.style.overflowWrap="anywhere"}else{containerDomNode.style.wordBreak="inherit";containerDomNode.style.overflowWrap="break-word"}document.body.appendChild(containerDomNode);const range2=document.createRange();const lineDomNodes=Array.prototype.slice.call(containerDomNode.children,0);const result=[];for(let i=0;it2.options));injectionOffsets=curInjectedTexts.map((text2=>text2.column-1))}else{injectionOptions=null;injectionOffsets=null}result[i]=new ModelLineProjectionData(injectionOffsets,injectionOptions,breakOffsets,breakOffsetsVisibleColumn,wrappedTextIndentLength)}document.body.removeChild(containerDomNode);return result}function renderLine(lineContent,initialVisibleColumn,tabSize,width,sb,wrappingIndentLength){if(wrappingIndentLength!==0){const hangingOffset=String(wrappingIndentLength);sb.appendString('
    ');const len=lineContent.length;let visibleColumn=initialVisibleColumn;let charOffset=0;const charOffsets=[];const visibleColumns=[];let nextCharCode=0");for(let charIndex=0;charIndex")}charOffsets[charIndex]=charOffset;visibleColumns[charIndex]=visibleColumn;const charCode=nextCharCode;nextCharCode=charIndex+1");charOffsets[lineContent.length]=charOffset;visibleColumns[lineContent.length]=visibleColumn;sb.appendString("
    ");return[charOffsets,visibleColumns]}function readLineBreaks(range2,lineDomNode,lineContent,charOffsets){if(lineContent.length<=1){return null}const spans=Array.prototype.slice.call(lineDomNode.children,0);const breakOffsets=[];try{discoverBreaks(range2,spans,charOffsets,0,null,lineContent.length-1,null,breakOffsets)}catch(err){console.log(err);return null}if(breakOffsets.length===0){return null}breakOffsets.push(lineContent.length);return breakOffsets}function discoverBreaks(range2,spans,charOffsets,low,lowRects,high,highRects,result){if(low===high){return}lowRects=lowRects||readClientRect(range2,spans,charOffsets[low],charOffsets[low+1]);highRects=highRects||readClientRect(range2,spans,charOffsets[high],charOffsets[high+1]);if(Math.abs(lowRects[0].top-highRects[0].top)<=.1){return}if(low+1===high){result.push(high);return}const mid=low+(high-low)/2|0;const midRects=readClientRect(range2,spans,charOffsets[mid],charOffsets[mid+1]);discoverBreaks(range2,spans,charOffsets,low,lowRects,mid,midRects,result);discoverBreaks(range2,spans,charOffsets,mid,midRects,high,highRects,result)}function readClientRect(range2,spans,startOffset,endOffset){range2.setStart(spans[startOffset/16384|0].firstChild,startOffset%16384);range2.setEnd(spans[endOffset/16384|0].firstChild,endOffset%16384);return range2.getClientRects()}var ttPolicy3,DOMLineBreaksComputerFactory;var init_domLineBreaksComputer=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/view/domLineBreaksComputer.js"(){init_trustedTypes();init_strings();init_domFontInfo();init_stringBuilder();init_modelLineProjectionData();init_textModelEvents();ttPolicy3=createTrustedTypesPolicy("domLineBreaksComputer",{createHTML:value=>value});DOMLineBreaksComputerFactory=class{static create(){return new DOMLineBreaksComputerFactory}constructor(){}createLineBreaksComputer(fontInfo,tabSize,wrappingColumn,wrappingIndent,wordBreak){const requests=[];const injectedTexts=[];return{addRequest:(lineText,injectedText,previousLineBreakData)=>{requests.push(lineText);injectedTexts.push(injectedText)},finalize:()=>createLineBreaks2(requests,fontInfo,tabSize,wrappingColumn,wrappingIndent,wordBreak,injectedTexts)}}}}});function findFocusedDiffEditor(accessor){var _a6;const codeEditorService=accessor.get(ICodeEditorService);const diffEditors=codeEditorService.listDiffEditors();const activeCodeEditor=(_a6=codeEditorService.getFocusedCodeEditor())!==null&&_a6!==void 0?_a6:codeEditorService.getActiveCodeEditor();if(!activeCodeEditor){return null}for(let i=0,len=diffEditors.length;i{this._instantiateSome(1)})));this._register(runWhenIdle((()=>{this._instantiateSome(2)})));this._register(runWhenIdle((()=>{this._instantiateSome(3)}),5e3))}saveViewState(){const contributionsState={};for(const[id,contribution]of this._instances){if(typeof contribution.saveViewState==="function"){contributionsState[id]=contribution.saveViewState()}}return contributionsState}restoreViewState(contributionsState){for(const[id,contribution]of this._instances){if(typeof contribution.restoreViewState==="function"){contribution.restoreViewState(contributionsState[id])}}}get(id){this._instantiateById(id);return this._instances.get(id)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){this._register(runWhenIdle((()=>{this._instantiateSome(1)}),50))}_instantiateSome(instantiation){if(this._finishedInstantiation[instantiation]){return}this._finishedInstantiation[instantiation]=true;const contribs=this._findPendingContributionsByInstantiation(instantiation);for(const contrib of contribs){this._instantiateById(contrib.id)}}_findPendingContributionsByInstantiation(instantiation){const result=[];for(const[,desc]of this._pending){if(desc.instantiation===instantiation){result.push(desc)}}return result}_instantiateById(id){const desc=this._pending.get(id);if(!desc){return}this._pending.delete(id);if(!this._instantiationService||!this._editor){throw new Error(`Cannot instantiate contributions before being initialized!`)}try{const instance=this._instantiationService.createInstance(desc.ctor,this._editor);this._instances.set(desc.id,instance);if(typeof instance.restoreViewState==="function"&&desc.instantiation!==0){console.warn(`Editor contribution '${desc.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}}catch(err){onUnexpectedError(err)}}}}});function getSquigglySVGData(color){return squigglyStart+encodeURIComponent(color.toString())+squigglyEnd}function getDotDotDotSVGData(color){return dotdotdotStart+encodeURIComponent(color.toString())+dotdotdotEnd}var __decorate13,__param12,__awaiter8,CodeEditorWidget_1,EDITOR_ID,ModelData,CodeEditorWidget,BooleanEventEmitter,InteractionEmitter,EditorContextKeysManager,EditorModeContext,CodeEditorWidgetFocusTracker,EditorDecorationsCollection,squigglyStart,squigglyEnd,dotdotdotStart,dotdotdotEnd;var init_codeEditorWidget=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/codeEditorWidget.js"(){init_markerDecorations2();init_3();init_nls();init_dom();init_errors();init_event();init_lifecycle();init_network();init_editorConfiguration();init_editorExtensions();init_codeEditorService();init_view();init_viewUserInputEvents();init_editorOptions();init_cursorColumns();init_position();init_range();init_selection();init_editorAction();init_editorCommon();init_editorContextKeys();init_textModel();init_editorColorRegistry();init_colorRegistry();init_viewModelImpl();init_commands();init_contextkey();init_instantiation();init_serviceCollection();init_notification();init_themeService();init_accessibility();init_monospaceLineBreaksComputer();init_domLineBreaksComputer();init_cursorWordOperations();init_languageConfigurationRegistry();init_domFontInfo();init_languageFeatures();init_codeEditorContributions();init_tabFocus();__decorate13=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param12=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter8=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};EDITOR_ID=0;ModelData=class{constructor(model,viewModel,view,hasRealView,listenersToRemove,attachedView){this.model=model;this.viewModel=viewModel;this.view=view;this.hasRealView=hasRealView;this.listenersToRemove=listenersToRemove;this.attachedView=attachedView}dispose(){dispose(this.listenersToRemove);this.model.onBeforeDetached(this.attachedView);if(this.hasRealView){this.view.dispose()}this.viewModel.dispose()}};CodeEditorWidget=CodeEditorWidget_1=class CodeEditorWidget2 extends Disposable{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(domElement,_options,codeEditorWidgetOptions,instantiationService,codeEditorService,commandService,contextKeyService,themeService,notificationService,accessibilityService,languageConfigurationService,languageFeaturesService){var _a6;super();this.languageConfigurationService=languageConfigurationService;this._deliveryQueue=createEventDeliveryQueue();this._contributions=this._register(new CodeEditorContributions);this._onDidDispose=this._register(new Emitter);this.onDidDispose=this._onDidDispose.event;this._onDidChangeModelContent=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidChangeModelContent=this._onDidChangeModelContent.event;this._onDidChangeModelLanguage=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event;this._onDidChangeModelLanguageConfiguration=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event;this._onDidChangeModelOptions=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidChangeModelOptions=this._onDidChangeModelOptions.event;this._onDidChangeModelDecorations=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event;this._onDidChangeModelTokens=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidChangeModelTokens=this._onDidChangeModelTokens.event;this._onDidChangeConfiguration=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;this._onDidChangeModel=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidChangeModel=this._onDidChangeModel.event;this._onDidChangeCursorPosition=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event;this._onDidChangeCursorSelection=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event;this._onDidAttemptReadOnlyEdit=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event;this._onDidLayoutChange=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidLayoutChange=this._onDidLayoutChange.event;this._editorTextFocus=this._register(new BooleanEventEmitter({deliveryQueue:this._deliveryQueue}));this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue;this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse;this._editorWidgetFocus=this._register(new BooleanEventEmitter({deliveryQueue:this._deliveryQueue}));this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue;this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse;this._onWillType=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onWillType=this._onWillType.event;this._onDidType=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onDidType=this._onDidType.event;this._onDidCompositionStart=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onDidCompositionStart=this._onDidCompositionStart.event;this._onDidCompositionEnd=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onDidCompositionEnd=this._onDidCompositionEnd.event;this._onDidPaste=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onDidPaste=this._onDidPaste.event;this._onMouseUp=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onMouseUp=this._onMouseUp.event;this._onMouseDown=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onMouseDown=this._onMouseDown.event;this._onMouseDrag=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onMouseDrag=this._onMouseDrag.event;this._onMouseDrop=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onMouseDrop=this._onMouseDrop.event;this._onMouseDropCanceled=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onMouseDropCanceled=this._onMouseDropCanceled.event;this._onDropIntoEditor=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onDropIntoEditor=this._onDropIntoEditor.event;this._onContextMenu=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onContextMenu=this._onContextMenu.event;this._onMouseMove=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onMouseMove=this._onMouseMove.event;this._onMouseLeave=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onMouseLeave=this._onMouseLeave.event;this._onMouseWheel=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onMouseWheel=this._onMouseWheel.event;this._onKeyUp=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onKeyUp=this._onKeyUp.event;this._onKeyDown=this._register(new InteractionEmitter(this._contributions,this._deliveryQueue));this.onKeyDown=this._onKeyDown.event;this._onDidContentSizeChange=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidContentSizeChange=this._onDidContentSizeChange.event;this._onDidScrollChange=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidScrollChange=this._onDidScrollChange.event;this._onDidChangeViewZones=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidChangeViewZones=this._onDidChangeViewZones.event;this._onDidChangeHiddenAreas=this._register(new Emitter({deliveryQueue:this._deliveryQueue}));this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event;this._actions=new Map;this._bannerDomNode=null;this._dropIntoEditorDecorations=this.createDecorationsCollection();codeEditorService.willCreateCodeEditor();const options2=Object.assign({},_options);this._domElement=domElement;this._overflowWidgetsDomNode=options2.overflowWidgetsDomNode;delete options2.overflowWidgetsDomNode;this._id=++EDITOR_ID;this._decorationTypeKeysToIds={};this._decorationTypeSubtypes={};this._telemetryData=codeEditorWidgetOptions.telemetryData;this._configuration=this._register(this._createConfiguration(codeEditorWidgetOptions.isSimpleWidget||false,options2,accessibilityService));this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const options3=this._configuration.options;if(e.hasChanged(142)){const layoutInfo=options3.get(142);this._onDidLayoutChange.fire(layoutInfo)}})));this._contextKeyService=this._register(contextKeyService.createScoped(this._domElement));this._notificationService=notificationService;this._codeEditorService=codeEditorService;this._commandService=commandService;this._themeService=themeService;this._register(new EditorContextKeysManager(this,this._contextKeyService));this._register(new EditorModeContext(this,this._contextKeyService,languageFeaturesService));this._instantiationService=instantiationService.createChild(new ServiceCollection([IContextKeyService,this._contextKeyService]));this._modelData=null;this._focusTracker=new CodeEditorWidgetFocusTracker(domElement);this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})));this._contentWidgets={};this._overlayWidgets={};this._glyphMarginWidgets={};let contributions;if(Array.isArray(codeEditorWidgetOptions.contributions)){contributions=codeEditorWidgetOptions.contributions}else{contributions=EditorExtensionsRegistry.getEditorContributions()}this._contributions.initialize(this,contributions,this._instantiationService);for(const action of EditorExtensionsRegistry.getEditorActions()){if(this._actions.has(action.id)){onUnexpectedError(new Error(`Cannot have two actions with the same id ${action.id}`));continue}const internalAction=new InternalEditorAction(action.id,action.label,action.alias,(_a6=action.precondition)!==null&&_a6!==void 0?_a6:void 0,(()=>this._instantiationService.invokeFunction((accessor=>Promise.resolve(action.runEditorCommand(accessor,this,null))))),this._contextKeyService);this._actions.set(internalAction.id,internalAction)}const isDropIntoEnabled=()=>!this._configuration.options.get(89)&&this._configuration.options.get(35).enabled;this._register(new DragAndDropObserver(this._domElement,{onDragEnter:()=>void 0,onDragOver:e=>{if(!isDropIntoEnabled()){return}const target=this.getTargetAtClientPoint(e.clientX,e.clientY);if(target===null||target===void 0?void 0:target.position){this.showDropIndicatorAt(target.position)}},onDrop:e=>__awaiter8(this,void 0,void 0,(function*(){if(!isDropIntoEnabled()){return}this.removeDropIndicator();if(!e.dataTransfer){return}const target=this.getTargetAtClientPoint(e.clientX,e.clientY);if(target===null||target===void 0?void 0:target.position){this._onDropIntoEditor.fire({position:target.position,event:e})}})),onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}}));this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(reason){var _a6;(_a6=this._modelData)===null||_a6===void 0?void 0:_a6.view.writeScreenReaderContent(reason)}_createConfiguration(isSimpleWidget,options2,accessibilityService){return new EditorConfiguration(isSimpleWidget,options2,this._domElement,accessibilityService)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return EditorType.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this);this._focusTracker.dispose();this._actions.clear();this._contentWidgets={};this._overlayWidgets={};this._removeDecorationTypes();this._postDetachModelCleanup(this._detachModel());this._onDidDispose.fire();super.dispose()}invokeWithinContext(fn){return this._instantiationService.invokeFunction(fn)}updateOptions(newOptions){this._configuration.updateOptions(newOptions||{})}getOptions(){return this._configuration.options}getOption(id){return this._configuration.options.get(id)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(position){if(!this._modelData){return null}return WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(128),position)}getValue(options2=null){if(!this._modelData){return""}const preserveBOM=options2&&options2.preserveBOM?true:false;let eolPreference=0;if(options2&&options2.lineEnding&&options2.lineEnding==="\n"){eolPreference=1}else if(options2&&options2.lineEnding&&options2.lineEnding==="\r\n"){eolPreference=2}return this._modelData.model.getValue(eolPreference,preserveBOM)}setValue(newValue){if(!this._modelData){return}this._modelData.model.setValue(newValue)}getModel(){if(!this._modelData){return null}return this._modelData.model}setModel(_model=null){const model=_model;if(this._modelData===null&&model===null){return}if(this._modelData&&this._modelData.model===model){return}const hasTextFocus=this.hasTextFocus();const detachedModel=this._detachModel();this._attachModel(model);if(hasTextFocus&&this.hasModel()){this.focus()}const e={oldModelUrl:detachedModel?detachedModel.uri:null,newModelUrl:model?model.uri:null};this._removeDecorationTypes();this._onDidChangeModel.fire(e);this._postDetachModelCleanup(detachedModel);this._contributions.onAfterModelAttached()}_removeDecorationTypes(){this._decorationTypeKeysToIds={};if(this._decorationTypeSubtypes){for(const decorationType in this._decorationTypeSubtypes){const subTypes=this._decorationTypeSubtypes[decorationType];for(const subType in subTypes){this._removeDecorationType(decorationType+"-"+subType)}}this._decorationTypeSubtypes={}}}getVisibleRanges(){if(!this._modelData){return[]}return this._modelData.viewModel.getVisibleRanges()}getVisibleRangesPlusViewportAboveBelow(){if(!this._modelData){return[]}return this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow()}getWhitespaces(){if(!this._modelData){return[]}return this._modelData.viewModel.viewLayout.getWhitespaces()}static _getVerticalOffsetAfterPosition(modelData,modelLineNumber,modelColumn,includeViewZones){const modelPosition=modelData.model.validatePosition({lineNumber:modelLineNumber,column:modelColumn});const viewPosition=modelData.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);return modelData.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(viewPosition.lineNumber,includeViewZones)}getTopForLineNumber(lineNumber,includeViewZones=false){if(!this._modelData){return-1}return CodeEditorWidget_1._getVerticalOffsetForPosition(this._modelData,lineNumber,1,includeViewZones)}getTopForPosition(lineNumber,column){if(!this._modelData){return-1}return CodeEditorWidget_1._getVerticalOffsetForPosition(this._modelData,lineNumber,column,false)}static _getVerticalOffsetForPosition(modelData,modelLineNumber,modelColumn,includeViewZones=false){const modelPosition=modelData.model.validatePosition({lineNumber:modelLineNumber,column:modelColumn});const viewPosition=modelData.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition);return modelData.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber,includeViewZones)}getBottomForLineNumber(lineNumber,includeViewZones=false){if(!this._modelData){return-1}return CodeEditorWidget_1._getVerticalOffsetAfterPosition(this._modelData,lineNumber,1,includeViewZones)}setHiddenAreas(ranges,source){var _a6;(_a6=this._modelData)===null||_a6===void 0?void 0:_a6.viewModel.setHiddenAreas(ranges.map((r=>Range.lift(r))),source)}getVisibleColumnFromPosition(rawPosition){if(!this._modelData){return rawPosition.column}const position=this._modelData.model.validatePosition(rawPosition);const tabSize=this._modelData.model.getOptions().tabSize;return CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(position.lineNumber),position.column,tabSize)+1}getPosition(){if(!this._modelData){return null}return this._modelData.viewModel.getPosition()}setPosition(position,source="api"){if(!this._modelData){return}if(!Position.isIPosition(position)){throw new Error("Invalid arguments")}this._modelData.viewModel.setSelections(source,[{selectionStartLineNumber:position.lineNumber,selectionStartColumn:position.column,positionLineNumber:position.lineNumber,positionColumn:position.column}])}_sendRevealRange(modelRange,verticalType,revealHorizontal,scrollType){if(!this._modelData){return}if(!Range.isIRange(modelRange)){throw new Error("Invalid arguments")}const validatedModelRange=this._modelData.model.validateRange(modelRange);const viewRange=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(validatedModelRange);this._modelData.viewModel.revealRange("api",revealHorizontal,viewRange,verticalType,scrollType)}revealLine(lineNumber,scrollType=0){this._revealLine(lineNumber,0,scrollType)}revealLineInCenter(lineNumber,scrollType=0){this._revealLine(lineNumber,1,scrollType)}revealLineInCenterIfOutsideViewport(lineNumber,scrollType=0){this._revealLine(lineNumber,2,scrollType)}revealLineNearTop(lineNumber,scrollType=0){this._revealLine(lineNumber,5,scrollType)}_revealLine(lineNumber,revealType,scrollType){if(typeof lineNumber!=="number"){throw new Error("Invalid arguments")}this._sendRevealRange(new Range(lineNumber,1,lineNumber,1),revealType,false,scrollType)}revealPosition(position,scrollType=0){this._revealPosition(position,0,true,scrollType)}revealPositionInCenter(position,scrollType=0){this._revealPosition(position,1,true,scrollType)}revealPositionInCenterIfOutsideViewport(position,scrollType=0){this._revealPosition(position,2,true,scrollType)}revealPositionNearTop(position,scrollType=0){this._revealPosition(position,5,true,scrollType)}_revealPosition(position,verticalType,revealHorizontal,scrollType){if(!Position.isIPosition(position)){throw new Error("Invalid arguments")}this._sendRevealRange(new Range(position.lineNumber,position.column,position.lineNumber,position.column),verticalType,revealHorizontal,scrollType)}getSelection(){if(!this._modelData){return null}return this._modelData.viewModel.getSelection()}getSelections(){if(!this._modelData){return null}return this._modelData.viewModel.getSelections()}setSelection(something,source="api"){const isSelection=Selection.isISelection(something);const isRange=Range.isIRange(something);if(!isSelection&&!isRange){throw new Error("Invalid arguments")}if(isSelection){this._setSelectionImpl(something,source)}else if(isRange){const selection={selectionStartLineNumber:something.startLineNumber,selectionStartColumn:something.startColumn,positionLineNumber:something.endLineNumber,positionColumn:something.endColumn};this._setSelectionImpl(selection,source)}}_setSelectionImpl(sel,source){if(!this._modelData){return}const selection=new Selection(sel.selectionStartLineNumber,sel.selectionStartColumn,sel.positionLineNumber,sel.positionColumn);this._modelData.viewModel.setSelections(source,[selection])}revealLines(startLineNumber,endLineNumber,scrollType=0){this._revealLines(startLineNumber,endLineNumber,0,scrollType)}revealLinesInCenter(startLineNumber,endLineNumber,scrollType=0){this._revealLines(startLineNumber,endLineNumber,1,scrollType)}revealLinesInCenterIfOutsideViewport(startLineNumber,endLineNumber,scrollType=0){this._revealLines(startLineNumber,endLineNumber,2,scrollType)}revealLinesNearTop(startLineNumber,endLineNumber,scrollType=0){this._revealLines(startLineNumber,endLineNumber,5,scrollType)}_revealLines(startLineNumber,endLineNumber,verticalType,scrollType){if(typeof startLineNumber!=="number"||typeof endLineNumber!=="number"){throw new Error("Invalid arguments")}this._sendRevealRange(new Range(startLineNumber,1,endLineNumber,1),verticalType,false,scrollType)}revealRange(range2,scrollType=0,revealVerticalInCenter=false,revealHorizontal=true){this._revealRange(range2,revealVerticalInCenter?1:0,revealHorizontal,scrollType)}revealRangeInCenter(range2,scrollType=0){this._revealRange(range2,1,true,scrollType)}revealRangeInCenterIfOutsideViewport(range2,scrollType=0){this._revealRange(range2,2,true,scrollType)}revealRangeNearTop(range2,scrollType=0){this._revealRange(range2,5,true,scrollType)}revealRangeNearTopIfOutsideViewport(range2,scrollType=0){this._revealRange(range2,6,true,scrollType)}revealRangeAtTop(range2,scrollType=0){this._revealRange(range2,3,true,scrollType)}_revealRange(range2,verticalType,revealHorizontal,scrollType){if(!Range.isIRange(range2)){throw new Error("Invalid arguments")}this._sendRevealRange(Range.lift(range2),verticalType,revealHorizontal,scrollType)}setSelections(ranges,source="api",reason=0){if(!this._modelData){return}if(!ranges||ranges.length===0){throw new Error("Invalid arguments")}for(let i=0,len=ranges.length;i0){this._modelData.viewModel.restoreCursorState(cursorState)}}else{this._modelData.viewModel.restoreCursorState([cursorState])}this._contributions.restoreViewState(codeEditorState.contributionsState||{});const reducedState=this._modelData.viewModel.reduceRestoreState(codeEditorState.viewState);this._modelData.view.restoreState(reducedState)}}handleInitialized(){var _a6;(_a6=this._getViewModel())===null||_a6===void 0?void 0:_a6.visibleLinesStabilized()}getContribution(id){return this._contributions.get(id)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let result=this.getActions();result=result.filter((action=>action.isSupported()));return result}getAction(id){return this._actions.get(id)||null}trigger(source,handlerId,payload){payload=payload||{};switch(handlerId){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(source);return;case"type":{const args=payload;this._type(source,args.text||"");return}case"replacePreviousChar":{const args=payload;this._compositionType(source,args.text||"",args.replaceCharCnt||0,0,0);return}case"compositionType":{const args=payload;this._compositionType(source,args.text||"",args.replacePrevCharCnt||0,args.replaceNextCharCnt||0,args.positionDelta||0);return}case"paste":{const args=payload;this._paste(source,args.text||"",args.pasteOnNewLine||false,args.multicursorText||null,args.mode||null);return}case"cut":this._cut(source);return}const action=this.getAction(handlerId);if(action){Promise.resolve(action.run(payload)).then(void 0,onUnexpectedError);return}if(!this._modelData){return}if(this._triggerEditorCommand(source,handlerId,payload)){return}this._triggerCommand(handlerId,payload)}_triggerCommand(handlerId,payload){this._commandService.executeCommand(handlerId,payload)}_startComposition(){if(!this._modelData){return}this._modelData.viewModel.startComposition();this._onDidCompositionStart.fire()}_endComposition(source){if(!this._modelData){return}this._modelData.viewModel.endComposition(source);this._onDidCompositionEnd.fire()}_type(source,text2){if(!this._modelData||text2.length===0){return}if(source==="keyboard"){this._onWillType.fire(text2)}this._modelData.viewModel.type(text2,source);if(source==="keyboard"){this._onDidType.fire(text2)}}_compositionType(source,text2,replacePrevCharCnt,replaceNextCharCnt,positionDelta){if(!this._modelData){return}this._modelData.viewModel.compositionType(text2,replacePrevCharCnt,replaceNextCharCnt,positionDelta,source)}_paste(source,text2,pasteOnNewLine,multicursorText,mode){if(!this._modelData||text2.length===0){return}const viewModel=this._modelData.viewModel;const startPosition=viewModel.getSelection().getStartPosition();viewModel.paste(text2,pasteOnNewLine,multicursorText,source);const endPosition=viewModel.getSelection().getStartPosition();if(source==="keyboard"){this._onDidPaste.fire({range:new Range(startPosition.lineNumber,startPosition.column,endPosition.lineNumber,endPosition.column),languageId:mode})}}_cut(source){if(!this._modelData){return}this._modelData.viewModel.cut(source)}_triggerEditorCommand(source,handlerId,payload){const command=EditorExtensionsRegistry.getEditorCommand(handlerId);if(command){payload=payload||{};payload.source=source;this._instantiationService.invokeFunction((accessor=>{Promise.resolve(command.runEditorCommand(accessor,this,payload)).then(void 0,onUnexpectedError)}));return true}return false}_getViewModel(){if(!this._modelData){return null}return this._modelData.viewModel}pushUndoStop(){if(!this._modelData){return false}if(this._configuration.options.get(89)){return false}this._modelData.model.pushStackElement();return true}popUndoStop(){if(!this._modelData){return false}if(this._configuration.options.get(89)){return false}this._modelData.model.popStackElement();return true}executeEdits(source,edits,endCursorState){if(!this._modelData){return false}if(this._configuration.options.get(89)){return false}let cursorStateComputer;if(!endCursorState){cursorStateComputer=()=>null}else if(Array.isArray(endCursorState)){cursorStateComputer=()=>endCursorState}else{cursorStateComputer=endCursorState}this._modelData.viewModel.executeEdits(source,edits,cursorStateComputer);return true}executeCommand(source,command){if(!this._modelData){return}this._modelData.viewModel.executeCommand(command,source)}executeCommands(source,commands){if(!this._modelData){return}this._modelData.viewModel.executeCommands(commands,source)}createDecorationsCollection(decorations){return new EditorDecorationsCollection(this,decorations)}changeDecorations(callback){if(!this._modelData){return null}return this._modelData.model.changeDecorations(callback,this._id)}getLineDecorations(lineNumber){if(!this._modelData){return null}return this._modelData.model.getLineDecorations(lineNumber,this._id,filterValidationDecorations(this._configuration.options))}getDecorationsInRange(range2){if(!this._modelData){return null}return this._modelData.model.getDecorationsInRange(range2,this._id,filterValidationDecorations(this._configuration.options))}deltaDecorations(oldDecorations,newDecorations){if(!this._modelData){return[]}if(oldDecorations.length===0&&newDecorations.length===0){return oldDecorations}return this._modelData.model.deltaDecorations(oldDecorations,newDecorations,this._id)}removeDecorations(decorationIds){if(!this._modelData||decorationIds.length===0){return}this._modelData.model.changeDecorations((changeAccessor=>{changeAccessor.deltaDecorations(decorationIds,[])}))}removeDecorationsByType(decorationTypeKey){const oldDecorationsIds=this._decorationTypeKeysToIds[decorationTypeKey];if(oldDecorationsIds){this.deltaDecorations(oldDecorationsIds,[])}if(this._decorationTypeKeysToIds.hasOwnProperty(decorationTypeKey)){delete this._decorationTypeKeysToIds[decorationTypeKey]}if(this._decorationTypeSubtypes.hasOwnProperty(decorationTypeKey)){delete this._decorationTypeSubtypes[decorationTypeKey]}}getLayoutInfo(){const options2=this._configuration.options;const layoutInfo=options2.get(142);return layoutInfo}createOverviewRuler(cssClassName){if(!this._modelData||!this._modelData.hasRealView){return null}return this._modelData.view.createOverviewRuler(cssClassName)}getContainerDomNode(){return this._domElement}getDomNode(){if(!this._modelData||!this._modelData.hasRealView){return null}return this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(browserEvent){if(!this._modelData||!this._modelData.hasRealView){return}this._modelData.view.delegateVerticalScrollbarPointerDown(browserEvent)}delegateScrollFromMouseWheelEvent(browserEvent){if(!this._modelData||!this._modelData.hasRealView){return}this._modelData.view.delegateScrollFromMouseWheelEvent(browserEvent)}layout(dimension){this._configuration.observeContainer(dimension);this.render()}focus(){if(!this._modelData||!this._modelData.hasRealView){return}this._modelData.view.focus()}hasTextFocus(){if(!this._modelData||!this._modelData.hasRealView){return false}return this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(widget){const widgetData={widget:widget,position:widget.getPosition()};if(this._contentWidgets.hasOwnProperty(widget.getId())){console.warn("Overwriting a content widget with the same id.")}this._contentWidgets[widget.getId()]=widgetData;if(this._modelData&&this._modelData.hasRealView){this._modelData.view.addContentWidget(widgetData)}}layoutContentWidget(widget){const widgetId=widget.getId();if(this._contentWidgets.hasOwnProperty(widgetId)){const widgetData=this._contentWidgets[widgetId];widgetData.position=widget.getPosition();if(this._modelData&&this._modelData.hasRealView){this._modelData.view.layoutContentWidget(widgetData)}}}removeContentWidget(widget){const widgetId=widget.getId();if(this._contentWidgets.hasOwnProperty(widgetId)){const widgetData=this._contentWidgets[widgetId];delete this._contentWidgets[widgetId];if(this._modelData&&this._modelData.hasRealView){this._modelData.view.removeContentWidget(widgetData)}}}addOverlayWidget(widget){const widgetData={widget:widget,position:widget.getPosition()};if(this._overlayWidgets.hasOwnProperty(widget.getId())){console.warn("Overwriting an overlay widget with the same id.")}this._overlayWidgets[widget.getId()]=widgetData;if(this._modelData&&this._modelData.hasRealView){this._modelData.view.addOverlayWidget(widgetData)}}layoutOverlayWidget(widget){const widgetId=widget.getId();if(this._overlayWidgets.hasOwnProperty(widgetId)){const widgetData=this._overlayWidgets[widgetId];widgetData.position=widget.getPosition();if(this._modelData&&this._modelData.hasRealView){this._modelData.view.layoutOverlayWidget(widgetData)}}}removeOverlayWidget(widget){const widgetId=widget.getId();if(this._overlayWidgets.hasOwnProperty(widgetId)){const widgetData=this._overlayWidgets[widgetId];delete this._overlayWidgets[widgetId];if(this._modelData&&this._modelData.hasRealView){this._modelData.view.removeOverlayWidget(widgetData)}}}addGlyphMarginWidget(widget){const widgetData={widget:widget,position:widget.getPosition()};if(this._glyphMarginWidgets.hasOwnProperty(widget.getId())){console.warn("Overwriting a glyph margin widget with the same id.")}this._glyphMarginWidgets[widget.getId()]=widgetData;if(this._modelData&&this._modelData.hasRealView){this._modelData.view.addGlyphMarginWidget(widgetData)}}layoutGlyphMarginWidget(widget){const widgetId=widget.getId();if(this._glyphMarginWidgets.hasOwnProperty(widgetId)){const widgetData=this._glyphMarginWidgets[widgetId];widgetData.position=widget.getPosition();if(this._modelData&&this._modelData.hasRealView){this._modelData.view.layoutGlyphMarginWidget(widgetData)}}}removeGlyphMarginWidget(widget){const widgetId=widget.getId();if(this._glyphMarginWidgets.hasOwnProperty(widgetId)){const widgetData=this._glyphMarginWidgets[widgetId];delete this._glyphMarginWidgets[widgetId];if(this._modelData&&this._modelData.hasRealView){this._modelData.view.removeGlyphMarginWidget(widgetData)}}}changeViewZones(callback){if(!this._modelData||!this._modelData.hasRealView){return}this._modelData.view.change(callback)}getTargetAtClientPoint(clientX,clientY){if(!this._modelData||!this._modelData.hasRealView){return null}return this._modelData.view.getTargetAtClientPoint(clientX,clientY)}getScrolledVisiblePosition(rawPosition){if(!this._modelData||!this._modelData.hasRealView){return null}const position=this._modelData.model.validatePosition(rawPosition);const options2=this._configuration.options;const layoutInfo=options2.get(142);const top=CodeEditorWidget_1._getVerticalOffsetForPosition(this._modelData,position.lineNumber,position.column)-this.getScrollTop();const left=this._modelData.view.getOffsetForColumn(position.lineNumber,position.column)+layoutInfo.glyphMarginWidth+layoutInfo.lineNumbersWidth+layoutInfo.decorationsWidth-this.getScrollLeft();return{top:top,left:left,height:options2.get(65)}}getOffsetForColumn(lineNumber,column){if(!this._modelData||!this._modelData.hasRealView){return-1}return this._modelData.view.getOffsetForColumn(lineNumber,column)}render(forceRedraw=false){if(!this._modelData||!this._modelData.hasRealView){return}this._modelData.view.render(true,forceRedraw)}setAriaOptions(options2){if(!this._modelData||!this._modelData.hasRealView){return}this._modelData.view.setAriaOptions(options2)}applyFontInfo(target){applyFontInfo(target,this._configuration.options.get(49))}setBanner(domNode,domNodeHeight){if(this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)){this._domElement.removeChild(this._bannerDomNode)}this._bannerDomNode=domNode;this._configuration.setReservedHeight(domNode?domNodeHeight:0);if(this._bannerDomNode){this._domElement.prepend(this._bannerDomNode)}}_attachModel(model){if(!model){this._modelData=null;return}const listenersToRemove=[];this._domElement.setAttribute("data-mode-id",model.getLanguageId());this._configuration.setIsDominatedByLongLines(model.isDominatedByLongLines());this._configuration.setModelLineCount(model.getLineCount());const attachedView=model.onBeforeAttached();const viewModel=new ViewModel(this._id,this._configuration,model,DOMLineBreaksComputerFactory.create(),MonospaceLineBreaksComputerFactory.create(this._configuration.options),(callback=>scheduleAtNextAnimationFrame(callback)),this.languageConfigurationService,this._themeService,attachedView);listenersToRemove.push(model.onWillDispose((()=>this.setModel(null))));listenersToRemove.push(viewModel.onEvent((e=>{switch(e.kind){case 0:this._onDidContentSizeChange.fire(e);break;case 1:this._editorTextFocus.setValue(e.hasFocus);break;case 2:this._onDidScrollChange.fire(e);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(e.reachedMaxCursorCount){const multiCursorLimit=this.getOption(78);const message=localize("cursors.maximum","The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",multiCursorLimit);this._notificationService.prompt(Severity2.Warning,message,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:localize("goToSetting","Increase Multi Cursor Limit"),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const positions=[];for(let i=0,len=e.selections.length;i{this._paste("keyboard",text2,pasteOnNewLine,multicursorText,mode)},type:text2=>{this._type("keyboard",text2)},compositionType:(text2,replacePrevCharCnt,replaceNextCharCnt,positionDelta)=>{this._compositionType("keyboard",text2,replacePrevCharCnt,replaceNextCharCnt,positionDelta)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}}else{commandDelegate={paste:(text2,pasteOnNewLine,multicursorText,mode)=>{const payload={text:text2,pasteOnNewLine:pasteOnNewLine,multicursorText:multicursorText,mode:mode};this._commandService.executeCommand("paste",payload)},type:text2=>{const payload={text:text2};this._commandService.executeCommand("type",payload)},compositionType:(text2,replacePrevCharCnt,replaceNextCharCnt,positionDelta)=>{if(replaceNextCharCnt||positionDelta){const payload={text:text2,replacePrevCharCnt:replacePrevCharCnt,replaceNextCharCnt:replaceNextCharCnt,positionDelta:positionDelta};this._commandService.executeCommand("compositionType",payload)}else{const payload={text:text2,replaceCharCnt:replacePrevCharCnt};this._commandService.executeCommand("replacePreviousChar",payload)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}}}const viewUserInputEvents=new ViewUserInputEvents(viewModel.coordinatesConverter);viewUserInputEvents.onKeyDown=e=>this._onKeyDown.fire(e);viewUserInputEvents.onKeyUp=e=>this._onKeyUp.fire(e);viewUserInputEvents.onContextMenu=e=>this._onContextMenu.fire(e);viewUserInputEvents.onMouseMove=e=>this._onMouseMove.fire(e);viewUserInputEvents.onMouseLeave=e=>this._onMouseLeave.fire(e);viewUserInputEvents.onMouseDown=e=>this._onMouseDown.fire(e);viewUserInputEvents.onMouseUp=e=>this._onMouseUp.fire(e);viewUserInputEvents.onMouseDrag=e=>this._onMouseDrag.fire(e);viewUserInputEvents.onMouseDrop=e=>this._onMouseDrop.fire(e);viewUserInputEvents.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e);viewUserInputEvents.onMouseWheel=e=>this._onMouseWheel.fire(e);const view=new View(commandDelegate,this._configuration,this._themeService.getColorTheme(),viewModel,viewUserInputEvents,this._overflowWidgetsDomNode,this._instantiationService);return[view,true]}_postDetachModelCleanup(detachedModel){detachedModel===null||detachedModel===void 0?void 0:detachedModel.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData){return null}const model=this._modelData.model;const removeDomNode=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;this._modelData.dispose();this._modelData=null;this._domElement.removeAttribute("data-mode-id");if(removeDomNode&&this._domElement.contains(removeDomNode)){this._domElement.removeChild(removeDomNode)}if(this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)){this._domElement.removeChild(this._bannerDomNode)}return model}_removeDecorationType(key){this._codeEditorService.removeDecorationType(key)}hasModel(){return this._modelData!==null}showDropIndicatorAt(position){const newDecorations=[{range:new Range(position.lineNumber,position.column,position.lineNumber,position.column),options:CodeEditorWidget_1.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(newDecorations);this.revealPosition(position,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(key,value){this._contextKeyService.createKey(key,value)}};CodeEditorWidget.dropIntoEditorDecorationOptions=ModelDecorationOptions.register({description:"workbench-dnd-target",className:"dnd-target"});CodeEditorWidget=CodeEditorWidget_1=__decorate13([__param12(3,IInstantiationService),__param12(4,ICodeEditorService),__param12(5,ICommandService),__param12(6,IContextKeyService),__param12(7,IThemeService),__param12(8,INotificationService),__param12(9,IAccessibilityService),__param12(10,ILanguageConfigurationService),__param12(11,ILanguageFeaturesService)],CodeEditorWidget);BooleanEventEmitter=class extends Disposable{constructor(_emitterOptions){super();this._emitterOptions=_emitterOptions;this._onDidChangeToTrue=this._register(new Emitter(this._emitterOptions));this.onDidChangeToTrue=this._onDidChangeToTrue.event;this._onDidChangeToFalse=this._register(new Emitter(this._emitterOptions));this.onDidChangeToFalse=this._onDidChangeToFalse.event;this._value=0}setValue(_value){const value=_value?2:1;if(this._value===value){return}this._value=value;if(this._value===2){this._onDidChangeToTrue.fire()}else if(this._value===1){this._onDidChangeToFalse.fire()}}};InteractionEmitter=class extends Emitter{constructor(_contributions,deliveryQueue){super({deliveryQueue:deliveryQueue});this._contributions=_contributions}fire(event){this._contributions.onBeforeInteractionEvent();super.fire(event)}};EditorContextKeysManager=class extends Disposable{constructor(editor2,contextKeyService){super();this._editor=editor2;contextKeyService.createKey("editorId",editor2.getId());this._editorSimpleInput=EditorContextKeys.editorSimpleInput.bindTo(contextKeyService);this._editorFocus=EditorContextKeys.focus.bindTo(contextKeyService);this._textInputFocus=EditorContextKeys.textInputFocus.bindTo(contextKeyService);this._editorTextFocus=EditorContextKeys.editorTextFocus.bindTo(contextKeyService);this._editorTabMovesFocus=EditorContextKeys.tabMovesFocus.bindTo(contextKeyService);this._editorReadonly=EditorContextKeys.readOnly.bindTo(contextKeyService);this._inDiffEditor=EditorContextKeys.inDiffEditor.bindTo(contextKeyService);this._editorColumnSelection=EditorContextKeys.columnSelection.bindTo(contextKeyService);this._hasMultipleSelections=EditorContextKeys.hasMultipleSelections.bindTo(contextKeyService);this._hasNonEmptySelection=EditorContextKeys.hasNonEmptySelection.bindTo(contextKeyService);this._canUndo=EditorContextKeys.canUndo.bindTo(contextKeyService);this._canRedo=EditorContextKeys.canRedo.bindTo(contextKeyService);this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig())));this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection())));this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus())));this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus())));this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus())));this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus())));this._register(this._editor.onDidChangeModel((()=>this._updateFromModel())));this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel())));this._register(TabFocus.onDidChangeTabFocus((()=>this._editorTabMovesFocus.set(TabFocus.getTabFocusMode("editorFocus")))));this._updateFromConfig();this._updateFromSelection();this._updateFromFocus();this._updateFromModel();this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const options2=this._editor.getOptions();this._editorTabMovesFocus.set(TabFocus.getTabFocusMode("editorFocus"));this._editorReadonly.set(options2.get(89));this._inDiffEditor.set(options2.get(60));this._editorColumnSelection.set(options2.get(21))}_updateFromSelection(){const selections=this._editor.getSelections();if(!selections){this._hasMultipleSelections.reset();this._hasNonEmptySelection.reset()}else{this._hasMultipleSelections.set(selections.length>1);this._hasNonEmptySelection.set(selections.some((s=>!s.isEmpty())))}}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget);this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget);this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const model=this._editor.getModel();this._canUndo.set(Boolean(model&&model.canUndo()));this._canRedo.set(Boolean(model&&model.canRedo()))}};EditorModeContext=class extends Disposable{constructor(_editor,_contextKeyService,_languageFeaturesService){super();this._editor=_editor;this._contextKeyService=_contextKeyService;this._languageFeaturesService=_languageFeaturesService;this._langId=EditorContextKeys.languageId.bindTo(_contextKeyService);this._hasCompletionItemProvider=EditorContextKeys.hasCompletionItemProvider.bindTo(_contextKeyService);this._hasCodeActionsProvider=EditorContextKeys.hasCodeActionsProvider.bindTo(_contextKeyService);this._hasCodeLensProvider=EditorContextKeys.hasCodeLensProvider.bindTo(_contextKeyService);this._hasDefinitionProvider=EditorContextKeys.hasDefinitionProvider.bindTo(_contextKeyService);this._hasDeclarationProvider=EditorContextKeys.hasDeclarationProvider.bindTo(_contextKeyService);this._hasImplementationProvider=EditorContextKeys.hasImplementationProvider.bindTo(_contextKeyService);this._hasTypeDefinitionProvider=EditorContextKeys.hasTypeDefinitionProvider.bindTo(_contextKeyService);this._hasHoverProvider=EditorContextKeys.hasHoverProvider.bindTo(_contextKeyService);this._hasDocumentHighlightProvider=EditorContextKeys.hasDocumentHighlightProvider.bindTo(_contextKeyService);this._hasDocumentSymbolProvider=EditorContextKeys.hasDocumentSymbolProvider.bindTo(_contextKeyService);this._hasReferenceProvider=EditorContextKeys.hasReferenceProvider.bindTo(_contextKeyService);this._hasRenameProvider=EditorContextKeys.hasRenameProvider.bindTo(_contextKeyService);this._hasSignatureHelpProvider=EditorContextKeys.hasSignatureHelpProvider.bindTo(_contextKeyService);this._hasInlayHintsProvider=EditorContextKeys.hasInlayHintsProvider.bindTo(_contextKeyService);this._hasDocumentFormattingProvider=EditorContextKeys.hasDocumentFormattingProvider.bindTo(_contextKeyService);this._hasDocumentSelectionFormattingProvider=EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(_contextKeyService);this._hasMultipleDocumentFormattingProvider=EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(_contextKeyService);this._hasMultipleDocumentSelectionFormattingProvider=EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(_contextKeyService);this._isInWalkThrough=EditorContextKeys.isInWalkThroughSnippet.bindTo(_contextKeyService);const update=()=>this._update();this._register(_editor.onDidChangeModel(update));this._register(_editor.onDidChangeModelLanguage(update));this._register(_languageFeaturesService.completionProvider.onDidChange(update));this._register(_languageFeaturesService.codeActionProvider.onDidChange(update));this._register(_languageFeaturesService.codeLensProvider.onDidChange(update));this._register(_languageFeaturesService.definitionProvider.onDidChange(update));this._register(_languageFeaturesService.declarationProvider.onDidChange(update));this._register(_languageFeaturesService.implementationProvider.onDidChange(update));this._register(_languageFeaturesService.typeDefinitionProvider.onDidChange(update));this._register(_languageFeaturesService.hoverProvider.onDidChange(update));this._register(_languageFeaturesService.documentHighlightProvider.onDidChange(update));this._register(_languageFeaturesService.documentSymbolProvider.onDidChange(update));this._register(_languageFeaturesService.referenceProvider.onDidChange(update));this._register(_languageFeaturesService.renameProvider.onDidChange(update));this._register(_languageFeaturesService.documentFormattingEditProvider.onDidChange(update));this._register(_languageFeaturesService.documentRangeFormattingEditProvider.onDidChange(update));this._register(_languageFeaturesService.signatureHelpProvider.onDidChange(update));this._register(_languageFeaturesService.inlayHintsProvider.onDidChange(update));update()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset();this._hasCompletionItemProvider.reset();this._hasCodeActionsProvider.reset();this._hasCodeLensProvider.reset();this._hasDefinitionProvider.reset();this._hasDeclarationProvider.reset();this._hasImplementationProvider.reset();this._hasTypeDefinitionProvider.reset();this._hasHoverProvider.reset();this._hasDocumentHighlightProvider.reset();this._hasDocumentSymbolProvider.reset();this._hasReferenceProvider.reset();this._hasRenameProvider.reset();this._hasDocumentFormattingProvider.reset();this._hasDocumentSelectionFormattingProvider.reset();this._hasSignatureHelpProvider.reset();this._isInWalkThrough.reset()}))}_update(){const model=this._editor.getModel();if(!model){this.reset();return}this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(model.getLanguageId());this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(model));this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(model));this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(model));this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(model));this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(model));this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(model));this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(model));this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(model));this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(model));this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(model));this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(model));this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(model));this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(model));this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(model));this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(model)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(model));this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(model));this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(model).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(model).length>1);this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(model).length>1);this._isInWalkThrough.set(model.uri.scheme===Schemas.walkThroughSnippet)}))}};CodeEditorWidgetFocusTracker=class extends Disposable{constructor(domElement){super();this._onChange=this._register(new Emitter);this.onChange=this._onChange.event;this._hasFocus=false;this._domFocusTracker=this._register(trackFocus(domElement));this._register(this._domFocusTracker.onDidFocus((()=>{this._hasFocus=true;this._onChange.fire(void 0)})));this._register(this._domFocusTracker.onDidBlur((()=>{this._hasFocus=false;this._onChange.fire(void 0)})))}hasFocus(){return this._hasFocus}};EditorDecorationsCollection=class{get length(){return this._decorationIds.length}constructor(_editor,decorations){this._editor=_editor;this._decorationIds=[];this._isChangingDecorations=false;if(Array.isArray(decorations)&&decorations.length>0){this.set(decorations)}}onDidChange(listener,thisArgs,disposables){return this._editor.onDidChangeModelDecorations((e=>{if(this._isChangingDecorations){return}listener.call(thisArgs,e)}),disposables)}getRange(index){if(!this._editor.hasModel()){return null}if(index>=this._decorationIds.length){return null}return this._editor.getModel().getDecorationRange(this._decorationIds[index])}getRanges(){if(!this._editor.hasModel()){return[]}const model=this._editor.getModel();const result=[];for(const decorationId of this._decorationIds){const range2=model.getDecorationRange(decorationId);if(range2){result.push(range2)}}return result}has(decoration2){return this._decorationIds.includes(decoration2.id)}clear(){if(this._decorationIds.length===0){return}this.set([])}set(newDecorations){try{this._isChangingDecorations=true;this._editor.changeDecorations((accessor=>{this._decorationIds=accessor.deltaDecorations(this._decorationIds,newDecorations)}))}finally{this._isChangingDecorations=false}return this._decorationIds}};squigglyStart=encodeURIComponent(``);dotdotdotStart=encodeURIComponent(``);registerThemingParticipant(((theme,collector)=>{const errorForeground2=theme.getColor(editorErrorForeground);if(errorForeground2){collector.addRule(`.monaco-editor .${"squiggly-error"} { background: url("data:image/svg+xml,${getSquigglySVGData(errorForeground2)}") repeat-x bottom left; }`)}const warningForeground=theme.getColor(editorWarningForeground);if(warningForeground){collector.addRule(`.monaco-editor .${"squiggly-warning"} { background: url("data:image/svg+xml,${getSquigglySVGData(warningForeground)}") repeat-x bottom left; }`)}const infoForeground=theme.getColor(editorInfoForeground);if(infoForeground){collector.addRule(`.monaco-editor .${"squiggly-info"} { background: url("data:image/svg+xml,${getSquigglySVGData(infoForeground)}") repeat-x bottom left; }`)}const hintForeground=theme.getColor(editorHintForeground);if(hintForeground){collector.addRule(`.monaco-editor .${"squiggly-hint"} { background: url("data:image/svg+xml,${getDotDotDotSVGData(hintForeground)}") no-repeat bottom left; }`)}const unnecessaryForeground=theme.getColor(editorUnnecessaryCodeOpacity);if(unnecessaryForeground){collector.addRule(`.monaco-editor.showUnused .${"squiggly-inline-unnecessary"} { opacity: ${unnecessaryForeground.rgba.a}; }`)}}))}});var init_24=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css"(){}});var __decorate14,DEBUG,OrthogonalEdge,globalSize,onDidChangeGlobalSize,globalHoverDelay,onDidChangeHoverDelay,MouseEventFactory,GestureEventFactory,OrthogonalPointerEventFactory,PointerEventsDisabledCssClass,Sash;var init_sash=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.js"(){init_dom();init_event2();init_touch();init_async();init_decorators();init_event();init_lifecycle();init_platform();init_24();__decorate14=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};DEBUG=false;(function(OrthogonalEdge2){OrthogonalEdge2["North"]="north";OrthogonalEdge2["South"]="south";OrthogonalEdge2["East"]="east";OrthogonalEdge2["West"]="west"})(OrthogonalEdge||(OrthogonalEdge={}));globalSize=4;onDidChangeGlobalSize=new Emitter;globalHoverDelay=300;onDidChangeHoverDelay=new Emitter;MouseEventFactory=class{constructor(){this.disposables=new DisposableStore}get onPointerMove(){return this.disposables.add(new DomEmitter(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new DomEmitter(window,"mouseup")).event}dispose(){this.disposables.dispose()}};__decorate14([memoize],MouseEventFactory.prototype,"onPointerMove",null);__decorate14([memoize],MouseEventFactory.prototype,"onPointerUp",null);GestureEventFactory=class{get onPointerMove(){return this.disposables.add(new DomEmitter(this.el,EventType2.Change)).event}get onPointerUp(){return this.disposables.add(new DomEmitter(this.el,EventType2.End)).event}constructor(el){this.el=el;this.disposables=new DisposableStore}dispose(){this.disposables.dispose()}};__decorate14([memoize],GestureEventFactory.prototype,"onPointerMove",null);__decorate14([memoize],GestureEventFactory.prototype,"onPointerUp",null);OrthogonalPointerEventFactory=class{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(factory){this.factory=factory}dispose(){}};__decorate14([memoize],OrthogonalPointerEventFactory.prototype,"onPointerMove",null);__decorate14([memoize],OrthogonalPointerEventFactory.prototype,"onPointerUp",null);PointerEventsDisabledCssClass="pointer-events-disabled";Sash=class extends Disposable{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(state){if(this._state===state){return}this.el.classList.toggle("disabled",state===0);this.el.classList.toggle("minimum",state===1);this.el.classList.toggle("maximum",state===2);this._state=state;this.onDidEnablementChange.fire(state)}set orthogonalStartSash(sash){if(this._orthogonalStartSash===sash){return}this.orthogonalStartDragHandleDisposables.clear();this.orthogonalStartSashDisposables.clear();if(sash){const onChange=state=>{this.orthogonalStartDragHandleDisposables.clear();if(state!==0){this._orthogonalStartDragHandle=append(this.el,$(".orthogonal-drag-handle.start"));this.orthogonalStartDragHandleDisposables.add(toDisposable((()=>this._orthogonalStartDragHandle.remove())));this.orthogonalStartDragHandleDisposables.add(new DomEmitter(this._orthogonalStartDragHandle,"mouseenter")).event((()=>Sash.onMouseEnter(sash)),void 0,this.orthogonalStartDragHandleDisposables);this.orthogonalStartDragHandleDisposables.add(new DomEmitter(this._orthogonalStartDragHandle,"mouseleave")).event((()=>Sash.onMouseLeave(sash)),void 0,this.orthogonalStartDragHandleDisposables)}};this.orthogonalStartSashDisposables.add(sash.onDidEnablementChange.event(onChange,this));onChange(sash.state)}this._orthogonalStartSash=sash}set orthogonalEndSash(sash){if(this._orthogonalEndSash===sash){return}this.orthogonalEndDragHandleDisposables.clear();this.orthogonalEndSashDisposables.clear();if(sash){const onChange=state=>{this.orthogonalEndDragHandleDisposables.clear();if(state!==0){this._orthogonalEndDragHandle=append(this.el,$(".orthogonal-drag-handle.end"));this.orthogonalEndDragHandleDisposables.add(toDisposable((()=>this._orthogonalEndDragHandle.remove())));this.orthogonalEndDragHandleDisposables.add(new DomEmitter(this._orthogonalEndDragHandle,"mouseenter")).event((()=>Sash.onMouseEnter(sash)),void 0,this.orthogonalEndDragHandleDisposables);this.orthogonalEndDragHandleDisposables.add(new DomEmitter(this._orthogonalEndDragHandle,"mouseleave")).event((()=>Sash.onMouseLeave(sash)),void 0,this.orthogonalEndDragHandleDisposables)}};this.orthogonalEndSashDisposables.add(sash.onDidEnablementChange.event(onChange,this));onChange(sash.state)}this._orthogonalEndSash=sash}constructor(container,layoutProvider,options2){super();this.hoverDelay=globalHoverDelay;this.hoverDelayer=this._register(new Delayer(this.hoverDelay));this._state=3;this.onDidEnablementChange=this._register(new Emitter);this._onDidStart=this._register(new Emitter);this._onDidChange=this._register(new Emitter);this._onDidReset=this._register(new Emitter);this._onDidEnd=this._register(new Emitter);this.orthogonalStartSashDisposables=this._register(new DisposableStore);this.orthogonalStartDragHandleDisposables=this._register(new DisposableStore);this.orthogonalEndSashDisposables=this._register(new DisposableStore);this.orthogonalEndDragHandleDisposables=this._register(new DisposableStore);this.onDidStart=this._onDidStart.event;this.onDidChange=this._onDidChange.event;this.onDidReset=this._onDidReset.event;this.onDidEnd=this._onDidEnd.event;this.linkedSash=void 0;this.el=append(container,$(".monaco-sash"));if(options2.orthogonalEdge){this.el.classList.add(`orthogonal-edge-${options2.orthogonalEdge}`)}if(isMacintosh){this.el.classList.add("mac")}const onMouseDown=this._register(new DomEmitter(this.el,"mousedown")).event;this._register(onMouseDown((e=>this.onPointerStart(e,new MouseEventFactory)),this));const onMouseDoubleClick=this._register(new DomEmitter(this.el,"dblclick")).event;this._register(onMouseDoubleClick(this.onPointerDoublePress,this));const onMouseEnter=this._register(new DomEmitter(this.el,"mouseenter")).event;this._register(onMouseEnter((()=>Sash.onMouseEnter(this))));const onMouseLeave=this._register(new DomEmitter(this.el,"mouseleave")).event;this._register(onMouseLeave((()=>Sash.onMouseLeave(this))));this._register(Gesture.addTarget(this.el));const onTouchStart=this._register(new DomEmitter(this.el,EventType2.Start)).event;this._register(onTouchStart((e=>this.onPointerStart(e,new GestureEventFactory(this.el))),this));const onTap=this._register(new DomEmitter(this.el,EventType2.Tap)).event;let doubleTapTimeout=void 0;this._register(onTap((event=>{if(doubleTapTimeout){clearTimeout(doubleTapTimeout);doubleTapTimeout=void 0;this.onPointerDoublePress(event);return}clearTimeout(doubleTapTimeout);doubleTapTimeout=setTimeout((()=>doubleTapTimeout=void 0),250)}),this));if(typeof options2.size==="number"){this.size=options2.size;if(options2.orientation===0){this.el.style.width=`${this.size}px`}else{this.el.style.height=`${this.size}px`}}else{this.size=globalSize;this._register(onDidChangeGlobalSize.event((size2=>{this.size=size2;this.layout()})))}this._register(onDidChangeHoverDelay.event((delay=>this.hoverDelay=delay)));this.layoutProvider=layoutProvider;this.orthogonalStartSash=options2.orthogonalStartSash;this.orthogonalEndSash=options2.orthogonalEndSash;this.orientation=options2.orientation||0;if(this.orientation===1){this.el.classList.add("horizontal");this.el.classList.remove("vertical")}else{this.el.classList.remove("horizontal");this.el.classList.add("vertical")}this.el.classList.toggle("debug",DEBUG);this.layout()}onPointerStart(event,pointerEventFactory){EventHelper.stop(event);let isMultisashResize=false;if(!event.__orthogonalSashEvent){const orthogonalSash=this.getOrthogonalSash(event);if(orthogonalSash){isMultisashResize=true;event.__orthogonalSashEvent=true;orthogonalSash.onPointerStart(event,new OrthogonalPointerEventFactory(pointerEventFactory))}}if(this.linkedSash&&!event.__linkedSashEvent){event.__linkedSashEvent=true;this.linkedSash.onPointerStart(event,new OrthogonalPointerEventFactory(pointerEventFactory))}if(!this.state){return}const iframes=document.getElementsByTagName("iframe");for(const iframe of iframes){iframe.classList.add(PointerEventsDisabledCssClass)}const startX=event.pageX;const startY=event.pageY;const altKey=event.altKey;const startEvent={startX:startX,currentX:startX,startY:startY,currentY:startY,altKey:altKey};this.el.classList.add("active");this._onDidStart.fire(startEvent);const style=createStyleSheet(this.el);const updateStyle=()=>{let cursor="";if(isMultisashResize){cursor="all-scroll"}else if(this.orientation===1){if(this.state===1){cursor="s-resize"}else if(this.state===2){cursor="n-resize"}else{cursor=isMacintosh?"row-resize":"ns-resize"}}else{if(this.state===1){cursor="e-resize"}else if(this.state===2){cursor="w-resize"}else{cursor=isMacintosh?"col-resize":"ew-resize"}}style.textContent=`* { cursor: ${cursor} !important; }`};const disposables=new DisposableStore;updateStyle();if(!isMultisashResize){this.onDidEnablementChange.event(updateStyle,null,disposables)}const onPointerMove=e=>{EventHelper.stop(e,false);const event2={startX:startX,currentX:e.pageX,startY:startY,currentY:e.pageY,altKey:altKey};this._onDidChange.fire(event2)};const onPointerUp=e=>{EventHelper.stop(e,false);this.el.removeChild(style);this.el.classList.remove("active");this._onDidEnd.fire();disposables.dispose();for(const iframe of iframes){iframe.classList.remove(PointerEventsDisabledCssClass)}};pointerEventFactory.onPointerMove(onPointerMove,null,disposables);pointerEventFactory.onPointerUp(onPointerUp,null,disposables);disposables.add(pointerEventFactory)}onPointerDoublePress(e){const orthogonalSash=this.getOrthogonalSash(e);if(orthogonalSash){orthogonalSash._onDidReset.fire()}if(this.linkedSash){this.linkedSash._onDidReset.fire()}this._onDidReset.fire()}static onMouseEnter(sash,fromLinkedSash=false){if(sash.el.classList.contains("active")){sash.hoverDelayer.cancel();sash.el.classList.add("hover")}else{sash.hoverDelayer.trigger((()=>sash.el.classList.add("hover")),sash.hoverDelay).then(void 0,(()=>{}))}if(!fromLinkedSash&&sash.linkedSash){Sash.onMouseEnter(sash.linkedSash,true)}}static onMouseLeave(sash,fromLinkedSash=false){sash.hoverDelayer.cancel();sash.el.classList.remove("hover");if(!fromLinkedSash&&sash.linkedSash){Sash.onMouseLeave(sash.linkedSash,true)}}clearSashHoverState(){Sash.onMouseLeave(this)}layout(){if(this.orientation===0){const verticalProvider=this.layoutProvider;this.el.style.left=verticalProvider.getVerticalSashLeft(this)-this.size/2+"px";if(verticalProvider.getVerticalSashTop){this.el.style.top=verticalProvider.getVerticalSashTop(this)+"px"}if(verticalProvider.getVerticalSashHeight){this.el.style.height=verticalProvider.getVerticalSashHeight(this)+"px"}}else{const horizontalProvider=this.layoutProvider;this.el.style.top=horizontalProvider.getHorizontalSashTop(this)-this.size/2+"px";if(horizontalProvider.getHorizontalSashLeft){this.el.style.left=horizontalProvider.getHorizontalSashLeft(this)+"px"}if(horizontalProvider.getHorizontalSashWidth){this.el.style.width=horizontalProvider.getHorizontalSashWidth(this)+"px"}}}getOrthogonalSash(e){var _a6;const target=(_a6=e.initialTarget)!==null&&_a6!==void 0?_a6:e.target;if(!target||!(target instanceof HTMLElement)){return void 0}if(target.classList.contains("orthogonal-drag-handle")){return target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}return void 0}dispose(){super.dispose();this.el.remove()}}}});var _a3,_b,ResourceMapEntry,ResourceMap,LinkedMap,LRUCache;var init_map=__esm({"node_modules/monaco-editor/esm/vs/base/common/map.js"(){ResourceMapEntry=class{constructor(uri,value){this.uri=uri;this.value=value}};ResourceMap=class{constructor(mapOrKeyFn,toKey){this[_a3]="ResourceMap";if(mapOrKeyFn instanceof ResourceMap){this.map=new Map(mapOrKeyFn.map);this.toKey=toKey!==null&&toKey!==void 0?toKey:ResourceMap.defaultToKey}else{this.map=new Map;this.toKey=mapOrKeyFn!==null&&mapOrKeyFn!==void 0?mapOrKeyFn:ResourceMap.defaultToKey}}set(resource,value){this.map.set(this.toKey(resource),new ResourceMapEntry(resource,value));return this}get(resource){var _c2;return(_c2=this.map.get(this.toKey(resource)))===null||_c2===void 0?void 0:_c2.value}has(resource){return this.map.has(this.toKey(resource))}get size(){return this.map.size}clear(){this.map.clear()}delete(resource){return this.map.delete(this.toKey(resource))}forEach(clb,thisArg){if(typeof thisArg!=="undefined"){clb=clb.bind(thisArg)}for(const[_,entry]of this.map){clb(entry.value,entry.uri,this)}}*values(){for(const entry of this.map.values()){yield entry.value}}*keys(){for(const entry of this.map.values()){yield entry.uri}}*entries(){for(const entry of this.map.values()){yield[entry.uri,entry.value]}}*[(_a3=Symbol.toStringTag,Symbol.iterator)](){for(const[,entry]of this.map){yield[entry.uri,entry.value]}}};ResourceMap.defaultToKey=resource=>resource.toString();LinkedMap=class{constructor(){this[_b]="LinkedMap";this._map=new Map;this._head=void 0;this._tail=void 0;this._size=0;this._state=0}clear(){this._map.clear();this._head=void 0;this._tail=void 0;this._size=0;this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var _c2;return(_c2=this._head)===null||_c2===void 0?void 0:_c2.value}get last(){var _c2;return(_c2=this._tail)===null||_c2===void 0?void 0:_c2.value}has(key){return this._map.has(key)}get(key,touch=0){const item=this._map.get(key);if(!item){return void 0}if(touch!==0){this.touch(item,touch)}return item.value}set(key,value,touch=0){let item=this._map.get(key);if(item){item.value=value;if(touch!==0){this.touch(item,touch)}}else{item={key:key,value:value,next:void 0,previous:void 0};switch(touch){case 0:this.addItemLast(item);break;case 1:this.addItemFirst(item);break;case 2:this.addItemLast(item);break;default:this.addItemLast(item);break}this._map.set(key,item);this._size++}return this}delete(key){return!!this.remove(key)}remove(key){const item=this._map.get(key);if(!item){return void 0}this._map.delete(key);this.removeItem(item);this._size--;return item.value}shift(){if(!this._head&&!this._tail){return void 0}if(!this._head||!this._tail){throw new Error("Invalid list")}const item=this._head;this._map.delete(item.key);this.removeItem(item);this._size--;return item.value}forEach(callbackfn,thisArg){const state=this._state;let current=this._head;while(current){if(thisArg){callbackfn.bind(thisArg)(current.value,current.key,this)}else{callbackfn(current.value,current.key,this)}if(this._state!==state){throw new Error(`LinkedMap got modified during iteration.`)}current=current.next}}keys(){const map=this;const state=this._state;let current=this._head;const iterator={[Symbol.iterator](){return iterator},next(){if(map._state!==state){throw new Error(`LinkedMap got modified during iteration.`)}if(current){const result={value:current.key,done:false};current=current.next;return result}else{return{value:void 0,done:true}}}};return iterator}values(){const map=this;const state=this._state;let current=this._head;const iterator={[Symbol.iterator](){return iterator},next(){if(map._state!==state){throw new Error(`LinkedMap got modified during iteration.`)}if(current){const result={value:current.value,done:false};current=current.next;return result}else{return{value:void 0,done:true}}}};return iterator}entries(){const map=this;const state=this._state;let current=this._head;const iterator={[Symbol.iterator](){return iterator},next(){if(map._state!==state){throw new Error(`LinkedMap got modified during iteration.`)}if(current){const result={value:[current.key,current.value],done:false};current=current.next;return result}else{return{value:void 0,done:true}}}};return iterator}[(_b=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(newSize){if(newSize>=this.size){return}if(newSize===0){this.clear();return}let current=this._head;let currentSize=this.size;while(current&¤tSize>newSize){this._map.delete(current.key);current=current.next;currentSize--}this._head=current;this._size=currentSize;if(current){current.previous=void 0}this._state++}addItemFirst(item){if(!this._head&&!this._tail){this._tail=item}else if(!this._head){throw new Error("Invalid list")}else{item.next=this._head;this._head.previous=item}this._head=item;this._state++}addItemLast(item){if(!this._head&&!this._tail){this._head=item}else if(!this._tail){throw new Error("Invalid list")}else{item.previous=this._tail;this._tail.next=item}this._tail=item;this._state++}removeItem(item){if(item===this._head&&item===this._tail){this._head=void 0;this._tail=void 0}else if(item===this._head){if(!item.next){throw new Error("Invalid list")}item.next.previous=void 0;this._head=item.next}else if(item===this._tail){if(!item.previous){throw new Error("Invalid list")}item.previous.next=void 0;this._tail=item.previous}else{const next=item.next;const previous=item.previous;if(!next||!previous){throw new Error("Invalid list")}next.previous=previous;previous.next=next}item.next=void 0;item.previous=void 0;this._state++}touch(item,touch){if(!this._head||!this._tail){throw new Error("Invalid list")}if(touch!==1&&touch!==2){return}if(touch===1){if(item===this._head){return}const next=item.next;const previous=item.previous;if(item===this._tail){previous.next=void 0;this._tail=previous}else{next.previous=previous;previous.next=next}item.previous=void 0;item.next=this._head;this._head.previous=item;this._head=item;this._state++}else if(touch===2){if(item===this._tail){return}const next=item.next;const previous=item.previous;if(item===this._head){next.previous=void 0;this._head=next}else{next.previous=previous;previous.next=next}item.next=void 0;item.previous=this._tail;this._tail.next=item;this._tail=item;this._state++}}toJSON(){const data=[];this.forEach(((value,key)=>{data.push([key,value])}));return data}fromJSON(data){this.clear();for(const[key,value]of data){this.set(key,value)}}};LRUCache=class extends LinkedMap{constructor(limit,ratio=1){super();this._limit=limit;this._ratio=Math.min(Math.max(0,ratio),1)}get limit(){return this._limit}set limit(limit){this._limit=limit;this.checkTrim()}get(key,touch=2){return super.get(key,touch)}peek(key){return super.get(key,0)}set(key,value){super.set(key,value,2);this.checkTrim();return this}checkTrim(){if(this.size>this._limit){this.trimOld(Math.round(this._limit*this._ratio))}}}}});function or(...filter){return function(word,wordToMatchAgainst){for(let i=0,len=filter.length;i0?[{start:0,end:word.length}]:[]}function matchesContiguousSubString(word,wordToMatchAgainst){const index=wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());if(index===-1){return null}return[{start:index,end:index+word.length}]}function matchesSubString(word,wordToMatchAgainst){return _matchesSubString(word.toLowerCase(),wordToMatchAgainst.toLowerCase(),0,0)}function _matchesSubString(word,wordToMatchAgainst,i,j){if(i===word.length){return[]}else if(j===wordToMatchAgainst.length){return null}else{if(word[i]===wordToMatchAgainst[j]){let result=null;if(result=_matchesSubString(word,wordToMatchAgainst,i+1,j+1)){return join({start:j,end:j+1},result)}return null}return _matchesSubString(word,wordToMatchAgainst,i,j+1)}}function isLower(code){return 97<=code&&code<=122}function isUpper(code){return 65<=code&&code<=90}function isNumber2(code){return 48<=code&&code<=57}function isWhitespace(code){return code===32||code===9||code===10||code===13}function isWordSeparator(code){return isWhitespace(code)||wordSeparators.has(code)}function charactersMatch(codeA,codeB){return codeA===codeB||isWordSeparator(codeA)&&isWordSeparator(codeB)}function isAlphanumeric(code){return isLower(code)||isUpper(code)||isNumber2(code)}function join(head,tail3){if(tail3.length===0){tail3=[head]}else if(head.end===tail3[0].start){tail3[0].start=head.start}else{tail3.unshift(head)}return tail3}function nextAnchor(camelCaseWord,start){for(let i=start;i0&&!isAlphanumeric(camelCaseWord.charCodeAt(i-1))){return i}}return camelCaseWord.length}function _matchesCamelCase(word,camelCaseWord,i,j){if(i===word.length){return[]}else if(j===camelCaseWord.length){return null}else if(word[i]!==camelCaseWord[j].toLowerCase()){return null}else{let result=null;let nextUpperIndex=j+1;result=_matchesCamelCase(word,camelCaseWord,i+1,j+1);while(!result&&(nextUpperIndex=nextAnchor(camelCaseWord,nextUpperIndex)).6}function isCamelCaseWord(analysis){const{upperPercent:upperPercent,lowerPercent:lowerPercent,alphaPercent:alphaPercent,numericPercent:numericPercent}=analysis;return lowerPercent>.2&&upperPercent<.8&&alphaPercent>.6&&numericPercent<.2}function isCamelCasePattern(word){let upper=0,lower=0,code=0,whitespace=0;for(let i=0;i60){return null}const analysis=analyzeCamelCaseWord(camelCaseWord);if(!isCamelCaseWord(analysis)){if(!isUpperCaseWord(analysis)){return null}camelCaseWord=camelCaseWord.toLowerCase()}let result=null;let i=0;word=word.toLowerCase();while(i0&&isWordSeparator(word.charCodeAt(i-1))){return i}}return word.length}function matchesFuzzy(word,wordToMatchAgainst,enableSeparateSubstringMatching=false){if(typeof word!=="string"||typeof wordToMatchAgainst!=="string"){return null}let regexp=fuzzyRegExpCache.get(word);if(!regexp){regexp=new RegExp(convertSimple2RegExpPattern(word),"i");fuzzyRegExpCache.set(word,regexp)}const match2=regexp.exec(wordToMatchAgainst);if(match2){return[{start:match2.index,end:match2.index+match2[0].length}]}return enableSeparateSubstringMatching?fuzzySeparateFilter(word,wordToMatchAgainst):fuzzyContiguousFilter(word,wordToMatchAgainst)}function matchesFuzzy2(pattern,word){const score3=fuzzyScore(pattern,pattern.toLowerCase(),0,word,word.toLowerCase(),0,{firstMatchCanBeWeak:true,boostFullMatch:true});return score3?createMatches(score3):null}function anyScore(pattern,lowPattern,patternPos,word,lowWord,wordPos){const max=Math.min(13,pattern.length);for(;patternPos1;i--){const pos=score3[i]+wordPos;const last=res[res.length-1];if(last&&last.end===pos){last.end=pos+1}else{res.push({start:pos,end:pos+1})}}return res}function initTable(){const table=[];const row=[];for(let i=0;i<=_maxLen;i++){row[i]=0}for(let i=0;i<=_maxLen;i++){table.push(row.slice(0))}return table}function initArr(maxLen){const row=[];for(let i=0;i<=maxLen;i++){row[i]=0}return row}function printTable(table,pattern,patternLen,word,wordLen){function pad(s,n,pad2=" "){while(s.lengthpad(c,3))).join("|")}\n`;for(let i=0;i<=patternLen;i++){if(i===0){ret+=" |"}else{ret+=`${pattern[i-1]}|`}ret+=table[i].slice(0,wordLen+1).map((n=>pad(n.toString(),3))).join("|")+"\n"}return ret}function printTables(pattern,patternStart,word,wordStart){pattern=pattern.substr(patternStart);word=word.substr(wordStart);console.log(printTable(_table,pattern,pattern.length,word,word.length));console.log(printTable(_arrows,pattern,pattern.length,word,word.length));console.log(printTable(_diag,pattern,pattern.length,word,word.length))}function isSeparatorAtPos(value,index){if(index<0||index>=value.length){return false}const code=value.codePointAt(index);switch(code){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return true;case void 0:return false;default:if(isEmojiImprecise(code)){return true}return false}}function isWhitespaceAtPos(value,index){if(index<0||index>=value.length){return false}const code=value.charCodeAt(index);switch(code){case 32:case 9:return true;default:return false}}function isUpperCaseAtPos(pos,word,wordLow){return word[pos]!==wordLow[pos]}function isPatternInWord(patternLow,patternPos,patternLen,wordLow,wordPos,wordLen,fillMinWordPosArr=false){while(patternPos_maxLen?_maxLen:pattern.length;const wordLen=word.length>_maxLen?_maxLen:word.length;if(patternStart>=patternLen||wordStart>=wordLen||patternLen-patternStart>wordLen-wordStart){return void 0}if(!isPatternInWord(patternLow,patternStart,patternLen,wordLow,wordStart,wordLen,true)){return void 0}_fillInMaxWordMatchPos(patternLen,wordLen,patternStart,wordStart,patternLow,wordLow);let row=1;let column=1;let patternPos=patternStart;let wordPos=wordStart;const hasStrongFirstMatch=[false];for(row=1,patternPos=patternStart;patternPosminWordMatchPos;const leftScore=canComeLeft?_table[row][column-1]+(_diag[row][column-1]>0?-5:0):0;const canComeLeftLeft=wordPos>minWordMatchPos+1&&_diag[row][column-1]>0;const leftLeftScore=canComeLeftLeft?_table[row][column-2]+(_diag[row][column-2]>0?-5:0):0;if(canComeLeftLeft&&(!canComeLeft||leftLeftScore>=leftScore)&&(!canComeDiag||leftLeftScore>=diagScore)){_table[row][column]=leftLeftScore;_arrows[row][column]=3;_diag[row][column]=0}else if(canComeLeft&&(!canComeDiag||leftScore>=diagScore)){_table[row][column]=leftScore;_arrows[row][column]=2;_diag[row][column]=0}else if(canComeDiag){_table[row][column]=diagScore;_arrows[row][column]=1;_diag[row][column]=_diag[row-1][column-1]+1}else{throw new Error(`not possible`)}}}if(_debug){printTables(pattern,patternStart,word,wordStart)}if(!hasStrongFirstMatch[0]&&!options2.firstMatchCanBeWeak){return void 0}row--;column--;const result=[_table[row][column],wordStart];let backwardsDiagLength=0;let maxMatchColumn=0;while(row>=1){let diagColumn=column;do{const arrow=_arrows[row][diagColumn];if(arrow===3){diagColumn=diagColumn-2}else if(arrow===2){diagColumn=diagColumn-1}else{break}}while(diagColumn>=1);if(backwardsDiagLength>1&&patternLow[patternStart+row-1]===wordLow[wordStart+column-1]&&!isUpperCaseAtPos(diagColumn+wordStart-1,word,wordLow)&&backwardsDiagLength+1>_diag[row][diagColumn]){diagColumn=column}if(diagColumn===column){backwardsDiagLength++}else{backwardsDiagLength=1}if(!maxMatchColumn){maxMatchColumn=diagColumn}row--;column=diagColumn-1;result.push(column)}if(wordLen===patternLen&&options2.boostFullMatch){result[0]+=2}const skippedCharsCount=maxMatchColumn-patternLen;result[0]-=skippedCharsCount;return result}function _fillInMaxWordMatchPos(patternLen,wordLen,patternStart,wordStart,patternLow,wordLow){let patternPos=patternLen-1;let wordPos=wordLen-1;while(patternPos>=patternStart&&wordPos>=wordStart){if(patternLow[patternPos]===wordLow[wordPos]){_maxWordMatchPos[patternPos]=wordPos;patternPos--}wordPos--}}function _doScore(pattern,patternLow,patternPos,patternStart,word,wordLow,wordPos,wordLen,wordStart,newMatchStart,outFirstMatchStrong){if(patternLow[patternPos]!==wordLow[wordPos]){return Number.MIN_SAFE_INTEGER}let score3=1;let isGapLocation=false;if(wordPos===patternPos-patternStart){score3=pattern[patternPos]===word[wordPos]?7:5}else if(isUpperCaseAtPos(wordPos,word,wordLow)&&(wordPos===0||!isUpperCaseAtPos(wordPos-1,word,wordLow))){score3=pattern[patternPos]===word[wordPos]?7:5;isGapLocation=true}else if(isSeparatorAtPos(wordLow,wordPos)&&(wordPos===0||!isSeparatorAtPos(wordLow,wordPos-1))){score3=5}else if(isSeparatorAtPos(wordLow,wordPos-1)||isWhitespaceAtPos(wordLow,wordPos-1)){score3=5;isGapLocation=true}if(score3>1&&patternPos===patternStart){outFirstMatchStrong[0]=true}if(!isGapLocation){isGapLocation=isUpperCaseAtPos(wordPos,word,wordLow)||isSeparatorAtPos(wordLow,wordPos-1)||isWhitespaceAtPos(wordLow,wordPos-1)}if(patternPos===patternStart){if(wordPos>wordStart){score3-=isGapLocation?3:5}}else{if(newMatchStart){score3+=isGapLocation?2:0}else{score3+=isGapLocation?0:1}}if(wordPos+1===wordLen){score3-=isGapLocation?3:5}return score3}function fuzzyScoreGracefulAggressive(pattern,lowPattern,patternPos,word,lowWord,wordPos,options2){return fuzzyScoreWithPermutations(pattern,lowPattern,patternPos,word,lowWord,wordPos,true,options2)}function fuzzyScoreWithPermutations(pattern,lowPattern,patternPos,word,lowWord,wordPos,aggressive,options2){let top=fuzzyScore(pattern,lowPattern,patternPos,word,lowWord,wordPos,options2);if(top&&!aggressive){return top}if(pattern.length>=3){const tries=Math.min(7,pattern.length-1);for(let movingPatternPos=patternPos+1;movingPatternPostop[0]){top=candidate}}}}}return top}function nextTypoPermutation(pattern,patternPos){if(patternPos+1>=pattern.length){return void 0}const swap1=pattern[patternPos];const swap2=pattern[patternPos+1];if(swap1===swap2){return void 0}return pattern.slice(0,patternPos)+swap2+swap1+pattern.slice(patternPos+2)}var matchesStrictPrefix,matchesPrefix,wordSeparators,fuzzyContiguousFilter,fuzzySeparateFilter,fuzzyRegExpCache,_maxLen,_minWordMatchPos,_maxWordMatchPos,_diag,_table,_arrows,_debug,FuzzyScore,FuzzyScoreOptions;var init_filters=__esm({"node_modules/monaco-editor/esm/vs/base/common/filters.js"(){init_map();init_strings();matchesStrictPrefix=_matchesPrefix.bind(void 0,false);matchesPrefix=_matchesPrefix.bind(void 0,true);wordSeparators=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach((s=>wordSeparators.add(s.charCodeAt(0))));fuzzyContiguousFilter=or(matchesPrefix,matchesCamelCase,matchesContiguousSubString);fuzzySeparateFilter=or(matchesPrefix,matchesCamelCase,matchesSubString);fuzzyRegExpCache=new LRUCache(1e4);_maxLen=128;_minWordMatchPos=initArr(2*_maxLen);_maxWordMatchPos=initArr(2*_maxLen);_diag=initTable();_table=initTable();_arrows=initTable();_debug=false;(function(FuzzyScore2){FuzzyScore2.Default=[-100,0];function isDefault(score3){return!score3||score3.length===2&&score3[0]===-100&&score3[1]===0}FuzzyScore2.isDefault=isDefault})(FuzzyScore||(FuzzyScore={}));FuzzyScoreOptions=class{constructor(firstMatchCanBeWeak,boostFullMatch){this.firstMatchCanBeWeak=firstMatchCanBeWeak;this.boostFullMatch=boostFullMatch}};FuzzyScoreOptions.default={boostFullMatch:true,firstMatchCanBeWeak:false}}});function escapeIcons(text2){return text2.replace(escapeIconsRegex,((match2,escaped)=>escaped?match2:`\\${match2}`))}function markdownEscapeEscapedIcons(text2){return text2.replace(markdownEscapedIconsRegex,(match2=>`\\${match2}`))}function stripIcons(text2){if(text2.indexOf(iconStartMarker)===-1){return text2}return text2.replace(stripIconsRegex,((match2,preWhitespace,escaped,postWhitespace)=>escaped?match2:preWhitespace||postWhitespace||""))}function getCodiconAriaLabel(text2){if(!text2){return""}return text2.replace(/\$\((.*?)\)/g,((_match,codiconName)=>` ${codiconName} `)).trim()}function parseLabelWithIcons(input){_parseIconsRegex.lastIndex=0;let text2="";const iconOffsets=[];let iconsOffset=0;while(true){const pos=_parseIconsRegex.lastIndex;const match2=_parseIconsRegex.exec(input);const chars=input.substring(pos,match2===null||match2===void 0?void 0:match2.index);if(chars.length>0){text2+=chars;for(let i=0;is.trim()));href=splitted[0];const parameters=splitted[1];if(parameters){const heightFromParams=/height=(\d+)/.exec(parameters);const widthFromParams=/width=(\d+)/.exec(parameters);const height=heightFromParams?heightFromParams[1]:"";const width=widthFromParams?widthFromParams[1]:"";const widthIsFinite=isFinite(parseInt(width));const heightIsFinite=isFinite(parseInt(height));if(widthIsFinite){dimensions.push(`width="${width}"`)}if(heightIsFinite){dimensions.push(`height="${height}"`)}}return{href:href,dimensions:dimensions}}var MarkdownString;var init_htmlContent=__esm({"node_modules/monaco-editor/esm/vs/base/common/htmlContent.js"(){init_errors();init_iconLabels();init_resources();init_strings();init_uri();MarkdownString=class{constructor(value="",isTrustedOrOptions=false){var _a6,_b3,_c2;this.value=value;if(typeof this.value!=="string"){throw illegalArgument("value")}if(typeof isTrustedOrOptions==="boolean"){this.isTrusted=isTrustedOrOptions;this.supportThemeIcons=false;this.supportHtml=false}else{this.isTrusted=(_a6=isTrustedOrOptions.isTrusted)!==null&&_a6!==void 0?_a6:void 0;this.supportThemeIcons=(_b3=isTrustedOrOptions.supportThemeIcons)!==null&&_b3!==void 0?_b3:false;this.supportHtml=(_c2=isTrustedOrOptions.supportHtml)!==null&&_c2!==void 0?_c2:false}}appendText(value,newlineStyle=0){this.value+=escapeMarkdownSyntaxTokens(this.supportThemeIcons?escapeIcons(value):value).replace(/([ \t]+)/g,((_match,g1)=>" ".repeat(g1.length))).replace(/\>/gm,"\\>").replace(/\n/g,newlineStyle===1?"\\\n":"\n\n");return this}appendMarkdown(value){this.value+=value;return this}appendCodeblock(langId,code){this.value+="\n```";this.value+=langId;this.value+="\n";this.value+=code;this.value+="\n```\n";return this}appendLink(target,label,title){this.value+="[";this.value+=this._escape(label,"]");this.value+="](";this.value+=this._escape(String(target),")");if(title){this.value+=` "${this._escape(this._escape(title,'"'),")")}"`}this.value+=")";return this}_escape(value,ch){const r=new RegExp(escapeRegExpCharacters(ch),"g");return value.replace(r,((match2,offset)=>{if(value.charAt(offset-1)!=="\\"){return`\\${match2}`}else{return match2}}))}}}});var init_25=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css"(){}});var StableEditorScrollState;var init_stableEditorScroll=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/stableEditorScroll.js"(){StableEditorScrollState=class{static capture(editor2){if(editor2.getScrollTop()===0||editor2.hasPendingScrollAnimation()){return new StableEditorScrollState(editor2.getScrollTop(),editor2.getContentHeight(),null,0,null)}let visiblePosition=null;let visiblePositionScrollDelta=0;const visibleRanges=editor2.getVisibleRanges();if(visibleRanges.length>0){visiblePosition=visibleRanges[0].getStartPosition();const visiblePositionScrollTop=editor2.getTopForPosition(visiblePosition.lineNumber,visiblePosition.column);visiblePositionScrollDelta=editor2.getScrollTop()-visiblePositionScrollTop}return new StableEditorScrollState(editor2.getScrollTop(),editor2.getContentHeight(),visiblePosition,visiblePositionScrollDelta,editor2.getPosition())}constructor(_initialScrollTop,_initialContentHeight,_visiblePosition,_visiblePositionScrollDelta,_cursorPosition){this._initialScrollTop=_initialScrollTop;this._initialContentHeight=_initialContentHeight;this._visiblePosition=_visiblePosition;this._visiblePositionScrollDelta=_visiblePositionScrollDelta;this._cursorPosition=_cursorPosition}restore(editor2){if(this._initialContentHeight===editor2.getContentHeight()&&this._initialScrollTop===editor2.getScrollTop()){return}if(this._visiblePosition){const visiblePositionScrollTop=editor2.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);editor2.setScrollTop(visiblePositionScrollTop+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(editor2){if(this._initialContentHeight===editor2.getContentHeight()&&this._initialScrollTop===editor2.getScrollTop()){return}const currentCursorPosition=editor2.getPosition();if(!this._cursorPosition||!currentCursorPosition){return}const offset=editor2.getTopForLineNumber(currentCursorPosition.lineNumber)-editor2.getTopForLineNumber(this._cursorPosition.lineNumber);editor2.setScrollTop(editor2.getScrollTop()+offset)}}}});var DataTransfers;var init_dnd=__esm({"node_modules/monaco-editor/esm/vs/base/browser/dnd.js"(){init_mime();DataTransfers={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:Mimes.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}}});function setupNativeHover(htmlElement,tooltip){if(isString(tooltip)){htmlElement.title=stripIcons(tooltip)}else if(tooltip===null||tooltip===void 0?void 0:tooltip.markdownNotSupportedFallback){htmlElement.title=tooltip.markdownNotSupportedFallback}else{htmlElement.removeAttribute("title")}}function setupCustomHover(hoverDelegate,htmlElement,content,options2){let hoverPreparation;let hoverWidget;const hideHover=(disposeWidget,disposePreparation)=>{var _a6;const hadHover=hoverWidget!==void 0;if(disposeWidget){hoverWidget===null||hoverWidget===void 0?void 0:hoverWidget.dispose();hoverWidget=void 0}if(disposePreparation){hoverPreparation===null||hoverPreparation===void 0?void 0:hoverPreparation.dispose();hoverPreparation=void 0}if(hadHover){(_a6=hoverDelegate.onDidHideHover)===null||_a6===void 0?void 0:_a6.call(hoverDelegate)}};const triggerShowHover=(delay,focus,target)=>new TimeoutTimer((()=>__awaiter9(this,void 0,void 0,(function*(){if(!hoverWidget||hoverWidget.isDisposed){hoverWidget=new UpdatableHoverWidget(hoverDelegate,target||htmlElement,delay>0);yield hoverWidget.update(content,focus,options2)}}))),delay);const onMouseOver=()=>{if(hoverPreparation){return}const toDispose=new DisposableStore;const onMouseLeave=e=>hideHover(false,e.fromElement===htmlElement);toDispose.add(addDisposableListener(htmlElement,EventType.MOUSE_LEAVE,onMouseLeave,true));const onMouseDown=()=>hideHover(true,true);toDispose.add(addDisposableListener(htmlElement,EventType.MOUSE_DOWN,onMouseDown,true));const target={targetElements:[htmlElement],dispose:()=>{}};if(hoverDelegate.placement===void 0||hoverDelegate.placement==="mouse"){const onMouseMove=e=>{target.x=e.x+10;if(e.target instanceof HTMLElement&&e.target.classList.contains("action-label")){hideHover(true,true)}};toDispose.add(addDisposableListener(htmlElement,EventType.MOUSE_MOVE,onMouseMove,true))}toDispose.add(triggerShowHover(hoverDelegate.delay,false,target));hoverPreparation=toDispose};const mouseOverDomEmitter=addDisposableListener(htmlElement,EventType.MOUSE_OVER,onMouseOver,true);const hover={show:focus=>{hideHover(false,true);triggerShowHover(0,focus)},hide:()=>{hideHover(true,true)},update:(newContent,hoverOptions)=>__awaiter9(this,void 0,void 0,(function*(){content=newContent;yield hoverWidget===null||hoverWidget===void 0?void 0:hoverWidget.update(content,void 0,hoverOptions)})),dispose:()=>{mouseOverDomEmitter.dispose();hideHover(true,true)}};return hover}var __awaiter9,UpdatableHoverWidget;var init_iconLabelHover=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabelHover.js"(){init_dom();init_async();init_cancellation();init_htmlContent();init_iconLabels();init_lifecycle();init_types();init_nls();__awaiter9=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};UpdatableHoverWidget=class{constructor(hoverDelegate,target,fadeInAnimation){this.hoverDelegate=hoverDelegate;this.target=target;this.fadeInAnimation=fadeInAnimation}update(content,focus,options2){var _a6;return __awaiter9(this,void 0,void 0,(function*(){if(this._cancellationTokenSource){this._cancellationTokenSource.dispose(true);this._cancellationTokenSource=void 0}if(this.isDisposed){return}let resolvedContent;if(content===void 0||isString(content)||content instanceof HTMLElement){resolvedContent=content}else if(!isFunction(content.markdown)){resolvedContent=(_a6=content.markdown)!==null&&_a6!==void 0?_a6:content.markdownNotSupportedFallback}else{if(!this._hoverWidget){this.show(localize("iconLabel.loading","Loading..."),focus)}this._cancellationTokenSource=new CancellationTokenSource;const token=this._cancellationTokenSource.token;resolvedContent=yield content.markdown(token);if(resolvedContent===void 0){resolvedContent=content.markdownNotSupportedFallback}if(this.isDisposed||token.isCancellationRequested){return}}this.show(resolvedContent,focus,options2)}))}show(content,focus,options2){const oldHoverWidget=this._hoverWidget;if(this.hasContent(content)){const hoverOptions=Object.assign({content:content,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!oldHoverWidget},options2);this._hoverWidget=this.hoverDelegate.showHover(hoverOptions,focus)}oldHoverWidget===null||oldHoverWidget===void 0?void 0:oldHoverWidget.dispose()}hasContent(content){if(!content){return false}if(isMarkdownString(content)){return!!content.value}return true}get isDisposed(){var _a6;return(_a6=this._hoverWidget)===null||_a6===void 0?void 0:_a6.isDisposed}dispose(){var _a6,_b3;(_a6=this._hoverWidget)===null||_a6===void 0?void 0:_a6.dispose();(_b3=this._cancellationTokenSource)===null||_b3===void 0?void 0:_b3.dispose(true);this._cancellationTokenSource=void 0}}}});function renderText(text2,options2={}){const element=createElement(options2);element.textContent=text2;return element}function renderFormattedText(formattedText,options2={}){const element=createElement(options2);_renderFormattedText(element,parseFormattedText(formattedText,!!options2.renderCodeSegments),options2.actionHandler,options2.renderCodeSegments);return element}function createElement(options2){const tagName=options2.inline?"span":"div";const element=document.createElement(tagName);if(options2.className){element.className=options2.className}return element}function _renderFormattedText(element,treeNode,actionHandler,renderCodeSegments){let child;if(treeNode.type===2){child=document.createTextNode(treeNode.content||"")}else if(treeNode.type===3){child=document.createElement("b")}else if(treeNode.type===4){child=document.createElement("i")}else if(treeNode.type===7&&renderCodeSegments){child=document.createElement("code")}else if(treeNode.type===5&&actionHandler){const a=document.createElement("a");actionHandler.disposables.add(addStandardDisposableListener(a,"click",(event=>{actionHandler.callback(String(treeNode.index),event)})));child=a}else if(treeNode.type===8){child=document.createElement("br")}else if(treeNode.type===1){child=element}if(child&&element!==child){element.appendChild(child)}if(child&&Array.isArray(treeNode.children)){treeNode.children.forEach((nodeChild=>{_renderFormattedText(child,nodeChild,actionHandler,renderCodeSegments)}))}}function parseFormattedText(content,parseCodeSegments){const root={type:1,children:[]};let actionViewItemIndex=0;let current=root;const stack=[];const stream=new StringStream(content);while(!stream.eos()){let next=stream.next();const isEscapedFormatType=next==="\\"&&formatTagType(stream.peek(),parseCodeSegments)!==0;if(isEscapedFormatType){next=stream.next()}if(!isEscapedFormatType&&isFormatTag(next,parseCodeSegments)&&next===stream.peek()){stream.advance();if(current.type===2){current=stack.pop()}const type=formatTagType(next,parseCodeSegments);if(current.type===type||current.type===5&&type===6){current=stack.pop()}else{const newCurrent={type:type,children:[]};if(type===5){newCurrent.index=actionViewItemIndex;actionViewItemIndex++}current.children.push(newCurrent);stack.push(current);current=newCurrent}}else if(next==="\n"){if(current.type===2){current=stack.pop()}current.children.push({type:8})}else{if(current.type!==2){const textCurrent={type:2,content:next};current.children.push(textCurrent);stack.push(current);current=textCurrent}else{current.content+=next}}}if(current.type===2){current=stack.pop()}if(stack.length){}return root}function isFormatTag(char,supportCodeSegments){return formatTagType(char,supportCodeSegments)!==0}function formatTagType(char,supportCodeSegments){switch(char){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return supportCodeSegments?7:0;default:return 0}}var StringStream;var init_formattedTextRenderer=__esm({"node_modules/monaco-editor/esm/vs/base/browser/formattedTextRenderer.js"(){init_dom();StringStream=class{constructor(source){this.source=source;this.index=0}eos(){return this.index>=this.source.length}next(){const next=this.peek();this.advance();return next}peek(){return this.source[this.index]}advance(){this.index++}}}});function renderLabelWithIcons(text2){const elements=new Array;let match2;let textStart=0,textStop=0;while((match2=labelWithIconsRegex.exec(text2))!==null){textStop=match2.index||0;if(textStartarr.length)len=arr.length;for(var i=0,arr2=new Array(len);i=o.length)return{done:true};return{done:false,value:o[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function getDefaults2(){return{async:false,baseUrl:null,breaks:false,extensions:null,gfm:true,headerIds:true,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:true,pedantic:false,renderer:null,sanitize:false,sanitizer:null,silent:false,smartLists:false,smartypants:false,tokenizer:null,walkTokens:null,xhtml:false}}exports2.defaults=getDefaults2();function changeDefaults(newDefaults){exports2.defaults=newDefaults}var escapeTest=/[&<>"']/;var escapeReplace=/[&<>"']/g;var escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/;var escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var escapeReplacements={"&":"&","<":"<",">":">",'"':""","'":"'"};var getEscapeReplacement=function getEscapeReplacement2(ch){return escapeReplacements[ch]};function escape2(html2,encode){if(encode){if(escapeTest.test(html2)){return html2.replace(escapeReplace,getEscapeReplacement)}}else{if(escapeTestNoEncode.test(html2)){return html2.replace(escapeReplaceNoEncode,getEscapeReplacement)}}return html2}var unescapeTest=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function unescape(html2){return html2.replace(unescapeTest,(function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""}))}var caret=/(^|[^\[])\^/g;function edit(regex,opt){regex=typeof regex==="string"?regex:regex.source;opt=opt||"";var obj={replace:function replace(name,val){val=val.source||val;val=val.replace(caret,"$1");regex=regex.replace(name,val);return obj},getRegex:function getRegex(){return new RegExp(regex,opt)}};return obj}var nonWordAndColonTest=/[^\w:]/g;var originIndependentUrl=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function cleanUrl(sanitize3,base,href){if(sanitize3){var prot;try{prot=decodeURIComponent(unescape(href)).replace(nonWordAndColonTest,"").toLowerCase()}catch(e){return null}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0||prot.indexOf("data:")===0){return null}}if(base&&!originIndependentUrl.test(href)){href=resolveUrl(base,href)}try{href=encodeURI(href).replace(/%25/g,"%")}catch(e){return null}return href}var baseUrls={};var justDomain=/^[^:]+:\/*[^/]*$/;var protocol=/^([^:]+:)[\s\S]*$/;var domain=/^([^:]+:\/*[^/]*)[\s\S]*$/;function resolveUrl(base,href){if(!baseUrls[" "+base]){if(justDomain.test(base)){baseUrls[" "+base]=base+"/"}else{baseUrls[" "+base]=rtrim2(base,"/",true)}}base=baseUrls[" "+base];var relativeBase=base.indexOf(":")===-1;if(href.substring(0,2)==="//"){if(relativeBase){return href}return base.replace(protocol,"$1")+href}else if(href.charAt(0)==="/"){if(relativeBase){return href}return base.replace(domain,"$1")+href}else{return base+href}}var noopTest={exec:function noopTest2(){}};function merge(obj){var i=1,target,key;for(;i=0&&str[curr]==="\\"){escaped=!escaped}if(escaped){return"|"}else{return" |"}})),cells=row.split(/ \|/);var i=0;if(!cells[0].trim()){cells.shift()}if(cells.length>0&&!cells[cells.length-1].trim()){cells.pop()}if(cells.length>count){cells.splice(count)}else{while(cells.length1){if(count&1){result+=pattern}count>>=1;pattern+=pattern}return result+pattern}function outputLink(cap,link,raw,lexer3){var href=link.href;var title=link.title?escape2(link.title):null;var text2=cap[1].replace(/\\([\[\]])/g,"$1");if(cap[0].charAt(0)!=="!"){lexer3.state.inLink=true;var token={type:"link",raw:raw,href:href,title:title,text:text2,tokens:lexer3.inlineTokens(text2)};lexer3.state.inLink=false;return token}return{type:"image",raw:raw,href:href,title:title,text:escape2(text2)}}function indentCodeCompensation(raw,text2){var matchIndentToCode=raw.match(/^(\s+)(?:```)/);if(matchIndentToCode===null){return text2}var indentToCode=matchIndentToCode[1];return text2.split("\n").map((function(node){var matchIndentInNode=node.match(/^\s+/);if(matchIndentInNode===null){return node}var indentInNode=matchIndentInNode[0];if(indentInNode.length>=indentToCode.length){return node.slice(indentToCode.length)}return node})).join("\n")}var Tokenizer2=function(){function Tokenizer3(options3){this.options=options3||exports2.defaults}var _proto=Tokenizer3.prototype;_proto.space=function space(src){var cap=this.rules.block.newline.exec(src);if(cap&&cap[0].length>0){return{type:"space",raw:cap[0]}}};_proto.code=function code(src){var cap=this.rules.block.code.exec(src);if(cap){var text2=cap[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:cap[0],codeBlockStyle:"indented",text:!this.options.pedantic?rtrim2(text2,"\n"):text2}}};_proto.fences=function fences(src){var cap=this.rules.block.fences.exec(src);if(cap){var raw=cap[0];var text2=indentCodeCompensation(raw,cap[3]||"");return{type:"code",raw:raw,lang:cap[2]?cap[2].trim():cap[2],text:text2}}};_proto.heading=function heading(src){var cap=this.rules.block.heading.exec(src);if(cap){var text2=cap[2].trim();if(/#$/.test(text2)){var trimmed=rtrim2(text2,"#");if(this.options.pedantic){text2=trimmed.trim()}else if(!trimmed||/ $/.test(trimmed)){text2=trimmed.trim()}}return{type:"heading",raw:cap[0],depth:cap[1].length,text:text2,tokens:this.lexer.inline(text2)}}};_proto.hr=function hr(src){var cap=this.rules.block.hr.exec(src);if(cap){return{type:"hr",raw:cap[0]}}};_proto.blockquote=function blockquote(src){var cap=this.rules.block.blockquote.exec(src);if(cap){var text2=cap[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:cap[0],tokens:this.lexer.blockTokens(text2,[]),text:text2}}};_proto.list=function list(src){var cap=this.rules.block.list.exec(src);if(cap){var raw,istask,ischecked,indent,i,blankLine,endsWithBlankLine,line,nextLine,rawLine,itemContents,endEarly;var bull=cap[1].trim();var isordered=bull.length>1;var list2={type:"list",raw:"",ordered:isordered,start:isordered?+bull.slice(0,-1):"",loose:false,items:[]};bull=isordered?"\\d{1,9}\\"+bull.slice(-1):"\\"+bull;if(this.options.pedantic){bull=isordered?bull:"[*+-]"}var itemRegex=new RegExp("^( {0,3}"+bull+")((?:[\t ][^\\n]*)?(?:\\n|$))");while(src){endEarly=false;if(!(cap=itemRegex.exec(src))){break}if(this.rules.block.hr.test(src)){break}raw=cap[0];src=src.substring(raw.length);line=cap[2].split("\n",1)[0];nextLine=src.split("\n",1)[0];if(this.options.pedantic){indent=2;itemContents=line.trimLeft()}else{indent=cap[2].search(/[^ ]/);indent=indent>4?1:indent;itemContents=line.slice(indent);indent+=cap[1].length}blankLine=false;if(!line&&/^ *$/.test(nextLine)){raw+=nextLine+"\n";src=src.substring(nextLine.length+1);endEarly=true}if(!endEarly){var nextBulletRegex=new RegExp("^ {0,"+Math.min(3,indent-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))");var hrRegex=new RegExp("^ {0,"+Math.min(3,indent-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)");var fencesBeginRegex=new RegExp("^ {0,"+Math.min(3,indent-1)+"}(?:```|~~~)");var headingBeginRegex=new RegExp("^ {0,"+Math.min(3,indent-1)+"}#");while(src){rawLine=src.split("\n",1)[0];line=rawLine;if(this.options.pedantic){line=line.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")}if(fencesBeginRegex.test(line)){break}if(headingBeginRegex.test(line)){break}if(nextBulletRegex.test(line)){break}if(hrRegex.test(src)){break}if(line.search(/[^ ]/)>=indent||!line.trim()){itemContents+="\n"+line.slice(indent)}else if(!blankLine){itemContents+="\n"+line}else{break}if(!blankLine&&!line.trim()){blankLine=true}raw+=rawLine+"\n";src=src.substring(rawLine.length+1)}}if(!list2.loose){if(endsWithBlankLine){list2.loose=true}else if(/\n *\n *$/.test(raw)){endsWithBlankLine=true}}if(this.options.gfm){istask=/^\[[ xX]\] /.exec(itemContents);if(istask){ischecked=istask[0]!=="[ ] ";itemContents=itemContents.replace(/^\[[ xX]\] +/,"")}}list2.items.push({type:"list_item",raw:raw,task:!!istask,checked:ischecked,loose:false,text:itemContents});list2.raw+=raw}list2.items[list2.items.length-1].raw=raw.trimRight();list2.items[list2.items.length-1].text=itemContents.trimRight();list2.raw=list2.raw.trimRight();var l=list2.items.length;for(i=0;i1){return true}}return false}));if(!list2.loose&&spacers.length&&hasMultipleLineBreaks){list2.loose=true;list2.items[i].loose=true}}return list2}};_proto.html=function html2(src){var cap=this.rules.block.html.exec(src);if(cap){var token={type:"html",raw:cap[0],pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]};if(this.options.sanitize){var text2=this.options.sanitizer?this.options.sanitizer(cap[0]):escape2(cap[0]);token.type="paragraph";token.text=text2;token.tokens=this.lexer.inline(text2)}return token}};_proto.def=function def(src){var cap=this.rules.block.def.exec(src);if(cap){if(cap[3])cap[3]=cap[3].substring(1,cap[3].length-1);var tag=cap[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:tag,raw:cap[0],href:cap[2],title:cap[3]}}};_proto.table=function table(src){var cap=this.rules.block.table.exec(src);if(cap){var item={type:"table",header:splitCells(cap[1]).map((function(c){return{text:c}})),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:cap[3]&&cap[3].trim()?cap[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(item.header.length===item.align.length){item.raw=cap[0];var l=item.align.length;var i,j,k,row;for(i=0;i/i.test(cap[0])){this.lexer.state.inLink=false}if(!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])){this.lexer.state.inRawBlock=true}else if(this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])){this.lexer.state.inRawBlock=false}return{type:this.options.sanitize?"text":"html",raw:cap[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape2(cap[0]):cap[0]}}};_proto.link=function link(src){var cap=this.rules.inline.link.exec(src);if(cap){var trimmedUrl=cap[2].trim();if(!this.options.pedantic&&/^$/.test(trimmedUrl)){return}var rtrimSlash=rtrim2(trimmedUrl.slice(0,-1),"\\");if((trimmedUrl.length-rtrimSlash.length)%2===0){return}}else{var lastParenIndex=findClosingBracket(cap[2],"()");if(lastParenIndex>-1){var start=cap[0].indexOf("!")===0?5:4;var linkLen=start+cap[1].length+lastParenIndex;cap[2]=cap[2].substring(0,lastParenIndex);cap[0]=cap[0].substring(0,linkLen).trim();cap[3]=""}}var href=cap[2];var title="";if(this.options.pedantic){var link2=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href);if(link2){href=link2[1];title=link2[3]}}else{title=cap[3]?cap[3].slice(1,-1):""}href=href.trim();if(/^$/.test(trimmedUrl)){href=href.slice(1)}else{href=href.slice(1,-1)}}return outputLink(cap,{href:href?href.replace(this.rules.inline._escapes,"$1"):href,title:title?title.replace(this.rules.inline._escapes,"$1"):title},cap[0],this.lexer)}};_proto.reflink=function reflink(src,links){var cap;if((cap=this.rules.inline.reflink.exec(src))||(cap=this.rules.inline.nolink.exec(src))){var link=(cap[2]||cap[1]).replace(/\s+/g," ");link=links[link.toLowerCase()];if(!link||!link.href){var text2=cap[0].charAt(0);return{type:"text",raw:text2,text:text2}}return outputLink(cap,link,cap[0],this.lexer)}};_proto.emStrong=function emStrong(src,maskedSrc,prevChar){if(prevChar===void 0){prevChar=""}var match2=this.rules.inline.emStrong.lDelim.exec(src);if(!match2)return;if(match2[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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1711\u171F-\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-\u1B4C\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\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\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\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\uDF40-\uDF46]|\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\uDEB0-\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]|\uD80B[\uDF90-\uDFF0]|[\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\uDE70-\uDEBE\uDEC0-\uDEC9\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]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\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]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\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-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))return;var nextChar=match2[1]||match2[2]||"";if(!nextChar||nextChar&&(prevChar===""||this.rules.inline.punctuation.exec(prevChar))){var lLength=match2[0].length-1;var rDelim,rLength,delimTotal=lLength,midDelimTotal=0;var endReg=match2[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;endReg.lastIndex=0;maskedSrc=maskedSrc.slice(-1*src.length+lLength);while((match2=endReg.exec(maskedSrc))!=null){rDelim=match2[1]||match2[2]||match2[3]||match2[4]||match2[5]||match2[6];if(!rDelim)continue;rLength=rDelim.length;if(match2[3]||match2[4]){delimTotal+=rLength;continue}else if(match2[5]||match2[6]){if(lLength%3&&!((lLength+rLength)%3)){midDelimTotal+=rLength;continue}}delimTotal-=rLength;if(delimTotal>0)continue;rLength=Math.min(rLength,rLength+delimTotal+midDelimTotal);if(Math.min(lLength,rLength)%2){var _text=src.slice(1,lLength+match2.index+rLength);return{type:"em",raw:src.slice(0,lLength+match2.index+rLength+1),text:_text,tokens:this.lexer.inlineTokens(_text)}}var text2=src.slice(2,lLength+match2.index+rLength-1);return{type:"strong",raw:src.slice(0,lLength+match2.index+rLength+1),text:text2,tokens:this.lexer.inlineTokens(text2)}}}};_proto.codespan=function codespan(src){var cap=this.rules.inline.code.exec(src);if(cap){var text2=cap[2].replace(/\n/g," ");var hasNonSpaceChars=/[^ ]/.test(text2);var hasSpaceCharsOnBothEnds=/^ /.test(text2)&&/ $/.test(text2);if(hasNonSpaceChars&&hasSpaceCharsOnBothEnds){text2=text2.substring(1,text2.length-1)}text2=escape2(text2,true);return{type:"codespan",raw:cap[0],text:text2}}};_proto.br=function br(src){var cap=this.rules.inline.br.exec(src);if(cap){return{type:"br",raw:cap[0]}}};_proto.del=function del(src){var cap=this.rules.inline.del.exec(src);if(cap){return{type:"del",raw:cap[0],text:cap[2],tokens:this.lexer.inlineTokens(cap[2])}}};_proto.autolink=function autolink(src,mangle2){var cap=this.rules.inline.autolink.exec(src);if(cap){var text2,href;if(cap[2]==="@"){text2=escape2(this.options.mangle?mangle2(cap[1]):cap[1]);href="mailto:"+text2}else{text2=escape2(cap[1]);href=text2}return{type:"link",raw:cap[0],text:text2,href:href,tokens:[{type:"text",raw:text2,text:text2}]}}};_proto.url=function url(src,mangle2){var cap;if(cap=this.rules.inline.url.exec(src)){var text2,href;if(cap[2]==="@"){text2=escape2(this.options.mangle?mangle2(cap[0]):cap[0]);href="mailto:"+text2}else{var prevCapZero;do{prevCapZero=cap[0];cap[0]=this.rules.inline._backpedal.exec(cap[0])[0]}while(prevCapZero!==cap[0]);text2=escape2(cap[0]);if(cap[1]==="www."){href="http://"+text2}else{href=text2}}return{type:"link",raw:cap[0],text:text2,href:href,tokens:[{type:"text",raw:text2,text:text2}]}}};_proto.inlineText=function inlineText(src,smartypants2){var cap=this.rules.inline.text.exec(src);if(cap){var text2;if(this.lexer.state.inRawBlock){text2=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape2(cap[0]):cap[0]}else{text2=escape2(this.options.smartypants?smartypants2(cap[0]):cap[0])}return{type:"text",raw:cap[0],text:text2}}};return Tokenizer3}();var block={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:noopTest,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};block._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;block._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;block.def=edit(block.def).replace("label",block._label).replace("title",block._title).getRegex();block.bullet=/(?:[*+-]|\d{1,9}[.)])/;block.listItemStart=edit(/^( *)(bull) */).replace("bull",block.bullet).getRegex();block.list=edit(block.list).replace(/bull/g,block.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+block.def.source+")").getRegex();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";block._comment=/|$)/;block.html=edit(block.html,"i").replace("comment",block._comment).replace("tag",block._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();block.paragraph=edit(block._paragraph).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex();block.blockquote=edit(block.blockquote).replace("paragraph",block.paragraph).getRegex();block.normal=merge({},block);block.gfm=merge({},block.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});block.gfm.table=edit(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[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex();block.gfm.paragraph=edit(block._paragraph).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",block.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex();block.pedantic=merge({},block.normal,{html:edit(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\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(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:noopTest,paragraph:edit(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()});var inline={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:noopTest,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:noopTest,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";inline.punctuation=edit(inline.punctuation).replace(/punctuation/g,inline._punctuation).getRegex();inline.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;inline.escapedEmSt=/\\\*|\\_/g;inline._comment=edit(block._comment).replace("(?:--\x3e|$)","--\x3e").getRegex();inline.emStrong.lDelim=edit(inline.emStrong.lDelim).replace(/punct/g,inline._punctuation).getRegex();inline.emStrong.rDelimAst=edit(inline.emStrong.rDelimAst,"g").replace(/punct/g,inline._punctuation).getRegex();inline.emStrong.rDelimUnd=edit(inline.emStrong.rDelimUnd,"g").replace(/punct/g,inline._punctuation).getRegex();inline._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;inline._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;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])?)+(?![-_])/;inline.autolink=edit(inline.autolink).replace("scheme",inline._scheme).replace("email",inline._email).getRegex();inline._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;inline.tag=edit(inline.tag).replace("comment",inline._comment).replace("attribute",inline._attribute).getRegex();inline._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;inline._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;inline._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;inline.link=edit(inline.link).replace("label",inline._label).replace("href",inline._href).replace("title",inline._title).getRegex();inline.reflink=edit(inline.reflink).replace("label",inline._label).replace("ref",block._label).getRegex();inline.nolink=edit(inline.nolink).replace("ref",block._label).getRegex();inline.reflinkSearch=edit(inline.reflinkSearch,"g").replace("reflink",inline.reflink).replace("nolink",inline.nolink).getRegex();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:edit(/^!?\[(label)\]\((.*?)\)/).replace("label",inline._label).getRegex(),reflink:edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",inline._label).getRegex()});inline.gfm=merge({},inline.normal,{escape:edit(inline.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out}var Lexer2=function(){function Lexer3(options3){this.tokens=[];this.tokens.links=Object.create(null);this.options=options3||exports2.defaults;this.options.tokenizer=this.options.tokenizer||new Tokenizer2;this.tokenizer=this.options.tokenizer;this.tokenizer.options=this.options;this.tokenizer.lexer=this;this.inlineQueue=[];this.state={inLink:false,inRawBlock:false,top:true};var rules={block:block.normal,inline:inline.normal};if(this.options.pedantic){rules.block=block.pedantic;rules.inline=inline.pedantic}else if(this.options.gfm){rules.block=block.gfm;if(this.options.breaks){rules.inline=inline.breaks}else{rules.inline=inline.gfm}}this.tokenizer.rules=rules}Lexer3.lex=function lex(src,options3){var lexer3=new Lexer3(options3);return lexer3.lex(src)};Lexer3.lexInline=function lexInline(src,options3){var lexer3=new Lexer3(options3);return lexer3.inlineTokens(src)};var _proto=Lexer3.prototype;_proto.lex=function lex(src){src=src.replace(/\r\n|\r/g,"\n");this.blockTokens(src,this.tokens);var next;while(next=this.inlineQueue.shift()){this.inlineTokens(next.src,next.tokens)}return this.tokens};_proto.blockTokens=function blockTokens(src,tokens){var _this=this;if(tokens===void 0){tokens=[]}if(this.options.pedantic){src=src.replace(/\t/g," ").replace(/^ +$/gm,"")}else{src=src.replace(/^( *)(\t+)/gm,(function(_,leading,tabs){return leading+" ".repeat(tabs.length)}))}var token,lastToken,cutSrc,lastParagraphClipped;while(src){if(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(extTokenizer){if(token=extTokenizer.call({lexer:_this},src,tokens)){src=src.substring(token.raw.length);tokens.push(token);return true}return false}))){continue}if(token=this.tokenizer.space(src)){src=src.substring(token.raw.length);if(token.raw.length===1&&tokens.length>0){tokens[tokens.length-1].raw+="\n"}else{tokens.push(token)}continue}if(token=this.tokenizer.code(src)){src=src.substring(token.raw.length);lastToken=tokens[tokens.length-1];if(lastToken&&(lastToken.type==="paragraph"||lastToken.type==="text")){lastToken.raw+="\n"+token.raw;lastToken.text+="\n"+token.text;this.inlineQueue[this.inlineQueue.length-1].src=lastToken.text}else{tokens.push(token)}continue}if(token=this.tokenizer.fences(src)){src=src.substring(token.raw.length);tokens.push(token);continue}if(token=this.tokenizer.heading(src)){src=src.substring(token.raw.length);tokens.push(token);continue}if(token=this.tokenizer.hr(src)){src=src.substring(token.raw.length);tokens.push(token);continue}if(token=this.tokenizer.blockquote(src)){src=src.substring(token.raw.length);tokens.push(token);continue}if(token=this.tokenizer.list(src)){src=src.substring(token.raw.length);tokens.push(token);continue}if(token=this.tokenizer.html(src)){src=src.substring(token.raw.length);tokens.push(token);continue}if(token=this.tokenizer.def(src)){src=src.substring(token.raw.length);lastToken=tokens[tokens.length-1];if(lastToken&&(lastToken.type==="paragraph"||lastToken.type==="text")){lastToken.raw+="\n"+token.raw;lastToken.text+="\n"+token.raw;this.inlineQueue[this.inlineQueue.length-1].src=lastToken.text}else if(!this.tokens.links[token.tag]){this.tokens.links[token.tag]={href:token.href,title:token.title}}continue}if(token=this.tokenizer.table(src)){src=src.substring(token.raw.length);tokens.push(token);continue}if(token=this.tokenizer.lheading(src)){src=src.substring(token.raw.length);tokens.push(token);continue}cutSrc=src;if(this.options.extensions&&this.options.extensions.startBlock){(function(){var startIndex=Infinity;var tempSrc=src.slice(1);var tempStart=void 0;_this.options.extensions.startBlock.forEach((function(getStartIndex){tempStart=getStartIndex.call({lexer:this},tempSrc);if(typeof tempStart==="number"&&tempStart>=0){startIndex=Math.min(startIndex,tempStart)}}));if(startIndex=0){cutSrc=src.substring(0,startIndex+1)}})()}if(this.state.top&&(token=this.tokenizer.paragraph(cutSrc))){lastToken=tokens[tokens.length-1];if(lastParagraphClipped&&lastToken.type==="paragraph"){lastToken.raw+="\n"+token.raw;lastToken.text+="\n"+token.text;this.inlineQueue.pop();this.inlineQueue[this.inlineQueue.length-1].src=lastToken.text}else{tokens.push(token)}lastParagraphClipped=cutSrc.length!==src.length;src=src.substring(token.raw.length);continue}if(token=this.tokenizer.text(src)){src=src.substring(token.raw.length);lastToken=tokens[tokens.length-1];if(lastToken&&lastToken.type==="text"){lastToken.raw+="\n"+token.raw;lastToken.text+="\n"+token.text;this.inlineQueue.pop();this.inlineQueue[this.inlineQueue.length-1].src=lastToken.text}else{tokens.push(token)}continue}if(src){var errMsg="Infinite loop on byte: "+src.charCodeAt(0);if(this.options.silent){console.error(errMsg);break}else{throw new Error(errMsg)}}}this.state.top=true;return tokens};_proto.inline=function inline2(src,tokens){if(tokens===void 0){tokens=[]}this.inlineQueue.push({src:src,tokens:tokens});return tokens};_proto.inlineTokens=function inlineTokens(src,tokens){var _this2=this;if(tokens===void 0){tokens=[]}var token,lastToken,cutSrc;var maskedSrc=src;var match2;var keepPrevChar,prevChar;if(this.tokens.links){var links=Object.keys(this.tokens.links);if(links.length>0){while((match2=this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc))!=null){if(links.includes(match2[0].slice(match2[0].lastIndexOf("[")+1,-1))){maskedSrc=maskedSrc.slice(0,match2.index)+"["+repeatString("a",match2[0].length-2)+"]"+maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)}}}}while((match2=this.tokenizer.rules.inline.blockSkip.exec(maskedSrc))!=null){maskedSrc=maskedSrc.slice(0,match2.index)+"["+repeatString("a",match2[0].length-2)+"]"+maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex)}while((match2=this.tokenizer.rules.inline.escapedEmSt.exec(maskedSrc))!=null){maskedSrc=maskedSrc.slice(0,match2.index)+"++"+maskedSrc.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex)}while(src){if(!keepPrevChar){prevChar=""}keepPrevChar=false;if(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(extTokenizer){if(token=extTokenizer.call({lexer:_this2},src,tokens)){src=src.substring(token.raw.length);tokens.push(token);return true}return false}))){continue}if(token=this.tokenizer.escape(src)){src=src.substring(token.raw.length);tokens.push(token);continue}if(token=this.tokenizer.tag(src)){src=src.substring(token.raw.length);lastToken=tokens[tokens.length-1];if(lastToken&&token.type==="text"&&lastToken.type==="text"){lastToken.raw+=token.raw;lastToken.text+=token.text}else{tokens.push(token)}continue}if(token=this.tokenizer.link(src)){src=src.substring(token.raw.length);tokens.push(token);continue}if(token=this.tokenizer.reflink(src,this.tokens.links)){src=src.substring(token.raw.length);lastToken=tokens[tokens.length-1];if(lastToken&&token.type==="text"&&lastToken.type==="text"){lastToken.raw+=token.raw;lastToken.text+=token.text}else{tokens.push(token)}continue}if(token=this.tokenizer.emStrong(src,maskedSrc,prevChar)){src=src.substring(token.raw.length);tokens.push(token);continue}if(token=this.tokenizer.codespan(src)){src=src.substring(token.raw.length);tokens.push(token);continue}if(token=this.tokenizer.br(src)){src=src.substring(token.raw.length);tokens.push(token);continue}if(token=this.tokenizer.del(src)){src=src.substring(token.raw.length);tokens.push(token);continue}if(token=this.tokenizer.autolink(src,mangle)){src=src.substring(token.raw.length);tokens.push(token);continue}if(!this.state.inLink&&(token=this.tokenizer.url(src,mangle))){src=src.substring(token.raw.length);tokens.push(token);continue}cutSrc=src;if(this.options.extensions&&this.options.extensions.startInline){(function(){var startIndex=Infinity;var tempSrc=src.slice(1);var tempStart=void 0;_this2.options.extensions.startInline.forEach((function(getStartIndex){tempStart=getStartIndex.call({lexer:this},tempSrc);if(typeof tempStart==="number"&&tempStart>=0){startIndex=Math.min(startIndex,tempStart)}}));if(startIndex=0){cutSrc=src.substring(0,startIndex+1)}})()}if(token=this.tokenizer.inlineText(cutSrc,smartypants)){src=src.substring(token.raw.length);if(token.raw.slice(-1)!=="_"){prevChar=token.raw.slice(-1)}keepPrevChar=true;lastToken=tokens[tokens.length-1];if(lastToken&&lastToken.type==="text"){lastToken.raw+=token.raw;lastToken.text+=token.text}else{tokens.push(token)}continue}if(src){var errMsg="Infinite loop on byte: "+src.charCodeAt(0);if(this.options.silent){console.error(errMsg);break}else{throw new Error(errMsg)}}}return tokens};_createClass(Lexer3,null,[{key:"rules",get:function get(){return{block:block,inline:inline}}}]);return Lexer3}();var Renderer2=function(){function Renderer3(options3){this.options=options3||exports2.defaults}var _proto=Renderer3.prototype;_proto.code=function code(_code,infostring,escaped){var lang=(infostring||"").match(/\S*/)[0];if(this.options.highlight){var out=this.options.highlight(_code,lang);if(out!=null&&out!==_code){escaped=true;_code=out}}_code=_code.replace(/\n$/,"")+"\n";if(!lang){return"
    "+(escaped?_code:escape2(_code,true))+"
    \n"}return'
    '+(escaped?_code:escape2(_code,true))+"
    \n"};_proto.blockquote=function blockquote(quote){return"
    \n"+quote+"
    \n"};_proto.html=function html2(_html){return _html};_proto.heading=function heading(text2,level,raw,slugger){if(this.options.headerIds){var id=this.options.headerPrefix+slugger.slug(raw);return"'+text2+"\n"}return""+text2+"\n"};_proto.hr=function hr(){return this.options.xhtml?"
    \n":"
    \n"};_proto.list=function list(body,ordered,start){var type=ordered?"ol":"ul",startatt=ordered&&start!==1?' start="'+start+'"':"";return"<"+type+startatt+">\n"+body+"\n"};_proto.listitem=function listitem(text2){return"
  • "+text2+"
  • \n"};_proto.checkbox=function checkbox(checked){return" "};_proto.paragraph=function paragraph(text2){return"

    "+text2+"

    \n"};_proto.table=function table(header,body){if(body)body=""+body+"";return"\n\n"+header+"\n"+body+"
    \n"};_proto.tablerow=function tablerow(content){return"\n"+content+"\n"};_proto.tablecell=function tablecell(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' align="'+flags.align+'">':"<"+type+">";return tag+content+("\n")};_proto.strong=function strong(text2){return""+text2+""};_proto.em=function em(text2){return""+text2+""};_proto.codespan=function codespan(text2){return""+text2+""};_proto.br=function br(){return this.options.xhtml?"
    ":"
    "};_proto.del=function del(text2){return""+text2+""};_proto.link=function link(href,title,text2){href=cleanUrl(this.options.sanitize,this.options.baseUrl,href);if(href===null){return text2}var out='";return out};_proto.image=function image(href,title,text2){href=cleanUrl(this.options.sanitize,this.options.baseUrl,href);if(href===null){return text2}var out=''+text2+'":">";return out};_proto.text=function text2(_text){return _text};return Renderer3}();var TextRenderer2=function(){function TextRenderer3(){}var _proto=TextRenderer3.prototype;_proto.strong=function strong(text2){return text2};_proto.em=function em(text2){return text2};_proto.codespan=function codespan(text2){return text2};_proto.del=function del(text2){return text2};_proto.html=function html2(text2){return text2};_proto.text=function text2(_text){return _text};_proto.link=function link(href,title,text2){return""+text2};_proto.image=function image(href,title,text2){return""+text2};_proto.br=function br(){return""};return TextRenderer3}();var Slugger2=function(){function Slugger3(){this.seen={}}var _proto=Slugger3.prototype;_proto.serialize=function serialize(value){return value.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")};_proto.getNextSafeSlug=function getNextSafeSlug(originalSlug,isDryRun){var slug=originalSlug;var occurenceAccumulator=0;if(this.seen.hasOwnProperty(slug)){occurenceAccumulator=this.seen[originalSlug];do{occurenceAccumulator++;slug=originalSlug+"-"+occurenceAccumulator}while(this.seen.hasOwnProperty(slug))}if(!isDryRun){this.seen[originalSlug]=occurenceAccumulator;this.seen[slug]=0}return slug};_proto.slug=function slug(value,options3){if(options3===void 0){options3={}}var slug2=this.serialize(value);return this.getNextSafeSlug(slug2,options3.dryrun)};return Slugger3}();var Parser4=function(){function Parser5(options3){this.options=options3||exports2.defaults;this.options.renderer=this.options.renderer||new Renderer2;this.renderer=this.options.renderer;this.renderer.options=this.options;this.textRenderer=new TextRenderer2;this.slugger=new Slugger2}Parser5.parse=function parse5(tokens,options3){var parser3=new Parser5(options3);return parser3.parse(tokens)};Parser5.parseInline=function parseInline3(tokens,options3){var parser3=new Parser5(options3);return parser3.parseInline(tokens)};var _proto=Parser5.prototype;_proto.parse=function parse5(tokens,top){if(top===void 0){top=true}var out="",i,j,k,l2,l3,row,cell,header,body,token,ordered,start,loose,itemBody,item,checked,task,checkbox,ret;var l=tokens.length;for(i=0;i0&&item.tokens[0].type==="paragraph"){item.tokens[0].text=checkbox+" "+item.tokens[0].text;if(item.tokens[0].tokens&&item.tokens[0].tokens.length>0&&item.tokens[0].tokens[0].type==="text"){item.tokens[0].tokens[0].text=checkbox+" "+item.tokens[0].tokens[0].text}}else{item.tokens.unshift({type:"text",text:checkbox})}}else{itemBody+=checkbox}}itemBody+=this.parse(item.tokens,loose);body+=this.renderer.listitem(itemBody,task,checked)}out+=this.renderer.list(body,ordered,start);continue}case"html":{out+=this.renderer.html(token.text);continue}case"paragraph":{out+=this.renderer.paragraph(this.parseInline(token.tokens));continue}case"text":{body=token.tokens?this.parseInline(token.tokens):token.text;while(i+1An error occurred:

    "+escape2(e.message+"",true)+"
    "}throw e}try{var _tokens=Lexer2.lex(src,opt);if(opt.walkTokens){if(opt.async){return Promise.all(marked2.walkTokens(_tokens,opt.walkTokens)).then((function(){return Parser4.parse(_tokens,opt)}))["catch"](onError)}marked2.walkTokens(_tokens,opt.walkTokens)}return Parser4.parse(_tokens,opt)}catch(e){onError(e)}}marked2.options=marked2.setOptions=function(opt){merge(marked2.defaults,opt);changeDefaults(marked2.defaults);return marked2};marked2.getDefaults=getDefaults2;marked2.defaults=exports2.defaults;marked2.use=function(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}var opts=merge.apply(void 0,[{}].concat(args));var extensions=marked2.defaults.extensions||{renderers:{},childTokens:{}};var hasExtensions;args.forEach((function(pack){if(pack.extensions){hasExtensions=true;pack.extensions.forEach((function(ext){if(!ext.name){throw new Error("extension name required")}if(ext.renderer){var prevRenderer=extensions.renderers?extensions.renderers[ext.name]:null;if(prevRenderer){extensions.renderers[ext.name]=function(){for(var _len2=arguments.length,args2=new Array(_len2),_key2=0;_key2<_len2;_key2++){args2[_key2]=arguments[_key2]}var ret=ext.renderer.apply(this,args2);if(ret===false){ret=prevRenderer.apply(this,args2)}return ret}}else{extensions.renderers[ext.name]=ext.renderer}}if(ext.tokenizer){if(!ext.level||ext.level!=="block"&&ext.level!=="inline"){throw new Error("extension level must be 'block' or 'inline'")}if(extensions[ext.level]){extensions[ext.level].unshift(ext.tokenizer)}else{extensions[ext.level]=[ext.tokenizer]}if(ext.start){if(ext.level==="block"){if(extensions.startBlock){extensions.startBlock.push(ext.start)}else{extensions.startBlock=[ext.start]}}else if(ext.level==="inline"){if(extensions.startInline){extensions.startInline.push(ext.start)}else{extensions.startInline=[ext.start]}}}}if(ext.childTokens){extensions.childTokens[ext.name]=ext.childTokens}}))}if(pack.renderer){(function(){var renderer=marked2.defaults.renderer||new Renderer2;var _loop=function _loop2(prop2){var prevRenderer=renderer[prop2];renderer[prop2]=function(){for(var _len3=arguments.length,args2=new Array(_len3),_key3=0;_key3<_len3;_key3++){args2[_key3]=arguments[_key3]}var ret=pack.renderer[prop2].apply(renderer,args2);if(ret===false){ret=prevRenderer.apply(renderer,args2)}return ret}};for(var prop in pack.renderer){_loop(prop)}opts.renderer=renderer})()}if(pack.tokenizer){(function(){var tokenizer=marked2.defaults.tokenizer||new Tokenizer2;var _loop2=function _loop22(prop2){var prevTokenizer=tokenizer[prop2];tokenizer[prop2]=function(){for(var _len4=arguments.length,args2=new Array(_len4),_key4=0;_key4<_len4;_key4++){args2[_key4]=arguments[_key4]}var ret=pack.tokenizer[prop2].apply(tokenizer,args2);if(ret===false){ret=prevTokenizer.apply(tokenizer,args2)}return ret}};for(var prop in pack.tokenizer){_loop2(prop)}opts.tokenizer=tokenizer})()}if(pack.walkTokens){var _walkTokens=marked2.defaults.walkTokens;opts.walkTokens=function(token){var values=[];values.push(pack.walkTokens.call(this,token));if(_walkTokens){values=values.concat(_walkTokens.call(this,token))}return values}}if(hasExtensions){opts.extensions=extensions}marked2.setOptions(opts)}))};marked2.walkTokens=function(tokens,callback){var values=[];var _loop3=function _loop32(){var token=_step.value;values=values.concat(callback.call(marked2,token));switch(token.type){case"table":{for(var _iterator2=_createForOfIteratorHelperLoose(token.header),_step2;!(_step2=_iterator2()).done;){var cell=_step2.value;values=values.concat(marked2.walkTokens(cell.tokens,callback))}for(var _iterator3=_createForOfIteratorHelperLoose(token.rows),_step3;!(_step3=_iterator3()).done;){var row=_step3.value;for(var _iterator4=_createForOfIteratorHelperLoose(row),_step4;!(_step4=_iterator4()).done;){var _cell=_step4.value;values=values.concat(marked2.walkTokens(_cell.tokens,callback))}}break}case"list":{values=values.concat(marked2.walkTokens(token.items,callback));break}default:{if(marked2.defaults.extensions&&marked2.defaults.extensions.childTokens&&marked2.defaults.extensions.childTokens[token.type]){marked2.defaults.extensions.childTokens[token.type].forEach((function(childTokens){values=values.concat(marked2.walkTokens(token[childTokens],callback))}))}else if(token.tokens){values=values.concat(marked2.walkTokens(token.tokens,callback))}}}};for(var _iterator=_createForOfIteratorHelperLoose(tokens),_step;!(_step=_iterator()).done;){_loop3()}return values};marked2.parseInline=function(src,opt){if(typeof src==="undefined"||src===null){throw new Error("marked.parseInline(): input parameter is undefined or null")}if(typeof src!=="string"){throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(src)+", string expected")}opt=merge({},marked2.defaults,opt||{});checkSanitizeDeprecation(opt);try{var tokens=Lexer2.lexInline(src,opt);if(opt.walkTokens){marked2.walkTokens(tokens,opt.walkTokens)}return Parser4.parseInline(tokens,opt)}catch(e){e.message+="\nPlease report this to https://github.com/markedjs/marked.";if(opt.silent){return"

    An error occurred:

    "+escape2(e.message+"",true)+"
    "}throw e}};marked2.Parser=Parser4;marked2.parser=Parser4.parse;marked2.Renderer=Renderer2;marked2.TextRenderer=TextRenderer2;marked2.Lexer=Lexer2;marked2.lexer=Lexer2.lex;marked2.Tokenizer=Tokenizer2;marked2.Slugger=Slugger2;marked2.parse=marked2;var options2=marked2.options;var setOptions2=marked2.setOptions;var use2=marked2.use;var walkTokens2=marked2.walkTokens;var parseInline2=marked2.parseInline;var parse4=marked2;var parser2=Parser4.parse;var lexer2=Lexer2.lex;exports2.Lexer=Lexer2;exports2.Parser=Parser4;exports2.Renderer=Renderer2;exports2.Slugger=Slugger2;exports2.TextRenderer=TextRenderer2;exports2.Tokenizer=Tokenizer2;exports2.getDefaults=getDefaults2;exports2.lexer=lexer2;exports2.marked=marked2;exports2.options=options2;exports2.parse=parse4;exports2.parseInline=parseInline2;exports2.parser=parser2;exports2.setOptions=setOptions2;exports2.use=use2;exports2.walkTokens=walkTokens2;Object.defineProperty(exports2,"__esModule",{value:true})}))})();Lexer=__marked_exports.Lexer||exports.Lexer;Parser3=__marked_exports.Parser||exports.Parser;Renderer=__marked_exports.Renderer||exports.Renderer;Slugger=__marked_exports.Slugger||exports.Slugger;TextRenderer=__marked_exports.TextRenderer||exports.TextRenderer;Tokenizer=__marked_exports.Tokenizer||exports.Tokenizer;getDefaults=__marked_exports.getDefaults||exports.getDefaults;lexer=__marked_exports.lexer||exports.lexer;marked=__marked_exports.marked||exports.marked;options=__marked_exports.options||exports.options;parse=__marked_exports.parse||exports.parse;parseInline=__marked_exports.parseInline||exports.parseInline;parser=__marked_exports.parser||exports.parser;setOptions=__marked_exports.setOptions||exports.setOptions;use=__marked_exports.use||exports.use;walkTokens=__marked_exports.walkTokens||exports.walkTokens}});function stringify(obj){return JSON.stringify(obj,replacer)}function parse2(text2){let data=JSON.parse(text2);data=revive(data);return data}function replacer(key,value){if(value instanceof RegExp){return{$mid:2,source:value.source,flags:value.flags}}return value}function revive(obj,depth=0){if(!obj||depth>200){return obj}if(typeof obj==="object"){switch(obj.$mid){case 1:return URI.revive(obj);case 2:return new RegExp(obj.source,obj.flags);case 16:return new Date(obj.source)}if(obj instanceof VSBuffer||obj instanceof Uint8Array){return obj}if(Array.isArray(obj)){for(let i=0;i{if(markdown.uris&&markdown.uris[value2]){return URI.revive(markdown.uris[value2])}else{return void 0}}));return encodeURIComponent(JSON.stringify(data))};const _href=function(href,isDomUri){const data=markdown.uris&&markdown.uris[href];let uri=URI.revive(data);if(isDomUri){if(href.startsWith(Schemas.data+":")){return href}if(!uri){uri=URI.parse(href)}return FileAccess.uriToBrowserUri(uri).toString(true)}if(!uri){return href}if(URI.parse(href).toString()===uri.toString()){return href}if(uri.query){uri=uri.with({query:_uriMassage(uri.query)})}return uri.toString()};const renderer=new marked.Renderer;renderer.image=defaultMarkedRenderers.image;renderer.link=defaultMarkedRenderers.link;renderer.paragraph=defaultMarkedRenderers.paragraph;const codeBlocks=[];const syncCodeBlocks=[];if(options2.codeBlockRendererSync){renderer.code=(code,lang)=>{const id=defaultGenerator.nextId();const value2=options2.codeBlockRendererSync(postProcessCodeBlockLanguageId(lang),code);syncCodeBlocks.push([id,value2]);return`
    ${escape(code)}
    `}}else if(options2.codeBlockRenderer){renderer.code=(code,lang)=>{const id=defaultGenerator.nextId();const value2=options2.codeBlockRenderer(postProcessCodeBlockLanguageId(lang),code);codeBlocks.push(value2.then((element2=>[id,element2])));return`
    ${escape(code)}
    `}}if(options2.actionHandler){const _activateLink=function(event){let target=event.target;if(target.tagName!=="A"){target=target.parentElement;if(!target||target.tagName!=="A"){return}}try{let href=target.dataset["href"];if(href){if(markdown.baseUri){href=resolveWithBaseUri(URI.from(markdown.baseUri),href)}options2.actionHandler.callback(href,event)}}catch(err){onUnexpectedError(err)}finally{event.preventDefault()}};const onClick=options2.actionHandler.disposables.add(new DomEmitter(element,"click"));const onAuxClick=options2.actionHandler.disposables.add(new DomEmitter(element,"auxclick"));options2.actionHandler.disposables.add(Event.any(onClick.event,onAuxClick.event)((e=>{const mouseEvent=new StandardMouseEvent(e);if(!mouseEvent.leftButton&&!mouseEvent.middleButton){return}_activateLink(mouseEvent)})));options2.actionHandler.disposables.add(addDisposableListener(element,"keydown",(e=>{const keyboardEvent=new StandardKeyboardEvent(e);if(!keyboardEvent.equals(10)&&!keyboardEvent.equals(3)){return}_activateLink(keyboardEvent)})))}if(!markdown.supportHtml){markedOptions.sanitizer=html2=>{const match2=markdown.isTrusted?html2.match(/^(]+>)|(<\/\s*span>)$/):void 0;return match2?html2:""};markedOptions.sanitize=true;markedOptions.silent=true}markedOptions.renderer=renderer;let value=(_a6=markdown.value)!==null&&_a6!==void 0?_a6:"";if(value.length>1e5){value=`${value.substr(0,1e5)}…`}if(markdown.supportThemeIcons){value=markdownEscapeEscapedIcons(value)}let renderedMarkdown;if(options2.fillInIncompleteTokens){const opts=Object.assign(Object.assign({},marked.defaults),markedOptions);const tokens=marked.lexer(value,opts);const newTokens=fillInIncompleteTokens(tokens);renderedMarkdown=marked.parser(newTokens,opts)}else{renderedMarkdown=marked.parse(value,markedOptions)}if(markdown.supportThemeIcons){const elements=renderLabelWithIcons(renderedMarkdown);renderedMarkdown=elements.map((e=>typeof e==="string"?e:e.outerHTML)).join("")}const htmlParser=new DOMParser;const markdownHtmlDoc=htmlParser.parseFromString(sanitizeRenderedMarkdown(markdown,renderedMarkdown),"text/html");markdownHtmlDoc.body.querySelectorAll("img").forEach((img=>{const src=img.getAttribute("src");if(src){let href=src;try{if(markdown.baseUri){href=resolveWithBaseUri(URI.from(markdown.baseUri),href)}}catch(err){}img.src=_href(href,true)}}));markdownHtmlDoc.body.querySelectorAll("a").forEach((a=>{const href=a.getAttribute("href");a.setAttribute("href","");if(!href||/^data:|javascript:/i.test(href)||/^command:/i.test(href)&&!markdown.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(href)){a.replaceWith(...a.childNodes)}else{let resolvedHref=_href(href,false);if(markdown.baseUri){resolvedHref=resolveWithBaseUri(URI.from(markdown.baseUri),href)}a.dataset.href=resolvedHref}}));element.innerHTML=sanitizeRenderedMarkdown(markdown,markdownHtmlDoc.body.innerHTML);if(codeBlocks.length>0){Promise.all(codeBlocks).then((tuples=>{var _a7,_b4;if(isDisposed){return}const renderedElements=new Map(tuples);const placeholderElements=element.querySelectorAll(`div[data-code]`);for(const placeholderElement of placeholderElements){const renderedElement=renderedElements.get((_a7=placeholderElement.dataset["code"])!==null&&_a7!==void 0?_a7:"");if(renderedElement){reset(placeholderElement,renderedElement)}}(_b4=options2.asyncRenderCallback)===null||_b4===void 0?void 0:_b4.call(options2)}))}else if(syncCodeBlocks.length>0){const renderedElements=new Map(syncCodeBlocks);const placeholderElements=element.querySelectorAll(`div[data-code]`);for(const placeholderElement of placeholderElements){const renderedElement=renderedElements.get((_b3=placeholderElement.dataset["code"])!==null&&_b3!==void 0?_b3:"");if(renderedElement){reset(placeholderElement,renderedElement)}}}if(options2.asyncRenderCallback){for(const img of element.getElementsByTagName("img")){const listener=disposables.add(addDisposableListener(img,"load",(()=>{listener.dispose();options2.asyncRenderCallback()})))}}return{element:element,dispose:()=>{isDisposed=true;disposables.dispose()}}}function postProcessCodeBlockLanguageId(lang){if(!lang){return""}const parts=lang.split(/[\s+|:|,|\{|\?]/,1);if(parts.length){return parts[0]}return lang}function resolveWithBaseUri(baseUri,href){const hasScheme=/^\w[\w\d+.-]*:/.test(href);if(hasScheme){return href}if(baseUri.path.endsWith("/")){return resolvePath(baseUri,href).toString()}else{return resolvePath(dirname2(baseUri),href).toString()}}function sanitizeRenderedMarkdown(options2,renderedMarkdown){const{config:config,allowedSchemes:allowedSchemes}=getSanitizerOptions(options2);addHook("uponSanitizeAttribute",((element,e)=>{if(e.attrName==="style"||e.attrName==="class"){if(element.tagName==="SPAN"){if(e.attrName==="style"){e.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(e.attrValue);return}else if(e.attrName==="class"){e.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(e.attrValue);return}}e.keepAttr=false;return}}));const hook=hookDomPurifyHrefAndSrcSanitizer(allowedSchemes);try{return sanitize2(renderedMarkdown,Object.assign(Object.assign({},config),{RETURN_TRUSTED_TYPE:true}))}finally{removeHook("uponSanitizeAttribute");hook.dispose()}}function getSanitizerOptions(options2){const allowedSchemes=[Schemas.http,Schemas.https,Schemas.mailto,Schemas.data,Schemas.file,Schemas.vscodeFileResource,Schemas.vscodeRemote,Schemas.vscodeRemoteResource];if(options2.isTrusted){allowedSchemes.push(Schemas.command)}return{config:{ALLOWED_TAGS:[...basicMarkupHtmlTags],ALLOWED_ATTR:allowedMarkdownAttr,ALLOW_UNKNOWN_PROTOCOLS:true},allowedSchemes:allowedSchemes}}function renderStringAsPlaintext(string2){return typeof string2==="string"?string2:renderMarkdownAsPlaintext(string2)}function renderMarkdownAsPlaintext(markdown){var _a6;let value=(_a6=markdown.value)!==null&&_a6!==void 0?_a6:"";if(value.length>1e5){value=`${value.substr(0,1e5)}…`}const html2=marked.parse(value,{renderer:plainTextRenderer.value}).replace(/&(#\d+|[a-zA-Z]+);/g,(m=>{var _a7;return(_a7=unescapeInfo.get(m))!==null&&_a7!==void 0?_a7:m}));return sanitizeRenderedMarkdown({isTrusted:false},html2).toString()}function mergeRawTokenText(tokens){let mergedTokenText="";tokens.forEach((token=>{mergedTokenText+=token.raw}));return mergedTokenText}function completeSingleLinePattern(token){for(const subtoken of token.tokens){if(subtoken.type==="text"){const lines=subtoken.raw.split("\n");const lastLine=lines[lines.length-1];if(lastLine.includes("`")){return completeCodespan(token)}else if(lastLine.includes("**")){return completeDoublestar(token)}else if(lastLine.match(/\*\w/)){return completeStar(token)}else if(lastLine.match(/(^|\s)__\w/)){return completeDoubleUnderscore(token)}else if(lastLine.match(/(^|\s)_\w/)){return completeUnderscore(token)}else if(lastLine.match(/(^|\s)\[.*\]\(\w*/)){return completeLinkTarget(token)}else if(lastLine.match(/(^|\s)\[\w/)){return completeLinkText(token)}}}return void 0}function fillInIncompleteTokens(tokens){let i;let newTokens;for(i=0;i0){const prefixText=hasSeparatorRow?lines.slice(0,-1).join("\n"):mergedRawText;const line1EndsInPipe=!!prefixText.match(/\|\s*$/);const newRawText=prefixText+(line1EndsInPipe?"":"|")+`\n|${" --- |".repeat(numCols)}`;return marked.lexer(newRawText)}return void 0}var defaultMarkedRenderers,allowedMarkdownAttr,unescapeInfo,plainTextRenderer;var init_markdownRenderer=__esm({"node_modules/monaco-editor/esm/vs/base/browser/markdownRenderer.js"(){init_dom();init_dompurify();init_event2();init_formattedTextRenderer();init_keyboardEvent();init_mouseEvent();init_iconLabels2();init_errors();init_event();init_htmlContent();init_iconLabels();init_idGenerator();init_lazy();init_lifecycle();init_marked();init_marshalling();init_network();init_objects();init_resources();init_strings();init_uri();defaultMarkedRenderers=Object.freeze({image:(href,title,text2)=>{let dimensions=[];let attributes=[];if(href){({href:href,dimensions:dimensions}=parseHrefAndDimensions(href));attributes.push(`src="${escapeDoubleQuotes(href)}"`)}if(text2){attributes.push(`alt="${escapeDoubleQuotes(text2)}"`)}if(title){attributes.push(`title="${escapeDoubleQuotes(title)}"`)}if(dimensions.length){attributes=attributes.concat(dimensions)}return""},paragraph:text2=>`

    ${text2}

    `,link:(href,title,text2)=>{if(typeof href!=="string"){return""}if(href===text2){text2=removeMarkdownEscapes(text2)}title=typeof title==="string"?escapeDoubleQuotes(removeMarkdownEscapes(title)):"";href=removeMarkdownEscapes(href);href=href.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");return`
    ${text2}`}});allowedMarkdownAttr=["align","autoplay","alt","class","controls","data-code","data-href","height","href","loop","muted","playsinline","poster","src","style","target","title","width","start"];unescapeInfo=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]);plainTextRenderer=new Lazy((()=>{const renderer=new marked.Renderer;renderer.code=code=>code;renderer.blockquote=quote=>quote;renderer.html=_html=>"";renderer.heading=(text2,_level,_raw)=>text2+"\n";renderer.hr=()=>"";renderer.list=(body,_ordered)=>body;renderer.listitem=text2=>text2+"\n";renderer.paragraph=text2=>text2+"\n";renderer.table=(header,body)=>header+body+"\n";renderer.tablerow=content=>content;renderer.tablecell=(content,_flags)=>content+" ";renderer.strong=text2=>text2;renderer.em=text2=>text2;renderer.codespan=code=>code;renderer.br=()=>"\n";renderer.del=text2=>text2;renderer.image=(_href,_title,_text)=>"";renderer.text=text2=>text2;renderer.link=(_href,_title,text2)=>text2;return renderer}))}});var CombinedSpliceable;var init_splice=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/list/splice.js"(){CombinedSpliceable=class{constructor(spliceables){this.spliceables=spliceables}splice(start,deleteCount,elements){this.spliceables.forEach((s=>s.splice(start,deleteCount,elements)))}}}});function clamp(value,min,max){return Math.min(Math.max(value,min),max)}var MovingAverage,SlidingWindowAverage;var init_numbers=__esm({"node_modules/monaco-editor/esm/vs/base/common/numbers.js"(){MovingAverage=class{constructor(){this._n=1;this._val=0}update(value){this._val=this._val+(value-this._val)/this._n;this._n+=1;return this._val}get value(){return this._val}};SlidingWindowAverage=class{constructor(size2){this._n=0;this._val=0;this._values=[];this._index=0;this._sum=0;this._values=new Array(size2);this._values.fill(0,0,size2)}update(value){const oldValue=this._values[this._index];this._values[this._index]=value;this._index=(this._index+1)%this._values.length;this._sum-=oldValue;this._sum+=value;if(this._n=other.end||other.start>=one.end){return{start:0,end:0}}const start=Math.max(one.start,other.start);const end=Math.min(one.end,other.end);if(end-start<=0){return{start:0,end:0}}return{start:start,end:end}}Range7.intersect=intersect;function isEmpty(range2){return range2.end-range2.start<=0}Range7.isEmpty=isEmpty;function intersects2(one,other){return!isEmpty(intersect(one,other))}Range7.intersects=intersects2;function relativeComplement2(one,other){const result=[];const first2={start:one.start,end:Math.min(other.start,one.end)};const second={start:Math.max(other.end,one.start),end:one.end};if(!isEmpty(first2)){result.push(first2)}if(!isEmpty(second)){result.push(second)}return result}Range7.relativeComplement=relativeComplement2})(Range2||(Range2={}))}});function groupIntersect(range2,groups){const result=[];for(const r of groups){if(range2.start>=r.range.end){continue}if(range2.endr.concat(g)),[]))}var RangeMap;var init_rangeMap=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/list/rangeMap.js"(){init_range2();RangeMap=class{get paddingTop(){return this._paddingTop}set paddingTop(paddingTop){this._size=this._size+paddingTop-this._paddingTop;this._paddingTop=paddingTop}constructor(topPadding){this.groups=[];this._size=0;this._paddingTop=0;this._paddingTop=topPadding!==null&&topPadding!==void 0?topPadding:0;this._size=this._paddingTop}splice(index,deleteCount,items=[]){const diff=items.length-deleteCount;const before=groupIntersect({start:0,end:index},this.groups);const after=groupIntersect({start:index+deleteCount,end:Number.POSITIVE_INFINITY},this.groups).map((g=>({range:shift(g.range,diff),size:g.size})));const middle=items.map(((item,i)=>({range:{start:index+i,end:index+i+1},size:item.size})));this.groups=concat2(before,middle,after);this._size=this._paddingTop+this.groups.reduce(((t2,g)=>t2+g.size*(g.range.end-g.range.start)),0)}get count(){const len=this.groups.length;if(!len){return 0}return this.groups[len-1].range.end}get size(){return this._size}indexAt(position){if(position<0){return-1}if(position{for(const cachedRow of cachedRows){const renderer=this.getRenderer(templateId);renderer.disposeTemplate(cachedRow.templateData);cachedRow.templateData=null}}));this.cache.clear();this.transactionNodesPendingRemoval.clear()}getRenderer(templateId){const renderer=this.renderers.get(templateId);if(!renderer){throw new Error(`No renderer found for ${templateId}`)}return renderer}}}});function equalsDragFeedback(f1,f2){if(Array.isArray(f1)&&Array.isArray(f2)){return equals(f1,f2)}return f1===f2}var __decorate15,StaticDND,DefaultOptions,ElementsDragAndDropData,ExternalElementsDragAndDropData,NativeDragAndDropData,ListViewAccessibilityProvider,ListView;var init_listView=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/list/listView.js"(){init_dnd();init_dom();init_event2();init_touch();init_scrollableElement();init_arrays();init_async();init_decorators();init_event();init_lifecycle();init_range2();init_scrollable();init_rangeMap();init_rowCache();init_errors();__decorate15=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};StaticDND={CurrentDragAndDropData:void 0};DefaultOptions={useShadows:true,verticalScrollMode:1,setRowLineHeight:true,setRowHeight:true,supportDynamicHeights:false,dnd:{getDragElements(e){return[e]},getDragURI(){return null},onDragStart(){},onDragOver(){return false},drop(){}},horizontalScrolling:false,transformOptimization:true,alwaysConsumeMouseWheel:true};ElementsDragAndDropData=class{constructor(elements){this.elements=elements}update(){}getData(){return this.elements}};ExternalElementsDragAndDropData=class{constructor(elements){this.elements=elements}update(){}getData(){return this.elements}};NativeDragAndDropData=class{constructor(){this.types=[];this.files=[]}update(dataTransfer){if(dataTransfer.types){this.types.splice(0,this.types.length,...dataTransfer.types)}if(dataTransfer.files){this.files.splice(0,this.files.length);for(let i=0;il}if(accessibilityProvider===null||accessibilityProvider===void 0?void 0:accessibilityProvider.getPosInSet){this.getPosInSet=accessibilityProvider.getPosInSet.bind(accessibilityProvider)}else{this.getPosInSet=(e,i)=>i+1}if(accessibilityProvider===null||accessibilityProvider===void 0?void 0:accessibilityProvider.getRole){this.getRole=accessibilityProvider.getRole.bind(accessibilityProvider)}else{this.getRole=_=>"listitem"}if(accessibilityProvider===null||accessibilityProvider===void 0?void 0:accessibilityProvider.isChecked){this.isChecked=accessibilityProvider.isChecked.bind(accessibilityProvider)}else{this.isChecked=_=>void 0}}};ListView=class{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(value){if(value===this._horizontalScrolling){return}if(value&&this.supportDynamicHeights){throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously")}this._horizontalScrolling=value;this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling);if(this._horizontalScrolling){for(const item of this.items){this.measureItemWidth(item)}this.updateScrollWidth();this.scrollableElement.setScrollDimensions({width:getContentWidth(this.domNode)});this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else{this.scrollableElementWidthDelayer.cancel();this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth});this.rowsContainer.style.width=""}}constructor(container,virtualDelegate,renderers,options2=DefaultOptions){var _a6,_b3,_c2,_d2,_e2,_f2,_g2,_h2,_j,_k,_l,_m,_o;this.virtualDelegate=virtualDelegate;this.domId=`list_id_${++ListView.InstanceCount}`;this.renderers=new Map;this.renderWidth=0;this._scrollHeight=0;this.scrollableElementUpdateDisposable=null;this.scrollableElementWidthDelayer=new Delayer(50);this.splicing=false;this.dragOverAnimationStopDisposable=Disposable.None;this.dragOverMouseY=0;this.canDrop=false;this.currentDragFeedbackDisposable=Disposable.None;this.onDragLeaveTimeout=Disposable.None;this.disposables=new DisposableStore;this._onDidChangeContentHeight=new Emitter;this._onDidChangeContentWidth=new Emitter;this._horizontalScrolling=false;if(options2.horizontalScrolling&&options2.supportDynamicHeights){throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously")}this.items=[];this.itemId=0;this.rangeMap=new RangeMap((_a6=options2.paddingTop)!==null&&_a6!==void 0?_a6:0);for(const renderer of renderers){this.renderers.set(renderer.templateId,renderer)}this.cache=this.disposables.add(new RowCache(this.renderers));this.lastRenderTop=0;this.lastRenderHeight=0;this.domNode=document.createElement("div");this.domNode.className="monaco-list";this.domNode.classList.add(this.domId);this.domNode.tabIndex=0;this.domNode.classList.toggle("mouse-support",typeof options2.mouseSupport==="boolean"?options2.mouseSupport:true);this._horizontalScrolling=(_b3=options2.horizontalScrolling)!==null&&_b3!==void 0?_b3:DefaultOptions.horizontalScrolling;this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling);this.paddingBottom=typeof options2.paddingBottom==="undefined"?0:options2.paddingBottom;this.accessibilityProvider=new ListViewAccessibilityProvider(options2.accessibilityProvider);this.rowsContainer=document.createElement("div");this.rowsContainer.className="monaco-list-rows";const transformOptimization=(_c2=options2.transformOptimization)!==null&&_c2!==void 0?_c2:DefaultOptions.transformOptimization;if(transformOptimization){this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)";this.rowsContainer.style.overflow="hidden";this.rowsContainer.style.contain="strict"}this.disposables.add(Gesture.addTarget(this.rowsContainer));this.scrollable=new Scrollable({forceIntegerValues:true,smoothScrollDuration:((_d2=options2.smoothScrolling)!==null&&_d2!==void 0?_d2:false)?125:0,scheduleAtNextAnimationFrame:cb=>scheduleAtNextAnimationFrame(cb)});this.scrollableElement=this.disposables.add(new SmoothScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:(_e2=options2.alwaysConsumeMouseWheel)!==null&&_e2!==void 0?_e2:DefaultOptions.alwaysConsumeMouseWheel,horizontal:1,vertical:(_f2=options2.verticalScrollMode)!==null&&_f2!==void 0?_f2:DefaultOptions.verticalScrollMode,useShadows:(_g2=options2.useShadows)!==null&&_g2!==void 0?_g2:DefaultOptions.useShadows,mouseWheelScrollSensitivity:options2.mouseWheelScrollSensitivity,fastScrollSensitivity:options2.fastScrollSensitivity,scrollByPage:options2.scrollByPage},this.scrollable));this.domNode.appendChild(this.scrollableElement.getDomNode());container.appendChild(this.domNode);this.scrollableElement.onScroll(this.onScroll,this,this.disposables);this.disposables.add(addDisposableListener(this.rowsContainer,EventType2.Change,(e=>this.onTouchChange(e))));this.disposables.add(addDisposableListener(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0)));this.disposables.add(addDisposableListener(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e)))));this.disposables.add(addDisposableListener(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e)))));this.disposables.add(addDisposableListener(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e)))));this.disposables.add(addDisposableListener(this.domNode,"dragend",(e=>this.onDragEnd(e))));this.setRowLineHeight=(_h2=options2.setRowLineHeight)!==null&&_h2!==void 0?_h2:DefaultOptions.setRowLineHeight;this.setRowHeight=(_j=options2.setRowHeight)!==null&&_j!==void 0?_j:DefaultOptions.setRowHeight;this.supportDynamicHeights=(_k=options2.supportDynamicHeights)!==null&&_k!==void 0?_k:DefaultOptions.supportDynamicHeights;this.dnd=(_l=options2.dnd)!==null&&_l!==void 0?_l:DefaultOptions.dnd;this.layout((_m=options2.initialSize)===null||_m===void 0?void 0:_m.height,(_o=options2.initialSize)===null||_o===void 0?void 0:_o.width)}updateOptions(options2){if(options2.paddingBottom!==void 0){this.paddingBottom=options2.paddingBottom;this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})}if(options2.smoothScrolling!==void 0){this.scrollable.setSmoothScrollDuration(options2.smoothScrolling?125:0)}if(options2.horizontalScrolling!==void 0){this.horizontalScrolling=options2.horizontalScrolling}let scrollableOptions;if(options2.scrollByPage!==void 0){scrollableOptions=Object.assign(Object.assign({},scrollableOptions!==null&&scrollableOptions!==void 0?scrollableOptions:{}),{scrollByPage:options2.scrollByPage})}if(options2.mouseWheelScrollSensitivity!==void 0){scrollableOptions=Object.assign(Object.assign({},scrollableOptions!==null&&scrollableOptions!==void 0?scrollableOptions:{}),{mouseWheelScrollSensitivity:options2.mouseWheelScrollSensitivity})}if(options2.fastScrollSensitivity!==void 0){scrollableOptions=Object.assign(Object.assign({},scrollableOptions!==null&&scrollableOptions!==void 0?scrollableOptions:{}),{fastScrollSensitivity:options2.fastScrollSensitivity})}if(scrollableOptions){this.scrollableElement.updateOptions(scrollableOptions)}if(options2.paddingTop!==void 0&&options2.paddingTop!==this.rangeMap.paddingTop){const lastRenderRange=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);const offset=options2.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=options2.paddingTop;this.render(lastRenderRange,Math.max(0,this.lastRenderTop+offset),this.lastRenderHeight,void 0,void 0,true);this.setScrollTop(this.lastRenderTop);this.eventuallyUpdateScrollDimensions();if(this.supportDynamicHeights){this._rerender(this.lastRenderTop,this.lastRenderHeight)}}}splice(start,deleteCount,elements=[]){if(this.splicing){throw new Error("Can't run recursive splices.")}this.splicing=true;try{return this._splice(start,deleteCount,elements)}finally{this.splicing=false;this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(start,deleteCount,elements=[]){const previousRenderRange=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);const deleteRange={start:start,end:start+deleteCount};const removeRange=Range2.intersect(previousRenderRange,deleteRange);const rowsToDispose=new Map;for(let i=removeRange.end-1;i>=removeRange.start;i--){const item=this.items[i];item.dragStartDisposable.dispose();item.checkedDisposable.dispose();if(item.row){let rows=rowsToDispose.get(item.templateId);if(!rows){rows=[];rowsToDispose.set(item.templateId,rows)}const renderer=this.renderers.get(item.templateId);if(renderer&&renderer.disposeElement){renderer.disposeElement(item.element,i,item.row.templateData,item.size)}rows.push(item.row)}item.row=null}const previousRestRange={start:start+deleteCount,end:this.items.length};const previousRenderedRestRange=Range2.intersect(previousRestRange,previousRenderRange);const previousUnrenderedRestRanges=Range2.relativeComplement(previousRestRange,previousRenderRange);const inserted=elements.map((element=>({id:String(this.itemId++),element:element,templateId:this.virtualDelegate.getTemplateId(element),size:this.virtualDelegate.getHeight(element),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(element),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:false,dragStartDisposable:Disposable.None,checkedDisposable:Disposable.None})));let deleted;if(start===0&&deleteCount>=this.items.length){this.rangeMap=new RangeMap(this.rangeMap.paddingTop);this.rangeMap.splice(0,0,inserted);deleted=this.items;this.items=inserted}else{this.rangeMap.splice(start,deleteCount,inserted);deleted=this.items.splice(start,deleteCount,...inserted)}const delta=elements.length-deleteCount;const renderRange=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);const renderedRestRange=shift(previousRenderedRestRange,delta);const updateRange=Range2.intersect(renderRange,renderedRestRange);for(let i=updateRange.start;ishift(r,delta)));const elementsRange={start:start,end:start+elements.length};const insertRanges=[elementsRange,...unrenderedRestRanges].map((r=>Range2.intersect(renderRange,r)));const beforeElement=this.getNextToLastElement(insertRanges);for(const range2 of insertRanges){for(let i=range2.start;ii.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight;this.rowsContainer.style.height=`${this._scrollHeight}px`;if(!this.scrollableElementUpdateDisposable){this.scrollableElementUpdateDisposable=scheduleAtNextAnimationFrame((()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight});this.updateScrollWidth();this.scrollableElementUpdateDisposable=null}))}}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth()))}updateScrollWidth(){if(!this.horizontalScrolling){return}let scrollWidth=0;for(const item of this.items){if(typeof item.width!=="undefined"){scrollWidth=Math.max(scrollWidth,item.width)}}this.scrollWidth=scrollWidth;this.scrollableElement.setScrollDimensions({scrollWidth:scrollWidth===0?0:scrollWidth+10});this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(!this.supportDynamicHeights){return}for(const item of this.items){item.lastDynamicHeightWidth=void 0}this._rerender(this.lastRenderTop,this.lastRenderHeight)}get length(){return this.items.length}get renderHeight(){const scrollDimensions=this.scrollableElement.getScrollDimensions();return scrollDimensions.height}get firstVisibleIndex(){const range2=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);const firstElTop=this.rangeMap.positionAt(range2.start);const nextElTop=this.rangeMap.positionAt(range2.start+1);if(nextElTop!==-1){const firstElMidpoint=(nextElTop-firstElTop)/2+firstElTop;if(firstElMidpoint{for(const range2 of rangesToRemove){for(let i=range2.start;iitem.row.domNode.setAttribute("aria-checked",String(!!checked2));update(checked.value);item.checkedDisposable=checked.onDidChange(update)}if(isStale||!item.row.domNode.parentElement){if(beforeElement){this.rowsContainer.insertBefore(item.row.domNode,beforeElement)}else{this.rowsContainer.appendChild(item.row.domNode)}}this.updateItemInDOM(item,index);const renderer=this.renderers.get(item.templateId);if(!renderer){throw new Error(`No renderer found for template id ${item.templateId}`)}renderer===null||renderer===void 0?void 0:renderer.renderElement(item.element,index,item.row.templateData,item.size);const uri=this.dnd.getDragURI(item.element);item.dragStartDisposable.dispose();item.row.domNode.draggable=!!uri;if(uri){item.dragStartDisposable=addDisposableListener(item.row.domNode,"dragstart",(event=>this.onDragStart(item.element,uri,event)))}if(this.horizontalScrolling){this.measureItemWidth(item);this.eventuallyUpdateScrollWidth()}}measureItemWidth(item){if(!item.row||!item.row.domNode){return}item.row.domNode.style.width="fit-content";item.width=getContentWidth(item.row.domNode);const style=window.getComputedStyle(item.row.domNode);if(style.paddingLeft){item.width+=parseFloat(style.paddingLeft)}if(style.paddingRight){item.width+=parseFloat(style.paddingRight)}item.row.domNode.style.width=""}updateItemInDOM(item,index){item.row.domNode.style.top=`${this.elementTop(index)}px`;if(this.setRowHeight){item.row.domNode.style.height=`${item.size}px`}if(this.setRowLineHeight){item.row.domNode.style.lineHeight=`${item.size}px`}item.row.domNode.setAttribute("data-index",`${index}`);item.row.domNode.setAttribute("data-last-element",index===this.length-1?"true":"false");item.row.domNode.setAttribute("data-parity",index%2===0?"even":"odd");item.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(item.element,index,this.length)));item.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(item.element,index)));item.row.domNode.setAttribute("id",this.getElementDomId(index));item.row.domNode.classList.toggle("drop-target",item.dropTarget)}removeItemFromDOM(index){const item=this.items[index];item.dragStartDisposable.dispose();item.checkedDisposable.dispose();if(item.row){const renderer=this.renderers.get(item.templateId);if(renderer&&renderer.disposeElement){renderer.disposeElement(item.element,index,item.row.templateData,item.size)}this.cache.release(item.row);item.row=null}if(this.horizontalScrolling){this.eventuallyUpdateScrollWidth()}}getScrollTop(){const scrollPosition=this.scrollableElement.getScrollPosition();return scrollPosition.scrollTop}setScrollTop(scrollTop,reuseAnimation){if(this.scrollableElementUpdateDisposable){this.scrollableElementUpdateDisposable.dispose();this.scrollableElementUpdateDisposable=null;this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})}this.scrollableElement.setScrollPosition({scrollTop:scrollTop,reuseAnimation:reuseAnimation})}get scrollTop(){return this.getScrollTop()}set scrollTop(scrollTop){this.setScrollTop(scrollTop)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return Event.map(this.disposables.add(new DomEmitter(this.domNode,"click")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseDblClick(){return Event.map(this.disposables.add(new DomEmitter(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseMiddleClick(){return Event.filter(Event.map(this.disposables.add(new DomEmitter(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e)),this.disposables),(e=>e.browserEvent.button===1),this.disposables)}get onMouseDown(){return Event.map(this.disposables.add(new DomEmitter(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOver(){return Event.map(this.disposables.add(new DomEmitter(this.domNode,"mouseover")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onMouseOut(){return Event.map(this.disposables.add(new DomEmitter(this.domNode,"mouseout")).event,(e=>this.toMouseEvent(e)),this.disposables)}get onContextMenu(){return Event.any(Event.map(this.disposables.add(new DomEmitter(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e)),this.disposables),Event.map(this.disposables.add(new DomEmitter(this.domNode,EventType2.Contextmenu)).event,(e=>this.toGestureEvent(e)),this.disposables))}get onTouchStart(){return Event.map(this.disposables.add(new DomEmitter(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)),this.disposables)}get onTap(){return Event.map(this.disposables.add(new DomEmitter(this.rowsContainer,EventType2.Tap)).event,(e=>this.toGestureEvent(e)),this.disposables)}toMouseEvent(browserEvent){const index=this.getItemIndexFromEventTarget(browserEvent.target||null);const item=typeof index==="undefined"?void 0:this.items[index];const element=item&&item.element;return{browserEvent:browserEvent,index:index,element:element}}toTouchEvent(browserEvent){const index=this.getItemIndexFromEventTarget(browserEvent.target||null);const item=typeof index==="undefined"?void 0:this.items[index];const element=item&&item.element;return{browserEvent:browserEvent,index:index,element:element}}toGestureEvent(browserEvent){const index=this.getItemIndexFromEventTarget(browserEvent.initialTarget||null);const item=typeof index==="undefined"?void 0:this.items[index];const element=item&&item.element;return{browserEvent:browserEvent,index:index,element:element}}toDragEvent(browserEvent){const index=this.getItemIndexFromEventTarget(browserEvent.target||null);const item=typeof index==="undefined"?void 0:this.items[index];const element=item&&item.element;return{browserEvent:browserEvent,index:index,element:element}}onScroll(e){try{const previousRenderRange=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(previousRenderRange,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth);if(this.supportDynamicHeights){this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}}catch(err){console.error("Got bad scroll event:",e);throw err}}onTouchChange(event){event.preventDefault();event.stopPropagation();this.scrollTop-=event.translationY}onDragStart(element,uri,event){var _a6,_b3;if(!event.dataTransfer){return}const elements=this.dnd.getDragElements(element);event.dataTransfer.effectAllowed="copyMove";event.dataTransfer.setData(DataTransfers.TEXT,uri);if(event.dataTransfer.setDragImage){let label;if(this.dnd.getDragLabel){label=this.dnd.getDragLabel(elements,event)}if(typeof label==="undefined"){label=String(elements.length)}const dragImage=$(".monaco-drag-image");dragImage.textContent=label;const getDragImageContainer=e=>{while(e&&!e.classList.contains("monaco-workbench")){e=e.parentElement}return e||document.body};const container=getDragImageContainer(this.domNode);container.appendChild(dragImage);event.dataTransfer.setDragImage(dragImage,-10,-10);setTimeout((()=>container.removeChild(dragImage)),0)}this.domNode.classList.add("dragging");this.currentDragData=new ElementsDragAndDropData(elements);StaticDND.CurrentDragAndDropData=new ExternalElementsDragAndDropData(elements);(_b3=(_a6=this.dnd).onDragStart)===null||_b3===void 0?void 0:_b3.call(_a6,this.currentDragData,event)}onDragOver(event){var _a6;event.browserEvent.preventDefault();this.onDragLeaveTimeout.dispose();if(StaticDND.CurrentDragAndDropData&&StaticDND.CurrentDragAndDropData.getData()==="vscode-ui"){return false}this.setupDragAndDropScrollTopAnimation(event.browserEvent);if(!event.browserEvent.dataTransfer){return false}if(!this.currentDragData){if(StaticDND.CurrentDragAndDropData){this.currentDragData=StaticDND.CurrentDragAndDropData}else{if(!event.browserEvent.dataTransfer.types){return false}this.currentDragData=new NativeDragAndDropData}}const result=this.dnd.onDragOver(this.currentDragData,event.element,event.index,event.browserEvent);this.canDrop=typeof result==="boolean"?result:result.accept;if(!this.canDrop){this.currentDragFeedback=void 0;this.currentDragFeedbackDisposable.dispose();return false}event.browserEvent.dataTransfer.dropEffect=typeof result!=="boolean"&&result.effect===0?"copy":"move";let feedback;if(typeof result!=="boolean"&&result.feedback){feedback=result.feedback}else{if(typeof event.index==="undefined"){feedback=[-1]}else{feedback=[event.index]}}feedback=distinct(feedback).filter((i=>i>=-1&&ia-b));feedback=feedback[0]===-1?[-1]:feedback;if(equalsDragFeedback(this.currentDragFeedback,feedback)){return true}this.currentDragFeedback=feedback;this.currentDragFeedbackDisposable.dispose();if(feedback[0]===-1){this.domNode.classList.add("drop-target");this.rowsContainer.classList.add("drop-target");this.currentDragFeedbackDisposable=toDisposable((()=>{this.domNode.classList.remove("drop-target");this.rowsContainer.classList.remove("drop-target")}))}else{for(const index of feedback){const item=this.items[index];item.dropTarget=true;(_a6=item.row)===null||_a6===void 0?void 0:_a6.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=toDisposable((()=>{var _a7;for(const index of feedback){const item=this.items[index];item.dropTarget=false;(_a7=item.row)===null||_a7===void 0?void 0:_a7.domNode.classList.remove("drop-target")}}))}return true}onDragLeave(event){var _a6,_b3;this.onDragLeaveTimeout.dispose();this.onDragLeaveTimeout=disposableTimeout((()=>this.clearDragOverFeedback()),100);if(this.currentDragData){(_b3=(_a6=this.dnd).onDragLeave)===null||_b3===void 0?void 0:_b3.call(_a6,this.currentDragData,event.element,event.index,event.browserEvent)}}onDrop(event){if(!this.canDrop){return}const dragData=this.currentDragData;this.teardownDragAndDropScrollTopAnimation();this.clearDragOverFeedback();this.domNode.classList.remove("dragging");this.currentDragData=void 0;StaticDND.CurrentDragAndDropData=void 0;if(!dragData||!event.browserEvent.dataTransfer){return}event.browserEvent.preventDefault();dragData.update(event.browserEvent.dataTransfer);this.dnd.drop(dragData,event.element,event.index,event.browserEvent)}onDragEnd(event){var _a6,_b3;this.canDrop=false;this.teardownDragAndDropScrollTopAnimation();this.clearDragOverFeedback();this.domNode.classList.remove("dragging");this.currentDragData=void 0;StaticDND.CurrentDragAndDropData=void 0;(_b3=(_a6=this.dnd).onDragEnd)===null||_b3===void 0?void 0:_b3.call(_a6,event)}clearDragOverFeedback(){this.currentDragFeedback=void 0;this.currentDragFeedbackDisposable.dispose();this.currentDragFeedbackDisposable=Disposable.None}setupDragAndDropScrollTopAnimation(event){if(!this.dragOverAnimationDisposable){const viewTop=getTopLeftOffset(this.domNode).top;this.dragOverAnimationDisposable=animate(this.animateDragAndDropScrollTop.bind(this,viewTop))}this.dragOverAnimationStopDisposable.dispose();this.dragOverAnimationStopDisposable=disposableTimeout((()=>{if(this.dragOverAnimationDisposable){this.dragOverAnimationDisposable.dispose();this.dragOverAnimationDisposable=void 0}}),1e3);this.dragOverMouseY=event.pageY}animateDragAndDropScrollTop(viewTop){if(this.dragOverMouseY===void 0){return}const diff=this.dragOverMouseY-viewTop;const upperLimit=this.renderHeight-35;if(diff<35){this.scrollTop+=Math.max(-14,Math.floor(.3*(diff-35)))}else if(diff>upperLimit){this.scrollTop+=Math.min(14,Math.floor(.3*(diff-upperLimit)))}}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose();if(this.dragOverAnimationDisposable){this.dragOverAnimationDisposable.dispose();this.dragOverAnimationDisposable=void 0}}getItemIndexFromEventTarget(target){const scrollableElement=this.scrollableElement.getDomNode();let element=target;while(element instanceof HTMLElement&&element!==this.rowsContainer&&scrollableElement.contains(element)){const rawIndex=element.getAttribute("data-index");if(rawIndex){const index=Number(rawIndex);if(!isNaN(index)){return index}}element=element.parentElement}return void 0}getRenderRange(renderTop,renderHeight){return{start:this.rangeMap.indexAt(renderTop),end:this.rangeMap.indexAfter(renderTop+renderHeight-1)}}_rerender(renderTop,renderHeight,inSmoothScrolling){const previousRenderRange=this.getRenderRange(renderTop,renderHeight);let anchorElementIndex;let anchorElementTopDelta;if(renderTop===this.elementTop(previousRenderRange.start)){anchorElementIndex=previousRenderRange.start;anchorElementTopDelta=0}else if(previousRenderRange.end-previousRenderRange.start>1){anchorElementIndex=previousRenderRange.start+1;anchorElementTopDelta=this.elementTop(anchorElementIndex)-renderTop}let heightDiff2=0;while(true){const renderRange=this.getRenderRange(renderTop,renderHeight);let didChange=false;for(let i=renderRange.start;i=0&&range2[i]===value-(index-i)){result.push(range2[i--])}result.reverse();i=index;while(i=one.length){result.push(other[j++])}else if(j>=other.length){result.push(one[i++])}else if(one[i]===other[j]){result.push(one[i]);i++;j++;continue}else if(one[i]=one.length){result.push(other[j++])}else if(j>=other.length){result.push(one[i++])}else if(one[i]===other[j]){i++;j++;continue}else if(one[i]=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};__awaiter10=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};TraitRenderer=class{constructor(trait){this.trait=trait;this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(container){return container}renderElement(element,index,templateData){const renderedElementIndex=this.renderedElements.findIndex((el=>el.templateData===templateData));if(renderedElementIndex>=0){const rendered=this.renderedElements[renderedElementIndex];this.trait.unrender(templateData);rendered.index=index}else{const rendered={index:index,templateData:templateData};this.renderedElements.push(rendered)}this.trait.renderIndex(index,templateData)}splice(start,deleteCount,insertCount){const rendered=[];for(const renderedElement of this.renderedElements){if(renderedElement.index=start+deleteCount){rendered.push({index:renderedElement.index+insertCount-deleteCount,templateData:renderedElement.templateData})}}this.renderedElements=rendered}renderIndexes(indexes){for(const{index:index,templateData:templateData}of this.renderedElements){if(indexes.indexOf(index)>-1){this.trait.renderIndex(index,templateData)}}}disposeTemplate(templateData){const index=this.renderedElements.findIndex((el=>el.templateData===templateData));if(index<0){return}this.renderedElements.splice(index,1)}};Trait=class{get name(){return this._trait}get renderer(){return new TraitRenderer(this)}constructor(_trait){this._trait=_trait;this.length=0;this.indexes=[];this.sortedIndexes=[];this._onChange=new Emitter;this.onChange=this._onChange.event}splice(start,deleteCount,elements){var _a6;deleteCount=Math.max(0,Math.min(deleteCount,this.length-start));const diff=elements.length-deleteCount;const end=start+deleteCount;const sortedIndexes=[];let i=0;while(i=end){sortedIndexes.push(this.sortedIndexes[i++]+diff)}const length2=this.length+diff;if(this.sortedIndexes.length>0&&sortedIndexes.length===0&&length2>0){const first2=(_a6=this.sortedIndexes.find((index=>index>=start)))!==null&&_a6!==void 0?_a6:length2-1;sortedIndexes.push(Math.min(first2,length2-1))}this.renderer.splice(start,deleteCount,elements.length);this._set(sortedIndexes,sortedIndexes);this.length=length2}renderIndex(index,container){container.classList.toggle(this._trait,this.contains(index))}unrender(container){container.classList.remove(this._trait)}set(indexes,browserEvent){return this._set(indexes,[...indexes].sort(numericSort),browserEvent)}_set(indexes,sortedIndexes,browserEvent){const result=this.indexes;const sortedResult=this.sortedIndexes;this.indexes=indexes;this.sortedIndexes=sortedIndexes;const toRender=disjunction(sortedResult,indexes);this.renderer.renderIndexes(toRender);this._onChange.fire({indexes:indexes,browserEvent:browserEvent});return result}get(){return this.indexes}contains(index){return binarySearch(this.sortedIndexes,index,numericSort)>=0}dispose(){dispose(this._onChange)}};__decorate16([memoize],Trait.prototype,"renderer",null);SelectionTrait=class extends Trait{constructor(setAriaSelected){super("selected");this.setAriaSelected=setAriaSelected}renderIndex(index,container){super.renderIndex(index,container);if(this.setAriaSelected){if(this.contains(index)){container.setAttribute("aria-selected","true")}else{container.setAttribute("aria-selected","false")}}}};TraitSpliceable=class{constructor(trait,view,identityProvider){this.trait=trait;this.view=view;this.identityProvider=identityProvider}splice(start,deleteCount,elements){if(!this.identityProvider){return this.trait.splice(start,deleteCount,new Array(elements.length).fill(false))}const pastElementsWithTrait=this.trait.get().map((i=>this.identityProvider.getId(this.view.element(i)).toString()));if(pastElementsWithTrait.length===0){return this.trait.splice(start,deleteCount,new Array(elements.length).fill(false))}const pastElementsWithTraitSet=new Set(pastElementsWithTrait);const elementsWithTrait=elements.map((e=>pastElementsWithTraitSet.has(this.identityProvider.getId(e).toString())));this.trait.splice(start,deleteCount,elementsWithTrait)}};KeyboardController=class{get onKeyDown(){return this.disposables.add(Event.chain(this.disposables.add(new DomEmitter(this.view.domNode,"keydown")).event).filter((e=>!isInputElement(e.target))).map((e=>new StandardKeyboardEvent(e))))}constructor(list,view,options2){this.list=list;this.view=view;this.disposables=new DisposableStore;this.multipleSelectionDisposables=new DisposableStore;this.onKeyDown.filter((e=>e.keyCode===3)).on(this.onEnter,this,this.disposables);this.onKeyDown.filter((e=>e.keyCode===16)).on(this.onUpArrow,this,this.disposables);this.onKeyDown.filter((e=>e.keyCode===18)).on(this.onDownArrow,this,this.disposables);this.onKeyDown.filter((e=>e.keyCode===11)).on(this.onPageUpArrow,this,this.disposables);this.onKeyDown.filter((e=>e.keyCode===12)).on(this.onPageDownArrow,this,this.disposables);this.onKeyDown.filter((e=>e.keyCode===9)).on(this.onEscape,this,this.disposables);if(options2.multipleSelectionSupport!==false){this.onKeyDown.filter((e=>(isMacintosh?e.metaKey:e.ctrlKey)&&e.keyCode===31)).on(this.onCtrlA,this,this.multipleSelectionDisposables)}}updateOptions(optionsUpdate){if(optionsUpdate.multipleSelectionSupport!==void 0){this.multipleSelectionDisposables.clear();if(optionsUpdate.multipleSelectionSupport){this.onKeyDown.filter((e=>(isMacintosh?e.metaKey:e.ctrlKey)&&e.keyCode===31)).on(this.onCtrlA,this,this.multipleSelectionDisposables)}}}onEnter(e){e.preventDefault();e.stopPropagation();this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault();e.stopPropagation();this.list.focusPrevious(1,false,e.browserEvent);const el=this.list.getFocus()[0];this.list.setAnchor(el);this.list.reveal(el);this.view.domNode.focus()}onDownArrow(e){e.preventDefault();e.stopPropagation();this.list.focusNext(1,false,e.browserEvent);const el=this.list.getFocus()[0];this.list.setAnchor(el);this.list.reveal(el);this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault();e.stopPropagation();this.list.focusPreviousPage(e.browserEvent);const el=this.list.getFocus()[0];this.list.setAnchor(el);this.list.reveal(el);this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault();e.stopPropagation();this.list.focusNextPage(e.browserEvent);const el=this.list.getFocus()[0];this.list.setAnchor(el);this.list.reveal(el);this.view.domNode.focus()}onCtrlA(e){e.preventDefault();e.stopPropagation();this.list.setSelection(range(this.list.length),e.browserEvent);this.list.setAnchor(void 0);this.view.domNode.focus()}onEscape(e){if(this.list.getSelection().length){e.preventDefault();e.stopPropagation();this.list.setSelection([],e.browserEvent);this.list.setAnchor(void 0);this.view.domNode.focus()}}dispose(){this.disposables.dispose();this.multipleSelectionDisposables.dispose()}};__decorate16([memoize],KeyboardController.prototype,"onKeyDown",null);(function(TypeNavigationMode2){TypeNavigationMode2[TypeNavigationMode2["Automatic"]=0]="Automatic";TypeNavigationMode2[TypeNavigationMode2["Trigger"]=1]="Trigger"})(TypeNavigationMode||(TypeNavigationMode={}));(function(TypeNavigationControllerState2){TypeNavigationControllerState2[TypeNavigationControllerState2["Idle"]=0]="Idle";TypeNavigationControllerState2[TypeNavigationControllerState2["Typing"]=1]="Typing"})(TypeNavigationControllerState||(TypeNavigationControllerState={}));DefaultKeyboardNavigationDelegate=new class{mightProducePrintableCharacter(event){if(event.ctrlKey||event.metaKey||event.altKey){return false}return event.keyCode>=31&&event.keyCode<=56||event.keyCode>=21&&event.keyCode<=30||event.keyCode>=98&&event.keyCode<=107||event.keyCode>=85&&event.keyCode<=95}};TypeNavigationController=class{constructor(list,view,keyboardNavigationLabelProvider,keyboardNavigationEventFilter,delegate){this.list=list;this.view=view;this.keyboardNavigationLabelProvider=keyboardNavigationLabelProvider;this.keyboardNavigationEventFilter=keyboardNavigationEventFilter;this.delegate=delegate;this.enabled=false;this.state=TypeNavigationControllerState.Idle;this.mode=TypeNavigationMode.Automatic;this.triggered=false;this.previouslyFocused=-1;this.enabledDisposables=new DisposableStore;this.disposables=new DisposableStore;this.updateOptions(list.options)}updateOptions(options2){var _a6,_b3;if((_a6=options2.typeNavigationEnabled)!==null&&_a6!==void 0?_a6:true){this.enable()}else{this.disable()}this.mode=(_b3=options2.typeNavigationMode)!==null&&_b3!==void 0?_b3:TypeNavigationMode.Automatic}enable(){if(this.enabled){return}let typing=false;const onChar=this.enabledDisposables.add(Event.chain(this.enabledDisposables.add(new DomEmitter(this.view.domNode,"keydown")).event)).filter((e=>!isInputElement(e.target))).filter((()=>this.mode===TypeNavigationMode.Automatic||this.triggered)).map((event=>new StandardKeyboardEvent(event))).filter((e=>typing||this.keyboardNavigationEventFilter(e))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>EventHelper.stop(e,true))).map((event=>event.browserEvent.key)).event;const onClear=Event.debounce(onChar,(()=>null),800,void 0,void 0,void 0,this.enabledDisposables);const onInput=Event.reduce(Event.any(onChar,onClear),((r,i)=>i===null?null:(r||"")+i),void 0,this.enabledDisposables);onInput(this.onInput,this,this.enabledDisposables);onClear(this.onClear,this,this.enabledDisposables);onChar((()=>typing=true),void 0,this.enabledDisposables);onClear((()=>typing=false),void 0,this.enabledDisposables);this.enabled=true;this.triggered=false}disable(){if(!this.enabled){return}this.enabledDisposables.clear();this.enabled=false;this.triggered=false}onClear(){var _a6;const focus=this.list.getFocus();if(focus.length>0&&focus[0]===this.previouslyFocused){const ariaLabel=(_a6=this.list.options.accessibilityProvider)===null||_a6===void 0?void 0:_a6.getAriaLabel(this.list.element(focus[0]));if(ariaLabel){alert(ariaLabel)}}this.previouslyFocused=-1}onInput(word){if(!word){this.state=TypeNavigationControllerState.Idle;this.triggered=false;return}const focus=this.list.getFocus();const start=focus.length>0?focus[0]:0;const delta=this.state===TypeNavigationControllerState.Idle?1:0;this.state=TypeNavigationControllerState.Typing;for(let i=0;i1&&fuzzy.length===1){this.previouslyFocused=start;this.list.setFocus([index]);this.list.reveal(index);return}}}}else{if(typeof labelStr==="undefined"||matchesPrefix(word,labelStr)){this.previouslyFocused=start;this.list.setFocus([index]);this.list.reveal(index);return}}}}dispose(){this.disable();this.enabledDisposables.dispose();this.disposables.dispose()}};DOMFocusController=class{constructor(list,view){this.list=list;this.view=view;this.disposables=new DisposableStore;const onKeyDown=this.disposables.add(Event.chain(this.disposables.add(new DomEmitter(view.domNode,"keydown")).event)).filter((e=>!isInputElement(e.target))).map((e=>new StandardKeyboardEvent(e)));onKeyDown.filter((e=>e.keyCode===2&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode){return}const focus=this.list.getFocus();if(focus.length===0){return}const focusedDomElement=this.view.domElement(focus[0]);if(!focusedDomElement){return}const tabIndexElement=focusedDomElement.querySelector("[tabIndex]");if(!tabIndexElement||!(tabIndexElement instanceof HTMLElement)||tabIndexElement.tabIndex===-1){return}const style=window.getComputedStyle(tabIndexElement);if(style.visibility==="hidden"||style.display==="none"){return}e.preventDefault();e.stopPropagation();tabIndexElement.focus()}dispose(){this.disposables.dispose()}};DefaultMultipleSelectionController={isSelectionSingleChangeEvent:isSelectionSingleChangeEvent,isSelectionRangeChangeEvent:isSelectionRangeChangeEvent};MouseController=class{constructor(list){this.list=list;this.disposables=new DisposableStore;this._onPointer=new Emitter;this.onPointer=this._onPointer.event;if(list.options.multipleSelectionSupport!==false){this.multipleSelectionController=this.list.options.multipleSelectionController||DefaultMultipleSelectionController}this.mouseSupport=typeof list.options.mouseSupport==="undefined"||!!list.options.mouseSupport;if(this.mouseSupport){list.onMouseDown(this.onMouseDown,this,this.disposables);list.onContextMenu(this.onContextMenu,this,this.disposables);list.onMouseDblClick(this.onDoubleClick,this,this.disposables);list.onTouchStart(this.onMouseDown,this,this.disposables);this.disposables.add(Gesture.addTarget(list.getHTMLElement()))}Event.any(list.onMouseClick,list.onMouseMiddleClick,list.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(optionsUpdate){if(optionsUpdate.multipleSelectionSupport!==void 0){this.multipleSelectionController=void 0;if(optionsUpdate.multipleSelectionSupport){this.multipleSelectionController=this.list.options.multipleSelectionController||DefaultMultipleSelectionController}}}isSelectionSingleChangeEvent(event){if(!this.multipleSelectionController){return false}return this.multipleSelectionController.isSelectionSingleChangeEvent(event)}isSelectionRangeChangeEvent(event){if(!this.multipleSelectionController){return false}return this.multipleSelectionController.isSelectionRangeChangeEvent(event)}isSelectionChangeEvent(event){return this.isSelectionSingleChangeEvent(event)||this.isSelectionRangeChangeEvent(event)}onMouseDown(e){if(isMonacoEditor(e.browserEvent.target)){return}if(document.activeElement!==e.browserEvent.target){this.list.domFocus()}}onContextMenu(e){if(isInputElement(e.browserEvent.target)||isMonacoEditor(e.browserEvent.target)){return}const focus=typeof e.index==="undefined"?[]:[e.index];this.list.setFocus(focus,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport){return}if(isInputElement(e.browserEvent.target)||isMonacoEditor(e.browserEvent.target)){return}if(e.browserEvent.isHandledByList){return}e.browserEvent.isHandledByList=true;const focus=e.index;if(typeof focus==="undefined"){this.list.setFocus([],e.browserEvent);this.list.setSelection([],e.browserEvent);this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(e)){return this.changeSelection(e)}this.list.setFocus([focus],e.browserEvent);this.list.setAnchor(focus);if(!isMouseRightClick(e.browserEvent)){this.list.setSelection([focus],e.browserEvent)}this._onPointer.fire(e)}onDoubleClick(e){if(isInputElement(e.browserEvent.target)||isMonacoEditor(e.browserEvent.target)){return}if(this.isSelectionChangeEvent(e)){return}if(e.browserEvent.isHandledByList){return}e.browserEvent.isHandledByList=true;const focus=this.list.getFocus();this.list.setSelection(focus,e.browserEvent)}changeSelection(e){const focus=e.index;let anchor=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(typeof anchor==="undefined"){const currentFocus=this.list.getFocus()[0];anchor=currentFocus!==null&¤tFocus!==void 0?currentFocus:focus;this.list.setAnchor(anchor)}const min=Math.min(anchor,focus);const max=Math.max(anchor,focus);const rangeSelection=range(min,max+1);const selection=this.list.getSelection();const contiguousRange=getContiguousRangeContaining(disjunction(selection,[anchor]),anchor);if(contiguousRange.length===0){return}const newSelection=disjunction(rangeSelection,relativeComplement(selection,contiguousRange));this.list.setSelection(newSelection,e.browserEvent);this.list.setFocus([focus],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const selection=this.list.getSelection();const newSelection=selection.filter((i=>i!==focus));this.list.setFocus([focus]);this.list.setAnchor(focus);if(selection.length===newSelection.length){this.list.setSelection([...newSelection,focus],e.browserEvent)}else{this.list.setSelection(newSelection,e.browserEvent)}}}dispose(){this.disposables.dispose()}};DefaultStyleController=class{constructor(styleElement,selectorSuffix){this.styleElement=styleElement;this.selectorSuffix=selectorSuffix}style(styles){var _a6,_b3;const suffix=this.selectorSuffix&&`.${this.selectorSuffix}`;const content=[];if(styles.listBackground){content.push(`.monaco-list${suffix} .monaco-list-rows { background: ${styles.listBackground}; }`)}if(styles.listFocusBackground){content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused { background-color: ${styles.listFocusBackground}; }`);content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused:hover { background-color: ${styles.listFocusBackground}; }`)}if(styles.listFocusForeground){content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused { color: ${styles.listFocusForeground}; }`)}if(styles.listActiveSelectionBackground){content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected { background-color: ${styles.listActiveSelectionBackground}; }`);content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected:hover { background-color: ${styles.listActiveSelectionBackground}; }`)}if(styles.listActiveSelectionForeground){content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected { color: ${styles.listActiveSelectionForeground}; }`)}if(styles.listActiveSelectionIconForeground){content.push(`.monaco-list${suffix}:focus .monaco-list-row.selected .codicon { color: ${styles.listActiveSelectionIconForeground}; }`)}if(styles.listFocusAndSelectionBackground){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`)}if(styles.listFocusAndSelectionForeground){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`)}if(styles.listInactiveFocusForeground){content.push(`.monaco-list${suffix} .monaco-list-row.focused { color: ${styles.listInactiveFocusForeground}; }`);content.push(`.monaco-list${suffix} .monaco-list-row.focused:hover { color: ${styles.listInactiveFocusForeground}; }`)}if(styles.listInactiveSelectionIconForeground){content.push(`.monaco-list${suffix} .monaco-list-row.focused .codicon { color: ${styles.listInactiveSelectionIconForeground}; }`)}if(styles.listInactiveFocusBackground){content.push(`.monaco-list${suffix} .monaco-list-row.focused { background-color: ${styles.listInactiveFocusBackground}; }`);content.push(`.monaco-list${suffix} .monaco-list-row.focused:hover { background-color: ${styles.listInactiveFocusBackground}; }`)}if(styles.listInactiveSelectionBackground){content.push(`.monaco-list${suffix} .monaco-list-row.selected { background-color: ${styles.listInactiveSelectionBackground}; }`);content.push(`.monaco-list${suffix} .monaco-list-row.selected:hover { background-color: ${styles.listInactiveSelectionBackground}; }`)}if(styles.listInactiveSelectionForeground){content.push(`.monaco-list${suffix} .monaco-list-row.selected { color: ${styles.listInactiveSelectionForeground}; }`)}if(styles.listHoverBackground){content.push(`.monaco-list${suffix}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${styles.listHoverBackground}; }`)}if(styles.listHoverForeground){content.push(`.monaco-list${suffix}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${styles.listHoverForeground}; }`)}const focusAndSelectionOutline=asCssValueWithDefault(styles.listFocusAndSelectionOutline,asCssValueWithDefault(styles.listSelectionOutline,(_a6=styles.listFocusOutline)!==null&&_a6!==void 0?_a6:""));if(focusAndSelectionOutline){content.push(`.monaco-list${suffix}:focus .monaco-list-row.focused.selected { outline: 1px solid ${focusAndSelectionOutline}; outline-offset: -1px;}`)}if(styles.listFocusOutline){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\t.monaco-workbench.context-menu-visible .monaco-list${suffix}.last-focused .monaco-list-row.focused { outline: 1px solid ${styles.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`)}const inactiveFocusAndSelectionOutline=asCssValueWithDefault(styles.listSelectionOutline,(_b3=styles.listInactiveFocusOutline)!==null&&_b3!==void 0?_b3:"");if(inactiveFocusAndSelectionOutline){content.push(`.monaco-list${suffix} .monaco-list-row.focused.selected { outline: 1px dotted ${inactiveFocusAndSelectionOutline}; outline-offset: -1px; }`)}if(styles.listSelectionOutline){content.push(`.monaco-list${suffix} .monaco-list-row.selected { outline: 1px dotted ${styles.listSelectionOutline}; outline-offset: -1px; }`)}if(styles.listInactiveFocusOutline){content.push(`.monaco-list${suffix} .monaco-list-row.focused { outline: 1px dotted ${styles.listInactiveFocusOutline}; outline-offset: -1px; }`)}if(styles.listHoverOutline){content.push(`.monaco-list${suffix} .monaco-list-row:hover { outline: 1px dashed ${styles.listHoverOutline}; outline-offset: -1px; }`)}if(styles.listDropBackground){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`)}if(styles.tableColumnsBorder){content.push(`\n\t\t\t\t.monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${styles.tableColumnsBorder};\n\t\t\t\t}\n\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2,\n\t\t\t\t.monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: transparent;\n\t\t\t\t}\n\t\t\t`)}if(styles.tableOddRowsBackgroundColor){content.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${styles.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`)}this.styleElement.textContent=content.join("\n")}};unthemedListStyles={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:Color.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:Color.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:Color.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0};DefaultOptions2={keyboardSupport:true,mouseSupport:true,multipleSelectionSupport:true,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return false},drop(){}}};numericSort=(a,b)=>a-b;PipelineRenderer=class{constructor(_templateId,renderers){this._templateId=_templateId;this.renderers=renderers}get templateId(){return this._templateId}renderTemplate(container){return this.renderers.map((r=>r.renderTemplate(container)))}renderElement(element,index,templateData,height){let i=0;for(const renderer of this.renderers){renderer.renderElement(element,index,templateData[i++],height)}}disposeElement(element,index,templateData,height){var _a6;let i=0;for(const renderer of this.renderers){(_a6=renderer.disposeElement)===null||_a6===void 0?void 0:_a6.call(renderer,element,index,templateData[i],height);i+=1}}disposeTemplate(templateData){let i=0;for(const renderer of this.renderers){renderer.disposeTemplate(templateData[i++])}}};AccessibiltyRenderer=class{constructor(accessibilityProvider){this.accessibilityProvider=accessibilityProvider;this.templateId="a18n"}renderTemplate(container){return container}renderElement(element,index,container){const ariaLabel=this.accessibilityProvider.getAriaLabel(element);if(ariaLabel){container.setAttribute("aria-label",ariaLabel)}else{container.removeAttribute("aria-label")}const ariaLevel=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(element);if(typeof ariaLevel==="number"){container.setAttribute("aria-level",`${ariaLevel}`)}else{container.removeAttribute("aria-level")}}disposeTemplate(templateData){}};ListViewDragAndDrop=class{constructor(list,dnd){this.list=list;this.dnd=dnd}getDragElements(element){const selection=this.list.getSelectedElements();const elements=selection.indexOf(element)>-1?selection:[element];return elements}getDragURI(element){return this.dnd.getDragURI(element)}getDragLabel(elements,originalEvent){if(this.dnd.getDragLabel){return this.dnd.getDragLabel(elements,originalEvent)}return void 0}onDragStart(data,originalEvent){var _a6,_b3;(_b3=(_a6=this.dnd).onDragStart)===null||_b3===void 0?void 0:_b3.call(_a6,data,originalEvent)}onDragOver(data,targetElement,targetIndex,originalEvent){return this.dnd.onDragOver(data,targetElement,targetIndex,originalEvent)}onDragLeave(data,targetElement,targetIndex,originalEvent){var _a6,_b3;(_b3=(_a6=this.dnd).onDragLeave)===null||_b3===void 0?void 0:_b3.call(_a6,data,targetElement,targetIndex,originalEvent)}onDragEnd(originalEvent){var _a6,_b3;(_b3=(_a6=this.dnd).onDragEnd)===null||_b3===void 0?void 0:_b3.call(_a6,originalEvent)}drop(data,targetElement,targetIndex,originalEvent){this.dnd.drop(data,targetElement,targetIndex,originalEvent)}};List=class{get onDidChangeFocus(){return Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)),this.disposables)}get onDidChangeSelection(){return Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let didJustPressContextMenuKey=false;const fromKeyDown=this.disposables.add(Event.chain(this.disposables.add(new DomEmitter(this.view.domNode,"keydown")).event)).map((e=>new StandardKeyboardEvent(e))).filter((e=>didJustPressContextMenuKey=e.keyCode===58||e.shiftKey&&e.keyCode===68)).map((e=>EventHelper.stop(e,true))).filter((()=>false)).event;const fromKeyUp=this.disposables.add(Event.chain(this.disposables.add(new DomEmitter(this.view.domNode,"keyup")).event)).forEach((()=>didJustPressContextMenuKey=false)).map((e=>new StandardKeyboardEvent(e))).filter((e=>e.keyCode===58||e.shiftKey&&e.keyCode===68)).map((e=>EventHelper.stop(e,true))).map((({browserEvent:browserEvent})=>{const focus=this.getFocus();const index=focus.length?focus[0]:void 0;const element=typeof index!=="undefined"?this.view.element(index):void 0;const anchor=typeof index!=="undefined"?this.view.domElement(index):this.view.domNode;return{index:index,element:element,anchor:anchor,browserEvent:browserEvent}})).event;const fromMouse=this.disposables.add(Event.chain(this.view.onContextMenu)).filter((_=>!didJustPressContextMenuKey)).map((({element:element,index:index,browserEvent:browserEvent})=>({element:element,index:index,anchor:new StandardMouseEvent(browserEvent),browserEvent:browserEvent}))).event;return Event.any(fromKeyDown,fromKeyUp,fromMouse)}get onKeyDown(){return this.disposables.add(new DomEmitter(this.view.domNode,"keydown")).event}get onDidFocus(){return Event.signal(this.disposables.add(new DomEmitter(this.view.domNode,"focus",true)).event)}constructor(user,container,virtualDelegate,renderers,_options=DefaultOptions2){var _a6,_b3,_c2,_d2;this.user=user;this._options=_options;this.focus=new Trait("focused");this.anchor=new Trait("anchor");this.eventBufferer=new EventBufferer;this._ariaLabel="";this.disposables=new DisposableStore;this._onDidDispose=new Emitter;this.onDidDispose=this._onDidDispose.event;const role=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(_a6=this._options.accessibilityProvider)===null||_a6===void 0?void 0:_a6.getWidgetRole():"list";this.selection=new SelectionTrait(role!=="listbox");const baseRenderers=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=_options.accessibilityProvider;if(this.accessibilityProvider){baseRenderers.push(new AccessibiltyRenderer(this.accessibilityProvider));(_c2=(_b3=this.accessibilityProvider).onDidChangeActiveDescendant)===null||_c2===void 0?void 0:_c2.call(_b3,this.onDidChangeActiveDescendant,this,this.disposables)}renderers=renderers.map((r=>new PipelineRenderer(r.templateId,[...baseRenderers,r])));const viewOptions=Object.assign(Object.assign({},_options),{dnd:_options.dnd&&new ListViewDragAndDrop(this,_options.dnd)});this.view=this.createListView(container,virtualDelegate,renderers,viewOptions);this.view.domNode.setAttribute("role",role);if(_options.styleController){this.styleController=_options.styleController(this.view.domId)}else{const styleElement=createStyleSheet(this.view.domNode);this.styleController=new DefaultStyleController(styleElement,this.view.domId)}this.spliceable=new CombinedSpliceable([new TraitSpliceable(this.focus,this.view,_options.identityProvider),new TraitSpliceable(this.selection,this.view,_options.identityProvider),new TraitSpliceable(this.anchor,this.view,_options.identityProvider),this.view]);this.disposables.add(this.focus);this.disposables.add(this.selection);this.disposables.add(this.anchor);this.disposables.add(this.view);this.disposables.add(this._onDidDispose);this.disposables.add(new DOMFocusController(this,this.view));if(typeof _options.keyboardSupport!=="boolean"||_options.keyboardSupport){this.keyboardController=new KeyboardController(this,this.view,_options);this.disposables.add(this.keyboardController)}if(_options.keyboardNavigationLabelProvider){const delegate=_options.keyboardNavigationDelegate||DefaultKeyboardNavigationDelegate;this.typeNavigationController=new TypeNavigationController(this,this.view,_options.keyboardNavigationLabelProvider,(_d2=_options.keyboardNavigationEventFilter)!==null&&_d2!==void 0?_d2:()=>true,delegate);this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(_options);this.disposables.add(this.mouseController);this.onDidChangeFocus(this._onFocusChange,this,this.disposables);this.onDidChangeSelection(this._onSelectionChange,this,this.disposables);if(this.accessibilityProvider){this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()}if(this._options.multipleSelectionSupport!==false){this.view.domNode.setAttribute("aria-multiselectable","true")}}createListView(container,virtualDelegate,renderers,viewOptions){return new ListView(container,virtualDelegate,renderers,viewOptions)}createMouseController(options2){return new MouseController(this)}updateOptions(optionsUpdate={}){var _a6,_b3;this._options=Object.assign(Object.assign({},this._options),optionsUpdate);(_a6=this.typeNavigationController)===null||_a6===void 0?void 0:_a6.updateOptions(this._options);if(this._options.multipleSelectionController!==void 0){if(this._options.multipleSelectionSupport){this.view.domNode.setAttribute("aria-multiselectable","true")}else{this.view.domNode.removeAttribute("aria-multiselectable")}}this.mouseController.updateOptions(optionsUpdate);(_b3=this.keyboardController)===null||_b3===void 0?void 0:_b3.updateOptions(optionsUpdate);this.view.updateOptions(optionsUpdate)}get options(){return this._options}splice(start,deleteCount,elements=[]){if(start<0||start>this.view.length){throw new ListError(this.user,`Invalid start index: ${start}`)}if(deleteCount<0){throw new ListError(this.user,`Invalid delete count: ${deleteCount}`)}if(deleteCount===0&&elements.length===0){return}this.eventBufferer.bufferEvents((()=>this.spliceable.splice(start,deleteCount,elements)))}rerender(){this.view.rerender()}element(index){return this.view.element(index)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(scrollTop){this.view.setScrollTop(scrollTop)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(value){this._ariaLabel=value;this.view.domNode.setAttribute("aria-label",value)}domFocus(){this.view.domNode.focus({preventScroll:true})}layout(height,width){this.view.layout(height,width)}setSelection(indexes,browserEvent){for(const index of indexes){if(index<0||index>=this.length){throw new ListError(this.user,`Invalid index ${index}`)}}this.selection.set(indexes,browserEvent)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((i=>this.view.element(i)))}setAnchor(index){if(typeof index==="undefined"){this.anchor.set([]);return}if(index<0||index>=this.length){throw new ListError(this.user,`Invalid index ${index}`)}this.anchor.set([index])}getAnchor(){return firstOrDefault(this.anchor.get(),void 0)}getAnchorElement(){const anchor=this.getAnchor();return typeof anchor==="undefined"?void 0:this.element(anchor)}setFocus(indexes,browserEvent){for(const index of indexes){if(index<0||index>=this.length){throw new ListError(this.user,`Invalid index ${index}`)}}this.focus.set(indexes,browserEvent)}focusNext(n=1,loop=false,browserEvent,filter){if(this.length===0){return}const focus=this.focus.get();const index=this.findNextIndex(focus.length>0?focus[0]+n:0,loop,filter);if(index>-1){this.setFocus([index],browserEvent)}}focusPrevious(n=1,loop=false,browserEvent,filter){if(this.length===0){return}const focus=this.focus.get();const index=this.findPreviousIndex(focus.length>0?focus[0]-n:0,loop,filter);if(index>-1){this.setFocus([index],browserEvent)}}focusNextPage(browserEvent,filter){return __awaiter10(this,void 0,void 0,(function*(){let lastPageIndex=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);lastPageIndex=lastPageIndex===0?0:lastPageIndex-1;const currentlyFocusedElementIndex=this.getFocus()[0];if(currentlyFocusedElementIndex!==lastPageIndex&&(currentlyFocusedElementIndex===void 0||lastPageIndex>currentlyFocusedElementIndex)){const lastGoodPageIndex=this.findPreviousIndex(lastPageIndex,false,filter);if(lastGoodPageIndex>-1&¤tlyFocusedElementIndex!==lastGoodPageIndex){this.setFocus([lastGoodPageIndex],browserEvent)}else{this.setFocus([lastPageIndex],browserEvent)}}else{const previousScrollTop=this.view.getScrollTop();let nextpageScrollTop=previousScrollTop+this.view.renderHeight;if(lastPageIndex>currentlyFocusedElementIndex){nextpageScrollTop-=this.view.elementHeight(lastPageIndex)}this.view.setScrollTop(nextpageScrollTop);if(this.view.getScrollTop()!==previousScrollTop){this.setFocus([]);yield timeout(0);yield this.focusNextPage(browserEvent,filter)}}}))}focusPreviousPage(browserEvent,filter){return __awaiter10(this,void 0,void 0,(function*(){let firstPageIndex;const scrollTop=this.view.getScrollTop();if(scrollTop===0){firstPageIndex=this.view.indexAt(scrollTop)}else{firstPageIndex=this.view.indexAfter(scrollTop-1)}const currentlyFocusedElementIndex=this.getFocus()[0];if(currentlyFocusedElementIndex!==firstPageIndex&&(currentlyFocusedElementIndex===void 0||currentlyFocusedElementIndex>=firstPageIndex)){const firstGoodPageIndex=this.findNextIndex(firstPageIndex,false,filter);if(firstGoodPageIndex>-1&¤tlyFocusedElementIndex!==firstGoodPageIndex){this.setFocus([firstGoodPageIndex],browserEvent)}else{this.setFocus([firstPageIndex],browserEvent)}}else{const previousScrollTop=scrollTop;this.view.setScrollTop(scrollTop-this.view.renderHeight);if(this.view.getScrollTop()!==previousScrollTop){this.setFocus([]);yield timeout(0);yield this.focusPreviousPage(browserEvent,filter)}}}))}focusLast(browserEvent,filter){if(this.length===0){return}const index=this.findPreviousIndex(this.length-1,false,filter);if(index>-1){this.setFocus([index],browserEvent)}}focusFirst(browserEvent,filter){this.focusNth(0,browserEvent,filter)}focusNth(n,browserEvent,filter){if(this.length===0){return}const index=this.findNextIndex(n,false,filter);if(index>-1){this.setFocus([index],browserEvent)}}findNextIndex(index,loop=false,filter){for(let i=0;i=this.length&&!loop){return-1}index=index%this.length;if(!filter||filter(this.element(index))){return index}index++}return-1}findPreviousIndex(index,loop=false,filter){for(let i=0;ithis.view.element(i)))}reveal(index,relativeTop){if(index<0||index>=this.length){throw new ListError(this.user,`Invalid index ${index}`)}const scrollTop=this.view.getScrollTop();const elementTop=this.view.elementTop(index);const elementHeight=this.view.elementHeight(index);if(isNumber(relativeTop)){const m=elementHeight-this.view.renderHeight;this.view.setScrollTop(m*clamp(relativeTop,0,1)+elementTop)}else{const viewItemBottom=elementTop+elementHeight;const scrollBottom=scrollTop+this.view.renderHeight;if(elementTop=scrollBottom){}else if(elementTop=scrollBottom&&elementHeight>=this.view.renderHeight){this.view.setScrollTop(elementTop)}else if(viewItemBottom>=scrollBottom){this.view.setScrollTop(viewItemBottom-this.view.renderHeight)}}}getHTMLElement(){return this.view.domNode}getElementID(index){return this.view.getElementDomId(index)}style(styles){this.styleController.style(styles)}toListEvent({indexes:indexes,browserEvent:browserEvent}){return{indexes:indexes,elements:indexes.map((i=>this.view.element(i))),browserEvent:browserEvent}}_onFocusChange(){const focus=this.focus.get();this.view.domNode.classList.toggle("element-focused",focus.length>0);this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var _a6;const focus=this.focus.get();if(focus.length>0){let id;if((_a6=this.accessibilityProvider)===null||_a6===void 0?void 0:_a6.getActiveDescendantId){id=this.accessibilityProvider.getActiveDescendantId(this.view.element(focus[0]))}this.view.domNode.setAttribute("aria-activedescendant",id||this.view.getElementDomId(focus[0]))}else{this.view.domNode.removeAttribute("aria-activedescendant")}}_onSelectionChange(){const selection=this.selection.get();this.view.domNode.classList.toggle("selection-none",selection.length===0);this.view.domNode.classList.toggle("selection-single",selection.length===1);this.view.domNode.classList.toggle("selection-multiple",selection.length>1)}dispose(){this._onDidDispose.fire();this.disposables.dispose();this._onDidDispose.dispose()}};__decorate16([memoize],List.prototype,"onDidChangeFocus",null);__decorate16([memoize],List.prototype,"onDidChangeSelection",null);__decorate16([memoize],List.prototype,"onContextMenu",null);__decorate16([memoize],List.prototype,"onKeyDown",null);__decorate16([memoize],List.prototype,"onDidFocus",null)}});var init_27=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/selectBox/selectBoxCustom.css"(){}});var $2,SELECT_OPTION_ENTRY_TEMPLATE_ID,SelectListRenderer,SelectBoxList;var init_selectBoxCustom=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js"(){init_dom();init_event2();init_keyboardEvent();init_markdownRenderer();init_listWidget();init_arrays();init_event();init_keyCodes();init_lifecycle();init_platform();init_27();init_nls();$2=$;SELECT_OPTION_ENTRY_TEMPLATE_ID="selectOption.entry.template";SelectListRenderer=class{get templateId(){return SELECT_OPTION_ENTRY_TEMPLATE_ID}renderTemplate(container){const data=Object.create(null);data.root=container;data.text=append(container,$2(".option-text"));data.detail=append(container,$2(".option-detail"));data.decoratorRight=append(container,$2(".option-decorator-right"));return data}renderElement(element,index,templateData){const data=templateData;const text2=element.text;const detail=element.detail;const decoratorRight=element.decoratorRight;const isDisabled=element.isDisabled;data.text.textContent=text2;data.detail.textContent=!!detail?detail:"";data.decoratorRight.innerText=!!decoratorRight?decoratorRight:"";if(isDisabled){data.root.classList.add("option-disabled")}else{data.root.classList.remove("option-disabled")}}disposeTemplate(_templateData){}};SelectBoxList=class extends Disposable{constructor(options2,selected,contextViewProvider,styles,selectBoxOptions){super();this.options=[];this._currentSelection=0;this._hasDetails=false;this._skipLayout=false;this._sticky=false;this._isVisible=false;this.styles=styles;this.selectBoxOptions=selectBoxOptions||Object.create(null);if(typeof this.selectBoxOptions.minBottomMargin!=="number"){this.selectBoxOptions.minBottomMargin=SelectBoxList.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN}else if(this.selectBoxOptions.minBottomMargin<0){this.selectBoxOptions.minBottomMargin=0}this.selectElement=document.createElement("select");this.selectElement.className="monaco-select-box monaco-select-box-dropdown-padding";if(typeof this.selectBoxOptions.ariaLabel==="string"){this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel)}if(typeof this.selectBoxOptions.ariaDescription==="string"){this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription)}this._onDidSelect=new Emitter;this._register(this._onDidSelect);this.registerListeners();this.constructSelectDropDown(contextViewProvider);this.selected=selected||0;if(options2){this.setOptions(options2,selected)}this.initStyleSheet()}getHeight(){return 22}getTemplateId(){return SELECT_OPTION_ENTRY_TEMPLATE_ID}constructSelectDropDown(contextViewProvider){this.contextViewProvider=contextViewProvider;this.selectDropDownContainer=$(".monaco-select-box-dropdown-container");this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding");this.selectionDetailsPane=append(this.selectDropDownContainer,$2(".select-box-details-pane"));const widthControlOuterDiv=append(this.selectDropDownContainer,$2(".select-box-dropdown-container-width-control"));const widthControlInnerDiv=append(widthControlOuterDiv,$2(".width-control-div"));this.widthControlElement=document.createElement("span");this.widthControlElement.className="option-text-width-control";append(widthControlInnerDiv,this.widthControlElement);this._dropDownPosition=0;this.styleElement=createStyleSheet(this.selectDropDownContainer);this.selectDropDownContainer.setAttribute("draggable","true");this._register(addDisposableListener(this.selectDropDownContainer,EventType.DRAG_START,(e=>{EventHelper.stop(e,true)})))}registerListeners(){this._register(addStandardDisposableListener(this.selectElement,"change",(e=>{this.selected=e.target.selectedIndex;this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value});if(!!this.options[this.selected]&&!!this.options[this.selected].text){this.selectElement.title=this.options[this.selected].text}})));this._register(addDisposableListener(this.selectElement,EventType.CLICK,(e=>{EventHelper.stop(e);if(this._isVisible){this.hideSelectDropDown(true)}else{this.showSelectDropDown()}})));this._register(addDisposableListener(this.selectElement,EventType.MOUSE_DOWN,(e=>{EventHelper.stop(e)})));let listIsVisibleOnTouchStart;this._register(addDisposableListener(this.selectElement,"touchstart",(e=>{listIsVisibleOnTouchStart=this._isVisible})));this._register(addDisposableListener(this.selectElement,"touchend",(e=>{EventHelper.stop(e);if(listIsVisibleOnTouchStart){this.hideSelectDropDown(true)}else{this.showSelectDropDown()}})));this._register(addDisposableListener(this.selectElement,EventType.KEY_DOWN,(e=>{const event=new StandardKeyboardEvent(e);let showDropDown=false;if(isMacintosh){if(event.keyCode===18||event.keyCode===16||event.keyCode===10||event.keyCode===3){showDropDown=true}}else{if(event.keyCode===18&&event.altKey||event.keyCode===16&&event.altKey||event.keyCode===10||event.keyCode===3){showDropDown=true}}if(showDropDown){this.showSelectDropDown();EventHelper.stop(e,true)}})))}get onDidSelect(){return this._onDidSelect.event}setOptions(options2,selected){if(!equals(this.options,options2)){this.options=options2;this.selectElement.options.length=0;this._hasDetails=false;this._cachedMaxDetailsHeight=void 0;this.options.forEach(((option,index)=>{this.selectElement.add(this.createOption(option.text,index,option.isDisabled));if(typeof option.description==="string"){this._hasDetails=true}}))}if(selected!==void 0){this.select(selected);this._currentSelection=this.selected}}setOptionsList(){var _a6;(_a6=this.selectList)===null||_a6===void 0?void 0:_a6.splice(0,this.selectList.length,this.options)}select(index){if(index>=0&&indexthis.options.length-1){this.select(this.options.length-1)}else if(this.selected<0){this.selected=0}this.selectElement.selectedIndex=this.selected;if(!!this.options[this.selected]&&!!this.options[this.selected].text){this.selectElement.title=this.options[this.selected].text}}focus(){if(this.selectElement){this.selectElement.tabIndex=0;this.selectElement.focus()}}blur(){if(this.selectElement){this.selectElement.tabIndex=-1;this.selectElement.blur()}}setFocusable(focusable){this.selectElement.tabIndex=focusable?0:-1}render(container){this.container=container;container.classList.add("select-container");container.appendChild(this.selectElement);this.styleSelectElement()}initStyleSheet(){const content=[];if(this.styles.listFocusBackground){content.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`)}if(this.styles.listFocusForeground){content.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`)}if(this.styles.decoratorRightForeground){content.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`)}if(this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground){content.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `);content.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `);content.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)}else if(this.styles.selectListBorder){content.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `);content.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)}if(this.styles.listHoverForeground){content.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`)}if(this.styles.listHoverBackground){content.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`)}if(this.styles.listFocusOutline){content.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`)}if(this.styles.listHoverOutline){content.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`)}content.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }`);content.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }`);this.styleElement.textContent=content.join("\n")}styleSelectElement(){var _a6,_b3,_c2;const background=(_a6=this.styles.selectBackground)!==null&&_a6!==void 0?_a6:"";const foreground2=(_b3=this.styles.selectForeground)!==null&&_b3!==void 0?_b3:"";const border=(_c2=this.styles.selectBorder)!==null&&_c2!==void 0?_c2:"";this.selectElement.style.backgroundColor=background;this.selectElement.style.color=foreground2;this.selectElement.style.borderColor=border}styleList(){var _a6,_b3;const background=(_a6=this.styles.selectBackground)!==null&&_a6!==void 0?_a6:"";const listBackground=asCssValueWithDefault(this.styles.selectListBackground,background);this.selectDropDownListContainer.style.backgroundColor=listBackground;this.selectionDetailsPane.style.backgroundColor=listBackground;const optionsBorder=(_b3=this.styles.focusBorder)!==null&&_b3!==void 0?_b3:"";this.selectDropDownContainer.style.outlineColor=optionsBorder;this.selectDropDownContainer.style.outlineOffset="-1px";this.selectList.style(this.styles)}createOption(value,index,disabled){const option=document.createElement("option");option.value=value;option.text=value;option.disabled=!!disabled;return option}showSelectDropDown(){this.selectionDetailsPane.innerText="";if(!this.contextViewProvider||this._isVisible){return}this.createSelectList(this.selectDropDownContainer);this.setOptionsList();this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:container=>this.renderSelectDropDown(container,true),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible");this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0);this._isVisible=true;this.hideSelectDropDown(false);this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:container=>this.renderSelectDropDown(container),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible");this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0);this._currentSelection=this.selected;this._isVisible=true;this.selectElement.setAttribute("aria-expanded","true")}hideSelectDropDown(focusSelect){if(!this.contextViewProvider||!this._isVisible){return}this._isVisible=false;this.selectElement.setAttribute("aria-expanded","false");if(focusSelect){this.selectElement.focus()}this.contextViewProvider.hideContextView()}renderSelectDropDown(container,preLayoutPosition){container.appendChild(this.selectDropDownContainer);this.layoutSelectDropDown(preLayoutPosition);return{dispose:()=>{try{container.removeChild(this.selectDropDownContainer)}catch(error){}}}}measureMaxDetailsHeight(){let maxDetailsPaneHeight=0;this.options.forEach(((_option,index)=>{this.updateDetail(index);if(this.selectionDetailsPane.offsetHeight>maxDetailsPaneHeight){maxDetailsPaneHeight=this.selectionDetailsPane.offsetHeight}}));return maxDetailsPaneHeight}layoutSelectDropDown(preLayoutPosition){if(this._skipLayout){return false}if(this.selectList){this.selectDropDownContainer.classList.add("visible");const selectPosition=getDomNodePagePosition(this.selectElement);const styles=getComputedStyle(this.selectElement);const verticalPadding=parseFloat(styles.getPropertyValue("--dropdown-padding-top"))+parseFloat(styles.getPropertyValue("--dropdown-padding-bottom"));const maxSelectDropDownHeightBelow=window.innerHeight-selectPosition.top-selectPosition.height-(this.selectBoxOptions.minBottomMargin||0);const maxSelectDropDownHeightAbove=selectPosition.top-SelectBoxList.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN;const selectWidth=this.selectElement.offsetWidth;const selectMinWidth=this.setWidthControlElement(this.widthControlElement);const selectOptimalWidth=Math.max(selectMinWidth,Math.round(selectWidth)).toString()+"px";this.selectDropDownContainer.style.width=selectOptimalWidth;this.selectList.getHTMLElement().style.height="";this.selectList.layout();let listHeight=this.selectList.contentHeight;if(this._hasDetails&&this._cachedMaxDetailsHeight===void 0){this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight()}const maxDetailsPaneHeight=this._hasDetails?this._cachedMaxDetailsHeight:0;const minRequiredDropDownHeight=listHeight+verticalPadding+maxDetailsPaneHeight;const maxVisibleOptionsBelow=Math.floor((maxSelectDropDownHeightBelow-verticalPadding-maxDetailsPaneHeight)/this.getHeight());const maxVisibleOptionsAbove=Math.floor((maxSelectDropDownHeightAbove-verticalPadding-maxDetailsPaneHeight)/this.getHeight());if(preLayoutPosition){if(selectPosition.top+selectPosition.height>window.innerHeight-22||selectPosition.topmaxVisibleOptionsBelow&&this.options.length>maxVisibleOptionsBelow){this._dropDownPosition=1;this.selectDropDownContainer.removeChild(this.selectDropDownListContainer);this.selectDropDownContainer.removeChild(this.selectionDetailsPane);this.selectDropDownContainer.appendChild(this.selectionDetailsPane);this.selectDropDownContainer.appendChild(this.selectDropDownListContainer);this.selectionDetailsPane.classList.remove("border-top");this.selectionDetailsPane.classList.add("border-bottom")}else{this._dropDownPosition=0;this.selectDropDownContainer.removeChild(this.selectDropDownListContainer);this.selectDropDownContainer.removeChild(this.selectionDetailsPane);this.selectDropDownContainer.appendChild(this.selectDropDownListContainer);this.selectDropDownContainer.appendChild(this.selectionDetailsPane);this.selectionDetailsPane.classList.remove("border-bottom");this.selectionDetailsPane.classList.add("border-top")}return true}if(selectPosition.top+selectPosition.height>window.innerHeight-22||selectPosition.topmaxSelectDropDownHeightBelow){listHeight=maxVisibleOptionsBelow*this.getHeight()}}else{if(minRequiredDropDownHeight>maxSelectDropDownHeightAbove){listHeight=maxVisibleOptionsAbove*this.getHeight()}}this.selectList.layout(listHeight);this.selectList.domFocus();if(this.selectList.length>0){this.selectList.setFocus([this.selected||0]);this.selectList.reveal(this.selectList.getFocus()[0]||0)}if(this._hasDetails){this.selectList.getHTMLElement().style.height=listHeight+verticalPadding+"px";this.selectDropDownContainer.style.height=""}else{this.selectDropDownContainer.style.height=listHeight+verticalPadding+"px"}this.updateDetail(this.selected);this.selectDropDownContainer.style.width=selectOptimalWidth;this.selectDropDownListContainer.setAttribute("tabindex","0");this.selectElement.classList.add("synthetic-focus");this.selectDropDownContainer.classList.add("synthetic-focus");return true}else{return false}}setWidthControlElement(container){let elementWidth=0;if(container){let longest=0;let longestLength=0;this.options.forEach(((option,index)=>{const detailLength=!!option.detail?option.detail.length:0;const rightDecoratorLength=!!option.decoratorRight?option.decoratorRight.length:0;const len=option.text.length+detailLength+rightDecoratorLength;if(len>longestLength){longest=index;longestLength=len}}));container.textContent=this.options[longest].text+(!!this.options[longest].decoratorRight?this.options[longest].decoratorRight+" ":"");elementWidth=getTotalWidth(container)}return elementWidth}createSelectList(parent){if(this.selectList){return}this.selectDropDownListContainer=append(parent,$2(".select-box-dropdown-list-container"));this.listRenderer=new SelectListRenderer;this.selectList=new List("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:false,verticalScrollMode:3,keyboardSupport:false,mouseSupport:false,accessibilityProvider:{getAriaLabel:element=>{let label=element.text;if(element.detail){label+=`. ${element.detail}`}if(element.decoratorRight){label+=`. ${element.decoratorRight}`}if(element.description){label+=`. ${element.description}`}return label},getWidgetAriaLabel:()=>localize({key:"selectBox",comment:["Behave like native select dropdown element."]},"Select Box"),getRole:()=>isMacintosh?"":"option",getWidgetRole:()=>"listbox"}});if(this.selectBoxOptions.ariaLabel){this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel}const onKeyDown=this._register(new DomEmitter(this.selectDropDownListContainer,"keydown"));const onSelectDropDownKeyDown=Event.chain(onKeyDown.event).filter((()=>this.selectList.length>0)).map((e=>new StandardKeyboardEvent(e)));this._register(onSelectDropDownKeyDown.filter((e=>e.keyCode===3)).on((e=>this.onEnter(e)),this));this._register(onSelectDropDownKeyDown.filter((e=>e.keyCode===2)).on((e=>this.onEnter(e)),this));this._register(onSelectDropDownKeyDown.filter((e=>e.keyCode===9)).on((e=>this.onEscape(e)),this));this._register(onSelectDropDownKeyDown.filter((e=>e.keyCode===16)).on((e=>this.onUpArrow(e)),this));this._register(onSelectDropDownKeyDown.filter((e=>e.keyCode===18)).on((e=>this.onDownArrow(e)),this));this._register(onSelectDropDownKeyDown.filter((e=>e.keyCode===12)).on(this.onPageDown,this));this._register(onSelectDropDownKeyDown.filter((e=>e.keyCode===11)).on(this.onPageUp,this));this._register(onSelectDropDownKeyDown.filter((e=>e.keyCode===14)).on(this.onHome,this));this._register(onSelectDropDownKeyDown.filter((e=>e.keyCode===13)).on(this.onEnd,this));this._register(onSelectDropDownKeyDown.filter((e=>e.keyCode>=21&&e.keyCode<=56||e.keyCode>=85&&e.keyCode<=113)).on(this.onCharacter,this));this._register(addDisposableListener(this.selectList.getHTMLElement(),EventType.POINTER_UP,(e=>this.onPointerUp(e))));this._register(this.selectList.onMouseOver((e=>typeof e.index!=="undefined"&&this.selectList.setFocus([e.index]))));this._register(this.selectList.onDidChangeFocus((e=>this.onListFocus(e))));this._register(addDisposableListener(this.selectDropDownContainer,EventType.FOCUS_OUT,(e=>{if(!this._isVisible||isAncestor(e.relatedTarget,this.selectDropDownContainer)){return}this.onListBlur()})));this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||"");this.selectList.getHTMLElement().setAttribute("aria-expanded","true");this.styleList()}onPointerUp(e){if(!this.selectList.length){return}EventHelper.stop(e);const target=e.target;if(!target){return}if(target.classList.contains("slider")){return}const listRowElement=target.closest(".monaco-list-row");if(!listRowElement){return}const index=Number(listRowElement.getAttribute("data-index"));const disabled=listRowElement.classList.contains("option-disabled");if(index>=0&&index{for(let i=0;ithis.selected+2){this.selected+=2}else if(nextOptionDisabled){return}else{this.selected++}this.select(this.selected);this.selectList.setFocus([this.selected]);this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(e){if(this.selected>0){EventHelper.stop(e,true);const previousOptionDisabled=this.options[this.selected-1].isDisabled;if(previousOptionDisabled&&this.selected>1){this.selected-=2}else{this.selected--}this.select(this.selected);this.selectList.setFocus([this.selected]);this.selectList.reveal(this.selectList.getFocus()[0])}}onPageUp(e){EventHelper.stop(e);this.selectList.focusPreviousPage();setTimeout((()=>{this.selected=this.selectList.getFocus()[0];if(this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0];if(this.options[this.selected].isDisabled&&this.selected>0){this.selected--;this.selectList.setFocus([this.selected])}this.selectList.reveal(this.selected);this.select(this.selected)}),1)}onHome(e){EventHelper.stop(e);if(this.options.length<2){return}this.selected=0;if(this.options[this.selected].isDisabled&&this.selected>1){this.selected++}this.selectList.setFocus([this.selected]);this.selectList.reveal(this.selected);this.select(this.selected)}onEnd(e){EventHelper.stop(e);if(this.options.length<2){return}this.selected=this.options.length-1;if(this.options[this.selected].isDisabled&&this.selected>1){this.selected--}this.selectList.setFocus([this.selected]);this.selectList.reveal(this.selected);this.select(this.selected)}onCharacter(e){const ch=KeyCodeUtils.toString(e.keyCode);let optionIndex=-1;for(let i=0;i{this._register(addDisposableListener(this.selectElement,eventType,(e=>{this.selectElement.focus()})))}));this._register(addStandardDisposableListener(this.selectElement,"click",(e=>{EventHelper.stop(e,true)})));this._register(addStandardDisposableListener(this.selectElement,"change",(e=>{this.selectElement.title=e.target.value;this._onDidSelect.fire({index:e.target.selectedIndex,selected:e.target.value})})));this._register(addStandardDisposableListener(this.selectElement,"keydown",(e=>{let showSelect=false;if(isMacintosh){if(e.keyCode===18||e.keyCode===16||e.keyCode===10){showSelect=true}}else{if(e.keyCode===18&&e.altKey||e.keyCode===10||e.keyCode===3){showSelect=true}}if(showSelect){e.stopPropagation()}})))}get onDidSelect(){return this._onDidSelect.event}setOptions(options2,selected){if(!this.options||!equals(this.options,options2)){this.options=options2;this.selectElement.options.length=0;this.options.forEach(((option,index)=>{this.selectElement.add(this.createOption(option.text,index,option.isDisabled))}))}if(selected!==void 0){this.select(selected)}}select(index){if(this.options.length===0){this.selected=0}else if(index>=0&&indexthis.options.length-1){this.select(this.options.length-1)}else if(this.selected<0){this.selected=0}this.selectElement.selectedIndex=this.selected;if(this.selected{if(!this.element){return}this.handleActionChangeEvent(event)})))}}handleActionChangeEvent(event){if(event.enabled!==void 0){this.updateEnabled()}if(event.checked!==void 0){this.updateChecked()}if(event.class!==void 0){this.updateClass()}if(event.label!==void 0){this.updateLabel();this.updateTooltip()}if(event.tooltip!==void 0){this.updateTooltip()}}get actionRunner(){if(!this._actionRunner){this._actionRunner=this._register(new ActionRunner)}return this._actionRunner}set actionRunner(actionRunner){this._actionRunner=actionRunner}isEnabled(){return this._action.enabled}setActionContext(newContext){this._context=newContext}render(container){const element=this.element=container;this._register(Gesture.addTarget(container));const enableDragging=this.options&&this.options.draggable;if(enableDragging){container.draggable=true;if(isFirefox2){this._register(addDisposableListener(container,EventType.DRAG_START,(e=>{var _a6;return(_a6=e.dataTransfer)===null||_a6===void 0?void 0:_a6.setData(DataTransfers.TEXT,this._action.label)})))}}this._register(addDisposableListener(element,EventType2.Tap,(e=>this.onClick(e,true))));this._register(addDisposableListener(element,EventType.MOUSE_DOWN,(e=>{if(!enableDragging){EventHelper.stop(e,true)}if(this._action.enabled&&e.button===0){element.classList.add("active")}})));if(isMacintosh){this._register(addDisposableListener(element,EventType.CONTEXT_MENU,(e=>{if(e.button===0&&e.ctrlKey===true){this.onClick(e)}})))}this._register(addDisposableListener(element,EventType.CLICK,(e=>{EventHelper.stop(e,true);if(!(this.options&&this.options.isMenu)){this.onClick(e)}})));this._register(addDisposableListener(element,EventType.DBLCLICK,(e=>{EventHelper.stop(e,true)})));[EventType.MOUSE_UP,EventType.MOUSE_OUT].forEach((event=>{this._register(addDisposableListener(element,event,(e=>{EventHelper.stop(e);element.classList.remove("active")})))}))}onClick(event,preserveFocus=false){var _a6;EventHelper.stop(event,true);const context=isUndefinedOrNull(this._context)?((_a6=this.options)===null||_a6===void 0?void 0:_a6.useEventAsContext)?event:{preserveFocus:preserveFocus}:this._context;this.actionRunner.run(this._action,context)}focus(){if(this.element){this.element.tabIndex=0;this.element.focus();this.element.classList.add("focused")}}blur(){if(this.element){this.element.blur();this.element.tabIndex=-1;this.element.classList.remove("focused")}}setFocusable(focusable){if(this.element){this.element.tabIndex=focusable?0:-1}}get trapsArrowNavigation(){return false}updateEnabled(){}updateLabel(){}getTooltip(){return this.action.tooltip}updateTooltip(){var _a6;if(!this.element){return}const title=(_a6=this.getTooltip())!==null&&_a6!==void 0?_a6:"";this.updateAriaLabel();if(!this.options.hoverDelegate){this.element.title=title}else{this.element.title="";if(!this.customHover){this.customHover=setupCustomHover(this.options.hoverDelegate,this.element,title);this._store.add(this.customHover)}else{this.customHover.update(title)}}}updateAriaLabel(){var _a6;if(this.element){const title=(_a6=this.getTooltip())!==null&&_a6!==void 0?_a6:"";this.element.setAttribute("aria-label",title)}}updateClass(){}updateChecked(){}dispose(){if(this.element){this.element.remove();this.element=void 0}this._context=void 0;super.dispose()}};ActionViewItem=class extends BaseActionViewItem{constructor(context,action,options2){super(context,action,options2);this.options=options2;this.options.icon=options2.icon!==void 0?options2.icon:false;this.options.label=options2.label!==void 0?options2.label:true;this.cssClass=""}render(container){super.render(container);if(this.element){this.label=append(this.element,$("a.action-label"))}if(this.label){this.label.setAttribute("role",this.getDefaultAriaRole())}if(this.options.label&&this.options.keybinding&&this.element){append(this.element,$("span.keybinding")).textContent=this.options.keybinding}this.updateClass();this.updateLabel();this.updateTooltip();this.updateEnabled();this.updateChecked()}getDefaultAriaRole(){if(this._action.id===Separator.ID){return"presentation"}else{if(this.options.isMenu){return"menuitem"}else{return"button"}}}focus(){if(this.label){this.label.tabIndex=0;this.label.focus()}}blur(){if(this.label){this.label.tabIndex=-1}}setFocusable(focusable){if(this.label){this.label.tabIndex=focusable?0:-1}}updateLabel(){if(this.options.label&&this.label){this.label.textContent=this.action.label}}getTooltip(){let title=null;if(this.action.tooltip){title=this.action.tooltip}else if(!this.options.label&&this.action.label&&this.options.icon){title=this.action.label;if(this.options.keybinding){title=localize({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",title,this.options.keybinding)}}return title!==null&&title!==void 0?title:void 0}updateClass(){var _a6;if(this.cssClass&&this.label){this.label.classList.remove(...this.cssClass.split(" "))}if(this.options.icon){this.cssClass=this.action.class;if(this.label){this.label.classList.add("codicon");if(this.cssClass){this.label.classList.add(...this.cssClass.split(" "))}}this.updateEnabled()}else{(_a6=this.label)===null||_a6===void 0?void 0:_a6.classList.remove("codicon")}}updateEnabled(){var _a6,_b3;if(this.action.enabled){if(this.label){this.label.removeAttribute("aria-disabled");this.label.classList.remove("disabled")}(_a6=this.element)===null||_a6===void 0?void 0:_a6.classList.remove("disabled")}else{if(this.label){this.label.setAttribute("aria-disabled","true");this.label.classList.add("disabled")}(_b3=this.element)===null||_b3===void 0?void 0:_b3.classList.add("disabled")}}updateAriaLabel(){var _a6;if(this.label){const title=(_a6=this.getTooltip())!==null&&_a6!==void 0?_a6:"";this.label.setAttribute("aria-label",title)}}updateChecked(){if(this.label){if(this.action.checked!==void 0){this.label.classList.toggle("checked",this.action.checked);this.label.setAttribute("aria-checked",this.action.checked?"true":"false");this.label.setAttribute("role","checkbox")}else{this.label.classList.remove("checked");this.label.setAttribute("aria-checked","");this.label.setAttribute("role",this.getDefaultAriaRole())}}}};SelectActionViewItem=class extends BaseActionViewItem{constructor(ctx,action,options2,selected,contextViewProvider,styles,selectBoxOptions){super(ctx,action);this.selectBox=new SelectBox(options2,selected,contextViewProvider,styles,selectBoxOptions);this.selectBox.setFocusable(false);this._register(this.selectBox);this.registerListeners()}select(index){this.selectBox.select(index)}registerListeners(){this._register(this.selectBox.onDidSelect((e=>this.runAction(e.selected,e.index))))}runAction(option,index){this.actionRunner.run(this._action,this.getActionContext(option,index))}getActionContext(option,index){return option}setFocusable(focusable){this.selectBox.setFocusable(focusable)}focus(){var _a6;(_a6=this.selectBox)===null||_a6===void 0?void 0:_a6.focus()}blur(){var _a6;(_a6=this.selectBox)===null||_a6===void 0?void 0:_a6.blur()}render(container){this.selectBox.render(container)}}}});var __awaiter11,ActionBar;var init_actionbar=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.js"(){init_dom();init_keyboardEvent();init_actionViewItems();init_actions();init_event();init_lifecycle();init_types();init_29();__awaiter11=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};ActionBar=class extends Disposable{constructor(container,options2={}){var _a6,_b3,_c2,_d2,_e2,_f2;super();this._actionRunnerDisposables=this._register(new DisposableStore);this.viewItemDisposables=this._register(new DisposableMap);this.triggerKeyDown=false;this.focusable=true;this._onDidBlur=this._register(new Emitter);this.onDidBlur=this._onDidBlur.event;this._onDidCancel=this._register(new Emitter({onWillAddFirstListener:()=>this.cancelHasListener=true}));this.onDidCancel=this._onDidCancel.event;this.cancelHasListener=false;this._onDidRun=this._register(new Emitter);this.onDidRun=this._onDidRun.event;this._onWillRun=this._register(new Emitter);this.onWillRun=this._onWillRun.event;this.options=options2;this._context=(_a6=options2.context)!==null&&_a6!==void 0?_a6:null;this._orientation=(_b3=this.options.orientation)!==null&&_b3!==void 0?_b3:0;this._triggerKeys={keyDown:(_d2=(_c2=this.options.triggerKeys)===null||_c2===void 0?void 0:_c2.keyDown)!==null&&_d2!==void 0?_d2:false,keys:(_f2=(_e2=this.options.triggerKeys)===null||_e2===void 0?void 0:_e2.keys)!==null&&_f2!==void 0?_f2:[3,10]};if(this.options.actionRunner){this._actionRunner=this.options.actionRunner}else{this._actionRunner=new ActionRunner;this._actionRunnerDisposables.add(this._actionRunner)}this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e))));this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e))));this.viewItems=[];this.focusedItem=void 0;this.domNode=document.createElement("div");this.domNode.className="monaco-action-bar";if(options2.animated!==false){this.domNode.classList.add("animated")}let previousKeys;let nextKeys;switch(this._orientation){case 0:previousKeys=[15];nextKeys=[17];break;case 1:previousKeys=[16];nextKeys=[18];this.domNode.className+=" vertical";break}this._register(addDisposableListener(this.domNode,EventType.KEY_DOWN,(e=>{const event=new StandardKeyboardEvent(e);let eventHandled=true;const focusedItem=typeof this.focusedItem==="number"?this.viewItems[this.focusedItem]:void 0;if(previousKeys&&(event.equals(previousKeys[0])||event.equals(previousKeys[1]))){eventHandled=this.focusPrevious()}else if(nextKeys&&(event.equals(nextKeys[0])||event.equals(nextKeys[1]))){eventHandled=this.focusNext()}else if(event.equals(9)&&this.cancelHasListener){this._onDidCancel.fire()}else if(event.equals(14)){eventHandled=this.focusFirst()}else if(event.equals(13)){eventHandled=this.focusLast()}else if(event.equals(2)&&focusedItem instanceof BaseActionViewItem&&focusedItem.trapsArrowNavigation){eventHandled=this.focusNext()}else if(this.isTriggerKeyEvent(event)){if(this._triggerKeys.keyDown){this.doTrigger(event)}else{this.triggerKeyDown=true}}else{eventHandled=false}if(eventHandled){event.preventDefault();event.stopPropagation()}})));this._register(addDisposableListener(this.domNode,EventType.KEY_UP,(e=>{const event=new StandardKeyboardEvent(e);if(this.isTriggerKeyEvent(event)){if(!this._triggerKeys.keyDown&&this.triggerKeyDown){this.triggerKeyDown=false;this.doTrigger(event)}event.preventDefault();event.stopPropagation()}else if(event.equals(2)||event.equals(1024|2)){this.updateFocusedItem()}})));this.focusTracker=this._register(trackFocus(this.domNode));this._register(this.focusTracker.onDidBlur((()=>{if(getActiveElement()===this.domNode||!isAncestor(getActiveElement(),this.domNode)){this._onDidBlur.fire();this.previouslyFocusedItem=this.focusedItem;this.focusedItem=void 0;this.triggerKeyDown=false}})));this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem())));this.actionsList=document.createElement("ul");this.actionsList.className="actions-container";if(this.options.highlightToggledItems){this.actionsList.classList.add("highlight-toggled")}this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar");if(this.options.ariaLabel){this.actionsList.setAttribute("aria-label",this.options.ariaLabel)}this.domNode.appendChild(this.actionsList);container.appendChild(this.domNode)}refreshRole(){if(this.length()>=2){this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar")}else{this.actionsList.setAttribute("role","presentation")}}setFocusable(focusable){this.focusable=focusable;if(this.focusable){const firstEnabled=this.viewItems.find((vi=>vi instanceof BaseActionViewItem&&vi.isEnabled()));if(firstEnabled instanceof BaseActionViewItem){firstEnabled.setFocusable(true)}}else{this.viewItems.forEach((vi=>{if(vi instanceof BaseActionViewItem){vi.setFocusable(false)}}))}}isTriggerKeyEvent(event){let ret=false;this._triggerKeys.keys.forEach((keyCode=>{ret=ret||event.equals(keyCode)}));return ret}updateFocusedItem(){for(let i=0;ii.setActionContext(context)))}get actionRunner(){return this._actionRunner}set actionRunner(actionRunner){this._actionRunner=actionRunner;this._actionRunnerDisposables.clear();this._actionRunnerDisposables.add(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e))));this._actionRunnerDisposables.add(this._actionRunner.onWillRun((e=>this._onWillRun.fire(e))));this.viewItems.forEach((item=>item.actionRunner=actionRunner))}getContainer(){return this.domNode}getAction(indexOrElement){var _a6;if(typeof indexOrElement==="number"){return(_a6=this.viewItems[indexOrElement])===null||_a6===void 0?void 0:_a6.action}if(indexOrElement instanceof HTMLElement){while(indexOrElement.parentElement!==this.actionsList){if(!indexOrElement.parentElement){return void 0}indexOrElement=indexOrElement.parentElement}for(let i=0;i{const actionViewItemElement=document.createElement("li");actionViewItemElement.className="action-item";actionViewItemElement.setAttribute("role","presentation");let item;const viewItemOptions=Object.assign({hoverDelegate:this.options.hoverDelegate},options2);if(this.options.actionViewItemProvider){item=this.options.actionViewItemProvider(action,viewItemOptions)}if(!item){item=new ActionViewItem(this.context,action,viewItemOptions)}if(!this.options.allowContextMenu){this.viewItemDisposables.set(item,addDisposableListener(actionViewItemElement,EventType.CONTEXT_MENU,(e=>{EventHelper.stop(e,true)})))}item.actionRunner=this._actionRunner;item.setActionContext(this.context);item.render(actionViewItemElement);if(this.focusable&&item instanceof BaseActionViewItem&&this.viewItems.length===0){item.setFocusable(true)}if(index===null||index<0||index>=this.actionsList.children.length){this.actionsList.appendChild(actionViewItemElement);this.viewItems.push(item)}else{this.actionsList.insertBefore(actionViewItemElement,this.actionsList.children[index]);this.viewItems.splice(index,0,item);index++}}));if(typeof this.focusedItem==="number"){this.focus(this.focusedItem)}this.refreshRole()}clear(){if(this.isEmpty()){return}this.viewItems=dispose(this.viewItems);this.viewItemDisposables.clearAndDisposeAll();clearNode(this.actionsList);this.refreshRole()}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(arg){let selectFirst=false;let index=void 0;if(arg===void 0){selectFirst=true}else if(typeof arg==="number"){index=arg}else if(typeof arg==="boolean"){selectFirst=arg}if(selectFirst&&typeof this.focusedItem==="undefined"){const firstEnabled=this.viewItems.findIndex((item=>item.isEnabled()));this.focusedItem=firstEnabled===-1?void 0:firstEnabled;this.updateFocus(void 0,void 0,true)}else{if(index!==void 0){this.focusedItem=index}this.updateFocus(void 0,void 0,true)}}focusFirst(){this.focusedItem=this.length()-1;return this.focusNext(true)}focusLast(){this.focusedItem=0;return this.focusPrevious(true)}focusNext(forceLoop){if(typeof this.focusedItem==="undefined"){this.focusedItem=this.viewItems.length-1}else if(this.viewItems.length<=1){return false}const startIndex=this.focusedItem;let item;do{if(!forceLoop&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length){this.focusedItem=startIndex;return false}this.focusedItem=(this.focusedItem+1)%this.viewItems.length;item=this.viewItems[this.focusedItem]}while(this.focusedItem!==startIndex&&(this.options.focusOnlyEnabledItems&&!item.isEnabled()||item.action.id===Separator.ID));this.updateFocus();return true}focusPrevious(forceLoop){if(typeof this.focusedItem==="undefined"){this.focusedItem=0}else if(this.viewItems.length<=1){return false}const startIndex=this.focusedItem;let item;do{this.focusedItem=this.focusedItem-1;if(this.focusedItem<0){if(!forceLoop&&this.options.preventLoopNavigation){this.focusedItem=startIndex;return false}this.focusedItem=this.viewItems.length-1}item=this.viewItems[this.focusedItem]}while(this.focusedItem!==startIndex&&(this.options.focusOnlyEnabledItems&&!item.isEnabled()||item.action.id===Separator.ID));this.updateFocus(true);return true}updateFocus(fromRight,preventScroll,forceFocus=false){var _a6;if(typeof this.focusedItem==="undefined"){this.actionsList.focus({preventScroll:preventScroll})}if(this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem){(_a6=this.viewItems[this.previouslyFocusedItem])===null||_a6===void 0?void 0:_a6.blur()}const actionViewItem=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(actionViewItem){let focusItem=true;if(!isFunction(actionViewItem.focus)){focusItem=false}if(this.options.focusOnlyEnabledItems&&isFunction(actionViewItem.isEnabled)&&!actionViewItem.isEnabled()){focusItem=false}if(actionViewItem.action.id===Separator.ID){focusItem=false}if(!focusItem){this.actionsList.focus({preventScroll:preventScroll});this.previouslyFocusedItem=void 0}else if(forceFocus||this.previouslyFocusedItem!==this.focusedItem){actionViewItem.focus(fromRight);this.previouslyFocusedItem=this.focusedItem}}}doTrigger(event){if(typeof this.focusedItem==="undefined"){return}const actionViewItem=this.viewItems[this.focusedItem];if(actionViewItem instanceof BaseActionViewItem){const context=actionViewItem._context===null||actionViewItem._context===void 0?event:actionViewItem._context;this.run(actionViewItem._action,context)}}run(action,context){return __awaiter11(this,void 0,void 0,(function*(){yield this._actionRunner.run(action,context)}))}dispose(){this._context=void 0;this.viewItems=dispose(this.viewItems);this.getContainer().remove();super.dispose()}}}});var init_30=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css"(){}});function registerIcon(id,defaults,description,deprecationMessage){return iconRegistry.registerIcon(id,defaults,description,deprecationMessage)}function getIconRegistry(){return iconRegistry}function initialize(){const codiconFontCharacters=getCodiconFontCharacters();for(const icon in codiconFontCharacters){const fontCharacter="\\"+codiconFontCharacters[icon].toString(16);iconRegistry.registerIcon(icon,{fontCharacter:fontCharacter})}}var Extensions8,IconContribution,IconFontDefinition,IconRegistry,iconRegistry,iconsSchemaId,schemaRegistry2,delayer2,widgetClose,gotoPreviousLocation,gotoNextLocation,syncing,spinningLoading;var init_iconRegistry=__esm({"node_modules/monaco-editor/esm/vs/platform/theme/common/iconRegistry.js"(){init_async();init_codicons();init_themables();init_event();init_types();init_uri();init_nls();init_jsonContributionRegistry();init_platform2();Extensions8={IconContribution:"base.contributions.icons"};(function(IconContribution2){function getDefinition(contribution,registry){let definition=contribution.defaults;while(ThemeIcon.isThemeIcon(definition)){const c=iconRegistry.getIcon(definition.id);if(!c){return void 0}definition=c.defaults}return definition}IconContribution2.getDefinition=getDefinition})(IconContribution||(IconContribution={}));(function(IconFontDefinition2){function toJSONObject(iconFont){return{weight:iconFont.weight,style:iconFont.style,src:iconFont.src.map((s=>({format:s.format,location:s.location.toString()})))}}IconFontDefinition2.toJSONObject=toJSONObject;function fromJSONObject(json){const stringOrUndef=s=>isString(s)?s:void 0;if(json&&Array.isArray(json.src)&&json.src.every((s=>isString(s.format)&&isString(s.location)))){return{weight:stringOrUndef(json.weight),style:stringOrUndef(json.style),src:json.src.map((s=>({format:s.format,location:URI.parse(s.location)})))}}return void 0}IconFontDefinition2.fromJSONObject=fromJSONObject})(IconFontDefinition||(IconFontDefinition={}));IconRegistry=class{constructor(){this._onDidChange=new Emitter;this.onDidChange=this._onDidChange.event;this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:localize("iconDefinition.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:localize("iconDefinition.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:false,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}};this.iconReferenceSchema={type:"string",pattern:`^${ThemeIcon.iconNameExpression}$`,enum:[],enumDescriptions:[]};this.iconsById={};this.iconFontsById={}}registerIcon(id,defaults,description,deprecationMessage){const existing=this.iconsById[id];if(existing){if(description&&!existing.description){existing.description=description;this.iconSchema.properties[id].markdownDescription=`${description} $(${id})`;const enumIndex=this.iconReferenceSchema.enum.indexOf(id);if(enumIndex!==-1){this.iconReferenceSchema.enumDescriptions[enumIndex]=description}this._onDidChange.fire()}return existing}const iconContribution={id:id,description:description,defaults:defaults,deprecationMessage:deprecationMessage};this.iconsById[id]=iconContribution;const propertySchema={$ref:"#/definitions/icons"};if(deprecationMessage){propertySchema.deprecationMessage=deprecationMessage}if(description){propertySchema.markdownDescription=`${description}: $(${id})`}this.iconSchema.properties[id]=propertySchema;this.iconReferenceSchema.enum.push(id);this.iconReferenceSchema.enumDescriptions.push(description||"");this._onDidChange.fire();return{id:id}}getIcons(){return Object.keys(this.iconsById).map((id=>this.iconsById[id]))}getIcon(id){return this.iconsById[id]}getIconSchema(){return this.iconSchema}toString(){const sorter2=(i1,i2)=>i1.id.localeCompare(i2.id);const classNames=i=>{while(ThemeIcon.isThemeIcon(i.defaults)){i=this.iconsById[i.defaults.id]}return`codicon codicon-${i?i.id:""}`};const reference=[];reference.push(`| preview | identifier | default codicon ID | description`);reference.push(`| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |`);const contributions=Object.keys(this.iconsById).map((key=>this.iconsById[key]));for(const i of contributions.filter((i2=>!!i2.description)).sort(sorter2)){reference.push(`||${i.id}|${ThemeIcon.isThemeIcon(i.defaults)?i.defaults.id:i.id}|${i.description||""}|`)}reference.push(`| preview | identifier `);reference.push(`| ----------- | --------------------------------- |`);for(const i of contributions.filter((i2=>!ThemeIcon.isThemeIcon(i2.defaults))).sort(sorter2)){reference.push(`||${i.id}|`)}return reference.join("\n")}};iconRegistry=new IconRegistry;Registry.add(Extensions8.IconContribution,iconRegistry);initialize();iconsSchemaId="vscode://schemas/icons";schemaRegistry2=Registry.as(Extensions.JSONContribution);schemaRegistry2.registerSchema(iconsSchemaId,iconRegistry.getIconSchema());delayer2=new RunOnceScheduler((()=>schemaRegistry2.notifySchemaChanged(iconsSchemaId)),200);iconRegistry.onDidChange((()=>{if(!delayer2.isScheduled()){delayer2.schedule()}}));widgetClose=registerIcon("widget-close",Codicon.close,localize("widgetClose","Icon for the close action in widgets."));gotoPreviousLocation=registerIcon("goto-previous-location",Codicon.arrowUp,localize("previousChangeIcon","Icon for goto previous editor location."));gotoNextLocation=registerIcon("goto-next-location",Codicon.arrowDown,localize("nextChangeIcon","Icon for goto next editor location."));syncing=ThemeIcon.modify(Codicon.sync,"spin");spinningLoading=ThemeIcon.modify(Codicon.loading,"spin")}});var __decorate17,__param13,__awaiter12,DiffReview_1,DIFF_LINES_PADDING,DiffEntry,Diff,diffReviewInsertIcon,diffReviewRemoveIcon,diffReviewCloseIcon,DiffReview;var init_diffReview=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffReview.js"(){init_dom();init_fastDomNode();init_trustedTypes();init_actionbar();init_scrollableElement();init_actions();init_codicons();init_lifecycle();init_themables();init_30();init_domFontInfo();init_editorOptions();init_position();init_language();init_lineTokens();init_viewLineRenderer();init_viewModel();init_nls();init_audioCueService();init_configuration();init_iconRegistry();__decorate17=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param13=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter12=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};DIFF_LINES_PADDING=3;DiffEntry=class{constructor(originalLineStart,originalLineEnd,modifiedLineStart,modifiedLineEnd){this.originalLineStart=originalLineStart;this.originalLineEnd=originalLineEnd;this.modifiedLineStart=modifiedLineStart;this.modifiedLineEnd=modifiedLineEnd}getType(){if(this.originalLineStart===0){return 1}if(this.modifiedLineStart===0){return 2}return 0}};Diff=class{constructor(entries2){this.entries=entries2}};diffReviewInsertIcon=registerIcon("diff-review-insert",Codicon.add,localize("diffReviewInsertIcon","Icon for 'Insert' in diff review."));diffReviewRemoveIcon=registerIcon("diff-review-remove",Codicon.remove,localize("diffReviewRemoveIcon","Icon for 'Remove' in diff review."));diffReviewCloseIcon=registerIcon("diff-review-close",Codicon.close,localize("diffReviewCloseIcon","Icon for 'Close' in diff review."));DiffReview=DiffReview_1=class DiffReview2 extends Disposable{constructor(diffEditor,_languageService,_audioCueService,_configurationService){super();this._languageService=_languageService;this._audioCueService=_audioCueService;this._configurationService=_configurationService;this._width=0;this._diffEditor=diffEditor;this._isVisible=false;this.shadow=createFastDomNode(document.createElement("div"));this.shadow.setClassName("diff-review-shadow");this.actionBarContainer=createFastDomNode(document.createElement("div"));this.actionBarContainer.setClassName("diff-review-actions");this._actionBar=this._register(new ActionBar(this.actionBarContainer.domNode));this._actionBar.push(new Action("diffreview.close",localize("label.close","Close"),"close-diff-review "+ThemeIcon.asClassName(diffReviewCloseIcon),true,(()=>__awaiter12(this,void 0,void 0,(function*(){return this.hide()})))),{label:false,icon:true});this.domNode=createFastDomNode(document.createElement("div"));this.domNode.setClassName("diff-review monaco-editor-background");this._content=createFastDomNode(document.createElement("div"));this._content.setClassName("diff-review-content");this._content.setAttribute("role","code");this.scrollbar=this._register(new DomScrollableElement(this._content.domNode,{}));this.domNode.domNode.appendChild(this.scrollbar.getDomNode());this._register(diffEditor.onDidUpdateDiff((()=>{if(!this._isVisible){return}this._diffs=this._compute();this._render()})));this._register(diffEditor.getModifiedEditor().onDidChangeCursorPosition((()=>{if(!this._isVisible){return}this._render()})));this._register(addStandardDisposableListener(this.domNode.domNode,"click",(e=>{e.preventDefault();const row=findParentWithClass(e.target,"diff-review-row");if(row){this._goToRow(row)}})));this._register(addStandardDisposableListener(this.domNode.domNode,"keydown",(e=>{if(e.equals(18)||e.equals(2048|18)||e.equals(512|18)){e.preventDefault();this._goToRow(this._getNextRow(),"next")}if(e.equals(16)||e.equals(2048|16)||e.equals(512|16)){e.preventDefault();this._goToRow(this._getPrevRow(),"previous")}if(e.equals(9)||e.equals(2048|9)||e.equals(512|9)||e.equals(1024|9)||e.equals(10)||e.equals(3)){e.preventDefault();this.accept()}})));this._register(this._configurationService.onDidChangeConfiguration((e=>{if(e.affectsConfiguration("accessibility.verbosity.diffEditor")){this._diffEditor.updateOptions({accessibilityVerbose:this._configurationService.getValue("accessibility.verbosity.diffEditor")})}})));this._diffs=[];this._currentDiff=null}prev(){let index=0;if(!this._isVisible){this._diffs=this._compute()}if(this._isVisible){let currentIndex=-1;for(let i=0,len=this._diffs.length;i0){const prevLineChange=lineChanges[i-1];if(prevLineChange.originalEndLineNumber===0){minOriginal=prevLineChange.originalStartLineNumber+1}else{minOriginal=prevLineChange.originalEndLineNumber+1}if(prevLineChange.modifiedEndLineNumber===0){minModified=prevLineChange.modifiedStartLineNumber+1}else{minModified=prevLineChange.modifiedEndLineNumber+1}}let fromOriginal=originalEqualAbove-DIFF_LINES_PADDING+1;let fromModified=modifiedEqualAbove-DIFF_LINES_PADDING+1;if(fromOriginalmaxOriginal){const delta=maxOriginal-toOriginal;toOriginal=toOriginal+delta;toModified=toModified+delta}if(toModified>maxModified){const delta=maxModified-toModified;toOriginal=toOriginal+delta;toModified=toModified+delta}r2[rLength2++]=new DiffEntry(originalEqualBelow,toOriginal,modifiedEqualBelow,toModified)}diffs[diffsLength++]=new Diff(r2)}let curr=diffs[0].entries;const r=[];let rLength=0;for(let i=1,len=diffs.length;imaxOriginalLine)){maxOriginalLine=originalLineEnd}if(modifiedLineStart!==0&&(minModifiedLine===0||modifiedLineStartmaxModifiedLine)){maxModifiedLine=modifiedLineEnd}}const header=document.createElement("div");header.className="diff-review-row";const cell=document.createElement("div");cell.className="diff-review-cell diff-review-summary";const originalChangedLinesCnt=maxOriginalLine-minOriginalLine+1;const modifiedChangedLinesCnt=maxModifiedLine-minModifiedLine+1;cell.appendChild(document.createTextNode(`${diffIndex+1}/${this._diffs.length}: @@ -${minOriginalLine},${originalChangedLinesCnt} +${minModifiedLine},${modifiedChangedLinesCnt} @@`));header.setAttribute("data-line",String(minModifiedLine));const getAriaLines=lines=>{if(lines===0){return localize("no_lines_changed","no lines changed")}else if(lines===1){return localize("one_line_changed","1 line changed")}else{return localize("more_lines_changed","{0} lines changed",lines)}};const originalChangedLinesCntAria=getAriaLines(originalChangedLinesCnt);const modifiedChangedLinesCntAria=getAriaLines(modifiedChangedLinesCnt);header.setAttribute("aria-label",localize({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",diffIndex+1,this._diffs.length,minOriginalLine,originalChangedLinesCntAria,minModifiedLine,modifiedChangedLinesCntAria));header.appendChild(cell);header.setAttribute("role","listitem");container.appendChild(header);const lineHeight=modifiedOptions.get(65);let modLine=minModifiedLine;for(let i=0,len=diffs.length;ivalue});DiffReview=DiffReview_1=__decorate17([__param13(1,ILanguageService),__param13(2,IAudioCueService),__param13(3,IConfigurationService)],DiffReview)}});var __awaiter13,InlineDiffMargin;var init_inlineDiffMargin=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/inlineDiffMargin.js"(){init_nls();init_dom();init_actions();init_lifecycle();init_range();init_codicons();init_themables();init_platform();__awaiter13=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};InlineDiffMargin=class extends Disposable{get visibility(){return this._visibility}set visibility(_visibility){if(this._visibility!==_visibility){this._visibility=_visibility;if(_visibility){this._diffActions.style.visibility="visible"}else{this._diffActions.style.visibility="hidden"}}}constructor(_viewZoneId,_marginDomNode,editor2,diff,_contextMenuService,_clipboardService){super();this._viewZoneId=_viewZoneId;this._marginDomNode=_marginDomNode;this.editor=editor2;this.diff=diff;this._contextMenuService=_contextMenuService;this._clipboardService=_clipboardService;this._visibility=false;this._marginDomNode.style.zIndex="10";this._diffActions=document.createElement("div");this._diffActions.className=ThemeIcon.asClassName(Codicon.lightBulb)+" lightbulb-glyph";this._diffActions.style.position="absolute";const lineHeight=editor2.getOption(65);const lineFeed=editor2.getModel().getEOL();this._diffActions.style.right="0px";this._diffActions.style.visibility="hidden";this._diffActions.style.height=`${lineHeight}px`;this._diffActions.style.lineHeight=`${lineHeight}px`;this._marginDomNode.appendChild(this._diffActions);const actions=[];const isDeletion=diff.modifiedEndLineNumber===0;actions.push(new Action("diff.clipboard.copyDeletedContent",isDeletion?diff.originalEndLineNumber>diff.modifiedStartLineNumber?localize("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):localize("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):diff.originalEndLineNumber>diff.modifiedStartLineNumber?localize("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):localize("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,true,(()=>__awaiter13(this,void 0,void 0,(function*(){const range2=new Range(diff.originalStartLineNumber,1,diff.originalEndLineNumber+1,1);const deletedText=diff.originalModel.getValueInRange(range2);yield this._clipboardService.writeText(deletedText)})))));let currentLineNumberOffset=0;let copyLineAction=void 0;if(diff.originalEndLineNumber>diff.modifiedStartLineNumber){copyLineAction=new Action("diff.clipboard.copyDeletedLineContent",isDeletion?localize("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",diff.originalStartLineNumber):localize("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",diff.originalStartLineNumber),void 0,true,(()=>__awaiter13(this,void 0,void 0,(function*(){const lineContent=diff.originalModel.getLineContent(diff.originalStartLineNumber+currentLineNumberOffset);if(lineContent===""){const eof=diff.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(eof===0?"\n":"\r\n")}else{yield this._clipboardService.writeText(lineContent)}}))));actions.push(copyLineAction)}const readOnly=editor2.getOption(89);if(!readOnly){actions.push(new Action("diff.inline.revertChange",localize("diff.inline.revertChange.label","Revert this change"),void 0,true,(()=>__awaiter13(this,void 0,void 0,(function*(){const range2=new Range(diff.originalStartLineNumber,1,diff.originalEndLineNumber,diff.originalModel.getLineMaxColumn(diff.originalEndLineNumber));const deletedText=diff.originalModel.getValueInRange(range2);if(diff.modifiedEndLineNumber===0){const column=editor2.getModel().getLineMaxColumn(diff.modifiedStartLineNumber);editor2.executeEdits("diffEditor",[{range:new Range(diff.modifiedStartLineNumber,column,diff.modifiedStartLineNumber,column),text:lineFeed+deletedText}])}else{const column=editor2.getModel().getLineMaxColumn(diff.modifiedEndLineNumber);editor2.executeEdits("diffEditor",[{range:new Range(diff.modifiedStartLineNumber,1,diff.modifiedEndLineNumber,column),text:deletedText}])}})))))}const useShadowDOM=editor2.getOption(125)&&!isIOS;const showContextMenu=(x,y)=>{var _a6;this._contextMenuService.showContextMenu({domForShadowRoot:useShadowDOM?(_a6=editor2.getDomNode())!==null&&_a6!==void 0?_a6:void 0:void 0,getAnchor:()=>({x:x,y:y}),getActions:()=>{if(copyLineAction){copyLineAction.label=isDeletion?localize("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",diff.originalStartLineNumber+currentLineNumberOffset):localize("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",diff.originalStartLineNumber+currentLineNumberOffset)}return actions},autoSelectFirstItem:true})};this._register(addStandardDisposableListener(this._diffActions,"mousedown",(e=>{const{top:top,height:height}=getDomNodePagePosition(this._diffActions);const pad=Math.floor(lineHeight/3);e.preventDefault();showContextMenu(e.posx,top+height+pad)})));this._register(editor2.onMouseMove((e=>{if(e.target.type===8||e.target.type===5){const viewZoneId=e.target.detail.viewZoneId;if(viewZoneId===this._viewZoneId){this.visibility=true;currentLineNumberOffset=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,lineHeight)}else{this.visibility=false}}else{this.visibility=false}})));this._register(editor2.onMouseDown((e=>{if(!e.event.rightButton){return}if(e.target.type===8||e.target.type===5){const viewZoneId=e.target.detail.viewZoneId;if(viewZoneId===this._viewZoneId){e.event.preventDefault();currentLineNumberOffset=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,lineHeight);showContextMenu(e.event.posx,e.event.posy+lineHeight)}}})))}_updateLightBulbPosition(marginDomNode,y,lineHeight){const{top:top}=getDomNodePagePosition(marginDomNode);const offset=y-top;const lineNumberOffset=Math.floor(offset/lineHeight);const newTop=lineNumberOffset*lineHeight;this._diffActions.style.top=`${newTop}px`;if(this.diff.viewLineCounts){let acc=0;for(let i=0;i=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};__param14=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter14=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};WorkerBasedDocumentDiffProvider=WorkerBasedDocumentDiffProvider_1=class WorkerBasedDocumentDiffProvider2{constructor(options2,editorWorkerService,telemetryService){this.editorWorkerService=editorWorkerService;this.telemetryService=telemetryService;this.onDidChangeEventEmitter=new Emitter;this.onDidChange=this.onDidChangeEventEmitter.event;this.diffAlgorithm="advanced";this.diffAlgorithmOnDidChangeSubscription=void 0;this.setOptions(options2)}dispose(){var _a6;(_a6=this.diffAlgorithmOnDidChangeSubscription)===null||_a6===void 0?void 0:_a6.dispose()}computeDiff(original,modified,options2,cancellationToken){var _a6,_b3;return __awaiter14(this,void 0,void 0,(function*(){if(typeof this.diffAlgorithm!=="string"){return this.diffAlgorithm.computeDiff(original,modified,options2,cancellationToken)}if(original.getLineCount()===1&&original.getLineMaxColumn(1)===1){if(modified.getLineCount()===1&&modified.getLineMaxColumn(1)===1){return{changes:[],identical:true,quitEarly:false,moves:[]}}return{changes:[new LineRangeMapping(new LineRange(1,2),new LineRange(1,modified.getLineCount()+1),[new RangeMapping(original.getFullModelRange(),modified.getFullModelRange())])],identical:false,quitEarly:false,moves:[]}}const uriKey=JSON.stringify([original.uri.toString(),modified.uri.toString()]);const context=JSON.stringify([original.id,modified.id,original.getAlternativeVersionId(),modified.getAlternativeVersionId(),JSON.stringify(options2)]);const c=WorkerBasedDocumentDiffProvider_1.diffCache.get(uriKey);if(c&&c.context===context){return c.result}const sw=StopWatch.create();const result=yield this.editorWorkerService.computeDiff(original.uri,modified.uri,options2,this.diffAlgorithm);const timeMs=sw.elapsed();this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:timeMs,timedOut:(_a6=result===null||result===void 0?void 0:result.quitEarly)!==null&&_a6!==void 0?_a6:true,detectedMoves:options2.computeMoves?(_b3=result===null||result===void 0?void 0:result.moves.length)!==null&&_b3!==void 0?_b3:0:-1});if(cancellationToken.isCancellationRequested){return{changes:[],identical:false,quitEarly:true,moves:[]}}if(!result){throw new Error("no diff result available")}if(WorkerBasedDocumentDiffProvider_1.diffCache.size>10){WorkerBasedDocumentDiffProvider_1.diffCache.delete(WorkerBasedDocumentDiffProvider_1.diffCache.keys().next().value)}WorkerBasedDocumentDiffProvider_1.diffCache.set(uriKey,{result:result,context:context});return result}))}setOptions(newOptions){var _a6;let didChange=false;if(newOptions.diffAlgorithm){if(this.diffAlgorithm!==newOptions.diffAlgorithm){(_a6=this.diffAlgorithmOnDidChangeSubscription)===null||_a6===void 0?void 0:_a6.dispose();this.diffAlgorithmOnDidChangeSubscription=void 0;this.diffAlgorithm=newOptions.diffAlgorithm;if(typeof newOptions.diffAlgorithm!=="string"){this.diffAlgorithmOnDidChangeSubscription=newOptions.diffAlgorithm.onDidChange((()=>this.onDidChangeEventEmitter.fire()))}didChange=true}}if(didChange){this.onDidChangeEventEmitter.fire()}}};WorkerBasedDocumentDiffProvider.diffCache=new Map;WorkerBasedDocumentDiffProvider=WorkerBasedDocumentDiffProvider_1=__decorate18([__param14(1,IEditorWorkerService),__param14(2,ITelemetryService)],WorkerBasedDocumentDiffProvider)}});var IClipboardService;var init_clipboardService=__esm({"node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js"(){init_instantiation();IClipboardService=createDecorator("clipboardService")}});var IContextViewService,IContextMenuService;var init_contextView=__esm({"node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js"(){init_instantiation();IContextViewService=createDecorator("contextViewService");IContextMenuService=createDecorator("contextMenuService")}});var IProgressService,emptyProgressRunner,Progress,IEditorProgressService;var init_progress=__esm({"node_modules/monaco-editor/esm/vs/platform/progress/common/progress.js"(){init_instantiation();IProgressService=createDecorator("progressService");emptyProgressRunner=Object.freeze({total(){},worked(){},done(){}});Progress=class{constructor(callback,opts){this.callback=callback;this.report=(opts===null||opts===void 0?void 0:opts.async)?this._reportAsync.bind(this):this._reportSync.bind(this)}_reportSync(item){this._value=item;this.callback(this._value)}_reportAsync(item){Promise.resolve(this._lastTask).finally((()=>{this._value=item;const r=this.callback(this._value);this._lastTask=Promise.resolve(r).finally((()=>this._lastTask=void 0))}))}};Progress.None=Object.freeze({report(){}});IEditorProgressService=createDecorator("editorProgressService")}});function createDecoration(startLineNumber,startColumn,endLineNumber,endColumn,options2){return{range:new Range(startLineNumber,startColumn,endLineNumber,endColumn),options:options2}}function validateDiffWordWrap(value,defaultValue){return stringSet(value,defaultValue,["off","on","inherit"])}function isChangeOrInsert(lineChange){return lineChange.modifiedEndLineNumber>0}function isChangeOrDelete(lineChange){return lineChange.originalEndLineNumber>0}function isCharChangeOrInsert(charChange){if(charChange.modifiedStartLineNumber===charChange.modifiedEndLineNumber){return charChange.modifiedEndColumn-charChange.modifiedStartColumn>0}return charChange.modifiedEndLineNumber-charChange.modifiedStartLineNumber>0}function isCharChangeOrDelete(charChange){if(charChange.originalStartLineNumber===charChange.originalEndLineNumber){return charChange.originalEndColumn-charChange.originalStartColumn>0}return charChange.originalEndLineNumber-charChange.originalStartLineNumber>0}function createFakeLinesDiv(){const r=document.createElement("div");r.className="diagonal-fill";return r}function createViewZoneMarginArrow(){const arrow=document.createElement("div");arrow.className="arrow-revert-change "+ThemeIcon.asClassName(Codicon.arrowRight);return $("div",{},arrow)}function getViewRange(model,viewModel,startLineNumber,endLineNumber){const lineCount=model.getLineCount();startLineNumber=Math.min(lineCount,Math.max(1,startLineNumber));endLineNumber=Math.min(lineCount,Math.max(1,endLineNumber));return viewModel.coordinatesConverter.convertModelRangeToViewRange(new Range(startLineNumber,model.getLineMinColumn(startLineNumber),endLineNumber,model.getLineMaxColumn(endLineNumber)))}function validateDiffEditorOptions(options2,defaults){return{enableSplitViewResizing:boolean(options2.enableSplitViewResizing,defaults.enableSplitViewResizing),splitViewDefaultRatio:clampedFloat(options2.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:boolean(options2.renderSideBySide,defaults.renderSideBySide),renderMarginRevertIcon:boolean(options2.renderMarginRevertIcon,defaults.renderMarginRevertIcon),maxComputationTime:clampedInt(options2.maxComputationTime,defaults.maxComputationTime,0,1073741824),maxFileSize:clampedInt(options2.maxFileSize,defaults.maxFileSize,0,1073741824),ignoreTrimWhitespace:boolean(options2.ignoreTrimWhitespace,defaults.ignoreTrimWhitespace),renderIndicators:boolean(options2.renderIndicators,defaults.renderIndicators),originalEditable:boolean(options2.originalEditable,defaults.originalEditable),diffCodeLens:boolean(options2.diffCodeLens,defaults.diffCodeLens),renderOverviewRuler:boolean(options2.renderOverviewRuler,defaults.renderOverviewRuler),diffWordWrap:validateDiffWordWrap(options2.diffWordWrap,defaults.diffWordWrap),diffAlgorithm:stringSet(options2.diffAlgorithm,defaults.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:boolean(options2.accessibilityVerbose,defaults.accessibilityVerbose),hideUnchangedRegions:{enabled:false,contextLineCount:0,minimumLineCount:0,revealLineCount:0},experimental:{showEmptyDecorations:false,showMoves:false},isInEmbeddedEditor:boolean(options2.isInEmbeddedEditor,defaults.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:false,renderSideBySideInlineBreakpoint:0,useInlineViewWhenSpaceIsLimited:false}}function changedDiffEditorOptions(a,b){return{enableSplitViewResizing:a.enableSplitViewResizing!==b.enableSplitViewResizing,renderSideBySide:a.renderSideBySide!==b.renderSideBySide,renderMarginRevertIcon:a.renderMarginRevertIcon!==b.renderMarginRevertIcon,maxComputationTime:a.maxComputationTime!==b.maxComputationTime,maxFileSize:a.maxFileSize!==b.maxFileSize,ignoreTrimWhitespace:a.ignoreTrimWhitespace!==b.ignoreTrimWhitespace,renderIndicators:a.renderIndicators!==b.renderIndicators,originalEditable:a.originalEditable!==b.originalEditable,diffCodeLens:a.diffCodeLens!==b.diffCodeLens,renderOverviewRuler:a.renderOverviewRuler!==b.renderOverviewRuler,diffWordWrap:a.diffWordWrap!==b.diffWordWrap,diffAlgorithm:a.diffAlgorithm!==b.diffAlgorithm,accessibilityVerbose:a.accessibilityVerbose!==b.accessibilityVerbose}}var __decorate19,__param15,__awaiter15,DiffEditorWidget_1,VisualEditorState,DIFF_EDITOR_ID,diffInsertIcon,diffRemoveIcon,diffEditorWidgetTtPolicy,ariaNavigationTip,DiffEditorWidget,DiffEditorWidgetStyle,ForeignViewZonesIterator,ViewZonesComputer,DECORATIONS,DiffEditorWidgetSideBySide,SideBySideViewZonesComputer,DiffEditorWidgetInline,InlineViewZonesComputer;var init_diffEditorWidget=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget.js"(){init_dom();init_fastDomNode();init_trustedTypes();init_mouseCursor();init_sash();init_assert();init_async();init_cancellation();init_codicons();init_errors();init_event();init_htmlContent();init_lifecycle();init_themables();init_25();init_domFontInfo();init_elementSizeObserver();init_editorExtensions();init_codeEditorService();init_stableEditorScroll();init_codeEditorWidget();init_diffNavigator();init_diffReview();init_inlineDiffMargin();init_workerBasedDocumentDiffProvider();init_editorOptions();init_position();init_range();init_stringBuilder();init_editorCommon();init_editorContextKeys();init_textModel();init_lineDecorations();init_viewLineRenderer();init_viewModel();init_overviewZoneManager();init_nls();init_clipboardService();init_contextkey();init_contextView();init_instantiation();init_serviceCollection();init_notification();init_progress();init_colorRegistry();init_iconRegistry();init_themeService();__decorate19=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param15=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter15=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};VisualEditorState=class{constructor(_contextMenuService,_clipboardService){this._contextMenuService=_contextMenuService;this._clipboardService=_clipboardService;this._zones=[];this._inlineDiffMargins=[];this._zonesMap={};this._decorations=[]}getForeignViewZones(allViewZones){return allViewZones.filter((z=>!this._zonesMap[String(z.id)]))}clean(editor2){if(this._zones.length>0){editor2.changeViewZones((viewChangeAccessor=>{for(const zoneId of this._zones){viewChangeAccessor.removeZone(zoneId)}}))}this._zones=[];this._zonesMap={};editor2.changeDecorations((changeAccessor=>{this._decorations=changeAccessor.deltaDecorations(this._decorations,[])}))}apply(editor2,overviewRuler,newDecorations,restoreScrollState){const scrollState=restoreScrollState?StableEditorScrollState.capture(editor2):null;editor2.changeViewZones((viewChangeAccessor=>{var _a6;for(const zoneId of this._zones){viewChangeAccessor.removeZone(zoneId)}for(const inlineDiffMargin of this._inlineDiffMargins){inlineDiffMargin.dispose()}this._zones=[];this._zonesMap={};this._inlineDiffMargins=[];for(let i=0,length2=newDecorations.zones.length;i{this._decorations=changeAccessor.deltaDecorations(this._decorations,newDecorations.decorations)}));overviewRuler===null||overviewRuler===void 0?void 0:overviewRuler.setZones(newDecorations.overviewZones)}};DIFF_EDITOR_ID=0;diffInsertIcon=registerIcon("diff-insert",Codicon.add,localize("diffInsertIcon","Line decoration for inserts in the diff editor."));diffRemoveIcon=registerIcon("diff-remove",Codicon.remove,localize("diffRemoveIcon","Line decoration for removals in the diff editor."));diffEditorWidgetTtPolicy=createTrustedTypesPolicy("diffEditorWidget",{createHTML:value=>value});ariaNavigationTip=localize("diff-aria-navigation-tip"," use Shift + F7 to navigate changes");DiffEditorWidget=DiffEditorWidget_1=class DiffEditorWidget2 extends Disposable{constructor(domElement,options2,codeEditorWidgetOptions,clipboardService,contextKeyService,instantiationService,codeEditorService,themeService,notificationService,contextMenuService,_editorProgressService){super();this._editorProgressService=_editorProgressService;this._onDidDispose=this._register(new Emitter);this.onDidDispose=this._onDidDispose.event;this._onDidChangeModel=this._register(new Emitter);this.onDidChangeModel=this._onDidChangeModel.event;this._onDidUpdateDiff=this._register(new Emitter);this.onDidUpdateDiff=this._onDidUpdateDiff.event;this._onDidContentSizeChange=this._register(new Emitter);this._lastOriginalWarning=null;this._lastModifiedWarning=null;codeEditorService.willCreateDiffEditor();this._documentDiffProvider=this._register(instantiationService.createInstance(WorkerBasedDocumentDiffProvider,options2));this._register(this._documentDiffProvider.onDidChange((e=>this._beginUpdateDecorationsSoon())));this._codeEditorService=codeEditorService;this._contextKeyService=this._register(contextKeyService.createScoped(domElement));this._instantiationService=instantiationService.createChild(new ServiceCollection([IContextKeyService,this._contextKeyService]));this._contextKeyService.createKey("isInDiffEditor",true);this._themeService=themeService;this._notificationService=notificationService;this._id=++DIFF_EDITOR_ID;this._state=0;this._updatingDiffProgress=null;this._domElement=domElement;options2=options2||{};this._options=validateDiffEditorOptions(options2,{enableSplitViewResizing:true,splitViewDefaultRatio:.5,renderSideBySide:true,renderMarginRevertIcon:true,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:true,renderIndicators:true,originalEditable:false,diffCodeLens:false,renderOverviewRuler:true,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:false,experimental:{showEmptyDecorations:false,showMoves:false},hideUnchangedRegions:{enabled:false,contextLineCount:0,minimumLineCount:0,revealLineCount:0},isInEmbeddedEditor:false,onlyShowAccessibleDiffViewer:false,renderSideBySideInlineBreakpoint:0,useInlineViewWhenSpaceIsLimited:false});this.isEmbeddedDiffEditorKey=EditorContextKeys.isEmbeddedDiffEditor.bindTo(this._contextKeyService);this.isEmbeddedDiffEditorKey.set(typeof options2.isInEmbeddedEditor!=="undefined"?options2.isInEmbeddedEditor:false);this._updateDecorationsRunner=this._register(new RunOnceScheduler((()=>this._updateDecorations()),0));this._containerDomElement=document.createElement("div");this._containerDomElement.className=DiffEditorWidget_1._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide);this._containerDomElement.style.position="relative";this._containerDomElement.style.height="100%";this._domElement.appendChild(this._containerDomElement);this._overviewViewportDomElement=createFastDomNode(document.createElement("div"));this._overviewViewportDomElement.setClassName("diffViewport");this._overviewViewportDomElement.setPosition("absolute");this._overviewDomElement=document.createElement("div");this._overviewDomElement.className="diffOverview";this._overviewDomElement.style.position="absolute";this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode);this._register(addStandardDisposableListener(this._overviewDomElement,EventType.POINTER_DOWN,(e=>{this._modifiedEditor.delegateVerticalScrollbarPointerDown(e)})));this._register(addDisposableListener(this._overviewDomElement,EventType.MOUSE_WHEEL,(e=>{this._modifiedEditor.delegateScrollFromMouseWheelEvent(e)}),{passive:false}));if(this._options.renderOverviewRuler){this._containerDomElement.appendChild(this._overviewDomElement)}this._originalDomNode=document.createElement("div");this._originalDomNode.className="editor original";this._originalDomNode.style.position="absolute";this._originalDomNode.style.height="100%";this._containerDomElement.appendChild(this._originalDomNode);this._modifiedDomNode=document.createElement("div");this._modifiedDomNode.className="editor modified";this._modifiedDomNode.style.position="absolute";this._modifiedDomNode.style.height="100%";this._containerDomElement.appendChild(this._modifiedDomNode);this._beginUpdateDecorationsTimeout=-1;this._currentlyChangingViewZones=false;this._diffComputationToken=0;this._originalEditorState=new VisualEditorState(contextMenuService,clipboardService);this._modifiedEditorState=new VisualEditorState(contextMenuService,clipboardService);this._isVisible=true;this._isHandlingScrollEvent=false;this._elementSizeObserver=this._register(new ElementSizeObserver(this._containerDomElement,options2.dimension));this._register(this._elementSizeObserver.onDidChange((()=>this._onDidContainerSizeChanged())));if(options2.automaticLayout){this._elementSizeObserver.startObserving()}this._diffComputationResult=null;this._originalEditor=this._createLeftHandSideEditor(options2,codeEditorWidgetOptions.originalEditor||{});this._modifiedEditor=this._createRightHandSideEditor(options2,codeEditorWidgetOptions.modifiedEditor||{});this._originalOverviewRuler=null;this._modifiedOverviewRuler=null;this._reviewPane=instantiationService.createInstance(DiffReview,this);this._containerDomElement.appendChild(this._reviewPane.domNode.domNode);this._containerDomElement.appendChild(this._reviewPane.shadow.domNode);this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode);if(this._options.renderSideBySide){this._setStrategy(new DiffEditorWidgetSideBySide(this._createDataSource(),this._options.enableSplitViewResizing,this._options.splitViewDefaultRatio))}else{this._setStrategy(new DiffEditorWidgetInline(this._createDataSource(),this._options.enableSplitViewResizing))}this._register(themeService.onDidColorThemeChange((t2=>{if(this._strategy&&this._strategy.applyColors(t2)){this._updateDecorationsRunner.schedule()}this._containerDomElement.className=DiffEditorWidget_1._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)})));const contributions=EditorExtensionsRegistry.getDiffEditorContributions();for(const desc of contributions){try{this._register(instantiationService.createInstance(desc.ctor,this))}catch(err){onUnexpectedError(err)}}this._codeEditorService.addDiffEditor(this)}_setState(newState){if(this._state===newState){return}this._state=newState;if(this._updatingDiffProgress){this._updatingDiffProgress.done();this._updatingDiffProgress=null}if(this._state===1){this._updatingDiffProgress=this._editorProgressService.show(true,1e3)}}accessibleDiffViewerNext(){this._reviewPane.next()}accessibleDiffViewerPrev(){this._reviewPane.prev()}static _getClassName(theme,renderSideBySide){let result="monaco-diff-editor monaco-editor-background ";if(renderSideBySide){result+="side-by-side "}result+=getThemeTypeSelector(theme.type);return result}_disposeOverviewRulers(){if(this._originalOverviewRuler){this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode());this._originalOverviewRuler.dispose();this._originalOverviewRuler=null}if(this._modifiedOverviewRuler){this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode());this._modifiedOverviewRuler.dispose();this._modifiedOverviewRuler=null}}_createOverviewRulers(){if(!this._options.renderOverviewRuler){return}ok(!this._originalOverviewRuler&&!this._modifiedOverviewRuler);if(this._originalEditor.hasModel()){this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler");this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())}if(this._modifiedEditor.hasModel()){this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler");this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())}this._layoutOverviewRulers()}_createLeftHandSideEditor(options2,codeEditorWidgetOptions){const editor2=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(options2),codeEditorWidgetOptions);this._register(editor2.onDidScrollChange((e=>{if(this._isHandlingScrollEvent){return}if(!e.scrollTopChanged&&!e.scrollLeftChanged&&!e.scrollHeightChanged){return}this._isHandlingScrollEvent=true;this._modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop});this._isHandlingScrollEvent=false;this._layoutOverviewViewport()})));this._register(editor2.onDidChangeViewZones((()=>{this._onViewZonesChanged()})));this._register(editor2.onDidChangeConfiguration((e=>{if(!editor2.getModel()){return}if(e.hasChanged(49)){this._updateDecorationsRunner.schedule()}if(e.hasChanged(143)){this._updateDecorationsRunner.cancel();this._updateDecorations()}})));this._register(editor2.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel();this._updateDecorations()})));this._register(editor2.onDidChangeModelContent((()=>{if(this._isVisible){this._beginUpdateDecorationsSoon()}})));const isInDiffLeftEditorKey=this._contextKeyService.createKey("isInDiffLeftEditor",editor2.hasWidgetFocus());this._register(editor2.onDidFocusEditorWidget((()=>isInDiffLeftEditorKey.set(true))));this._register(editor2.onDidBlurEditorWidget((()=>isInDiffLeftEditorKey.set(false))));this._register(editor2.onDidContentSizeChange((e=>{const width=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+DiffEditorWidget_1.ONE_OVERVIEW_WIDTH;const height=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:height,contentWidth:width,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})})));return editor2}_createRightHandSideEditor(options2,codeEditorWidgetOptions){const editor2=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(options2),codeEditorWidgetOptions);this._register(editor2.onDidScrollChange((e=>{if(this._isHandlingScrollEvent){return}if(!e.scrollTopChanged&&!e.scrollLeftChanged&&!e.scrollHeightChanged){return}this._isHandlingScrollEvent=true;this._originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop});this._isHandlingScrollEvent=false;this._layoutOverviewViewport()})));this._register(editor2.onDidChangeViewZones((()=>{this._onViewZonesChanged()})));this._register(editor2.onDidChangeConfiguration((e=>{if(!editor2.getModel()){return}if(e.hasChanged(49)){this._updateDecorationsRunner.schedule()}if(e.hasChanged(143)){this._updateDecorationsRunner.cancel();this._updateDecorations()}})));this._register(editor2.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel();this._updateDecorations()})));this._register(editor2.onDidChangeModelContent((()=>{if(this._isVisible){this._beginUpdateDecorationsSoon()}})));this._register(editor2.onDidChangeModelOptions((e=>{if(e.tabSize){this._updateDecorationsRunner.schedule()}})));const isInDiffRightEditorKey=this._contextKeyService.createKey("isInDiffRightEditor",editor2.hasWidgetFocus());this._register(editor2.onDidFocusEditorWidget((()=>isInDiffRightEditorKey.set(true))));this._register(editor2.onDidBlurEditorWidget((()=>isInDiffRightEditorKey.set(false))));this._register(editor2.onDidContentSizeChange((e=>{const width=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+DiffEditorWidget_1.ONE_OVERVIEW_WIDTH;const height=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:height,contentWidth:width,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})})));this._register(editor2.onMouseDown((event=>{var _a6,_b3;if(!event.event.rightButton&&event.target.position&&((_a6=event.target.element)===null||_a6===void 0?void 0:_a6.className.includes("arrow-revert-change"))){const lineNumber=event.target.position.lineNumber;const viewZone=event.target;const change=(_b3=this._diffComputationResult)===null||_b3===void 0?void 0:_b3.changes.find((c=>(viewZone===null||viewZone===void 0?void 0:viewZone.detail.afterLineNumber)===c.modifiedStartLineNumber||c.modifiedEndLineNumber>0&&c.modifiedStartLineNumber===lineNumber));if(change){this.revertChange(change)}event.event.stopPropagation();this._updateDecorations();return}})));return editor2}revertChange(change){const editor2=this._modifiedEditor;const original=this._originalEditor.getModel();const modified=this._modifiedEditor.getModel();if(!original||!modified||!editor2){return}const originalRange=change.originalEndLineNumber>0?new Range(change.originalStartLineNumber,1,change.originalEndLineNumber,original.getLineMaxColumn(change.originalEndLineNumber)):null;const originalContent=originalRange?original.getValueInRange(originalRange):null;const newRange=change.modifiedEndLineNumber>0?new Range(change.modifiedStartLineNumber,1,change.modifiedEndLineNumber,modified.getLineMaxColumn(change.modifiedEndLineNumber)):null;const eol=modified.getEOL();if(change.originalEndLineNumber===0&&newRange){let range2=newRange;if(change.modifiedStartLineNumber>1){range2=newRange.setStartPosition(change.modifiedStartLineNumber-1,modified.getLineMaxColumn(change.modifiedStartLineNumber-1))}else if(change.modifiedEndLineNumberthis._beginUpdateDecorations()),DiffEditorWidget_1.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(a,b){if(!a&&!b){return true}if(!a||!b){return false}return a.toString()===b.toString()}_beginUpdateDecorations(){if(this._beginUpdateDecorationsTimeout!==-1){window.clearTimeout(this._beginUpdateDecorationsTimeout);this._beginUpdateDecorationsTimeout=-1}const currentOriginalModel=this._originalEditor.getModel();const currentModifiedModel=this._modifiedEditor.getModel();if(!currentOriginalModel||!currentModifiedModel){return}this._diffComputationToken++;const currentToken=this._diffComputationToken;const diffLimit=this._options.maxFileSize*1024*1024;const canSyncModelForDiff=model=>{const bufferTextLength=model.getValueLength();return diffLimit===0||bufferTextLength<=diffLimit};if(!canSyncModelForDiff(currentOriginalModel)||!canSyncModelForDiff(currentModifiedModel)){if(!DiffEditorWidget_1._equals(currentOriginalModel.uri,this._lastOriginalWarning)||!DiffEditorWidget_1._equals(currentModifiedModel.uri,this._lastModifiedWarning)){this._lastOriginalWarning=currentOriginalModel.uri;this._lastModifiedWarning=currentModifiedModel.uri;this._notificationService.warn(localize("diff.tooLarge","Cannot compare files because one file is too large."))}return}this._setState(1);this._documentDiffProvider.computeDiff(currentOriginalModel,currentModifiedModel,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace,maxComputationTimeMs:this._options.maxComputationTime,computeMoves:false},CancellationToken.None).then((result=>{if(currentToken===this._diffComputationToken&¤tOriginalModel===this._originalEditor.getModel()&¤tModifiedModel===this._modifiedEditor.getModel()){this._setState(2);this._diffComputationResult={identical:result.identical,quitEarly:result.quitEarly,changes2:result.changes,changes:result.changes.map((m=>{let originalStartLineNumber;let originalEndLineNumber;let modifiedStartLineNumber;let modifiedEndLineNumber;let innerChanges=m.innerChanges;if(m.originalRange.isEmpty){originalStartLineNumber=m.originalRange.startLineNumber-1;originalEndLineNumber=0;innerChanges=void 0}else{originalStartLineNumber=m.originalRange.startLineNumber;originalEndLineNumber=m.originalRange.endLineNumberExclusive-1}if(m.modifiedRange.isEmpty){modifiedStartLineNumber=m.modifiedRange.startLineNumber-1;modifiedEndLineNumber=0;innerChanges=void 0}else{modifiedStartLineNumber=m.modifiedRange.startLineNumber;modifiedEndLineNumber=m.modifiedRange.endLineNumberExclusive-1}return{originalStartLineNumber:originalStartLineNumber,originalEndLineNumber:originalEndLineNumber,modifiedStartLineNumber:modifiedStartLineNumber,modifiedEndLineNumber:modifiedEndLineNumber,charChanges:innerChanges===null||innerChanges===void 0?void 0:innerChanges.map((m2=>({originalStartLineNumber:m2.originalRange.startLineNumber,originalStartColumn:m2.originalRange.startColumn,originalEndLineNumber:m2.originalRange.endLineNumber,originalEndColumn:m2.originalRange.endColumn,modifiedStartLineNumber:m2.modifiedRange.startLineNumber,modifiedStartColumn:m2.modifiedRange.startColumn,modifiedEndLineNumber:m2.modifiedRange.endLineNumber,modifiedEndColumn:m2.modifiedRange.endColumn})))}}))};this._updateDecorationsRunner.schedule();this._onDidUpdateDiff.fire()}}),(error=>{if(currentToken===this._diffComputationToken&¤tOriginalModel===this._originalEditor.getModel()&¤tModifiedModel===this._modifiedEditor.getModel()){this._setState(2);this._diffComputationResult=null;this._updateDecorationsRunner.schedule()}}))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor);this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel()){return}const lineChanges=this._diffComputationResult?this._diffComputationResult.changes:[];const foreignOriginal=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces());const foreignModified=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces());const renderMarginRevertIcon=this._options.renderMarginRevertIcon&&!this._modifiedEditor.getOption(89);const diffDecorations=this._strategy.getEditorsDiffDecorations(lineChanges,this._options.ignoreTrimWhitespace,this._options.renderIndicators,renderMarginRevertIcon,foreignOriginal,foreignModified);try{this._currentlyChangingViewZones=true;this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,diffDecorations.original,false);this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,diffDecorations.modified,true)}finally{this._currentlyChangingViewZones=false}}_adjustOptionsForSubEditor(options2){const clonedOptions=Object.assign({},options2);clonedOptions.inDiffEditor=true;clonedOptions.automaticLayout=false;clonedOptions.scrollbar=Object.assign({},clonedOptions.scrollbar||{});clonedOptions.scrollbar.vertical="visible";clonedOptions.folding=false;clonedOptions.codeLens=this._options.diffCodeLens;clonedOptions.fixedOverflowWidgets=true;clonedOptions.minimap=Object.assign({},clonedOptions.minimap||{});clonedOptions.minimap.enabled=false;return clonedOptions}_adjustOptionsForLeftHandSide(options2){const result=this._adjustOptionsForSubEditor(options2);if(!this._options.renderSideBySide){result.wordWrapOverride1="off";result.wordWrapOverride2="off";result.stickyScroll={enabled:false}}else{result.wordWrapOverride1=this._options.diffWordWrap}if(options2.originalAriaLabel){result.ariaLabel=options2.originalAriaLabel}this._updateAriaLabel(result);result.readOnly=!this._options.originalEditable;result.dropIntoEditor={enabled:!result.readOnly};result.extraEditorClassName="original-in-monaco-diff-editor";return Object.assign(Object.assign({},result),{dimension:{height:0,width:0}})}_updateAriaLabel(options2){var _a6;let ariaLabel=(_a6=options2.ariaLabel)!==null&&_a6!==void 0?_a6:"";if(this._options.accessibilityVerbose){ariaLabel+=ariaNavigationTip}else if(ariaLabel){ariaLabel=ariaLabel.replaceAll(ariaNavigationTip,"")}options2.ariaLabel=ariaLabel}_adjustOptionsForRightHandSide(options2){const result=this._adjustOptionsForSubEditor(options2);if(options2.modifiedAriaLabel){result.ariaLabel=options2.modifiedAriaLabel}this._updateAriaLabel(result);result.wordWrapOverride1=this._options.diffWordWrap;result.revealHorizontalRightPadding=EditorOptions.revealHorizontalRightPadding.defaultValue+DiffEditorWidget_1.ENTIRE_DIFF_OVERVIEW_WIDTH;result.scrollbar.verticalHasArrows=false;result.extraEditorClassName="modified-in-monaco-diff-editor";return Object.assign(Object.assign({},result),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe();this._doLayout()}_doLayout(){const width=this._elementSizeObserver.getWidth();const height=this._elementSizeObserver.getHeight();const reviewHeight=this._getReviewHeight();const splitPoint=this._strategy.layout();this._originalDomNode.style.width=splitPoint+"px";this._originalDomNode.style.left="0px";this._modifiedDomNode.style.width=width-splitPoint-DiffEditorWidget_1.ENTIRE_DIFF_OVERVIEW_WIDTH+"px";this._modifiedDomNode.style.left=splitPoint+"px";this._overviewDomElement.style.top="0px";this._overviewDomElement.style.height=height-reviewHeight+"px";this._overviewDomElement.style.width=DiffEditorWidget_1.ENTIRE_DIFF_OVERVIEW_WIDTH+"px";this._overviewDomElement.style.left=width-DiffEditorWidget_1.ENTIRE_DIFF_OVERVIEW_WIDTH+"px";this._overviewViewportDomElement.setWidth(DiffEditorWidget_1.ENTIRE_DIFF_OVERVIEW_WIDTH);this._overviewViewportDomElement.setHeight(30);this._originalEditor.layout({width:splitPoint,height:height-reviewHeight});this._modifiedEditor.layout({width:width-splitPoint-(this._options.renderOverviewRuler?DiffEditorWidget_1.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:height-reviewHeight});if(this._originalOverviewRuler||this._modifiedOverviewRuler){this._layoutOverviewRulers()}this._reviewPane.layout(height-reviewHeight,width,reviewHeight);this._layoutOverviewViewport()}_layoutOverviewViewport(){const layout2=this._computeOverviewViewport();if(!layout2){this._overviewViewportDomElement.setTop(0);this._overviewViewportDomElement.setHeight(0)}else{this._overviewViewportDomElement.setTop(layout2.top);this._overviewViewportDomElement.setHeight(layout2.height)}}_computeOverviewViewport(){const layoutInfo=this._modifiedEditor.getLayoutInfo();if(!layoutInfo){return null}const scrollTop=this._modifiedEditor.getScrollTop();const scrollHeight=this._modifiedEditor.getScrollHeight();const computedAvailableSize=Math.max(0,layoutInfo.height);const computedRepresentableSize=Math.max(0,computedAvailableSize-2*0);const computedRatio=scrollHeight>0?computedRepresentableSize/scrollHeight:0;const computedSliderSize=Math.max(0,Math.floor(layoutInfo.height*computedRatio));const computedSliderPosition=Math.floor(scrollTop*computedRatio);return{height:computedSliderSize,top:computedSliderPosition}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(newStrategy){var _a6;(_a6=this._strategy)===null||_a6===void 0?void 0:_a6.dispose();this._strategy=newStrategy;if(this._boundarySashes){newStrategy.setBoundarySashes(this._boundarySashes)}newStrategy.applyColors(this._themeService.getColorTheme());if(this._diffComputationResult){this._updateDecorations()}this._doLayout()}};DiffEditorWidget.ONE_OVERVIEW_WIDTH=15;DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH=30;DiffEditorWidget.UPDATE_DIFF_DECORATIONS_DELAY=200;DiffEditorWidget=DiffEditorWidget_1=__decorate19([__param15(3,IClipboardService),__param15(4,IContextKeyService),__param15(5,IInstantiationService),__param15(6,ICodeEditorService),__param15(7,IThemeService),__param15(8,INotificationService),__param15(9,IContextMenuService),__param15(10,IEditorProgressService)],DiffEditorWidget);DiffEditorWidgetStyle=class extends Disposable{constructor(dataSource){super();this._dataSource=dataSource;this._insertColor=null;this._removeColor=null}applyColors(theme){const newInsertColor=theme.getColor(diffOverviewRulerInserted)||(theme.getColor(diffInserted)||defaultInsertColor).transparent(2);const newRemoveColor=theme.getColor(diffOverviewRulerRemoved)||(theme.getColor(diffRemoved)||defaultRemoveColor).transparent(2);const hasChanges=!newInsertColor.equals(this._insertColor)||!newRemoveColor.equals(this._removeColor);this._insertColor=newInsertColor;this._removeColor=newRemoveColor;return hasChanges}getEditorsDiffDecorations(lineChanges,ignoreTrimWhitespace,renderIndicators,renderMarginRevertIcon,originalWhitespaces,modifiedWhitespaces){modifiedWhitespaces=modifiedWhitespaces.sort(((a,b)=>a.afterLineNumber-b.afterLineNumber));originalWhitespaces=originalWhitespaces.sort(((a,b)=>a.afterLineNumber-b.afterLineNumber));const zones=this._getViewZones(lineChanges,originalWhitespaces,modifiedWhitespaces,renderIndicators);const originalDecorations=this._getOriginalEditorDecorations(zones,lineChanges,ignoreTrimWhitespace,renderIndicators);const modifiedDecorations=this._getModifiedEditorDecorations(zones,lineChanges,ignoreTrimWhitespace,renderIndicators,renderMarginRevertIcon);return{original:{decorations:originalDecorations.decorations,overviewZones:originalDecorations.overviewZones,zones:zones.original},modified:{decorations:modifiedDecorations.decorations,overviewZones:modifiedDecorations.overviewZones,zones:zones.modified}}}setBoundarySashes(_sashes){}};ForeignViewZonesIterator=class{constructor(source){this._source=source;this._index=-1;this.current=null;this.advance()}advance(){this._index++;if(this._indexa.afterLineNumber-b.afterLineNumber;const addAndCombineIfPossible=(destination,item)=>{if(item.domNode===null&&destination.length>0){const lastItem=destination[destination.length-1];if(lastItem.afterLineNumber===item.afterLineNumber&&lastItem.domNode===null){lastItem.heightInLines+=item.heightInLines;return}}destination.push(item)};const modifiedForeignVZ=new ForeignViewZonesIterator(this._modifiedForeignVZ);const originalForeignVZ=new ForeignViewZonesIterator(this._originalForeignVZ);let lastOriginalLineNumber=1;let lastModifiedLineNumber=1;for(let i=0,length2=this._lineChanges.length;i<=length2;i++){const lineChange=i0?-1:0);modifiedEquivalentLineNumber=lineChange.modifiedStartLineNumber+(lineChange.modifiedEndLineNumber>0?-1:0);lineChangeOriginalLength=lineChange.originalEndLineNumber>0?ViewZonesComputer._getViewLineCount(this._originalEditor,lineChange.originalStartLineNumber,lineChange.originalEndLineNumber):0;lineChangeModifiedLength=lineChange.modifiedEndLineNumber>0?ViewZonesComputer._getViewLineCount(this._modifiedEditor,lineChange.modifiedStartLineNumber,lineChange.modifiedEndLineNumber):0;originalEndEquivalentLineNumber=Math.max(lineChange.originalStartLineNumber,lineChange.originalEndLineNumber);modifiedEndEquivalentLineNumber=Math.max(lineChange.modifiedStartLineNumber,lineChange.modifiedEndLineNumber)}else{originalEquivalentLineNumber+=1e7+lineChangeOriginalLength;modifiedEquivalentLineNumber+=1e7+lineChangeModifiedLength;originalEndEquivalentLineNumber=originalEquivalentLineNumber;modifiedEndEquivalentLineNumber=modifiedEquivalentLineNumber}let stepOriginal=[];let stepModified=[];if(hasWrapping){let count;if(lineChange){if(lineChange.originalEndLineNumber>0){count=lineChange.originalStartLineNumber-lastOriginalLineNumber}else{count=lineChange.modifiedStartLineNumber-lastModifiedLineNumber}}else{count=originalModel.getLineCount()-lastOriginalLineNumber+1}for(let i2=0;i2modifiedViewLineCount){stepModified.push({afterLineNumber:modifiedLineNumber,heightInLines:originalViewLineCount-modifiedViewLineCount,domNode:null,marginDomNode:null})}}if(lineChange){lastOriginalLineNumber=(lineChange.originalEndLineNumber>0?lineChange.originalEndLineNumber:lineChange.originalStartLineNumber)+1;lastModifiedLineNumber=(lineChange.modifiedEndLineNumber>0?lineChange.modifiedEndLineNumber:lineChange.modifiedStartLineNumber)+1}}while(modifiedForeignVZ.current&&modifiedForeignVZ.current.afterLineNumber<=modifiedEndEquivalentLineNumber){let viewZoneLineNumber;if(modifiedForeignVZ.current.afterLineNumber<=modifiedEquivalentLineNumber){viewZoneLineNumber=originalEquivalentLineNumber-modifiedEquivalentLineNumber+modifiedForeignVZ.current.afterLineNumber}else{viewZoneLineNumber=originalEndEquivalentLineNumber}let marginDomNode=null;if(lineChange&&lineChange.modifiedStartLineNumber<=modifiedForeignVZ.current.afterLineNumber&&modifiedForeignVZ.current.afterLineNumber<=lineChange.modifiedEndLineNumber){marginDomNode=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()}stepOriginal.push({afterLineNumber:viewZoneLineNumber,heightInLines:modifiedForeignVZ.current.height/modifiedLineHeight,domNode:null,marginDomNode:marginDomNode});modifiedForeignVZ.advance()}while(originalForeignVZ.current&&originalForeignVZ.current.afterLineNumber<=originalEndEquivalentLineNumber){let viewZoneLineNumber;if(originalForeignVZ.current.afterLineNumber<=originalEquivalentLineNumber){viewZoneLineNumber=modifiedEquivalentLineNumber-originalEquivalentLineNumber+originalForeignVZ.current.afterLineNumber}else{viewZoneLineNumber=modifiedEndEquivalentLineNumber}stepModified.push({afterLineNumber:viewZoneLineNumber,heightInLines:originalForeignVZ.current.height/originalLineHeight,domNode:null});originalForeignVZ.advance()}if(lineChange!==null&&isChangeOrInsert(lineChange)){const r=this._produceOriginalFromDiff(lineChange,lineChangeOriginalLength,lineChangeModifiedLength);if(r){stepOriginal.push(r)}}if(lineChange!==null&&isChangeOrDelete(lineChange)){const r=this._produceModifiedFromDiff(lineChange,lineChangeOriginalLength,lineChangeModifiedLength);if(r){stepModified.push(r)}}let stepOriginalIndex=0;let stepModifiedIndex=0;stepOriginal=stepOriginal.sort(sortMyViewZones);stepModified=stepModified.sort(sortMyViewZones);while(stepOriginalIndex=modified.heightInLines){original.heightInLines-=modified.heightInLines;stepModifiedIndex++}else{modified.heightInLines-=original.heightInLines;stepOriginalIndex++}}}while(stepOriginalIndex{if(!z.domNode){z.domNode=createFakeLinesDiv()}return z}))}};DECORATIONS={arrowRevertChange:ModelDecorationOptions.register({description:"diff-editor-arrow-revert-change",glyphMarginHoverMessage:new MarkdownString(void 0,{isTrusted:true,supportThemeIcons:true}).appendMarkdown(localize("revertChangeHoverMessage","Click to revert change")),glyphMarginClassName:"arrow-revert-change "+ThemeIcon.asClassName(Codicon.arrowRight),zIndex:10001}),charDelete:ModelDecorationOptions.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:ModelDecorationOptions.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:true}),charInsert:ModelDecorationOptions.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:ModelDecorationOptions.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:true}),lineInsert:ModelDecorationOptions.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:true}),lineInsertWithSign:ModelDecorationOptions.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+ThemeIcon.asClassName(diffInsertIcon),marginClassName:"gutter-insert",isWholeLine:true}),lineDelete:ModelDecorationOptions.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:true}),lineDeleteWithSign:ModelDecorationOptions.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+ThemeIcon.asClassName(diffRemoveIcon),marginClassName:"gutter-delete",isWholeLine:true}),lineDeleteMargin:ModelDecorationOptions.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};DiffEditorWidgetSideBySide=class extends DiffEditorWidgetStyle{constructor(dataSource,enableSplitViewResizing,defaultSashRatio){super(dataSource);this._disableSash=enableSplitViewResizing===false;this._defaultRatio=defaultSashRatio;this._sashRatio=null;this._sashPosition=null;this._startSashPosition=null;this._sash=this._register(new Sash(this._dataSource.getContainerDomNode(),this,{orientation:0}));if(this._disableSash){this._sash.state=0}this._sash.onDidStart((()=>this._onSashDragStart()));this._sash.onDidChange((e=>this._onSashDrag(e)));this._sash.onDidEnd((()=>this._onSashDragEnd()));this._sash.onDidReset((()=>this._onSashReset()))}setEnableSplitViewResizing(enableSplitViewResizing,defaultRatio){this._defaultRatio=defaultRatio;const newDisableSash=enableSplitViewResizing===false;if(this._disableSash!==newDisableSash){this._disableSash=newDisableSash;this._sash.state=this._disableSash?0:3}}layout(sashRatio=this._sashRatio||this._defaultRatio){const w=this._dataSource.getWidth();const contentWidth=w-(this._dataSource.getOptions().renderOverviewRuler?DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let sashPosition=Math.floor((sashRatio||this._defaultRatio)*contentWidth);const midPoint=Math.floor(this._defaultRatio*contentWidth);sashPosition=this._disableSash?midPoint:sashPosition||midPoint;if(contentWidth>DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH*2){if(sashPositioncontentWidth-DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH){sashPosition=contentWidth-DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH}}else{sashPosition=midPoint}if(this._sashPosition!==sashPosition){this._sashPosition=sashPosition}this._sash.layout();return this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const w=this._dataSource.getWidth();const contentWidth=w-(this._dataSource.getOptions().renderOverviewRuler?DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH:0);const sashPosition=this.layout((this._startSashPosition+(e.currentX-e.startX))/contentWidth);this._sashRatio=sashPosition/contentWidth;this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=this._defaultRatio;this._dataSource.relayoutEditors();this._sash.layout()}getVerticalSashTop(sash){return 0}getVerticalSashLeft(sash){return this._sashPosition}getVerticalSashHeight(sash){return this._dataSource.getHeight()}setBoundarySashes(sashes){this._sash.orthogonalEndSash=sashes.bottom}_getViewZones(lineChanges,originalForeignVZ,modifiedForeignVZ){const originalEditor=this._dataSource.getOriginalEditor();const modifiedEditor=this._dataSource.getModifiedEditor();const c=new SideBySideViewZonesComputer(lineChanges,originalForeignVZ,modifiedForeignVZ,originalEditor,modifiedEditor);return c.getViewZones()}_getOriginalEditorDecorations(zones,lineChanges,ignoreTrimWhitespace,renderIndicators){const originalEditor=this._dataSource.getOriginalEditor();const overviewZoneColor=String(this._removeColor);const result={decorations:[],overviewZones:[]};const originalModel=originalEditor.getModel();const originalViewModel=originalEditor._getViewModel();for(const lineChange of lineChanges){if(isChangeOrDelete(lineChange)){result.decorations.push({range:new Range(lineChange.originalStartLineNumber,1,lineChange.originalEndLineNumber,1073741824),options:renderIndicators?DECORATIONS.lineDeleteWithSign:DECORATIONS.lineDelete});if(!isChangeOrInsert(lineChange)||!lineChange.charChanges){result.decorations.push(createDecoration(lineChange.originalStartLineNumber,1,lineChange.originalEndLineNumber,1073741824,DECORATIONS.charDeleteWholeLine))}const viewRange=getViewRange(originalModel,originalViewModel,lineChange.originalStartLineNumber,lineChange.originalEndLineNumber);result.overviewZones.push(new OverviewRulerZone(viewRange.startLineNumber,viewRange.endLineNumber,0,overviewZoneColor));if(lineChange.charChanges){for(const charChange of lineChange.charChanges){if(isCharChangeOrDelete(charChange)){if(ignoreTrimWhitespace){for(let lineNumber=charChange.originalStartLineNumber;lineNumber<=charChange.originalEndLineNumber;lineNumber++){let startColumn;let endColumn;if(lineNumber===charChange.originalStartLineNumber){startColumn=charChange.originalStartColumn}else{startColumn=originalModel.getLineFirstNonWhitespaceColumn(lineNumber)}if(lineNumber===charChange.originalEndLineNumber){endColumn=charChange.originalEndColumn}else{endColumn=originalModel.getLineLastNonWhitespaceColumn(lineNumber)}result.decorations.push(createDecoration(lineNumber,startColumn,lineNumber,endColumn,DECORATIONS.charDelete))}}else{result.decorations.push(createDecoration(charChange.originalStartLineNumber,charChange.originalStartColumn,charChange.originalEndLineNumber,charChange.originalEndColumn,DECORATIONS.charDelete))}}}}}}return result}_getModifiedEditorDecorations(zones,lineChanges,ignoreTrimWhitespace,renderIndicators,renderMarginRevertIcon){const modifiedEditor=this._dataSource.getModifiedEditor();const overviewZoneColor=String(this._insertColor);const result={decorations:[],overviewZones:[]};const modifiedModel=modifiedEditor.getModel();const modifiedViewModel=modifiedEditor._getViewModel();for(const lineChange of lineChanges){if(renderMarginRevertIcon){if(lineChange.modifiedEndLineNumber>0){result.decorations.push({range:new Range(lineChange.modifiedStartLineNumber,1,lineChange.modifiedStartLineNumber,1),options:DECORATIONS.arrowRevertChange})}else{const viewZone=zones.modified.find((z=>z.afterLineNumber===lineChange.modifiedStartLineNumber));if(viewZone){viewZone.marginDomNode=createViewZoneMarginArrow()}}}if(isChangeOrInsert(lineChange)){result.decorations.push({range:new Range(lineChange.modifiedStartLineNumber,1,lineChange.modifiedEndLineNumber,1073741824),options:renderIndicators?DECORATIONS.lineInsertWithSign:DECORATIONS.lineInsert});if(!isChangeOrDelete(lineChange)||!lineChange.charChanges){result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber,1,lineChange.modifiedEndLineNumber,1073741824,DECORATIONS.charInsertWholeLine))}const viewRange=getViewRange(modifiedModel,modifiedViewModel,lineChange.modifiedStartLineNumber,lineChange.modifiedEndLineNumber);result.overviewZones.push(new OverviewRulerZone(viewRange.startLineNumber,viewRange.endLineNumber,0,overviewZoneColor));if(lineChange.charChanges){for(const charChange of lineChange.charChanges){if(isCharChangeOrInsert(charChange)){if(ignoreTrimWhitespace){for(let lineNumber=charChange.modifiedStartLineNumber;lineNumber<=charChange.modifiedEndLineNumber;lineNumber++){let startColumn;let endColumn;if(lineNumber===charChange.modifiedStartLineNumber){startColumn=charChange.modifiedStartColumn}else{startColumn=modifiedModel.getLineFirstNonWhitespaceColumn(lineNumber)}if(lineNumber===charChange.modifiedEndLineNumber){endColumn=charChange.modifiedEndColumn}else{endColumn=modifiedModel.getLineLastNonWhitespaceColumn(lineNumber)}result.decorations.push(createDecoration(lineNumber,startColumn,lineNumber,endColumn,DECORATIONS.charInsert))}}else{result.decorations.push(createDecoration(charChange.modifiedStartLineNumber,charChange.modifiedStartColumn,charChange.modifiedEndLineNumber,charChange.modifiedEndColumn,DECORATIONS.charInsert))}}}}}}return result}};DiffEditorWidgetSideBySide.MINIMUM_EDITOR_WIDTH=100;SideBySideViewZonesComputer=class extends ViewZonesComputer{constructor(lineChanges,originalForeignVZ,modifiedForeignVZ,originalEditor,modifiedEditor){super(lineChanges,originalForeignVZ,modifiedForeignVZ,originalEditor,modifiedEditor)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(lineChange,lineChangeOriginalLength,lineChangeModifiedLength){if(lineChangeModifiedLength>lineChangeOriginalLength){return{afterLineNumber:Math.max(lineChange.originalStartLineNumber,lineChange.originalEndLineNumber),heightInLines:lineChangeModifiedLength-lineChangeOriginalLength,domNode:null}}return null}_produceModifiedFromDiff(lineChange,lineChangeOriginalLength,lineChangeModifiedLength){if(lineChangeOriginalLength>lineChangeModifiedLength){return{afterLineNumber:Math.max(lineChange.modifiedStartLineNumber,lineChange.modifiedEndLineNumber),heightInLines:lineChangeOriginalLength-lineChangeModifiedLength,domNode:null}}return null}};DiffEditorWidgetInline=class extends DiffEditorWidgetStyle{constructor(dataSource,enableSplitViewResizing){super(dataSource);this._decorationsLeft=dataSource.getOriginalEditor().getLayoutInfo().decorationsLeft;this._register(dataSource.getOriginalEditor().onDidLayoutChange((layoutInfo=>{if(this._decorationsLeft!==layoutInfo.decorationsLeft){this._decorationsLeft=layoutInfo.decorationsLeft;dataSource.relayoutEditors()}})))}setEnableSplitViewResizing(enableSplitViewResizing){}_getViewZones(lineChanges,originalForeignVZ,modifiedForeignVZ,renderIndicators){const originalEditor=this._dataSource.getOriginalEditor();const modifiedEditor=this._dataSource.getModifiedEditor();const computer=new InlineViewZonesComputer(lineChanges,originalForeignVZ,modifiedForeignVZ,originalEditor,modifiedEditor,renderIndicators);return computer.getViewZones()}_getOriginalEditorDecorations(zones,lineChanges,ignoreTrimWhitespace,renderIndicators){const overviewZoneColor=String(this._removeColor);const result={decorations:[],overviewZones:[]};const originalEditor=this._dataSource.getOriginalEditor();const originalModel=originalEditor.getModel();const originalViewModel=originalEditor._getViewModel();let zoneIndex=0;for(const lineChange of lineChanges){if(isChangeOrDelete(lineChange)){result.decorations.push({range:new Range(lineChange.originalStartLineNumber,1,lineChange.originalEndLineNumber,1073741824),options:DECORATIONS.lineDeleteMargin});while(zoneIndex=lineChange.originalStartLineNumber){break}zoneIndex++}let zoneHeightInLines=0;if(zoneIndex0;const sb=new StringBuilder(1e4);let maxCharsPerLine=0;let renderedLineCount=0;let viewLineCounts=null;for(let lineNumber=lineChange.originalStartLineNumber;lineNumber<=lineChange.originalEndLineNumber;lineNumber++){const lineIndex=lineNumber-lineChange.originalStartLineNumber;const lineTokens=this._originalModel.tokenization.getLineTokens(lineNumber);const lineContent=lineTokens.getLineContent();const lineBreakData=lineBreaks[lineBreakIndex++];const actualDecorations=LineDecoration.filter(decorations,lineNumber,1,lineContent.length+1);if(lineBreakData){let lastBreakOffset=0;for(const breakOffset of lineBreakData.breakOffsets){const viewLineTokens=lineTokens.sliceAndInflate(lastBreakOffset,breakOffset,0);const viewLineContent=lineContent.substring(lastBreakOffset,breakOffset);maxCharsPerLine=Math.max(maxCharsPerLine,this._renderOriginalLine(renderedLineCount++,viewLineContent,viewLineTokens,LineDecoration.extractWrapped(actualDecorations,lastBreakOffset,breakOffset),hasCharChanges,mightContainNonBasicASCII,mightContainRTL,fontInfo,disableMonospaceOptimizations,lineHeight,lineDecorationsWidth,stopRenderingLineAfter,renderWhitespace,renderControlCharacters,fontLigatures,tabSize,sb,marginDomNode));lastBreakOffset=breakOffset}if(!viewLineCounts){viewLineCounts=[]}while(viewLineCounts.lengtha.afterLineNumber-b.afterLineNumber))}_renderOriginalLine(renderedLineCount,lineContent,lineTokens,decorations,hasCharChanges,mightContainNonBasicASCII,mightContainRTL,fontInfo,disableMonospaceOptimizations,lineHeight,lineDecorationsWidth,stopRenderingLineAfter,renderWhitespace,renderControlCharacters,fontLigatures,tabSize,sb,marginDomNode){sb.appendString('
    ');const isBasicASCII2=ViewLineRenderingData.isBasicASCII(lineContent,mightContainNonBasicASCII);const containsRTL2=ViewLineRenderingData.containsRTL(lineContent,isBasicASCII2,mightContainRTL);const output=renderViewLine(new RenderLineInput(fontInfo.isMonospace&&!disableMonospaceOptimizations,fontInfo.canUseHalfwidthRightwardsArrow,lineContent,false,isBasicASCII2,containsRTL2,0,lineTokens,decorations,tabSize,0,fontInfo.spaceWidth,fontInfo.middotWidth,fontInfo.wsmiddotWidth,stopRenderingLineAfter,renderWhitespace,renderControlCharacters,fontLigatures!==EditorFontLigatures.OFF,null),sb);sb.appendString("
    ");if(this._renderIndicators){const marginElement=document.createElement("div");marginElement.className=`delete-sign ${ThemeIcon.asClassName(diffRemoveIcon)}`;marginElement.setAttribute("style",`position:absolute;top:${renderedLineCount*lineHeight}px;width:${lineDecorationsWidth}px;height:${lineHeight}px;right:0;`);marginDomNode.appendChild(marginElement)}return output.characterMapping.getHorizontalOffset(output.characterMapping.length)}};registerThemingParticipant(((theme,collector)=>{const diffDiagonalFillColor=theme.getColor(diffDiagonalFill);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`)}))}});var __decorate20,__param16,__awaiter16,AbstractCodeEditorService;var init_abstractCodeEditorService=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/services/abstractCodeEditorService.js"(){init_event();init_lifecycle();init_linkedList();init_themeService();__decorate20=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param16=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter16=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};AbstractCodeEditorService=class AbstractCodeEditorService2 extends Disposable{constructor(_themeService){super();this._themeService=_themeService;this._onWillCreateCodeEditor=this._register(new Emitter);this._onCodeEditorAdd=this._register(new Emitter);this.onCodeEditorAdd=this._onCodeEditorAdd.event;this._onCodeEditorRemove=this._register(new Emitter);this.onCodeEditorRemove=this._onCodeEditorRemove.event;this._onWillCreateDiffEditor=this._register(new Emitter);this._onDiffEditorAdd=this._register(new Emitter);this.onDiffEditorAdd=this._onDiffEditorAdd.event;this._onDiffEditorRemove=this._register(new Emitter);this.onDiffEditorRemove=this._onDiffEditorRemove.event;this._decorationOptionProviders=new Map;this._codeEditorOpenHandlers=new LinkedList;this._modelProperties=new Map;this._codeEditors=Object.create(null);this._diffEditors=Object.create(null);this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(editor2){this._codeEditors[editor2.getId()]=editor2;this._onCodeEditorAdd.fire(editor2)}removeCodeEditor(editor2){if(delete this._codeEditors[editor2.getId()]){this._onCodeEditorRemove.fire(editor2)}}listCodeEditors(){return Object.keys(this._codeEditors).map((id=>this._codeEditors[id]))}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(editor2){this._diffEditors[editor2.getId()]=editor2;this._onDiffEditorAdd.fire(editor2)}removeDiffEditor(editor2){if(delete this._diffEditors[editor2.getId()]){this._onDiffEditorRemove.fire(editor2)}}listDiffEditors(){return Object.keys(this._diffEditors).map((id=>this._diffEditors[id]))}getFocusedCodeEditor(){let editorWithWidgetFocus=null;const editors=this.listCodeEditors();for(const editor2 of editors){if(editor2.hasTextFocus()){return editor2}if(editor2.hasWidgetFocus()){editorWithWidgetFocus=editor2}}return editorWithWidgetFocus}removeDecorationType(key){const provider=this._decorationOptionProviders.get(key);if(provider){provider.refCount--;if(provider.refCount<=0){this._decorationOptionProviders.delete(key);provider.dispose();this.listCodeEditors().forEach((ed=>ed.removeDecorationsByType(key)))}}}setModelProperty(resource,key,value){const key1=resource.toString();let dest;if(this._modelProperties.has(key1)){dest=this._modelProperties.get(key1)}else{dest=new Map;this._modelProperties.set(key1,dest)}dest.set(key,value)}getModelProperty(resource,key){const key1=resource.toString();if(this._modelProperties.has(key1)){const innerMap=this._modelProperties.get(key1);return innerMap.get(key)}return void 0}openCodeEditor(input,source,sideBySide){return __awaiter16(this,void 0,void 0,(function*(){for(const handler of this._codeEditorOpenHandlers){const candidate=yield handler(input,source,sideBySide);if(candidate!==null){return candidate}}return null}))}registerCodeEditorOpenHandler(handler){const rm=this._codeEditorOpenHandlers.unshift(handler);return toDisposable(rm)}};AbstractCodeEditorService=__decorate20([__param16(0,IThemeService)],AbstractCodeEditorService)}});var __decorate21,__param17,__awaiter17,StandaloneCodeEditorService;var init_standaloneCodeEditorService=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditorService.js"(){init_dom();init_network();init_abstractCodeEditorService();init_codeEditorService();init_contextkey();init_extensions();init_themeService();__decorate21=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param17=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter17=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};StandaloneCodeEditorService=class StandaloneCodeEditorService2 extends AbstractCodeEditorService{constructor(contextKeyService,themeService){super(themeService);this.onCodeEditorAdd((()=>this._checkContextKey()));this.onCodeEditorRemove((()=>this._checkContextKey()));this._editorIsOpen=contextKeyService.createKey("editorIsOpen",false);this._activeCodeEditor=null;this.registerCodeEditorOpenHandler(((input,source,sideBySide)=>__awaiter17(this,void 0,void 0,(function*(){if(!source){return null}return this.doOpenEditor(source,input)}))))}_checkContextKey(){let hasCodeEditor=false;for(const editor2 of this.listCodeEditors()){if(!editor2.isSimpleWidget){hasCodeEditor=true;break}}this._editorIsOpen.set(hasCodeEditor)}setActiveCodeEditor(activeCodeEditor){this._activeCodeEditor=activeCodeEditor}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(editor2,input){const model=this.findModel(editor2,input.resource);if(!model){if(input.resource){const schema=input.resource.scheme;if(schema===Schemas.http||schema===Schemas.https){windowOpenNoOpener(input.resource.toString());return editor2}}return null}const selection=input.options?input.options.selection:null;if(selection){if(typeof selection.endLineNumber==="number"&&typeof selection.endColumn==="number"){editor2.setSelection(selection);editor2.revealRangeInCenter(selection,1)}else{const pos={lineNumber:selection.startLineNumber,column:selection.startColumn};editor2.setPosition(pos);editor2.revealPositionInCenter(pos,1)}}return editor2}findModel(editor2,resource){const model=editor2.getModel();if(model&&model.uri.toString()!==resource.toString()){return null}return model}};StandaloneCodeEditorService=__decorate21([__param17(0,IContextKeyService),__param17(1,IThemeService)],StandaloneCodeEditorService);registerSingleton(ICodeEditorService,StandaloneCodeEditorService,0)}});var ILayoutService;var init_layoutService=__esm({"node_modules/monaco-editor/esm/vs/platform/layout/browser/layoutService.js"(){init_instantiation();ILayoutService=createDecorator("layoutService")}});var __decorate22,__param18,StandaloneLayoutService,EditorScopedLayoutService;var init_standaloneLayoutService=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneLayoutService.js"(){init_dom();init_event();init_layoutService();init_codeEditorService();init_extensions();__decorate22=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param18=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};StandaloneLayoutService=class StandaloneLayoutService2{get dimension(){if(!this._dimension){this._dimension=getClientArea(window.document.body)}return this._dimension}get hasContainer(){return false}get container(){throw new Error(`ILayoutService.container is not available in the standalone editor!`)}focus(){var _a6;(_a6=this._codeEditorService.getFocusedCodeEditor())===null||_a6===void 0?void 0:_a6.focus()}constructor(_codeEditorService){this._codeEditorService=_codeEditorService;this.onDidLayout=Event.None;this.offset={top:0,quickPickTop:0}}};StandaloneLayoutService=__decorate22([__param18(0,ICodeEditorService)],StandaloneLayoutService);EditorScopedLayoutService=class EditorScopedLayoutService2 extends StandaloneLayoutService{get hasContainer(){return false}get container(){return this._container}constructor(_container,codeEditorService){super(codeEditorService);this._container=_container}};EditorScopedLayoutService=__decorate22([__param18(1,ICodeEditorService)],EditorScopedLayoutService);registerSingleton(ILayoutService,StandaloneLayoutService,1)}});var IDialogService;var init_dialogs=__esm({"node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js"(){init_instantiation();IDialogService=createDecorator("dialogService")}});function getResourceLabel(resource){return resource.scheme===Schemas.file?resource.fsPath:resource.path}var __decorate23,__param19,__awaiter18,DEBUG2,stackElementCounter,ResourceStackElement,ResourceReasonPair,RemovedResources,WorkspaceStackElement,ResourceEditStack,EditStackSnapshot,missingEditStack,UndoRedoService,WorkspaceVerificationError;var init_undoRedoService=__esm({"node_modules/monaco-editor/esm/vs/platform/undoRedo/common/undoRedoService.js"(){init_errors();init_lifecycle();init_network();init_severity();init_nls();init_dialogs();init_extensions();init_notification();init_undoRedo();__decorate23=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param19=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter18=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};DEBUG2=false;stackElementCounter=0;ResourceStackElement=class{constructor(actual,resourceLabel,strResource,groupId,groupOrder,sourceId,sourceOrder){this.id=++stackElementCounter;this.type=0;this.actual=actual;this.label=actual.label;this.confirmBeforeUndo=actual.confirmBeforeUndo||false;this.resourceLabel=resourceLabel;this.strResource=strResource;this.resourceLabels=[this.resourceLabel];this.strResources=[this.strResource];this.groupId=groupId;this.groupOrder=groupOrder;this.sourceId=sourceId;this.sourceOrder=sourceOrder;this.isValid=true}setValid(isValid2){this.isValid=isValid2}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}};ResourceReasonPair=class{constructor(resourceLabel,reason){this.resourceLabel=resourceLabel;this.reason=reason}};RemovedResources=class{constructor(){this.elements=new Map}createMessage(){const externalRemoval=[];const noParallelUniverses=[];for(const[,element]of this.elements){const dest=element.reason===0?externalRemoval:noParallelUniverses;dest.push(element.resourceLabel)}const messages=[];if(externalRemoval.length>0){messages.push(localize({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",externalRemoval.join(", ")))}if(noParallelUniverses.length>0){messages.push(localize({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",noParallelUniverses.join(", ")))}return messages.join("\n")}get size(){return this.elements.size}has(strResource){return this.elements.has(strResource)}set(strResource,value){this.elements.set(strResource,value)}delete(strResource){return this.elements.delete(strResource)}};WorkspaceStackElement=class{constructor(actual,resourceLabels,strResources,groupId,groupOrder,sourceId,sourceOrder){this.id=++stackElementCounter;this.type=1;this.actual=actual;this.label=actual.label;this.confirmBeforeUndo=actual.confirmBeforeUndo||false;this.resourceLabels=resourceLabels;this.strResources=strResources;this.groupId=groupId;this.groupOrder=groupOrder;this.sourceId=sourceId;this.sourceOrder=sourceOrder;this.removedResources=null;this.invalidatedResources=null}canSplit(){return typeof this.actual.split==="function"}removeResource(resourceLabel,strResource,reason){if(!this.removedResources){this.removedResources=new RemovedResources}if(!this.removedResources.has(strResource)){this.removedResources.set(strResource,new ResourceReasonPair(resourceLabel,reason))}}setValid(resourceLabel,strResource,isValid2){if(isValid2){if(this.invalidatedResources){this.invalidatedResources.delete(strResource);if(this.invalidatedResources.size===0){this.invalidatedResources=null}}}else{if(!this.invalidatedResources){this.invalidatedResources=new RemovedResources}if(!this.invalidatedResources.has(strResource)){this.invalidatedResources.set(strResource,new ResourceReasonPair(resourceLabel,0))}}}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}};ResourceEditStack=class{constructor(resourceLabel,strResource){this.resourceLabel=resourceLabel;this.strResource=strResource;this._past=[];this._future=[];this.locked=false;this.versionId=1}dispose(){for(const element of this._past){if(element.type===1){element.removeResource(this.resourceLabel,this.strResource,0)}}for(const element of this._future){if(element.type===1){element.removeResource(this.resourceLabel,this.strResource,0)}}this.versionId++}toString(){const result=[];result.push(`* ${this.strResource}:`);for(let i=0;i=0;i--){result.push(` * [REDO] ${this._future[i]}`)}return result.join("\n")}flushAllElements(){this._past=[];this._future=[];this.versionId++}_setElementValidFlag(element,isValid2){if(element.type===1){element.setValid(this.resourceLabel,this.strResource,isValid2)}else{element.setValid(isValid2)}}setElementsValidFlag(isValid2,filter){for(const element of this._past){if(filter(element.actual)){this._setElementValidFlag(element,isValid2)}}for(const element of this._future){if(filter(element.actual)){this._setElementValidFlag(element,isValid2)}}}pushElement(element){for(const futureElement of this._future){if(futureElement.type===1){futureElement.removeResource(this.resourceLabel,this.strResource,1)}}this._future=[];this._past.push(element);this.versionId++}createSnapshot(resource){const elements=[];for(let i=0,len=this._past.length;i=0;i--){elements.push(this._future[i].id)}return new ResourceEditStackSnapshot(resource,elements)}restoreSnapshot(snapshot){const snapshotLength=snapshot.elements.length;let isOK=true;let snapshotIndex=0;let removePastAfter=-1;for(let i=0,len=this._past.length;i=snapshotLength||element.id!==snapshot.elements[snapshotIndex])){isOK=false;removePastAfter=0}if(!isOK&&element.type===1){element.removeResource(this.resourceLabel,this.strResource,0)}}let removeFutureBefore=-1;for(let i=this._future.length-1;i>=0;i--,snapshotIndex++){const element=this._future[i];if(isOK&&(snapshotIndex>=snapshotLength||element.id!==snapshot.elements[snapshotIndex])){isOK=false;removeFutureBefore=i}if(!isOK&&element.type===1){element.removeResource(this.resourceLabel,this.strResource,0)}}if(removePastAfter!==-1){this._past=this._past.slice(0,removePastAfter)}if(removeFutureBefore!==-1){this._future=this._future.slice(removeFutureBefore+1)}this.versionId++}getElements(){const past=[];const future=[];for(const element of this._past){past.push(element.actual)}for(const element of this._future){future.push(element.actual)}return{past:past,future:future}}getClosestPastElement(){if(this._past.length===0){return null}return this._past[this._past.length-1]}getSecondClosestPastElement(){if(this._past.length<2){return null}return this._past[this._past.length-2]}getClosestFutureElement(){if(this._future.length===0){return null}return this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(toRemove,individualMap){for(let j=this._past.length-1;j>=0;j--){if(this._past[j]===toRemove){if(individualMap.has(this.strResource)){this._past[j]=individualMap.get(this.strResource)}else{this._past.splice(j,1)}break}}this.versionId++}splitFutureWorkspaceElement(toRemove,individualMap){for(let j=this._future.length-1;j>=0;j--){if(this._future[j]===toRemove){if(individualMap.has(this.strResource)){this._future[j]=individualMap.get(this.strResource)}else{this._future.splice(j,1)}break}}this.versionId++}moveBackward(element){this._past.pop();this._future.push(element);this.versionId++}moveForward(element){this._future.pop();this._past.push(element);this.versionId++}};EditStackSnapshot=class{constructor(editStacks){this.editStacks=editStacks;this._versionIds=[];for(let i=0,len=this.editStacks.length;imatchedElement.sourceOrder){matchedElement=candidate;matchedStrResource=strResource}}}return[matchedElement,matchedStrResource]}canUndo(resourceOrSource){if(resourceOrSource instanceof UndoRedoSource){const[,matchedStrResource]=this._findClosestUndoElementWithSource(resourceOrSource.id);return matchedStrResource?true:false}const strResource=this.getUriComparisonKey(resourceOrSource);if(this._editStacks.has(strResource)){const editStack=this._editStacks.get(strResource);return editStack.hasPastElements()}return false}_onError(err,element){onUnexpectedError(err);for(const strResource of element.strResources){this.removeElements(strResource)}this._notificationService.error(err)}_acquireLocks(editStackSnapshot){for(const editStack of editStackSnapshot.editStacks){if(editStack.locked){throw new Error("Cannot acquire edit stack lock")}}for(const editStack of editStackSnapshot.editStacks){editStack.locked=true}return()=>{for(const editStack of editStackSnapshot.editStacks){editStack.locked=false}}}_safeInvokeWithLocks(element,invoke,editStackSnapshot,cleanup,continuation){const releaseLocks=this._acquireLocks(editStackSnapshot);let result;try{result=invoke()}catch(err){releaseLocks();cleanup.dispose();return this._onError(err,element)}if(result){return result.then((()=>{releaseLocks();cleanup.dispose();return continuation()}),(err=>{releaseLocks();cleanup.dispose();return this._onError(err,element)}))}else{releaseLocks();cleanup.dispose();return continuation()}}_invokeWorkspacePrepare(element){return __awaiter18(this,void 0,void 0,(function*(){if(typeof element.actual.prepareUndoRedo==="undefined"){return Disposable.None}const result=element.actual.prepareUndoRedo();if(typeof result==="undefined"){return Disposable.None}return result}))}_invokeResourcePrepare(element,callback){if(element.actual.type!==1||typeof element.actual.prepareUndoRedo==="undefined"){return callback(Disposable.None)}const r=element.actual.prepareUndoRedo();if(!r){return callback(Disposable.None)}if(isDisposable(r)){return callback(r)}return r.then((disposable=>callback(disposable)))}_getAffectedEditStacks(element){const affectedEditStacks=[];for(const strResource of element.strResources){affectedEditStacks.push(this._editStacks.get(strResource)||missingEditStack)}return new EditStackSnapshot(affectedEditStacks)}_tryToSplitAndUndo(strResource,element,ignoreResources,message){if(element.canSplit()){this._splitPastWorkspaceElement(element,ignoreResources);this._notificationService.warn(message);return new WorkspaceVerificationError(this._undo(strResource,0,true))}else{for(const strResource2 of element.strResources){this.removeElements(strResource2)}this._notificationService.warn(message);return new WorkspaceVerificationError}}_checkWorkspaceUndo(strResource,element,editStackSnapshot,checkInvalidatedResources){if(element.removedResources){return this._tryToSplitAndUndo(strResource,element,element.removedResources,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()))}if(checkInvalidatedResources&&element.invalidatedResources){return this._tryToSplitAndUndo(strResource,element,element.invalidatedResources,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()))}const cannotUndoDueToResources=[];for(const editStack of editStackSnapshot.editStacks){if(editStack.getClosestPastElement()!==element){cannotUndoDueToResources.push(editStack.resourceLabel)}}if(cannotUndoDueToResources.length>0){return this._tryToSplitAndUndo(strResource,element,null,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(", ")))}const cannotLockDueToResources=[];for(const editStack of editStackSnapshot.editStacks){if(editStack.locked){cannotLockDueToResources.push(editStack.resourceLabel)}}if(cannotLockDueToResources.length>0){return this._tryToSplitAndUndo(strResource,element,null,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(", ")))}if(!editStackSnapshot.isValid()){return this._tryToSplitAndUndo(strResource,element,null,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))}return null}_workspaceUndo(strResource,element,undoConfirmed){const affectedEditStacks=this._getAffectedEditStacks(element);const verificationError=this._checkWorkspaceUndo(strResource,element,affectedEditStacks,false);if(verificationError){return verificationError.returnValue}return this._confirmAndExecuteWorkspaceUndo(strResource,element,affectedEditStacks,undoConfirmed)}_isPartOfUndoGroup(element){if(!element.groupId){return false}for(const[,editStack]of this._editStacks){const pastElement=editStack.getClosestPastElement();if(!pastElement){continue}if(pastElement===element){const secondPastElement=editStack.getSecondClosestPastElement();if(secondPastElement&&secondPastElement.groupId===element.groupId){return true}}if(pastElement.groupId===element.groupId){return true}}return false}_confirmAndExecuteWorkspaceUndo(strResource,element,editStackSnapshot,undoConfirmed){return __awaiter18(this,void 0,void 0,(function*(){if(element.canSplit()&&!this._isPartOfUndoGroup(element)){let UndoChoice;(function(UndoChoice2){UndoChoice2[UndoChoice2["All"]=0]="All";UndoChoice2[UndoChoice2["This"]=1]="This";UndoChoice2[UndoChoice2["Cancel"]=2]="Cancel"})(UndoChoice||(UndoChoice={}));const{result:result}=yield this._dialogService.prompt({type:severity_default.Info,message:localize("confirmWorkspace","Would you like to undo '{0}' across all files?",element.label),buttons:[{label:localize({key:"ok",comment:["{0} denotes a number that is > 1, && denotes a mnemonic"]},"&&Undo in {0} Files",editStackSnapshot.editStacks.length),run:()=>UndoChoice.All},{label:localize({key:"nok",comment:["&& denotes a mnemonic"]},"Undo this &&File"),run:()=>UndoChoice.This}],cancelButton:{run:()=>UndoChoice.Cancel}});if(result===UndoChoice.Cancel){return}if(result===UndoChoice.This){this._splitPastWorkspaceElement(element,null);return this._undo(strResource,0,true)}const verificationError1=this._checkWorkspaceUndo(strResource,element,editStackSnapshot,false);if(verificationError1){return verificationError1.returnValue}undoConfirmed=true}let cleanup;try{cleanup=yield this._invokeWorkspacePrepare(element)}catch(err){return this._onError(err,element)}const verificationError2=this._checkWorkspaceUndo(strResource,element,editStackSnapshot,true);if(verificationError2){cleanup.dispose();return verificationError2.returnValue}for(const editStack of editStackSnapshot.editStacks){editStack.moveBackward(element)}return this._safeInvokeWithLocks(element,(()=>element.actual.undo()),editStackSnapshot,cleanup,(()=>this._continueUndoInGroup(element.groupId,undoConfirmed)))}))}_resourceUndo(editStack,element,undoConfirmed){if(!element.isValid){editStack.flushAllElements();return}if(editStack.locked){const message=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);this._notificationService.warn(message);return}return this._invokeResourcePrepare(element,(cleanup=>{editStack.moveBackward(element);return this._safeInvokeWithLocks(element,(()=>element.actual.undo()),new EditStackSnapshot([editStack]),cleanup,(()=>this._continueUndoInGroup(element.groupId,undoConfirmed)))}))}_findClosestUndoElementInGroup(groupId){if(!groupId){return[null,null]}let matchedElement=null;let matchedStrResource=null;for(const[strResource,editStack]of this._editStacks){const candidate=editStack.getClosestPastElement();if(!candidate){continue}if(candidate.groupId===groupId){if(!matchedElement||candidate.groupOrder>matchedElement.groupOrder){matchedElement=candidate;matchedStrResource=strResource}}}return[matchedElement,matchedStrResource]}_continueUndoInGroup(groupId,undoConfirmed){if(!groupId){return}const[,matchedStrResource]=this._findClosestUndoElementInGroup(groupId);if(matchedStrResource){return this._undo(matchedStrResource,0,undoConfirmed)}}undo(resourceOrSource){if(resourceOrSource instanceof UndoRedoSource){const[,matchedStrResource]=this._findClosestUndoElementWithSource(resourceOrSource.id);return matchedStrResource?this._undo(matchedStrResource,resourceOrSource.id,false):void 0}if(typeof resourceOrSource==="string"){return this._undo(resourceOrSource,0,false)}return this._undo(this.getUriComparisonKey(resourceOrSource),0,false)}_undo(strResource,sourceId=0,undoConfirmed){if(!this._editStacks.has(strResource)){return}const editStack=this._editStacks.get(strResource);const element=editStack.getClosestPastElement();if(!element){return}if(element.groupId){const[matchedElement,matchedStrResource]=this._findClosestUndoElementInGroup(element.groupId);if(element!==matchedElement&&matchedStrResource){return this._undo(matchedStrResource,sourceId,undoConfirmed)}}const shouldPromptForConfirmation=element.sourceId!==sourceId||element.confirmBeforeUndo;if(shouldPromptForConfirmation&&!undoConfirmed){return this._confirmAndContinueUndo(strResource,sourceId,element)}try{if(element.type===1){return this._workspaceUndo(strResource,element,undoConfirmed)}else{return this._resourceUndo(editStack,element,undoConfirmed)}}finally{if(DEBUG2){this._print("undo")}}}_confirmAndContinueUndo(strResource,sourceId,element){return __awaiter18(this,void 0,void 0,(function*(){const result=yield this._dialogService.confirm({message:localize("confirmDifferentSource","Would you like to undo '{0}'?",element.label),primaryButton:localize({key:"confirmDifferentSource.yes",comment:["&& denotes a mnemonic"]},"&&Yes"),cancelButton:localize("confirmDifferentSource.no","No")});if(!result.confirmed){return}return this._undo(strResource,sourceId,true)}))}_findClosestRedoElementWithSource(sourceId){if(!sourceId){return[null,null]}let matchedElement=null;let matchedStrResource=null;for(const[strResource,editStack]of this._editStacks){const candidate=editStack.getClosestFutureElement();if(!candidate){continue}if(candidate.sourceId===sourceId){if(!matchedElement||candidate.sourceOrder0){return this._tryToSplitAndRedo(strResource,element,null,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(", ")))}const cannotLockDueToResources=[];for(const editStack of editStackSnapshot.editStacks){if(editStack.locked){cannotLockDueToResources.push(editStack.resourceLabel)}}if(cannotLockDueToResources.length>0){return this._tryToSplitAndRedo(strResource,element,null,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(", ")))}if(!editStackSnapshot.isValid()){return this._tryToSplitAndRedo(strResource,element,null,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))}return null}_workspaceRedo(strResource,element){const affectedEditStacks=this._getAffectedEditStacks(element);const verificationError=this._checkWorkspaceRedo(strResource,element,affectedEditStacks,false);if(verificationError){return verificationError.returnValue}return this._executeWorkspaceRedo(strResource,element,affectedEditStacks)}_executeWorkspaceRedo(strResource,element,editStackSnapshot){return __awaiter18(this,void 0,void 0,(function*(){let cleanup;try{cleanup=yield this._invokeWorkspacePrepare(element)}catch(err){return this._onError(err,element)}const verificationError=this._checkWorkspaceRedo(strResource,element,editStackSnapshot,true);if(verificationError){cleanup.dispose();return verificationError.returnValue}for(const editStack of editStackSnapshot.editStacks){editStack.moveForward(element)}return this._safeInvokeWithLocks(element,(()=>element.actual.redo()),editStackSnapshot,cleanup,(()=>this._continueRedoInGroup(element.groupId)))}))}_resourceRedo(editStack,element){if(!element.isValid){editStack.flushAllElements();return}if(editStack.locked){const message=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);this._notificationService.warn(message);return}return this._invokeResourcePrepare(element,(cleanup=>{editStack.moveForward(element);return this._safeInvokeWithLocks(element,(()=>element.actual.redo()),new EditStackSnapshot([editStack]),cleanup,(()=>this._continueRedoInGroup(element.groupId)))}))}_findClosestRedoElementInGroup(groupId){if(!groupId){return[null,null]}let matchedElement=null;let matchedStrResource=null;for(const[strResource,editStack]of this._editStacks){const candidate=editStack.getClosestFutureElement();if(!candidate){continue}if(candidate.groupId===groupId){if(!matchedElement||candidate.groupOrdermatchesScheme(target,scheme)))}function extractSelection(uri){let selection=void 0;const match2=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(uri.fragment);if(match2){selection={startLineNumber:parseInt(match2[1]),startColumn:match2[2]?parseInt(match2[2]):1,endLineNumber:match2[4]?parseInt(match2[4]):void 0,endColumn:match2[4]?match2[5]?parseInt(match2[5]):1:void 0};uri=uri.with({fragment:""})}return{selection:selection,uri:uri}}var IOpenerService;var init_opener=__esm({"node_modules/monaco-editor/esm/vs/platform/opener/common/opener.js"(){init_strings();init_uri();init_instantiation();IOpenerService=createDecorator("openerService")}});var __decorate24,__param20,ILanguageFeatureDebounceService,IdentityHash,NullDebounceInformation,FeatureDebounceInformation,LanguageFeatureDebounceService;var init_languageFeatureDebounce=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/languageFeatureDebounce.js"(){init_hash();init_map();init_numbers();init_environment();init_extensions();init_instantiation();init_log();init_opener();__decorate24=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param20=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};ILanguageFeatureDebounceService=createDecorator("ILanguageFeatureDebounceService");(function(IdentityHash2){const _hashes=new WeakMap;let pool=0;function of(obj){let value=_hashes.get(obj);if(value===void 0){value=++pool;_hashes.set(obj,value)}return value}IdentityHash2.of=of})(IdentityHash||(IdentityHash={}));NullDebounceInformation=class{constructor(_default){this._default=_default}get(_model){return this._default}update(_model,_value){return this._default}default(){return this._default}};FeatureDebounceInformation=class{constructor(_logService,_name,_registry2,_default,_min,_max){this._logService=_logService;this._name=_name;this._registry=_registry2;this._default=_default;this._min=_min;this._max=_max;this._cache=new LRUCache(50,.7)}_key(model){return model.id+this._registry.all(model).reduce(((hashVal,obj)=>doHash(IdentityHash.of(obj),hashVal)),0)}get(model){const key=this._key(model);const avg=this._cache.get(key);return avg?clamp(avg.value,this._min,this._max):this.default()}update(model,value){const key=this._key(model);let avg=this._cache.get(key);if(!avg){avg=new SlidingWindowAverage(6);this._cache.set(key,avg)}const newValue=clamp(avg.update(value),this._min,this._max);if(!matchesScheme(model.uri,"output")){this._logService.trace(`[DEBOUNCE: ${this._name}] for ${model.uri.toString()} is ${newValue}ms`)}return newValue}_overall(){const result=new MovingAverage;for(const[,avg]of this._cache){result.update(avg.value)}return result.value}default(){const value=this._overall()|0||this._default;return clamp(value,this._min,this._max)}};LanguageFeatureDebounceService=class LanguageFeatureDebounceService2{constructor(_logService,envService){this._logService=_logService;this._data=new Map;this._isDev=envService.isExtensionDevelopment||!envService.isBuilt}for(feature,name,config){var _a6,_b3,_c2;const min=(_a6=config===null||config===void 0?void 0:config.min)!==null&&_a6!==void 0?_a6:50;const max=(_b3=config===null||config===void 0?void 0:config.max)!==null&&_b3!==void 0?_b3:Math.pow(min,2);const extra=(_c2=config===null||config===void 0?void 0:config.key)!==null&&_c2!==void 0?_c2:void 0;const key=`${IdentityHash.of(feature)},${min}${extra?","+extra:""}`;let info=this._data.get(key);if(!info){if(!this._isDev){this._logService.debug(`[DEBOUNCE: ${name}] is disabled in developed mode`);info=new NullDebounceInformation(min*1.5)}else{info=new FeatureDebounceInformation(this._logService,name,feature,this._overallAverage()|0||min*1.5,min,max)}this._data.set(key,info)}return info}_overallAverage(){const result=new MovingAverage;for(const info of this._data.values()){result.update(info.default())}return result.value}};LanguageFeatureDebounceService=__decorate24([__param20(0,ILogService),__param20(1,IEnvironmentService)],LanguageFeatureDebounceService);registerSingleton(ILanguageFeatureDebounceService,LanguageFeatureDebounceService,1)}});var SparseMultilineTokens,SparseMultilineTokensStorage,SparseLineTokens;var init_sparseMultilineTokens=__esm({"node_modules/monaco-editor/esm/vs/editor/common/tokens/sparseMultilineTokens.js"(){init_position();init_range();init_eolCounter();SparseMultilineTokens=class{static create(startLineNumber,tokens){return new SparseMultilineTokens(startLineNumber,new SparseMultilineTokensStorage(tokens))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(startLineNumber,tokens){this._startLineNumber=startLineNumber;this._tokens=tokens;this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(lineNumber){if(this._startLineNumber<=lineNumber&&lineNumber<=this._endLineNumber){return this._tokens.getLineTokens(lineNumber-this._startLineNumber)}return null}getRange(){const deltaRange=this._tokens.getRange();if(!deltaRange){return deltaRange}return new Range(this._startLineNumber+deltaRange.startLineNumber,deltaRange.startColumn,this._startLineNumber+deltaRange.endLineNumber,deltaRange.endColumn)}removeTokens(range2){const startLineIndex=range2.startLineNumber-this._startLineNumber;const endLineIndex=range2.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(startLineIndex,range2.startColumn-1,endLineIndex,range2.endColumn-1);this._updateEndLineNumber()}split(range2){const startLineIndex=range2.startLineNumber-this._startLineNumber;const endLineIndex=range2.endLineNumber-this._startLineNumber;const[a,b,bDeltaLine]=this._tokens.split(startLineIndex,range2.startColumn-1,endLineIndex,range2.endColumn-1);return[new SparseMultilineTokens(this._startLineNumber,a),new SparseMultilineTokens(this._startLineNumber+bDeltaLine,b)]}applyEdit(range2,text2){const[eolCount,firstLineLength,lastLineLength]=countEOL(text2);this.acceptEdit(range2,eolCount,firstLineLength,lastLineLength,text2.length>0?text2.charCodeAt(0):0)}acceptEdit(range2,eolCount,firstLineLength,lastLineLength,firstCharCode){this._acceptDeleteRange(range2);this._acceptInsertText(new Position(range2.startLineNumber,range2.startColumn),eolCount,firstLineLength,lastLineLength,firstCharCode);this._updateEndLineNumber()}_acceptDeleteRange(range2){if(range2.startLineNumber===range2.endLineNumber&&range2.startColumn===range2.endColumn){return}const firstLineIndex=range2.startLineNumber-this._startLineNumber;const lastLineIndex=range2.endLineNumber-this._startLineNumber;if(lastLineIndex<0){const deletedLinesCount=lastLineIndex-firstLineIndex;this._startLineNumber-=deletedLinesCount;return}const tokenMaxDeltaLine=this._tokens.getMaxDeltaLine();if(firstLineIndex>=tokenMaxDeltaLine+1){return}if(firstLineIndex<0&&lastLineIndex>=tokenMaxDeltaLine+1){this._startLineNumber=0;this._tokens.clear();return}if(firstLineIndex<0){const deletedBefore=-firstLineIndex;this._startLineNumber-=deletedBefore;this._tokens.acceptDeleteRange(range2.startColumn-1,0,0,lastLineIndex,range2.endColumn-1)}else{this._tokens.acceptDeleteRange(0,firstLineIndex,range2.startColumn-1,lastLineIndex,range2.endColumn-1)}}_acceptInsertText(position,eolCount,firstLineLength,lastLineLength,firstCharCode){if(eolCount===0&&firstLineLength===0){return}const lineIndex=position.lineNumber-this._startLineNumber;if(lineIndex<0){this._startLineNumber+=eolCount;return}const tokenMaxDeltaLine=this._tokens.getMaxDeltaLine();if(lineIndex>=tokenMaxDeltaLine+1){return}this._tokens.acceptInsertText(lineIndex,position.column-1,eolCount,firstLineLength,lastLineLength,firstCharCode)}};SparseMultilineTokensStorage=class{constructor(tokens){this._tokens=tokens;this._tokenCount=tokens.length/4}toString(startLineNumber){const pieces=[];for(let i=0;ideltaLine){high=mid-1}else{let min=mid;while(min>low&&this._getDeltaLine(min-1)===deltaLine){min--}let max=mid;while(maxstartDeltaLine||tokenDeltaLine===startDeltaLine&&tokenEndCharacter>=startChar)&&(tokenDeltaLinestartDeltaLine||tokenDeltaLine===startDeltaLine&&tokenEndCharacter>=startChar){if(tokenDeltaLineendCharacter){tokenEndCharacter-=endCharacter-startCharacter}else{tokenEndCharacter=startCharacter}}else if(tokenDeltaLine===startDeltaLine&&tokenStartCharacter===startCharacter){if(tokenDeltaLine===endDeltaLine&&tokenEndCharacter>endCharacter){tokenEndCharacter-=endCharacter-startCharacter}else{hasDeletedTokens=true;continue}}else if(tokenDeltaLineendCharacter){tokenDeltaLine=startDeltaLine;tokenStartCharacter=startCharacter;tokenEndCharacter=tokenStartCharacter+(tokenEndCharacter-endCharacter)}else{hasDeletedTokens=true;continue}}else if(tokenDeltaLine>endDeltaLine){if(deletedLineCount===0&&!hasDeletedTokens){newTokenCount=tokenCount;break}tokenDeltaLine-=deletedLineCount}else if(tokenDeltaLine===endDeltaLine&&tokenStartCharacter>=endCharacter){if(horizontalShiftForFirstLineTokens&&tokenDeltaLine===0){tokenStartCharacter+=horizontalShiftForFirstLineTokens;tokenEndCharacter+=horizontalShiftForFirstLineTokens}tokenDeltaLine-=deletedLineCount;tokenStartCharacter-=endCharacter-startCharacter;tokenEndCharacter-=endCharacter-startCharacter}else{throw new Error(`Not possible!`)}const destOffset=4*newTokenCount;tokens[destOffset]=tokenDeltaLine;tokens[destOffset+1]=tokenStartCharacter;tokens[destOffset+2]=tokenEndCharacter;tokens[destOffset+3]=tokenMetadata;newTokenCount++}this._tokenCount=newTokenCount}acceptInsertText(deltaLine,character,eolCount,firstLineLength,lastLineLength,firstCharCode){const isInsertingPreciselyOneWordCharacter=eolCount===0&&firstLineLength===1&&(firstCharCode>=48&&firstCharCode<=57||firstCharCode>=65&&firstCharCode<=90||firstCharCode>=97&&firstCharCode<=122);const tokens=this._tokens;const tokenCount=this._tokenCount;for(let i=0;itokenStartIndex&&srcData[5*smallTokenEndIndex]===0){smallTokenEndIndex--}if(smallTokenEndIndex-1===tokenStartIndex){let bigTokenEndIndex=tokenEndIndex;while(bigTokenEndIndex+1startCharacter){styling.warnOverlappingSemanticTokens(lineNumber,startCharacter+1)}else{const metadata=styling.getMetadata(tokenTypeIndex,tokenModifierSet,languageId);if(metadata!==2147483647){if(areaLine===0){areaLine=lineNumber}destData[destOffset]=lineNumber-areaLine;destData[destOffset+1]=startCharacter;destData[destOffset+2]=endCharacter;destData[destOffset+3]=metadata;destOffset+=4;prevLineNumber=lineNumber;prevEndCharacter=endCharacter}}lastLineNumber=lineNumber;lastStartCharacter=startCharacter;tokenIndex++}if(destOffset!==destData.length){destData=destData.subarray(0,destOffset)}const tokens2=SparseMultilineTokens.create(areaLine,destData);result.push(tokens2)}return result}var __decorate25,__param21,SemanticTokensProviderStyling,HashTableEntry,HashTable;var init_semanticTokensProviderStyling=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/semanticTokensProviderStyling.js"(){init_encodedTokenAttributes();init_themeService();init_log();init_sparseMultilineTokens();init_language();__decorate25=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param21=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};SemanticTokensProviderStyling=class SemanticTokensProviderStyling2{constructor(_legend,_themeService,_languageService,_logService){this._legend=_legend;this._themeService=_themeService;this._languageService=_languageService;this._logService=_logService;this._hasWarnedOverlappingTokens=false;this._hasWarnedInvalidLengthTokens=false;this._hasWarnedInvalidEditStart=false;this._hashTable=new HashTable}getMetadata(tokenTypeIndex,tokenModifierSet,languageId){const encodedLanguageId=this._languageService.languageIdCodec.encodeLanguageId(languageId);const entry=this._hashTable.get(tokenTypeIndex,tokenModifierSet,encodedLanguageId);let metadata;if(entry){metadata=entry.metadata;if(this._logService.getLevel()===LogLevel.Trace){this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${tokenTypeIndex} / ${tokenModifierSet}: foreground ${TokenMetadata.getForeground(metadata)}, fontStyle ${TokenMetadata.getFontStyle(metadata).toString(2)}`)}}else{let tokenType=this._legend.tokenTypes[tokenTypeIndex];const tokenModifiers=[];if(tokenType){let modifierSet=tokenModifierSet;for(let modifierIndex=0;modifierSet>0&&modifierIndex>1}if(modifierSet>0&&this._logService.getLevel()===LogLevel.Trace){this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${tokenModifierSet.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`);tokenModifiers.push("not-in-legend")}const tokenStyle=this._themeService.getColorTheme().getTokenStyleMetadata(tokenType,tokenModifiers,languageId);if(typeof tokenStyle==="undefined"){metadata=2147483647}else{metadata=0;if(typeof tokenStyle.italic!=="undefined"){const italicBit=(tokenStyle.italic?1:0)<<11;metadata|=italicBit|1}if(typeof tokenStyle.bold!=="undefined"){const boldBit=(tokenStyle.bold?2:0)<<11;metadata|=boldBit|2}if(typeof tokenStyle.underline!=="undefined"){const underlineBit=(tokenStyle.underline?4:0)<<11;metadata|=underlineBit|4}if(typeof tokenStyle.strikethrough!=="undefined"){const strikethroughBit=(tokenStyle.strikethrough?8:0)<<11;metadata|=strikethroughBit|8}if(tokenStyle.foreground){const foregroundBits=tokenStyle.foreground<<15;metadata|=foregroundBits|16}if(metadata===0){metadata=2147483647}}}else{if(this._logService.getLevel()===LogLevel.Trace){this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${tokenTypeIndex} for legend: ${JSON.stringify(this._legend.tokenTypes)}`)}metadata=2147483647;tokenType="not-in-legend"}this._hashTable.add(tokenTypeIndex,tokenModifierSet,encodedLanguageId,metadata);if(this._logService.getLevel()===LogLevel.Trace){this._logService.trace(`SemanticTokensProviderStyling ${tokenTypeIndex} (${tokenType}) / ${tokenModifierSet} (${tokenModifiers.join(" ")}): foreground ${TokenMetadata.getForeground(metadata)}, fontStyle ${TokenMetadata.getFontStyle(metadata).toString(2)}`)}}return metadata}warnOverlappingSemanticTokens(lineNumber,startColumn){if(!this._hasWarnedOverlappingTokens){this._hasWarnedOverlappingTokens=true;console.warn(`Overlapping semantic tokens detected at lineNumber ${lineNumber}, column ${startColumn}`)}}warnInvalidLengthSemanticTokens(lineNumber,startColumn){if(!this._hasWarnedInvalidLengthTokens){this._hasWarnedInvalidLengthTokens=true;console.warn(`Semantic token with invalid length detected at lineNumber ${lineNumber}, column ${startColumn}`)}}warnInvalidEditStart(previousResultId,resultId,editIndex,editStart,maxExpectedStart){if(!this._hasWarnedInvalidEditStart){this._hasWarnedInvalidEditStart=true;console.warn(`Invalid semantic tokens edit detected (previousResultId: ${previousResultId}, resultId: ${resultId}) at edit #${editIndex}: The provided start offset ${editStart} is outside the previous data (length ${maxExpectedStart}).`)}}};SemanticTokensProviderStyling=__decorate25([__param21(1,IThemeService),__param21(2,ILanguageService),__param21(3,ILogService)],SemanticTokensProviderStyling);HashTableEntry=class{constructor(tokenTypeIndex,tokenModifierSet,languageId,metadata){this.tokenTypeIndex=tokenTypeIndex;this.tokenModifierSet=tokenModifierSet;this.languageId=languageId;this.metadata=metadata;this.next=null}};HashTable=class{constructor(){this._elementsCount=0;this._currentLengthIndex=0;this._currentLength=HashTable._SIZES[this._currentLengthIndex];this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const oldElements=this._elements;this._currentLengthIndex++;this._currentLength=HashTable._SIZES[this._currentLengthIndex];this._growCount=Math.round(this._currentLengthIndex+1=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};__param22=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};SemanticTokensStylingService=class SemanticTokensStylingService2 extends Disposable{constructor(_themeService,_logService,_languageService){super();this._themeService=_themeService;this._logService=_logService;this._languageService=_languageService;this._caches=new WeakMap;this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}getStyling(provider){if(!this._caches.has(provider)){this._caches.set(provider,new SemanticTokensProviderStyling(provider.getLegend(),this._themeService,this._languageService,this._logService))}return this._caches.get(provider)}};SemanticTokensStylingService=__decorate26([__param22(0,IThemeService),__param22(1,ILogService),__param22(2,ILanguageService)],SemanticTokensStylingService);registerSingleton(ISemanticTokensStylingService,SemanticTokensStylingService,1)}});function starsToRegExp(starCount,isLastPattern){switch(starCount){case 0:return"";case 1:return`${NO_PATH_REGEX}*?`;default:return`(?:${PATH_REGEX}|${NO_PATH_REGEX}+${PATH_REGEX}${isLastPattern?`|${PATH_REGEX}${NO_PATH_REGEX}+`:""})*?`}}function splitGlobAware(pattern,splitChar){if(!pattern){return[]}const segments=[];let inBraces=false;let inBrackets=false;let curVal="";for(const char of pattern){switch(char){case splitChar:if(!inBraces&&!inBrackets){segments.push(curVal);curVal="";continue}break;case"{":inBraces=true;break;case"}":inBraces=false;break;case"[":inBrackets=true;break;case"]":inBrackets=false;break}curVal+=char}if(curVal){segments.push(curVal)}return segments}function parseRegExp(pattern){if(!pattern){return""}let regEx="";const segments=splitGlobAware(pattern,GLOB_SPLIT);if(segments.every((segment=>segment===GLOBSTAR))){regEx=".*"}else{let previousSegmentWasGlobStar=false;segments.forEach(((segment,index)=>{if(segment===GLOBSTAR){if(previousSegmentWasGlobStar){return}regEx+=starsToRegExp(2,index===segments.length-1)}else{let inBraces=false;let braceVal="";let inBrackets=false;let bracketVal="";for(const char of segment){if(char!=="}"&&inBraces){braceVal+=char;continue}if(inBrackets&&(char!=="]"||!bracketVal)){let res;if(char==="-"){res=char}else if((char==="^"||char==="!")&&!bracketVal){res="^"}else if(char===GLOB_SPLIT){res=""}else{res=escapeRegExpCharacters(char)}bracketVal+=res;continue}switch(char){case"{":inBraces=true;continue;case"[":inBrackets=true;continue;case"}":{const choices=splitGlobAware(braceVal,",");const braceRegExp=`(?:${choices.map((choice=>parseRegExp(choice))).join("|")})`;regEx+=braceRegExp;inBraces=false;braceVal="";break}case"]":{regEx+="["+bracketVal+"]";inBrackets=false;bracketVal="";break}case"?":regEx+=NO_PATH_REGEX;continue;case"*":regEx+=starsToRegExp(1);continue;default:regEx+=escapeRegExpCharacters(char)}}if(indexparsePattern(pattern2,options2))).filter((pattern2=>pattern2!==NULL)),pattern);const patternsLength=parsedPatterns.length;if(!patternsLength){return NULL}if(patternsLength===1){return parsedPatterns[0]}const parsedPattern=function(path,basename3){for(let i=0,n=parsedPatterns.length;i!!pattern2.allBasenames));if(withBasenames){parsedPattern.allBasenames=withBasenames.allBasenames}const allPaths=parsedPatterns.reduce(((all,current)=>current.allPaths?all.concat(current.allPaths):all),[]);if(allPaths.length){parsedPattern.allPaths=allPaths}return parsedPattern}function trivia4and5(targetPath,pattern,matchPathEnds){const usingPosixSep=sep===posix.sep;const nativePath=usingPosixSep?targetPath:targetPath.replace(ALL_FORWARD_SLASHES,sep);const nativePathEnd=sep+nativePath;const targetPathEnd=posix.sep+targetPath;let parsedPattern;if(matchPathEnds){parsedPattern=function(path,basename3){return typeof path==="string"&&(path===nativePath||path.endsWith(nativePathEnd)||!usingPosixSep&&(path===targetPath||path.endsWith(targetPathEnd)))?pattern:null}}else{parsedPattern=function(path,basename3){return typeof path==="string"&&(path===nativePath||!usingPosixSep&&path===targetPath)?pattern:null}}parsedPattern.allPaths=[(matchPathEnds?"*/":"./")+targetPath];return parsedPattern}function toRegExp(pattern){try{const regExp=new RegExp(`^${parseRegExp(pattern)}$`);return function(path){regExp.lastIndex=0;return typeof path==="string"&®Exp.test(path)?pattern:null}}catch(error){return NULL}}function match(arg1,path,hasSibling){if(!arg1||typeof path!=="string"){return false}return parse3(arg1)(path,void 0,hasSibling)}function parse3(arg1,options2={}){if(!arg1){return FALSE}if(typeof arg1==="string"||isRelativePattern(arg1)){const parsedPattern=parsePattern(arg1,options2);if(parsedPattern===NULL){return FALSE}const resultPattern=function(path,basename3){return!!parsedPattern(path,basename3)};if(parsedPattern.allBasenames){resultPattern.allBasenames=parsedPattern.allBasenames}if(parsedPattern.allPaths){resultPattern.allPaths=parsedPattern.allPaths}return resultPattern}return parsedExpression(arg1,options2)}function isRelativePattern(obj){const rp=obj;if(!rp){return false}return typeof rp.base==="string"&&typeof rp.pattern==="string"}function parsedExpression(expression,options2){const parsedPatterns=aggregateBasenameMatches(Object.getOwnPropertyNames(expression).map((pattern=>parseExpressionPattern(pattern,expression[pattern],options2))).filter((pattern=>pattern!==NULL)));const patternsLength=parsedPatterns.length;if(!patternsLength){return NULL}if(!parsedPatterns.some((parsedPattern=>!!parsedPattern.requiresSiblings))){if(patternsLength===1){return parsedPatterns[0]}const resultExpression2=function(path,basename3){let resultPromises=void 0;for(let i=0,n=parsedPatterns.length;i__awaiter19(this,void 0,void 0,(function*(){for(const resultPromise of resultPromises){const result=yield resultPromise;if(typeof result==="string"){return result}}return null})))()}return null};const withBasenames2=parsedPatterns.find((pattern=>!!pattern.allBasenames));if(withBasenames2){resultExpression2.allBasenames=withBasenames2.allBasenames}const allPaths2=parsedPatterns.reduce(((all,current)=>current.allPaths?all.concat(current.allPaths):all),[]);if(allPaths2.length){resultExpression2.allPaths=allPaths2}return resultExpression2}const resultExpression=function(path,base,hasSibling){let name=void 0;let resultPromises=void 0;for(let i=0,n=parsedPatterns.length;i__awaiter19(this,void 0,void 0,(function*(){for(const resultPromise of resultPromises){const result=yield resultPromise;if(typeof result==="string"){return result}}return null})))()}return null};const withBasenames=parsedPatterns.find((pattern=>!!pattern.allBasenames));if(withBasenames){resultExpression.allBasenames=withBasenames.allBasenames}const allPaths=parsedPatterns.reduce(((all,current)=>current.allPaths?all.concat(current.allPaths):all),[]);if(allPaths.length){resultExpression.allPaths=allPaths}return resultExpression}function parseExpressionPattern(pattern,value,options2){if(value===false){return NULL}const parsedPattern=parsePattern(pattern,options2);if(parsedPattern===NULL){return NULL}if(typeof value==="boolean"){return parsedPattern}if(value){const when=value.when;if(typeof when==="string"){const result=(path,basename3,name,hasSibling)=>{if(!hasSibling||!parsedPattern(path,basename3)){return null}const clausePattern=when.replace("$(basename)",(()=>name));const matched=hasSibling(clausePattern);return isThenable(matched)?matched.then((match2=>match2?pattern:null)):matched?pattern:null};result.requiresSiblings=true;return result}}return parsedPattern}function aggregateBasenameMatches(parsedPatterns,result){const basenamePatterns=parsedPatterns.filter((parsedPattern=>!!parsedPattern.basenames));if(basenamePatterns.length<2){return parsedPatterns}const basenames=basenamePatterns.reduce(((all,current)=>{const basenames2=current.basenames;return basenames2?all.concat(basenames2):all}),[]);let patterns;if(result){patterns=[];for(let i=0,n=basenames.length;i{const patterns2=current.patterns;return patterns2?all.concat(patterns2):all}),[])}const aggregate=function(path,basename3){if(typeof path!=="string"){return null}if(!basename3){let i;for(i=path.length;i>0;i--){const ch=path.charCodeAt(i-1);if(ch===47||ch===92){break}}basename3=path.substr(i)}const index=basenames.indexOf(basename3);return index!==-1?patterns[index]:null};aggregate.basenames=basenames;aggregate.patterns=patterns;aggregate.allBasenames=basenames;const aggregatedPatterns=parsedPatterns.filter((parsedPattern=>!parsedPattern.basenames));aggregatedPatterns.push(aggregate);return aggregatedPatterns}var __awaiter19,GLOBSTAR,GLOB_SPLIT,PATH_REGEX,NO_PATH_REGEX,ALL_FORWARD_SLASHES,T1,T2,T3,T3_2,T4,T5,CACHE,FALSE,NULL;var init_glob=__esm({"node_modules/monaco-editor/esm/vs/base/common/glob.js"(){init_async();init_extpath();init_map();init_path();init_platform();init_strings();__awaiter19=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};GLOBSTAR="**";GLOB_SPLIT="/";PATH_REGEX="[/\\\\]";NO_PATH_REGEX="[^/\\\\]";ALL_FORWARD_SLASHES=/\//g;T1=/^\*\*\/\*\.[\w\.-]+$/;T2=/^\*\*\/([\w\.-]+)\/?$/;T3=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/;T3_2=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/;T4=/^\*\*((\/[\w\.-]+)+)\/?$/;T5=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/;CACHE=new LRUCache(1e4);FALSE=function(){return false};NULL=function(){return null}}});function score2(selector,candidateUri,candidateLanguage,candidateIsSynchronized,candidateNotebookUri,candidateNotebookType){if(Array.isArray(selector)){let ret=0;for(const filter of selector){const value=score2(filter,candidateUri,candidateLanguage,candidateIsSynchronized,candidateNotebookUri,candidateNotebookType);if(value===10){return value}if(value>ret){ret=value}}return ret}else if(typeof selector==="string"){if(!candidateIsSynchronized){return 0}if(selector==="*"){return 5}else if(selector===candidateLanguage){return 10}else{return 0}}else if(selector){const{language:language81,pattern:pattern,scheme:scheme,hasAccessToAllModels:hasAccessToAllModels,notebookType:notebookType}=selector;if(!candidateIsSynchronized&&!hasAccessToAllModels){return 0}if(notebookType&&candidateNotebookUri){candidateUri=candidateNotebookUri}let ret=0;if(scheme){if(scheme===candidateUri.scheme){ret=10}else if(scheme==="*"){ret=5}else{return 0}}if(language81){if(language81===candidateLanguage){ret=10}else if(language81==="*"){ret=Math.max(ret,5)}else{return 0}}if(notebookType){if(notebookType===candidateNotebookType){ret=10}else if(notebookType==="*"&&candidateNotebookType!==void 0){ret=Math.max(ret,5)}else{return 0}}if(pattern){let normalizedPattern;if(typeof pattern==="string"){normalizedPattern=pattern}else{normalizedPattern=Object.assign(Object.assign({},pattern),{base:normalize(pattern.base)})}if(normalizedPattern===candidateUri.fsPath||match(normalizedPattern,candidateUri.fsPath)){ret=10}else{return 0}}return ret}else{return 0}}var init_languageSelector=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languageSelector.js"(){init_glob();init_path()}});function isExclusive(selector){if(typeof selector==="string"){return false}else if(Array.isArray(selector)){return selector.every(isExclusive)}else{return!!selector.exclusive}}function isBuiltinSelector(selector){if(typeof selector==="string"){return false}if(Array.isArray(selector)){return selector.some(isBuiltinSelector)}return Boolean(selector.isBuiltin)}var MatchCandidate,LanguageFeatureRegistry;var init_languageFeatureRegistry=__esm({"node_modules/monaco-editor/esm/vs/editor/common/languageFeatureRegistry.js"(){init_event();init_lifecycle();init_model();init_languageSelector();MatchCandidate=class{constructor(uri,languageId,notebookUri,notebookType){this.uri=uri;this.languageId=languageId;this.notebookUri=notebookUri;this.notebookType=notebookType}equals(other){var _a6,_b3;return this.notebookType===other.notebookType&&this.languageId===other.languageId&&this.uri.toString()===other.uri.toString()&&((_a6=this.notebookUri)===null||_a6===void 0?void 0:_a6.toString())===((_b3=other.notebookUri)===null||_b3===void 0?void 0:_b3.toString())}};LanguageFeatureRegistry=class{constructor(_notebookInfoResolver){this._notebookInfoResolver=_notebookInfoResolver;this._clock=0;this._entries=[];this._onDidChange=new Emitter;this.onDidChange=this._onDidChange.event}register(selector,provider){let entry={selector:selector,provider:provider,_score:-1,_time:this._clock++};this._entries.push(entry);this._lastCandidate=void 0;this._onDidChange.fire(this._entries.length);return toDisposable((()=>{if(entry){const idx=this._entries.indexOf(entry);if(idx>=0){this._entries.splice(idx,1);this._lastCandidate=void 0;this._onDidChange.fire(this._entries.length);entry=void 0}}}))}has(model){return this.all(model).length>0}all(model){if(!model){return[]}this._updateScores(model);const result=[];for(const entry of this._entries){if(entry._score>0){result.push(entry.provider)}}return result}ordered(model){const result=[];this._orderedForEach(model,(entry=>result.push(entry.provider)));return result}orderedGroups(model){const result=[];let lastBucket;let lastBucketScore;this._orderedForEach(model,(entry=>{if(lastBucket&&lastBucketScore===entry._score){lastBucket.push(entry.provider)}else{lastBucketScore=entry._score;lastBucket=[entry.provider];result.push(lastBucket)}}));return result}_orderedForEach(model,callback){this._updateScores(model);for(const entry of this._entries){if(entry._score>0){callback(entry)}}}_updateScores(model){var _a6,_b3;const notebookInfo=(_a6=this._notebookInfoResolver)===null||_a6===void 0?void 0:_a6.call(this,model.uri);const candidate=notebookInfo?new MatchCandidate(model.uri,model.getLanguageId(),notebookInfo.uri,notebookInfo.type):new MatchCandidate(model.uri,model.getLanguageId(),void 0,void 0);if((_b3=this._lastCandidate)===null||_b3===void 0?void 0:_b3.equals(candidate)){return}this._lastCandidate=candidate;for(const entry of this._entries){entry._score=score2(entry.selector,candidate.uri,candidate.languageId,shouldSynchronizeModel(model),candidate.notebookUri,candidate.notebookType);if(isExclusive(entry.selector)&&entry._score>0){for(const entry2 of this._entries){entry2._score=0}entry._score=1e3;break}}this._entries.sort(LanguageFeatureRegistry._compareByScoreAndTime)}static _compareByScoreAndTime(a,b){if(a._scoreb._score){return-1}if(isBuiltinSelector(a.selector)&&!isBuiltinSelector(b.selector)){return 1}else if(!isBuiltinSelector(a.selector)&&isBuiltinSelector(b.selector)){return-1}if(a._timeb._time){return-1}else{return 0}}}}});var LanguageFeaturesService;var init_languageFeaturesService=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/languageFeaturesService.js"(){init_languageFeatureRegistry();init_languageFeatures();init_extensions();LanguageFeaturesService=class{constructor(){this.referenceProvider=new LanguageFeatureRegistry(this._score.bind(this));this.renameProvider=new LanguageFeatureRegistry(this._score.bind(this));this.codeActionProvider=new LanguageFeatureRegistry(this._score.bind(this));this.definitionProvider=new LanguageFeatureRegistry(this._score.bind(this));this.typeDefinitionProvider=new LanguageFeatureRegistry(this._score.bind(this));this.declarationProvider=new LanguageFeatureRegistry(this._score.bind(this));this.implementationProvider=new LanguageFeatureRegistry(this._score.bind(this));this.documentSymbolProvider=new LanguageFeatureRegistry(this._score.bind(this));this.inlayHintsProvider=new LanguageFeatureRegistry(this._score.bind(this));this.colorProvider=new LanguageFeatureRegistry(this._score.bind(this));this.codeLensProvider=new LanguageFeatureRegistry(this._score.bind(this));this.documentFormattingEditProvider=new LanguageFeatureRegistry(this._score.bind(this));this.documentRangeFormattingEditProvider=new LanguageFeatureRegistry(this._score.bind(this));this.onTypeFormattingEditProvider=new LanguageFeatureRegistry(this._score.bind(this));this.signatureHelpProvider=new LanguageFeatureRegistry(this._score.bind(this));this.hoverProvider=new LanguageFeatureRegistry(this._score.bind(this));this.documentHighlightProvider=new LanguageFeatureRegistry(this._score.bind(this));this.selectionRangeProvider=new LanguageFeatureRegistry(this._score.bind(this));this.foldingRangeProvider=new LanguageFeatureRegistry(this._score.bind(this));this.linkProvider=new LanguageFeatureRegistry(this._score.bind(this));this.inlineCompletionsProvider=new LanguageFeatureRegistry(this._score.bind(this));this.completionProvider=new LanguageFeatureRegistry(this._score.bind(this));this.linkedEditingRangeProvider=new LanguageFeatureRegistry(this._score.bind(this));this.documentRangeSemanticTokensProvider=new LanguageFeatureRegistry(this._score.bind(this));this.documentSemanticTokensProvider=new LanguageFeatureRegistry(this._score.bind(this));this.documentOnDropEditProvider=new LanguageFeatureRegistry(this._score.bind(this));this.documentPasteEditProvider=new LanguageFeatureRegistry(this._score.bind(this))}_score(uri){var _a6;return(_a6=this._notebookTypeResolver)===null||_a6===void 0?void 0:_a6.call(this,uri)}};registerSingleton(ILanguageFeaturesService,LanguageFeaturesService,1)}});var IBulkEditService,ResourceEdit,ResourceTextEdit,ResourceFileEdit;var init_bulkEditService=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js"(){init_instantiation();init_uri();init_types();IBulkEditService=createDecorator("IWorkspaceEditService");ResourceEdit=class{constructor(metadata){this.metadata=metadata}static convert(edit){return edit.edits.map((edit2=>{if(ResourceTextEdit.is(edit2)){return ResourceTextEdit.lift(edit2)}if(ResourceFileEdit.is(edit2)){return ResourceFileEdit.lift(edit2)}throw new Error("Unsupported edit")}))}};ResourceTextEdit=class extends ResourceEdit{static is(candidate){if(candidate instanceof ResourceTextEdit){return true}return isObject(candidate)&&URI.isUri(candidate.resource)&&isObject(candidate.textEdit)}static lift(edit){if(edit instanceof ResourceTextEdit){return edit}else{return new ResourceTextEdit(edit.resource,edit.textEdit,edit.versionId,edit.metadata)}}constructor(resource,textEdit,versionId=void 0,metadata){super(metadata);this.resource=resource;this.textEdit=textEdit;this.versionId=versionId}};ResourceFileEdit=class extends ResourceEdit{static is(candidate){if(candidate instanceof ResourceFileEdit){return true}else{return isObject(candidate)&&(Boolean(candidate.newResource)||Boolean(candidate.oldResource))}}static lift(edit){if(edit instanceof ResourceFileEdit){return edit}else{return new ResourceFileEdit(edit.oldResource,edit.newResource,edit.options,edit.metadata)}}constructor(oldResource,newResource,options2={},metadata){super(metadata);this.oldResource=oldResource;this.newResource=newResource;this.options=options2}}}});var diffEditorDefaultOptions;var init_diffEditor=__esm({"node_modules/monaco-editor/esm/vs/editor/common/config/diffEditor.js"(){diffEditorDefaultOptions={enableSplitViewResizing:true,splitViewDefaultRatio:.5,renderSideBySide:true,renderMarginRevertIcon:true,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:true,renderIndicators:true,originalEditable:false,diffCodeLens:false,renderOverviewRuler:true,diffWordWrap:"inherit",diffAlgorithm:"advanced",accessibilityVerbose:false,experimental:{showMoves:false,showEmptyDecorations:true},hideUnchangedRegions:{enabled:false,contextLineCount:3,minimumLineCount:3,revealLineCount:20},isInEmbeddedEditor:false,onlyShowAccessibleDiffViewer:false,renderSideBySideInlineBreakpoint:900,useInlineViewWhenSpaceIsLimited:true}}});function isConfigurationPropertySchema(x){return typeof x.type!=="undefined"||typeof x.anyOf!=="undefined"}function getEditorConfigurationKeys(){if(cachedEditorConfigurationKeys===null){cachedEditorConfigurationKeys=Object.create(null);Object.keys(editorConfiguration.properties).forEach((prop=>{cachedEditorConfigurationKeys[prop]=true}))}return cachedEditorConfigurationKeys}function isEditorConfigurationKey(key){const editorConfigurationKeys=getEditorConfigurationKeys();return editorConfigurationKeys[`editor.${key}`]||false}function isDiffEditorConfigurationKey(key){const editorConfigurationKeys=getEditorConfigurationKeys();return editorConfigurationKeys[`diffEditor.${key}`]||false}var editorConfigurationBaseNode,editorConfiguration,cachedEditorConfigurationKeys,configurationRegistry2;var init_editorConfigurationSchema=__esm({"node_modules/monaco-editor/esm/vs/editor/common/config/editorConfigurationSchema.js"(){init_diffEditor();init_editorOptions();init_textModelDefaults();init_nls();init_configurationRegistry();init_platform2();editorConfigurationBaseNode=Object.freeze({id:"editor",order:5,type:"object",title:localize("editorConfigurationTitle","Editor"),scope:5});editorConfiguration=Object.assign(Object.assign({},editorConfigurationBaseNode),{properties:{"editor.tabSize":{type:"number",default:EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:localize("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription: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.')},"editor.insertSpaces":{type:"boolean",default:EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:localize("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:localize("detectIndentation","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:localize("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:localize("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:true,description:localize("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[localize("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),localize("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),localize("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:localize("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[true,false,"configuredByTheme"],enumDescriptions:[localize("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),localize("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),localize("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:localize("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:false,markdownDescription:localize("stablePeek","Keep peek editors open even when double-clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:localize("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.experimental.asyncTokenization":{type:"boolean",default:false,description:localize("editor.experimental.asyncTokenization","Controls whether the tokenization should happen asynchronously on a web worker."),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:false,description:localize("editor.experimental.asyncTokenizationLogging","Controls whether async tokenization should be logged. For debugging only.")},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:false,description:localize("editor.experimental.asyncTokenizationVerification","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only."),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:localize("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:localize("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:localize("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:localize("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:localize("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:localize("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:diffEditorDefaultOptions.maxComputationTime,description:localize("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:diffEditorDefaultOptions.maxFileSize,description:localize("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:diffEditorDefaultOptions.renderSideBySide,description:localize("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:diffEditorDefaultOptions.renderSideBySideInlineBreakpoint,description:localize("renderSideBySideInlineBreakpoint","If the diff editor width is smaller than this value, the inline view is used.")},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:diffEditorDefaultOptions.useInlineViewWhenSpaceIsLimited,description:localize("useInlineViewWhenSpaceIsLimited","If enabled and the editor width is too small, the inline view is used.")},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:diffEditorDefaultOptions.renderMarginRevertIcon,description:localize("renderMarginRevertIcon","When enabled, the diff editor shows arrows in its glyph margin to revert changes.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:diffEditorDefaultOptions.ignoreTrimWhitespace,description:localize("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:diffEditorDefaultOptions.renderIndicators,description:localize("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:diffEditorDefaultOptions.diffCodeLens,description:localize("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:diffEditorDefaultOptions.diffWordWrap,markdownEnumDescriptions:[localize("wordWrap.off","Lines will never wrap."),localize("wordWrap.on","Lines will wrap at the viewport width."),localize("wordWrap.inherit","Lines will wrap according to the {0} setting.","`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:diffEditorDefaultOptions.diffAlgorithm,markdownEnumDescriptions:[localize("diffAlgorithm.legacy","Uses the legacy diffing algorithm."),localize("diffAlgorithm.advanced","Uses the advanced diffing algorithm.")],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:diffEditorDefaultOptions.hideUnchangedRegions.enabled,markdownDescription:localize("hideUnchangedRegions.enabled","Controls whether the diff editor shows unchanged regions. Only works when {0} is set.","`#diffEditor.experimental.useVersion2#`")},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:diffEditorDefaultOptions.hideUnchangedRegions.revealLineCount,markdownDescription:localize("hideUnchangedRegions.revealLineCount","Controls how many lines are used for unchanged regions. Only works when {0} is set.","`#diffEditor.experimental.useVersion2#`"),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:diffEditorDefaultOptions.hideUnchangedRegions.minimumLineCount,markdownDescription:localize("hideUnchangedRegions.minimumLineCount","Controls how many lines are used as a minimum for unchanged regions. Only works when {0} is set.","`#diffEditor.experimental.useVersion2#`"),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:diffEditorDefaultOptions.hideUnchangedRegions.contextLineCount,markdownDescription:localize("hideUnchangedRegions.contextLineCount","Controls how many lines are used as context when comparing unchanged regions. Only works when {0} is set.","`#diffEditor.experimental.useVersion2#`"),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:diffEditorDefaultOptions.experimental.showMoves,markdownDescription:localize("showMoves","Controls whether the diff editor should show detected code moves. Only works when {0} is set.","`#diffEditor.experimental.useVersion2#`")},"diffEditor.experimental.useVersion2":{type:"boolean",default:true,description:localize("useVersion2","Controls whether the diff editor uses the new or the old implementation."),tags:["experimental"]},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:diffEditorDefaultOptions.experimental.showEmptyDecorations,description:localize("showEmptyDecorations","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted.")}}});for(const editorOption of editorOptionsRegistry){const schema=editorOption.schema;if(typeof schema!=="undefined"){if(isConfigurationPropertySchema(schema)){editorConfiguration.properties[`editor.${editorOption.name}`]=schema}else{for(const key in schema){if(Object.hasOwnProperty.call(schema,key)){editorConfiguration.properties[key]=schema[key]}}}}}cachedEditorConfigurationKeys=null;configurationRegistry2=Registry.as(Extensions2.Configuration);configurationRegistry2.registerConfiguration(editorConfiguration)}});var EditOperation;var init_editOperation=__esm({"node_modules/monaco-editor/esm/vs/editor/common/core/editOperation.js"(){init_range();EditOperation=class{static insert(position,text2){return{range:new Range(position.lineNumber,position.column,position.lineNumber,position.column),text:text2,forceMoveMarkers:true}}static delete(range2){return{range:range2,text:null}}static replace(range2,text2){return{range:range2,text:text2}}static replaceMove(range2,text2){return{range:range2,text:text2,forceMoveMarkers:true}}}}});function freeze2(data){return Object.isFrozen(data)?data:deepFreeze(data)}var ConfigurationModel,ConfigurationModelParser,ConfigurationInspectValue,Configuration,ConfigurationChangeEvent;var init_configurationModels=__esm({"node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationModels.js"(){init_arrays();init_map();init_objects();init_types();init_uri();init_configuration();init_configurationRegistry();init_platform2();ConfigurationModel=class{constructor(_contents={},_keys=[],_overrides=[],raw){this._contents=_contents;this._keys=_keys;this._overrides=_overrides;this.raw=raw;this.overrideConfigurations=new Map}get rawConfiguration(){var _a6;if(!this._rawConfiguration){if((_a6=this.raw)===null||_a6===void 0?void 0:_a6.length){const rawConfigurationModels=this.raw.map((raw=>{if(raw instanceof ConfigurationModel){return raw}const parser2=new ConfigurationModelParser("");parser2.parseRaw(raw);return parser2.configurationModel}));this._rawConfiguration=rawConfigurationModels.reduce(((previous,current)=>current===previous?current:previous.merge(current)),rawConfigurationModels[0])}else{this._rawConfiguration=this}}return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(section){return section?getConfigurationValue(this.contents,section):this.contents}inspect(section,overrideIdentifier){const value=this.rawConfiguration.getValue(section);const override=overrideIdentifier?this.rawConfiguration.getOverrideValue(section,overrideIdentifier):void 0;const merged=overrideIdentifier?this.rawConfiguration.override(overrideIdentifier).getValue(section):value;return{value:value,override:override,merged:merged}}getOverrideValue(section,overrideIdentifier){const overrideContents=this.getContentsForOverrideIdentifer(overrideIdentifier);return overrideContents?section?getConfigurationValue(overrideContents,section):overrideContents:void 0}override(identifier2){let overrideConfigurationModel=this.overrideConfigurations.get(identifier2);if(!overrideConfigurationModel){overrideConfigurationModel=this.createOverrideConfigurationModel(identifier2);this.overrideConfigurations.set(identifier2,overrideConfigurationModel)}return overrideConfigurationModel}merge(...others){var _a6,_b3;const contents=deepClone(this.contents);const overrides=deepClone(this.overrides);const keys=[...this.keys];const raws=((_a6=this.raw)===null||_a6===void 0?void 0:_a6.length)?[...this.raw]:[this];for(const other of others){raws.push(...((_b3=other.raw)===null||_b3===void 0?void 0:_b3.length)?other.raw:[other]);if(other.isEmpty()){continue}this.mergeContents(contents,other.contents);for(const otherOverride of other.overrides){const[override]=overrides.filter((o=>equals(o.identifiers,otherOverride.identifiers)));if(override){this.mergeContents(override.contents,otherOverride.contents);override.keys.push(...otherOverride.keys);override.keys=distinct(override.keys)}else{overrides.push(deepClone(otherOverride))}}for(const key of other.keys){if(keys.indexOf(key)===-1){keys.push(key)}}}return new ConfigurationModel(contents,keys,overrides,raws.every((raw=>raw instanceof ConfigurationModel))?void 0:raws)}createOverrideConfigurationModel(identifier2){const overrideContents=this.getContentsForOverrideIdentifer(identifier2);if(!overrideContents||typeof overrideContents!=="object"||!Object.keys(overrideContents).length){return this}const contents={};for(const key of distinct([...Object.keys(this.contents),...Object.keys(overrideContents)])){let contentsForKey=this.contents[key];const overrideContentsForKey=overrideContents[key];if(overrideContentsForKey){if(typeof contentsForKey==="object"&&typeof overrideContentsForKey==="object"){contentsForKey=deepClone(contentsForKey);this.mergeContents(contentsForKey,overrideContentsForKey)}else{contentsForKey=overrideContentsForKey}}contents[key]=contentsForKey}return new ConfigurationModel(contents,this.keys,this.overrides)}mergeContents(source,target){for(const key of Object.keys(target)){if(key in source){if(isObject(source[key])&&isObject(target[key])){this.mergeContents(source[key],target[key]);continue}}source[key]=deepClone(target[key])}}getContentsForOverrideIdentifer(identifier2){let contentsForIdentifierOnly=null;let contents=null;const mergeContents=contentsToMerge=>{if(contentsToMerge){if(contents){this.mergeContents(contents,contentsToMerge)}else{contents=deepClone(contentsToMerge)}}};for(const override of this.overrides){if(override.identifiers.length===1&&override.identifiers[0]===identifier2){contentsForIdentifierOnly=override.contents}else if(override.identifiers.includes(identifier2)){mergeContents(override.contents)}}mergeContents(contentsForIdentifierOnly);return contents}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(key,value){this.updateValue(key,value,true)}setValue(key,value){this.updateValue(key,value,false)}removeValue(key){const index=this.keys.indexOf(key);if(index===-1){return}this.keys.splice(index,1);removeFromValueTree(this.contents,key);if(OVERRIDE_PROPERTY_REGEX.test(key)){this.overrides.splice(this.overrides.findIndex((o=>equals(o.identifiers,overrideIdentifiersFromKey(key)))),1)}}updateValue(key,value,add){addToValueTree(this.contents,key,value,(e=>console.error(e)));add=add||this.keys.indexOf(key)===-1;if(add){this.keys.push(key)}if(OVERRIDE_PROPERTY_REGEX.test(key)){this.overrides.push({identifiers:overrideIdentifiersFromKey(key),keys:Object.keys(this.contents[key]),contents:toValuesTree(this.contents[key],(message=>console.error(message)))})}}};ConfigurationModelParser=class{constructor(_name){this._name=_name;this._raw=null;this._configurationModel=null;this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new ConfigurationModel}parseRaw(raw,options2){this._raw=raw;const{contents:contents,keys:keys,overrides:overrides,restricted:restricted,hasExcludedProperties:hasExcludedProperties}=this.doParseRaw(raw,options2);this._configurationModel=new ConfigurationModel(contents,keys,overrides,hasExcludedProperties?[raw]:void 0);this._restrictedConfigurations=restricted||[]}doParseRaw(raw,options2){const configurationProperties=Registry.as(Extensions2.Configuration).getConfigurationProperties();const filtered=this.filter(raw,configurationProperties,true,options2);raw=filtered.raw;const contents=toValuesTree(raw,(message=>console.error(`Conflict in settings file ${this._name}: ${message}`)));const keys=Object.keys(raw);const overrides=this.toOverrides(raw,(message=>console.error(`Conflict in settings file ${this._name}: ${message}`)));return{contents:contents,keys:keys,overrides:overrides,restricted:filtered.restricted,hasExcludedProperties:filtered.hasExcludedProperties}}filter(properties,configurationProperties,filterOverriddenProperties,options2){var _a6,_b3,_c2;let hasExcludedProperties=false;if(!(options2===null||options2===void 0?void 0:options2.scopes)&&!(options2===null||options2===void 0?void 0:options2.skipRestricted)&&!((_a6=options2===null||options2===void 0?void 0:options2.exclude)===null||_a6===void 0?void 0:_a6.length)){return{raw:properties,restricted:[],hasExcludedProperties:hasExcludedProperties}}const raw={};const restricted=[];for(const key in properties){if(OVERRIDE_PROPERTY_REGEX.test(key)&&filterOverriddenProperties){const result=this.filter(properties[key],configurationProperties,false,options2);raw[key]=result.raw;hasExcludedProperties=hasExcludedProperties||result.hasExcludedProperties;restricted.push(...result.restricted)}else{const propertySchema=configurationProperties[key];const scope=propertySchema?typeof propertySchema.scope!=="undefined"?propertySchema.scope:3:void 0;if(propertySchema===null||propertySchema===void 0?void 0:propertySchema.restricted){restricted.push(key)}if(!((_b3=options2.exclude)===null||_b3===void 0?void 0:_b3.includes(key))&&(((_c2=options2.include)===null||_c2===void 0?void 0:_c2.includes(key))||(scope===void 0||options2.scopes===void 0||options2.scopes.includes(scope))&&!(options2.skipRestricted&&(propertySchema===null||propertySchema===void 0?void 0:propertySchema.restricted)))){raw[key]=properties[key]}else{hasExcludedProperties=true}}}return{raw:raw,restricted:restricted,hasExcludedProperties:hasExcludedProperties}}toOverrides(raw,conflictReporter){const overrides=[];for(const key of Object.keys(raw)){if(OVERRIDE_PROPERTY_REGEX.test(key)){const overrideRaw={};for(const keyInOverrideRaw in raw[key]){overrideRaw[keyInOverrideRaw]=raw[key][keyInOverrideRaw]}overrides.push({identifiers:overrideIdentifiersFromKey(key),keys:Object.keys(overrideRaw),contents:toValuesTree(overrideRaw,conflictReporter)})}}return overrides}};ConfigurationInspectValue=class{constructor(key,overrides,_value,overrideIdentifiers,defaultConfiguration,policyConfiguration,applicationConfiguration,userConfiguration,localUserConfiguration,remoteUserConfiguration,workspaceConfiguration,folderConfigurationModel,memoryConfigurationModel){this.key=key;this.overrides=overrides;this._value=_value;this.overrideIdentifiers=overrideIdentifiers;this.defaultConfiguration=defaultConfiguration;this.policyConfiguration=policyConfiguration;this.applicationConfiguration=applicationConfiguration;this.userConfiguration=userConfiguration;this.localUserConfiguration=localUserConfiguration;this.remoteUserConfiguration=remoteUserConfiguration;this.workspaceConfiguration=workspaceConfiguration;this.folderConfigurationModel=folderConfigurationModel;this.memoryConfigurationModel=memoryConfigurationModel}inspect(model,section,overrideIdentifier){const inspectValue=model.inspect(section,overrideIdentifier);return{get value(){return freeze2(inspectValue.value)},get override(){return freeze2(inspectValue.override)},get merged(){return freeze2(inspectValue.merged)}}}get userInspectValue(){if(!this._userInspectValue){this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)}return this._userInspectValue}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}};Configuration=class{constructor(_defaultConfiguration,_policyConfiguration,_applicationConfiguration,_localUserConfiguration,_remoteUserConfiguration=new ConfigurationModel,_workspaceConfiguration=new ConfigurationModel,_folderConfigurations=new ResourceMap,_memoryConfiguration=new ConfigurationModel,_memoryConfigurationByResource=new ResourceMap){this._defaultConfiguration=_defaultConfiguration;this._policyConfiguration=_policyConfiguration;this._applicationConfiguration=_applicationConfiguration;this._localUserConfiguration=_localUserConfiguration;this._remoteUserConfiguration=_remoteUserConfiguration;this._workspaceConfiguration=_workspaceConfiguration;this._folderConfigurations=_folderConfigurations;this._memoryConfiguration=_memoryConfiguration;this._memoryConfigurationByResource=_memoryConfigurationByResource;this._workspaceConsolidatedConfiguration=null;this._foldersConsolidatedConfigurations=new ResourceMap;this._userConfiguration=null}getValue(section,overrides,workspace){const consolidateConfigurationModel=this.getConsolidatedConfigurationModel(section,overrides,workspace);return consolidateConfigurationModel.getValue(section)}updateValue(key,value,overrides={}){let memoryConfiguration;if(overrides.resource){memoryConfiguration=this._memoryConfigurationByResource.get(overrides.resource);if(!memoryConfiguration){memoryConfiguration=new ConfigurationModel;this._memoryConfigurationByResource.set(overrides.resource,memoryConfiguration)}}else{memoryConfiguration=this._memoryConfiguration}if(value===void 0){memoryConfiguration.removeValue(key)}else{memoryConfiguration.setValue(key,value)}if(!overrides.resource){this._workspaceConsolidatedConfiguration=null}}inspect(key,overrides,workspace){const consolidateConfigurationModel=this.getConsolidatedConfigurationModel(key,overrides,workspace);const folderConfigurationModel=this.getFolderConfigurationModelForResource(overrides.resource,workspace);const memoryConfigurationModel=overrides.resource?this._memoryConfigurationByResource.get(overrides.resource)||this._memoryConfiguration:this._memoryConfiguration;const overrideIdentifiers=new Set;for(const override of consolidateConfigurationModel.overrides){for(const overrideIdentifier of override.identifiers){if(consolidateConfigurationModel.getOverrideValue(key,overrideIdentifier)!==void 0){overrideIdentifiers.add(overrideIdentifier)}}}return new ConfigurationInspectValue(key,overrides,consolidateConfigurationModel.getValue(key),overrideIdentifiers.size?[...overrideIdentifiers]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,workspace?this._workspaceConfiguration:void 0,folderConfigurationModel?folderConfigurationModel:void 0,memoryConfigurationModel)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){if(!this._userConfiguration){this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)}return this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(section,overrides,workspace){let configurationModel=this.getConsolidatedConfigurationModelForResource(overrides,workspace);if(overrides.overrideIdentifier){configurationModel=configurationModel.override(overrides.overrideIdentifier)}if(!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(section)!==void 0){configurationModel=configurationModel.merge(this._policyConfiguration)}return configurationModel}getConsolidatedConfigurationModelForResource({resource:resource},workspace){let consolidateConfiguration=this.getWorkspaceConsolidatedConfiguration();if(workspace&&resource){const root=workspace.getFolder(resource);if(root){consolidateConfiguration=this.getFolderConsolidatedConfiguration(root.uri)||consolidateConfiguration}const memoryConfigurationForResource=this._memoryConfigurationByResource.get(resource);if(memoryConfigurationForResource){consolidateConfiguration=consolidateConfiguration.merge(memoryConfigurationForResource)}}return consolidateConfiguration}getWorkspaceConsolidatedConfiguration(){if(!this._workspaceConsolidatedConfiguration){this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)}return this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(folder){let folderConsolidatedConfiguration=this._foldersConsolidatedConfigurations.get(folder);if(!folderConsolidatedConfiguration){const workspaceConsolidateConfiguration=this.getWorkspaceConsolidatedConfiguration();const folderConfiguration=this._folderConfigurations.get(folder);if(folderConfiguration){folderConsolidatedConfiguration=workspaceConsolidateConfiguration.merge(folderConfiguration);this._foldersConsolidatedConfigurations.set(folder,folderConsolidatedConfiguration)}else{folderConsolidatedConfiguration=workspaceConsolidateConfiguration}}return folderConsolidatedConfiguration}getFolderConfigurationModelForResource(resource,workspace){if(workspace&&resource){const root=workspace.getFolder(resource);if(root){return this._folderConfigurations.get(root.uri)}}return void 0}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((result,folder)=>{const{contents:contents,overrides:overrides,keys:keys}=this._folderConfigurations.get(folder);result.push([folder,{contents:contents,overrides:overrides,keys:keys}]);return result}),[])}}static parse(data){const defaultConfiguration=this.parseConfigurationModel(data.defaults);const policyConfiguration=this.parseConfigurationModel(data.policy);const applicationConfiguration=this.parseConfigurationModel(data.application);const userConfiguration=this.parseConfigurationModel(data.user);const workspaceConfiguration=this.parseConfigurationModel(data.workspace);const folders=data.folders.reduce(((result,value)=>{result.set(URI.revive(value[0]),this.parseConfigurationModel(value[1]));return result}),new ResourceMap);return new Configuration(defaultConfiguration,policyConfiguration,applicationConfiguration,userConfiguration,new ConfigurationModel,workspaceConfiguration,folders,new ConfigurationModel,new ResourceMap)}static parseConfigurationModel(model){return new ConfigurationModel(model.contents,model.keys,model.overrides)}};ConfigurationChangeEvent=class{constructor(change,previous,currentConfiguraiton,currentWorkspace){this.change=change;this.previous=previous;this.currentConfiguraiton=currentConfiguraiton;this.currentWorkspace=currentWorkspace;this._marker="\n";this._markerCode1=this._marker.charCodeAt(0);this._markerCode2=".".charCodeAt(0);this.affectedKeys=new Set;this._previousConfiguration=void 0;for(const key of change.keys){this.affectedKeys.add(key)}for(const[,keys]of change.overrides){for(const key of keys){this.affectedKeys.add(key)}}this._affectsConfigStr=this._marker;for(const key of this.affectedKeys){this._affectsConfigStr+=key+this._marker}}get previousConfiguration(){if(!this._previousConfiguration&&this.previous){this._previousConfiguration=Configuration.parse(this.previous.data)}return this._previousConfiguration}affectsConfiguration(section,overrides){var _a6;const needle=this._marker+section;const idx=this._affectsConfigStr.indexOf(needle);if(idx<0){return false}const pos=idx+needle.length;if(pos>=this._affectsConfigStr.length){return false}const code=this._affectsConfigStr.charCodeAt(pos);if(code!==this._markerCode1&&code!==this._markerCode2){return false}if(overrides){const value1=this.previousConfiguration?this.previousConfiguration.getValue(section,overrides,(_a6=this.previous)===null||_a6===void 0?void 0:_a6.workspace):void 0;const value2=this.currentConfiguraiton.getValue(section,overrides,this.currentWorkspace);return!equals2(value1,value2)}return true}}}});function KbFound(commandId,commandArgs,isBubble){return{kind:2,commandId:commandId,commandArgs:commandArgs,isBubble:isBubble}}function printWhenExplanation(when){if(!when){return`no when condition`}return`${when.serialize()}`}function printSourceExplanation(kb){return kb.extensionId?kb.isBuiltinExtension?`built-in extension ${kb.extensionId}`:`user extension ${kb.extensionId}`:kb.isDefault?`built-in`:`user`}var NoMatchingKb,MoreChordsNeeded,KeybindingResolver;var init_keybindingResolver=__esm({"node_modules/monaco-editor/esm/vs/platform/keybinding/common/keybindingResolver.js"(){init_contextkey();NoMatchingKb={kind:0};MoreChordsNeeded={kind:1};KeybindingResolver=class{constructor(defaultKeybindings,overrides,log2){var _a6;this._log=log2;this._defaultKeybindings=defaultKeybindings;this._defaultBoundCommands=new Map;for(const defaultKeybinding of defaultKeybindings){const command=defaultKeybinding.command;if(command&&command.charAt(0)!=="-"){this._defaultBoundCommands.set(command,true)}}this._map=new Map;this._lookupMap=new Map;this._keybindings=KeybindingResolver.handleRemovals([].concat(defaultKeybindings).concat(overrides));for(let i=0,len=this._keybindings.length;i=0;i--){const conflict=conflicts[i];if(conflict.command===item.command){continue}let isShorterKbPrefix=true;for(let i2=1;i2=0;i--){const item=items[i];if(context.contextMatchesRules(item.when)){return item}}return items[items.length-1]}resolve(context,currentChords,keypress){const pressedChords=[...currentChords,keypress];this._log(`| Resolving ${pressedChords}`);const kbCandidates=this._map.get(pressedChords[0]);if(kbCandidates===void 0){this._log(`\\ No keybinding entries.`);return NoMatchingKb}let lookupMap=null;if(pressedChords.length<2){lookupMap=kbCandidates}else{lookupMap=[];for(let i=0,len=kbCandidates.length;icandidate.chords.length){continue}let prefixMatches=true;for(let i2=1;i2=0;i--){const k=matches[i];if(!KeybindingResolver._contextMatchesRules(context,k.when)){continue}return k}return null}static _contextMatchesRules(context,rules){if(!rules){return true}return rules.evaluate(context)}}}});var HIGH_FREQ_COMMANDS,AbstractKeybindingService,KeybindingModifierSet;var init_abstractKeybindingService=__esm({"node_modules/monaco-editor/esm/vs/platform/keybinding/common/abstractKeybindingService.js"(){init_async();init_errors();init_event();init_ime();init_lifecycle();init_nls();init_keybindingResolver();HIGH_FREQ_COMMANDS=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;AbstractKeybindingService=class extends Disposable{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:Event.None}get inChordMode(){return this._currentChords.length>0}constructor(_contextKeyService,_commandService,_telemetryService,_notificationService,_logService){super();this._contextKeyService=_contextKeyService;this._commandService=_commandService;this._telemetryService=_telemetryService;this._notificationService=_notificationService;this._logService=_logService;this._onDidUpdateKeybindings=this._register(new Emitter);this._currentChords=[];this._currentChordChecker=new IntervalTimer;this._currentChordStatusMessage=null;this._ignoreSingleModifiers=KeybindingModifierSet.EMPTY;this._currentSingleModifier=null;this._currentSingleModifierClearTimeout=new TimeoutTimer;this._logging=false}dispose(){super.dispose()}_log(str){if(this._logging){this._logService.info(`[KeybindingService]: ${str}`)}}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(commandId,context){const result=this._getResolver().lookupPrimaryKeybinding(commandId,context||this._contextKeyService);if(!result){return void 0}return result.resolvedKeybinding}dispatchEvent(e,target){return this._dispatch(e,target)}softDispatch(e,target){this._log(`/ Soft dispatching keyboard event`);const keybinding=this.resolveKeyboardEvent(e);if(keybinding.hasMultipleChords()){console.warn("keyboard event should not be mapped to multiple chords");return NoMatchingKb}const[firstChord]=keybinding.getDispatchChords();if(firstChord===null){this._log(`\\ Keyboard event cannot be dispatched`);return NoMatchingKb}const contextValue=this._contextKeyService.getContext(target);const currentChords=this._currentChords.map((({keypress:keypress})=>keypress));return this._getResolver().resolve(contextValue,currentChords,firstChord)}_scheduleLeaveChordMode(){const chordLastInteractedTime=Date.now();this._currentChordChecker.cancelAndSet((()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}if(Date.now()-chordLastInteractedTime>5e3){this._leaveChordMode()}}),500)}_expectAnotherChord(firstChord,keypressLabel){this._currentChords.push({keypress:firstChord,label:keypressLabel});switch(this._currentChords.length){case 0:throw illegalState("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(localize("first.chord","({0}) was pressed. Waiting for second key of chord...",keypressLabel));break;default:{const fullKeypressLabel=this._currentChords.map((({label:label})=>label)).join(", ");this._currentChordStatusMessage=this._notificationService.status(localize("next.chord","({0}) was pressed. Waiting for next key of chord...",fullKeypressLabel))}}this._scheduleLeaveChordMode();if(IME.enabled){IME.disable()}}_leaveChordMode(){if(this._currentChordStatusMessage){this._currentChordStatusMessage.dispose();this._currentChordStatusMessage=null}this._currentChordChecker.cancel();this._currentChords=[];IME.enable()}_dispatch(e,target){return this._doDispatch(this.resolveKeyboardEvent(e),target,false)}_singleModifierDispatch(e,target){const keybinding=this.resolveKeyboardEvent(e);const[singleModifier]=keybinding.getSingleModifierDispatchChords();if(singleModifier){if(this._ignoreSingleModifiers.has(singleModifier)){this._log(`+ Ignoring single modifier ${singleModifier} due to it being pressed together with other keys.`);this._ignoreSingleModifiers=KeybindingModifierSet.EMPTY;this._currentSingleModifierClearTimeout.cancel();this._currentSingleModifier=null;return false}this._ignoreSingleModifiers=KeybindingModifierSet.EMPTY;if(this._currentSingleModifier===null){this._log(`+ Storing single modifier for possible chord ${singleModifier}.`);this._currentSingleModifier=singleModifier;this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log(`+ Clearing single modifier due to 300ms elapsed.`);this._currentSingleModifier=null}),300);return false}if(singleModifier===this._currentSingleModifier){this._log(`/ Dispatching single modifier chord ${singleModifier} ${singleModifier}`);this._currentSingleModifierClearTimeout.cancel();this._currentSingleModifier=null;return this._doDispatch(keybinding,target,true)}this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${singleModifier}`);this._currentSingleModifierClearTimeout.cancel();this._currentSingleModifier=null;return false}const[firstChord]=keybinding.getChords();this._ignoreSingleModifiers=new KeybindingModifierSet(firstChord);if(this._currentSingleModifier!==null){this._log(`+ Clearing single modifier due to other key up.`)}this._currentSingleModifierClearTimeout.cancel();this._currentSingleModifier=null;return false}_doDispatch(userKeypress,target,isSingleModiferChord=false){var _a6;let shouldPreventDefault=false;if(userKeypress.hasMultipleChords()){console.warn("Unexpected keyboard event mapped to multiple chords");return false}let userPressedChord=null;let currentChords=null;if(isSingleModiferChord){const[dispatchKeyname]=userKeypress.getSingleModifierDispatchChords();userPressedChord=dispatchKeyname;currentChords=dispatchKeyname?[dispatchKeyname]:[]}else{[userPressedChord]=userKeypress.getDispatchChords();currentChords=this._currentChords.map((({keypress:keypress})=>keypress))}if(userPressedChord===null){this._log(`\\ Keyboard event cannot be dispatched in keydown phase.`);return shouldPreventDefault}const contextValue=this._contextKeyService.getContext(target);const keypressLabel=userKeypress.getLabel();const resolveResult=this._getResolver().resolve(contextValue,currentChords,userPressedChord);switch(resolveResult.kind){case 0:{this._logService.trace("KeybindingService#dispatch",keypressLabel,`[ No matching keybinding ]`);if(this.inChordMode){const currentChordsLabel=this._currentChords.map((({label:label})=>label)).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${currentChordsLabel}, ${keypressLabel}".`);this._notificationService.status(localize("missing.chord","The key combination ({0}, {1}) is not a command.",currentChordsLabel,keypressLabel),{hideAfter:10*1e3});this._leaveChordMode();shouldPreventDefault=true}return shouldPreventDefault}case 1:{this._logService.trace("KeybindingService#dispatch",keypressLabel,`[ Several keybindings match - more chords needed ]`);shouldPreventDefault=true;this._expectAnotherChord(userPressedChord,keypressLabel);this._log(this._currentChords.length===1?`+ Entering multi-chord mode...`:`+ Continuing multi-chord mode...`);return shouldPreventDefault}case 2:{this._logService.trace("KeybindingService#dispatch",keypressLabel,`[ Will dispatch command ${resolveResult.commandId} ]`);if(resolveResult.commandId===null||resolveResult.commandId===""){if(this.inChordMode){const currentChordsLabel=this._currentChords.map((({label:label})=>label)).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${currentChordsLabel}, ${keypressLabel}".`);this._notificationService.status(localize("missing.chord","The key combination ({0}, {1}) is not a command.",currentChordsLabel,keypressLabel),{hideAfter:10*1e3});this._leaveChordMode();shouldPreventDefault=true}}else{if(this.inChordMode){this._leaveChordMode()}if(!resolveResult.isBubble){shouldPreventDefault=true}this._log(`+ Invoking command ${resolveResult.commandId}.`);if(typeof resolveResult.commandArgs==="undefined"){this._commandService.executeCommand(resolveResult.commandId).then(void 0,(err=>this._notificationService.warn(err)))}else{this._commandService.executeCommand(resolveResult.commandId,resolveResult.commandArgs).then(void 0,(err=>this._notificationService.warn(err)))}if(!HIGH_FREQ_COMMANDS.test(resolveResult.commandId)){this._telemetryService.publicLog2("workbenchActionExecuted",{id:resolveResult.commandId,from:"keybinding",detail:(_a6=userKeypress.getUserSettingsLabel())!==null&&_a6!==void 0?_a6:void 0})}}return shouldPreventDefault}}}mightProducePrintableCharacter(event){if(event.ctrlKey||event.metaKey){return false}if(event.keyCode>=31&&event.keyCode<=56||event.keyCode>=21&&event.keyCode<=30){return true}return false}};KeybindingModifierSet=class{constructor(source){this._ctrlKey=source?source.ctrlKey:false;this._shiftKey=source?source.shiftKey:false;this._altKey=source?source.altKey:false;this._metaKey=source?source.metaKey:false}has(modifier){switch(modifier){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}};KeybindingModifierSet.EMPTY=new KeybindingModifierSet(null)}});function toEmptyArrayIfContainsNull(arr){const result=[];for(let i=0,len=arr.length;ithis._getLabel(keybinding)))}getAriaLabel(){return AriaLabelProvider.toLabel(this._os,this._chords,(keybinding=>this._getAriaLabel(keybinding)))}getElectronAccelerator(){if(this._chords.length>1){return null}if(this._chords[0].isDuplicateModifierCase()){return null}return ElectronAcceleratorLabelProvider.toLabel(this._os,this._chords,(keybinding=>this._getElectronAccelerator(keybinding)))}getUserSettingsLabel(){return UserSettingsLabelProvider.toLabel(this._os,this._chords,(keybinding=>this._getUserSettingsLabel(keybinding)))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map((keybinding=>this._getChord(keybinding)))}_getChord(keybinding){return new ResolvedChord(keybinding.ctrlKey,keybinding.shiftKey,keybinding.altKey,keybinding.metaKey,this._getLabel(keybinding),this._getAriaLabel(keybinding))}getDispatchChords(){return this._chords.map((keybinding=>this._getChordDispatch(keybinding)))}getSingleModifierDispatchChords(){return this._chords.map((keybinding=>this._getSingleModifierChordDispatch(keybinding)))}}}});var USLayoutResolvedKeybinding;var init_usLayoutResolvedKeybinding=__esm({"node_modules/monaco-editor/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js"(){init_keyCodes();init_keybindings();init_baseResolvedKeybinding();init_resolvedKeybindingItem();USLayoutResolvedKeybinding=class extends BaseResolvedKeybinding{constructor(chords,os){super(os,chords)}_keyCodeToUILabel(keyCode){if(this._os===2){switch(keyCode){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}}return KeyCodeUtils.toString(keyCode)}_getLabel(chord){if(chord.isDuplicateModifierCase()){return""}return this._keyCodeToUILabel(chord.keyCode)}_getAriaLabel(chord){if(chord.isDuplicateModifierCase()){return""}return KeyCodeUtils.toString(chord.keyCode)}_getElectronAccelerator(chord){return KeyCodeUtils.toElectronAccelerator(chord.keyCode)}_getUserSettingsLabel(chord){if(chord.isDuplicateModifierCase()){return""}const result=KeyCodeUtils.toUserSettingsUS(chord.keyCode);return result?result.toLowerCase():result}_getChordDispatch(chord){return USLayoutResolvedKeybinding.getDispatchStr(chord)}static getDispatchStr(chord){if(chord.isModifierKey()){return null}let result="";if(chord.ctrlKey){result+="ctrl+"}if(chord.shiftKey){result+="shift+"}if(chord.altKey){result+="alt+"}if(chord.metaKey){result+="meta+"}result+=KeyCodeUtils.toString(chord.keyCode);return result}_getSingleModifierChordDispatch(keybinding){if(keybinding.keyCode===5&&!keybinding.shiftKey&&!keybinding.altKey&&!keybinding.metaKey){return"ctrl"}if(keybinding.keyCode===4&&!keybinding.ctrlKey&&!keybinding.altKey&&!keybinding.metaKey){return"shift"}if(keybinding.keyCode===6&&!keybinding.ctrlKey&&!keybinding.shiftKey&&!keybinding.metaKey){return"alt"}if(keybinding.keyCode===57&&!keybinding.ctrlKey&&!keybinding.shiftKey&&!keybinding.altKey){return"meta"}return null}static _scanCodeToKeyCode(scanCode){const immutableKeyCode=IMMUTABLE_CODE_TO_KEY_CODE[scanCode];if(immutableKeyCode!==-1){return immutableKeyCode}switch(scanCode){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 88;case 52:return 86;case 53:return 92;case 54:return 94;case 55:return 93;case 56:return 0;case 57:return 85;case 58:return 95;case 59:return 91;case 60:return 87;case 61:return 89;case 62:return 90;case 106:return 97}return 0}static _toKeyCodeChord(chord){if(!chord){return null}if(chord instanceof KeyCodeChord){return chord}const keyCode=this._scanCodeToKeyCode(chord.scanCode);if(keyCode===0){return null}return new KeyCodeChord(chord.ctrlKey,chord.shiftKey,chord.altKey,chord.metaKey,keyCode)}static resolveKeybinding(keybinding,os){const chords=toEmptyArrayIfContainsNull(keybinding.chords.map((chord=>this._toKeyCodeChord(chord))));if(chords.length>0){return[new USLayoutResolvedKeybinding(chords,os)]}return[]}}}});var ILabelService;var init_label=__esm({"node_modules/monaco-editor/esm/vs/platform/label/common/label.js"(){init_instantiation();ILabelService=createDecorator("labelService")}});var StringIterator,ConfigKeysIterator,PathIterator,UriIterator,TernarySearchTreeNode,TernarySearchTree;var init_ternarySearchTree=__esm({"node_modules/monaco-editor/esm/vs/base/common/ternarySearchTree.js"(){init_strings();StringIterator=class{constructor(){this._value="";this._pos=0}reset(key){this._value=key;this._pos=0;return this}next(){this._pos+=1;return this}hasNext(){return this._pos=0;pos--,this._valueLen--){const ch=this._value.charCodeAt(pos);if(!(ch===47||this._splitOnBackslash&&ch===92)){break}}return this.next()}hasNext(){return this._tofalse),ignoreQueryAndFragment=(()=>false)){return new TernarySearchTree(new UriIterator(ignorePathCasing,ignoreQueryAndFragment))}static forStrings(){return new TernarySearchTree(new StringIterator)}static forConfigKeys(){return new TernarySearchTree(new ConfigKeysIterator)}constructor(segments){this._iter=segments}clear(){this._root=void 0}set(key,element){const iter=this._iter.reset(key);let node;if(!this._root){this._root=new TernarySearchTreeNode;this._root.segment=iter.value()}const stack=[];node=this._root;while(true){const val=iter.cmp(node.segment);if(val>0){if(!node.left){node.left=new TernarySearchTreeNode;node.left.segment=iter.value()}stack.push([-1,node]);node=node.left}else if(val<0){if(!node.right){node.right=new TernarySearchTreeNode;node.right.segment=iter.value()}stack.push([1,node]);node=node.right}else if(iter.hasNext()){iter.next();if(!node.mid){node.mid=new TernarySearchTreeNode;node.mid.segment=iter.value()}stack.push([0,node]);node=node.mid}else{break}}const oldElement=node.value;node.value=element;node.key=key;for(let i=stack.length-1;i>=0;i--){const node2=stack[i][1];node2.updateHeight();const bf=node2.balanceFactor();if(bf<-1||bf>1){const d1=stack[i][0];const d2=stack[i+1][0];if(d1===1&&d2===1){stack[i][1]=node2.rotateLeft()}else if(d1===-1&&d2===-1){stack[i][1]=node2.rotateRight()}else if(d1===1&&d2===-1){node2.right=stack[i+1][1]=stack[i+1][1].rotateRight();stack[i][1]=node2.rotateLeft()}else if(d1===-1&&d2===1){node2.left=stack[i+1][1]=stack[i+1][1].rotateLeft();stack[i][1]=node2.rotateRight()}else{throw new Error}if(i>0){switch(stack[i-1][0]){case-1:stack[i-1][1].left=stack[i][1];break;case 1:stack[i-1][1].right=stack[i][1];break;case 0:stack[i-1][1].mid=stack[i][1];break}}else{this._root=stack[0][1]}}}return oldElement}get(key){var _a6;return(_a6=this._getNode(key))===null||_a6===void 0?void 0:_a6.value}_getNode(key){const iter=this._iter.reset(key);let node=this._root;while(node){const val=iter.cmp(node.segment);if(val>0){node=node.left}else if(val<0){node=node.right}else if(iter.hasNext()){iter.next();node=node.mid}else{break}}return node}has(key){const node=this._getNode(key);return!((node===null||node===void 0?void 0:node.value)===void 0&&(node===null||node===void 0?void 0:node.mid)===void 0)}delete(key){return this._delete(key,false)}deleteSuperstr(key){return this._delete(key,true)}_delete(key,superStr){var _a6;const iter=this._iter.reset(key);const stack=[];let node=this._root;while(node){const val=iter.cmp(node.segment);if(val>0){stack.push([-1,node]);node=node.left}else if(val<0){stack.push([1,node]);node=node.right}else if(iter.hasNext()){iter.next();stack.push([0,node]);node=node.mid}else{break}}if(!node){return}if(superStr){node.left=void 0;node.mid=void 0;node.right=void 0;node.height=1}else{node.key=void 0;node.value=void 0}if(!node.mid&&!node.value){if(node.left&&node.right){const min=this._min(node.right);if(min.key){const{key:key2,value:value,segment:segment}=min;this._delete(min.key,false);node.key=key2;node.value=value;node.segment=segment}}else{const newChild=(_a6=node.left)!==null&&_a6!==void 0?_a6:node.right;if(stack.length>0){const[dir,parent]=stack[stack.length-1];switch(dir){case-1:parent.left=newChild;break;case 0:parent.mid=newChild;break;case 1:parent.right=newChild;break}}else{this._root=newChild}}}for(let i=stack.length-1;i>=0;i--){const node2=stack[i][1];node2.updateHeight();const bf=node2.balanceFactor();if(bf>1){if(node2.right.balanceFactor()>=0){stack[i][1]=node2.rotateLeft()}else{node2.right=node2.right.rotateRight();stack[i][1]=node2.rotateLeft()}}else if(bf<-1){if(node2.left.balanceFactor()<=0){stack[i][1]=node2.rotateRight()}else{node2.left=node2.left.rotateLeft();stack[i][1]=node2.rotateRight()}}if(i>0){switch(stack[i-1][0]){case-1:stack[i-1][1].left=stack[i][1];break;case 1:stack[i-1][1].right=stack[i][1];break;case 0:stack[i-1][1].mid=stack[i][1];break}}else{this._root=stack[0][1]}}}_min(node){while(node.left){node=node.left}return node}findSubstr(key){const iter=this._iter.reset(key);let node=this._root;let candidate=void 0;while(node){const val=iter.cmp(node.segment);if(val>0){node=node.left}else if(val<0){node=node.right}else if(iter.hasNext()){iter.next();candidate=node.value||candidate;node=node.mid}else{break}}return node&&node.value||candidate}findSuperstr(key){return this._findSuperstrOrElement(key,false)}_findSuperstrOrElement(key,allowValue){const iter=this._iter.reset(key);let node=this._root;while(node){const val=iter.cmp(node.segment);if(val>0){node=node.left}else if(val<0){node=node.right}else if(iter.hasNext()){iter.next();node=node.mid}else{if(!node.mid){if(allowValue){return node.value}else{return void 0}}else{return this._entries(node.mid)}}}return void 0}forEach(callback){for(const[key,value]of this){callback(value,key)}}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(node){const result=[];this._dfsEntries(node,result);return result[Symbol.iterator]()}_dfsEntries(node,bucket){if(!node){return}if(node.left){this._dfsEntries(node.left,bucket)}if(node.value){bucket.push([node.key,node.value])}if(node.mid){this._dfsEntries(node.mid,bucket)}if(node.right){this._dfsEntries(node.right,bucket)}}}}});function isSingleFolderWorkspaceIdentifier(obj){const singleFolderIdentifier=obj;return typeof(singleFolderIdentifier===null||singleFolderIdentifier===void 0?void 0:singleFolderIdentifier.id)==="string"&&URI.isUri(singleFolderIdentifier.uri)}function isEmptyWorkspaceIdentifier(obj){const emptyWorkspaceIdentifier=obj;return typeof(emptyWorkspaceIdentifier===null||emptyWorkspaceIdentifier===void 0?void 0:emptyWorkspaceIdentifier.id)==="string"&&!isSingleFolderWorkspaceIdentifier(obj)&&!isWorkspaceIdentifier(obj)}function toWorkspaceIdentifier(arg0,isExtensionDevelopment){if(typeof arg0==="string"||typeof arg0==="undefined"){if(typeof arg0==="string"){return{id:basename(arg0)}}if(isExtensionDevelopment){return EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE}return UNKNOWN_EMPTY_WINDOW_WORKSPACE}const workspace=arg0;if(workspace.configuration){return{id:workspace.id,configPath:workspace.configuration}}if(workspace.folders.length===1){return{id:workspace.id,uri:workspace.folders[0].uri}}return{id:workspace.id}}function isWorkspaceIdentifier(obj){const workspaceIdentifier=obj;return typeof(workspaceIdentifier===null||workspaceIdentifier===void 0?void 0:workspaceIdentifier.id)==="string"&&URI.isUri(workspaceIdentifier.configPath)}function isStandaloneEditorWorkspace(workspace){return workspace.id===STANDALONE_EDITOR_WORKSPACE_ID}var IWorkspaceContextService,EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE,UNKNOWN_EMPTY_WINDOW_WORKSPACE,WorkspaceFolder,WORKSPACE_EXTENSION,WORKSPACE_FILTER,STANDALONE_EDITOR_WORKSPACE_ID;var init_workspace=__esm({"node_modules/monaco-editor/esm/vs/platform/workspace/common/workspace.js"(){init_nls();init_path();init_ternarySearchTree();init_uri();init_instantiation();IWorkspaceContextService=createDecorator("contextService");EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE={id:"ext-dev"};UNKNOWN_EMPTY_WINDOW_WORKSPACE={id:"empty-window"};WorkspaceFolder=class{constructor(data,raw){this.raw=raw;this.uri=data.uri;this.index=data.index;this.name=data.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}};WORKSPACE_EXTENSION="code-workspace";WORKSPACE_FILTER=[{name:localize("codeWorkspace","Code Workspace"),extensions:[WORKSPACE_EXTENSION]}];STANDALONE_EDITOR_WORKSPACE_ID="4064f6ec-cb38-4ad0-af64-ee6467e63c82"}});var InspectTokensNLS,GoToLineNLS,QuickHelpNLS,QuickCommandNLS,QuickOutlineNLS,StandaloneCodeEditorNLS,ToggleHighContrastNLS,StandaloneServicesNLS;var init_standaloneStrings=__esm({"node_modules/monaco-editor/esm/vs/editor/common/standaloneStrings.js"(){init_nls();(function(InspectTokensNLS2){InspectTokensNLS2.inspectTokensAction=localize("inspectTokens","Developer: Inspect Tokens")})(InspectTokensNLS||(InspectTokensNLS={}));(function(GoToLineNLS2){GoToLineNLS2.gotoLineActionLabel=localize("gotoLineActionLabel","Go to Line/Column...")})(GoToLineNLS||(GoToLineNLS={}));(function(QuickHelpNLS2){QuickHelpNLS2.helpQuickAccessActionLabel=localize("helpQuickAccess","Show all Quick Access Providers")})(QuickHelpNLS||(QuickHelpNLS={}));(function(QuickCommandNLS2){QuickCommandNLS2.quickCommandActionLabel=localize("quickCommandActionLabel","Command Palette");QuickCommandNLS2.quickCommandHelp=localize("quickCommandActionHelp","Show And Run Commands")})(QuickCommandNLS||(QuickCommandNLS={}));(function(QuickOutlineNLS2){QuickOutlineNLS2.quickOutlineActionLabel=localize("quickOutlineActionLabel","Go to Symbol...");QuickOutlineNLS2.quickOutlineByCategoryActionLabel=localize("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(QuickOutlineNLS||(QuickOutlineNLS={}));(function(StandaloneCodeEditorNLS2){StandaloneCodeEditorNLS2.editorViewAccessibleLabel=localize("editorViewAccessibleLabel","Editor content");StandaloneCodeEditorNLS2.accessibilityHelpMessage=localize("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(StandaloneCodeEditorNLS||(StandaloneCodeEditorNLS={}));(function(ToggleHighContrastNLS2){ToggleHighContrastNLS2.toggleHighContrast=localize("toggleHighContrast","Toggle High Contrast Theme")})(ToggleHighContrastNLS||(ToggleHighContrastNLS={}));(function(StandaloneServicesNLS2){StandaloneServicesNLS2.bulkEditServiceSummary=localize("bulkEditServiceSummary","Made {0} edits in {1} files")})(StandaloneServicesNLS||(StandaloneServicesNLS={}))}});var IWorkspaceTrustManagementService;var init_workspaceTrust=__esm({"node_modules/monaco-editor/esm/vs/platform/workspace/common/workspaceTrust.js"(){init_instantiation();IWorkspaceTrustManagementService=createDecorator("workspaceTrustManagementService")}});var init_31=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css"(){}});function isAnchor(obj){const anchor=obj;return!!anchor&&typeof anchor.x==="number"&&typeof anchor.y==="number"}function layout(viewportSize,viewSize,anchor){const layoutAfterAnchorBoundary=anchor.mode===LayoutAnchorMode.ALIGN?anchor.offset:anchor.offset+anchor.size;const layoutBeforeAnchorBoundary=anchor.mode===LayoutAnchorMode.ALIGN?anchor.offset+anchor.size:anchor.offset;if(anchor.position===0){if(viewSize<=viewportSize-layoutAfterAnchorBoundary){return layoutAfterAnchorBoundary}if(viewSize<=layoutBeforeAnchorBoundary){return layoutBeforeAnchorBoundary-viewSize}return Math.max(viewportSize-viewSize,0)}else{if(viewSize<=layoutBeforeAnchorBoundary){return layoutBeforeAnchorBoundary-viewSize}if(viewSize<=viewportSize-layoutAfterAnchorBoundary){return layoutAfterAnchorBoundary}return 0}}var LayoutAnchorMode,ContextView,SHADOW_ROOT_CSS;var init_contextview=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.js"(){init_canIUse();init_dom();init_lifecycle();init_platform();init_range2();init_31();(function(LayoutAnchorMode2){LayoutAnchorMode2[LayoutAnchorMode2["AVOID"]=0]="AVOID";LayoutAnchorMode2[LayoutAnchorMode2["ALIGN"]=1]="ALIGN"})(LayoutAnchorMode||(LayoutAnchorMode={}));ContextView=class extends Disposable{constructor(container,domPosition){super();this.container=null;this.delegate=null;this.toDisposeOnClean=Disposable.None;this.toDisposeOnSetContainer=Disposable.None;this.shadowRoot=null;this.shadowRootHostElement=null;this.view=$(".context-view");this.useFixedPosition=false;this.useShadowDOM=false;hide(this.view);this.setContainer(container,domPosition);this._register(toDisposable((()=>this.setContainer(null,1))))}setContainer(container,domPosition){var _a6;if(this.container){this.toDisposeOnSetContainer.dispose();if(this.shadowRoot){this.shadowRoot.removeChild(this.view);this.shadowRoot=null;(_a6=this.shadowRootHostElement)===null||_a6===void 0?void 0:_a6.remove();this.shadowRootHostElement=null}else{this.container.removeChild(this.view)}this.container=null}if(container){this.container=container;this.useFixedPosition=domPosition!==1;this.useShadowDOM=domPosition===3;if(this.useShadowDOM){this.shadowRootHostElement=$(".shadow-root-host");this.container.appendChild(this.shadowRootHostElement);this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const style=document.createElement("style");style.textContent=SHADOW_ROOT_CSS;this.shadowRoot.appendChild(style);this.shadowRoot.appendChild(this.view);this.shadowRoot.appendChild($("slot"))}else{this.container.appendChild(this.view)}const toDisposeOnSetContainer=new DisposableStore;ContextView.BUBBLE_UP_EVENTS.forEach((event=>{toDisposeOnSetContainer.add(addStandardDisposableListener(this.container,event,(e=>{this.onDOMEvent(e,false)})))}));ContextView.BUBBLE_DOWN_EVENTS.forEach((event=>{toDisposeOnSetContainer.add(addStandardDisposableListener(this.container,event,(e=>{this.onDOMEvent(e,true)}),true))}));this.toDisposeOnSetContainer=toDisposeOnSetContainer}}show(delegate){var _a6,_b3;if(this.isVisible()){this.hide()}clearNode(this.view);this.view.className="context-view";this.view.style.top="0px";this.view.style.left="0px";this.view.style.zIndex="2575";this.view.style.position=this.useFixedPosition?"fixed":"absolute";show(this.view);this.toDisposeOnClean=delegate.render(this.view)||Disposable.None;this.delegate=delegate;this.doLayout();(_b3=(_a6=this.delegate).focus)===null||_b3===void 0?void 0:_b3.call(_a6)}getViewElement(){return this.view}layout(){if(!this.isVisible()){return}if(this.delegate.canRelayout===false&&!(isIOS&&BrowserFeatures.pointerEvents)){this.hide();return}if(this.delegate.layout){this.delegate.layout()}this.doLayout()}doLayout(){if(!this.isVisible()){return}const anchor=this.delegate.getAnchor();let around;if(isHTMLElement(anchor)){const elementPosition=getDomNodePagePosition(anchor);const zoom=getDomNodeZoomLevel(anchor);around={top:elementPosition.top*zoom,left:elementPosition.left*zoom,width:elementPosition.width*zoom,height:elementPosition.height*zoom}}else if(isAnchor(anchor)){around={top:anchor.y,left:anchor.x,width:anchor.width||1,height:anchor.height||2}}else{around={top:anchor.posy,left:anchor.posx,width:2,height:2}}const viewSizeWidth=getTotalWidth(this.view);const viewSizeHeight=getTotalHeight(this.view);const anchorPosition=this.delegate.anchorPosition||0;const anchorAlignment=this.delegate.anchorAlignment||0;const anchorAxisAlignment=this.delegate.anchorAxisAlignment||0;let top;let left;if(anchorAxisAlignment===0){const verticalAnchor={offset:around.top-window.pageYOffset,size:around.height,position:anchorPosition===0?0:1};const horizontalAnchor={offset:around.left,size:around.width,position:anchorAlignment===0?0:1,mode:LayoutAnchorMode.ALIGN};top=layout(window.innerHeight,viewSizeHeight,verticalAnchor)+window.pageYOffset;if(Range2.intersects({start:top,end:top+viewSizeHeight},{start:verticalAnchor.offset,end:verticalAnchor.offset+verticalAnchor.size})){horizontalAnchor.mode=LayoutAnchorMode.AVOID}left=layout(window.innerWidth,viewSizeWidth,horizontalAnchor)}else{const horizontalAnchor={offset:around.left,size:around.width,position:anchorAlignment===0?0:1};const verticalAnchor={offset:around.top,size:around.height,position:anchorPosition===0?0:1,mode:LayoutAnchorMode.ALIGN};left=layout(window.innerWidth,viewSizeWidth,horizontalAnchor);if(Range2.intersects({start:left,end:left+viewSizeWidth},{start:horizontalAnchor.offset,end:horizontalAnchor.offset+horizontalAnchor.size})){verticalAnchor.mode=LayoutAnchorMode.AVOID}top=layout(window.innerHeight,viewSizeHeight,verticalAnchor)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right");this.view.classList.add(anchorPosition===0?"bottom":"top");this.view.classList.add(anchorAlignment===0?"left":"right");this.view.classList.toggle("fixed",this.useFixedPosition);const containerPosition=getDomNodePagePosition(this.container);this.view.style.top=`${top-(this.useFixedPosition?getDomNodePagePosition(this.view).top:containerPosition.top)}px`;this.view.style.left=`${left-(this.useFixedPosition?getDomNodePagePosition(this.view).left:containerPosition.left)}px`;this.view.style.width="initial"}hide(data){const delegate=this.delegate;this.delegate=null;if(delegate===null||delegate===void 0?void 0:delegate.onHide){delegate.onHide(data)}this.toDisposeOnClean.dispose();hide(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,onCapture){if(this.delegate){if(this.delegate.onDOMEvent){this.delegate.onDOMEvent(e,document.activeElement)}else if(onCapture&&!isAncestor(e.target,this.container)){this.hide()}}}dispose(){this.hide();super.dispose()}};ContextView.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"];ContextView.BUBBLE_DOWN_EVENTS=["click"];SHADOW_ROOT_CSS=`\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\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`}});var __decorate27,__param23,ContextViewService;var init_contextViewService=__esm({"node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextViewService.js"(){init_contextview();init_lifecycle();init_layoutService();__decorate27=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param23=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};ContextViewService=class ContextViewService2 extends Disposable{constructor(layoutService){super();this.layoutService=layoutService;this.currentViewDisposable=Disposable.None;this.container=layoutService.hasContainer?layoutService.container:null;this.contextView=this._register(new ContextView(this.container,1));this.layout();this._register(layoutService.onDidLayout((()=>this.layout())))}setContainer(container,domPosition){this.contextView.setContainer(container,domPosition||1)}showContextView(delegate,container,shadowRoot){if(container){if(container!==this.container||this.shadowRoot!==shadowRoot){this.container=container;this.setContainer(container,shadowRoot?3:2)}}else{if(this.layoutService.hasContainer&&this.container!==this.layoutService.container){this.container=this.layoutService.container;this.setContainer(this.container,1)}}this.shadowRoot=shadowRoot;this.contextView.show(delegate);const disposable=toDisposable((()=>{if(this.currentViewDisposable===disposable){this.hideContextView()}}));this.currentViewDisposable=disposable;return disposable}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(data){this.contextView.hide(data)}};ContextViewService=__decorate27([__param23(0,ILayoutService)],ContextViewService)}});function registerPlatformLanguageAssociation(association,warnOnOverwrite=false){_registerLanguageAssociation(association,false,warnOnOverwrite)}function _registerLanguageAssociation(association,userConfigured,warnOnOverwrite){const associationItem=toLanguageAssociationItem(association,userConfigured);registeredAssociations.push(associationItem);if(!associationItem.userConfigured){nonUserRegisteredAssociations.push(associationItem)}else{userRegisteredAssociations.push(associationItem)}if(warnOnOverwrite&&!associationItem.userConfigured){registeredAssociations.forEach((a=>{if(a.mime===associationItem.mime||a.userConfigured){return}if(associationItem.extension&&a.extension===associationItem.extension){console.warn(`Overwriting extension <<${associationItem.extension}>> to now point to mime <<${associationItem.mime}>>`)}if(associationItem.filename&&a.filename===associationItem.filename){console.warn(`Overwriting filename <<${associationItem.filename}>> to now point to mime <<${associationItem.mime}>>`)}if(associationItem.filepattern&&a.filepattern===associationItem.filepattern){console.warn(`Overwriting filepattern <<${associationItem.filepattern}>> to now point to mime <<${associationItem.mime}>>`)}if(associationItem.firstline&&a.firstline===associationItem.firstline){console.warn(`Overwriting firstline <<${associationItem.firstline}>> to now point to mime <<${associationItem.mime}>>`)}}))}}function toLanguageAssociationItem(association,userConfigured){return{id:association.id,mime:association.mime,filename:association.filename,extension:association.extension,filepattern:association.filepattern,firstline:association.firstline,userConfigured:userConfigured,filenameLowercase:association.filename?association.filename.toLowerCase():void 0,extensionLowercase:association.extension?association.extension.toLowerCase():void 0,filepatternLowercase:association.filepattern?parse3(association.filepattern.toLowerCase()):void 0,filepatternOnPath:association.filepattern?association.filepattern.indexOf(posix.sep)>=0:false}}function clearPlatformLanguageAssociations(){registeredAssociations=registeredAssociations.filter((a=>a.userConfigured));nonUserRegisteredAssociations=[]}function getLanguageIds(resource,firstLine){return getAssociations(resource,firstLine).map((item=>item.id))}function getAssociations(resource,firstLine){let path;if(resource){switch(resource.scheme){case Schemas.file:path=resource.fsPath;break;case Schemas.data:{const metadata=DataUri.parseMetaData(resource);path=metadata.get(DataUri.META_DATA_LABEL);break}case Schemas.vscodeNotebookCell:path=void 0;break;default:path=resource.path}}if(!path){return[{id:"unknown",mime:Mimes.unknown}]}path=path.toLowerCase();const filename=basename(path);const configuredLanguage=getAssociationByPath(path,filename,userRegisteredAssociations);if(configuredLanguage){return[configuredLanguage,{id:PLAINTEXT_LANGUAGE_ID,mime:Mimes.text}]}const registeredLanguage=getAssociationByPath(path,filename,nonUserRegisteredAssociations);if(registeredLanguage){return[registeredLanguage,{id:PLAINTEXT_LANGUAGE_ID,mime:Mimes.text}]}if(firstLine){const firstlineLanguage=getAssociationByFirstline(firstLine);if(firstlineLanguage){return[firstlineLanguage,{id:PLAINTEXT_LANGUAGE_ID,mime:Mimes.text}]}}return[{id:"unknown",mime:Mimes.unknown}]}function getAssociationByPath(path,filename,associations){var _a6;let filenameMatch=void 0;let patternMatch=void 0;let extensionMatch=void 0;for(let i=associations.length-1;i>=0;i--){const association=associations[i];if(filename===association.filenameLowercase){filenameMatch=association;break}if(association.filepattern){if(!patternMatch||association.filepattern.length>patternMatch.filepattern.length){const target=association.filepatternOnPath?path:filename;if((_a6=association.filepatternLowercase)===null||_a6===void 0?void 0:_a6.call(association,target)){patternMatch=association}}}if(association.extension){if(!extensionMatch||association.extension.length>extensionMatch.extension.length){if(filename.endsWith(association.extensionLowercase)){extensionMatch=association}}}}if(filenameMatch){return filenameMatch}if(patternMatch){return patternMatch}if(extensionMatch){return extensionMatch}return void 0}function getAssociationByFirstline(firstLine){if(startsWithUTF8BOM(firstLine)){firstLine=firstLine.substr(1)}if(firstLine.length>0){for(let i=registeredAssociations.length-1;i>=0;i--){const association=registeredAssociations[i];if(!association.firstline){continue}const matches=firstLine.match(association.firstline);if(matches&&matches.length>0){return association}}}return void 0}var registeredAssociations,nonUserRegisteredAssociations,userRegisteredAssociations;var init_languagesAssociations=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/languagesAssociations.js"(){init_glob();init_mime();init_network();init_path();init_resources();init_strings();init_modesRegistry();registeredAssociations=[];nonUserRegisteredAssociations=[];userRegisteredAssociations=[]}});var hasOwnProperty2,NULL_LANGUAGE_ID,LanguageIdCodec,LanguagesRegistry;var init_languagesRegistry=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/languagesRegistry.js"(){init_event();init_lifecycle();init_strings();init_languagesAssociations();init_modesRegistry();init_configurationRegistry();init_platform2();hasOwnProperty2=Object.prototype.hasOwnProperty;NULL_LANGUAGE_ID="vs.editor.nullLanguage";LanguageIdCodec=class{constructor(){this._languageIdToLanguage=[];this._languageToLanguageId=new Map;this._register(NULL_LANGUAGE_ID,0);this._register(PLAINTEXT_LANGUAGE_ID,1);this._nextLanguageId=2}_register(language81,languageId){this._languageIdToLanguage[languageId]=language81;this._languageToLanguageId.set(language81,languageId)}register(language81){if(this._languageToLanguageId.has(language81)){return}const languageId=this._nextLanguageId++;this._register(language81,languageId)}encodeLanguageId(languageId){return this._languageToLanguageId.get(languageId)||0}decodeLanguageId(languageId){return this._languageIdToLanguage[languageId]||NULL_LANGUAGE_ID}};LanguagesRegistry=class extends Disposable{constructor(useModesRegistry=true,warnOnOverwrite=false){super();this._onDidChange=this._register(new Emitter);this.onDidChange=this._onDidChange.event;LanguagesRegistry.instanceCount++;this._warnOnOverwrite=warnOnOverwrite;this.languageIdCodec=new LanguageIdCodec;this._dynamicLanguages=[];this._languages={};this._mimeTypesMap={};this._nameMap={};this._lowercaseNameMap={};if(useModesRegistry){this._initializeFromRegistry();this._register(ModesRegistry.onDidChangeLanguages((m=>{this._initializeFromRegistry()})))}}dispose(){LanguagesRegistry.instanceCount--;super.dispose()}_initializeFromRegistry(){this._languages={};this._mimeTypesMap={};this._nameMap={};this._lowercaseNameMap={};clearPlatformLanguageAssociations();const desc=[].concat(ModesRegistry.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(desc)}_registerLanguages(desc){for(const d of desc){this._registerLanguage(d)}this._mimeTypesMap={};this._nameMap={};this._lowercaseNameMap={};Object.keys(this._languages).forEach((langId=>{const language81=this._languages[langId];if(language81.name){this._nameMap[language81.name]=language81.identifier}language81.aliases.forEach((alias=>{this._lowercaseNameMap[alias.toLowerCase()]=language81.identifier}));language81.mimetypes.forEach((mimetype=>{this._mimeTypesMap[mimetype]=language81.identifier}))}));Registry.as(Extensions2.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds());this._onDidChange.fire()}_registerLanguage(lang){const langId=lang.id;let resolvedLanguage;if(hasOwnProperty2.call(this._languages,langId)){resolvedLanguage=this._languages[langId]}else{this.languageIdCodec.register(langId);resolvedLanguage={identifier:langId,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]};this._languages[langId]=resolvedLanguage}this._mergeLanguage(resolvedLanguage,lang)}_mergeLanguage(resolvedLanguage,lang){const langId=lang.id;let primaryMime=null;if(Array.isArray(lang.mimetypes)&&lang.mimetypes.length>0){resolvedLanguage.mimetypes.push(...lang.mimetypes);primaryMime=lang.mimetypes[0]}if(!primaryMime){primaryMime=`text/x-${langId}`;resolvedLanguage.mimetypes.push(primaryMime)}if(Array.isArray(lang.extensions)){if(lang.configuration){resolvedLanguage.extensions=lang.extensions.concat(resolvedLanguage.extensions)}else{resolvedLanguage.extensions=resolvedLanguage.extensions.concat(lang.extensions)}for(const extension of lang.extensions){registerPlatformLanguageAssociation({id:langId,mime:primaryMime,extension:extension},this._warnOnOverwrite)}}if(Array.isArray(lang.filenames)){for(const filename of lang.filenames){registerPlatformLanguageAssociation({id:langId,mime:primaryMime,filename:filename},this._warnOnOverwrite);resolvedLanguage.filenames.push(filename)}}if(Array.isArray(lang.filenamePatterns)){for(const filenamePattern of lang.filenamePatterns){registerPlatformLanguageAssociation({id:langId,mime:primaryMime,filepattern:filenamePattern},this._warnOnOverwrite)}}if(typeof lang.firstLine==="string"&&lang.firstLine.length>0){let firstLineRegexStr=lang.firstLine;if(firstLineRegexStr.charAt(0)!=="^"){firstLineRegexStr="^"+firstLineRegexStr}try{const firstLineRegex=new RegExp(firstLineRegexStr);if(!regExpLeadsToEndlessLoop(firstLineRegex)){registerPlatformLanguageAssociation({id:langId,mime:primaryMime,firstline:firstLineRegex},this._warnOnOverwrite)}}catch(err){console.warn(`[${lang.id}]: Invalid regular expression \`${firstLineRegexStr}\`: `,err)}}resolvedLanguage.aliases.push(langId);let langAliases=null;if(typeof lang.aliases!=="undefined"&&Array.isArray(lang.aliases)){if(lang.aliases.length===0){langAliases=[null]}else{langAliases=lang.aliases}}if(langAliases!==null){for(const langAlias of langAliases){if(!langAlias||langAlias.length===0){continue}resolvedLanguage.aliases.push(langAlias)}}const containsAliases=langAliases!==null&&langAliases.length>0;if(containsAliases&&langAliases[0]===null){}else{const bestName=(containsAliases?langAliases[0]:null)||langId;if(containsAliases||!resolvedLanguage.name){resolvedLanguage.name=bestName}}if(lang.configuration){resolvedLanguage.configurationFiles.push(lang.configuration)}if(lang.icon){resolvedLanguage.icons.push(lang.icon)}}isRegisteredLanguageId(languageId){if(!languageId){return false}return hasOwnProperty2.call(this._languages,languageId)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(languageName){const languageNameLower=languageName.toLowerCase();if(!hasOwnProperty2.call(this._lowercaseNameMap,languageNameLower)){return null}return this._lowercaseNameMap[languageNameLower]}getLanguageIdByMimeType(mimeType){if(!mimeType){return null}if(hasOwnProperty2.call(this._mimeTypesMap,mimeType)){return this._mimeTypesMap[mimeType]}return null}guessLanguageIdByFilepathOrFirstLine(resource,firstLine){if(!resource&&!firstLine){return[]}return getLanguageIds(resource,firstLine)}};LanguagesRegistry.instanceCount=0}});var LanguageService,LanguageSelection;var init_languageService=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/languageService.js"(){init_event();init_lifecycle();init_languagesRegistry();init_arrays();init_languages();init_modesRegistry();LanguageService=class extends Disposable{constructor(warnOnOverwrite=false){super();this._onDidRequestBasicLanguageFeatures=this._register(new Emitter);this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event;this._onDidRequestRichLanguageFeatures=this._register(new Emitter);this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event;this._onDidChange=this._register(new Emitter({leakWarningThreshold:200}));this.onDidChange=this._onDidChange.event;this._requestedBasicLanguages=new Set;this._requestedRichLanguages=new Set;LanguageService.instanceCount++;this._registry=this._register(new LanguagesRegistry(true,warnOnOverwrite));this.languageIdCodec=this._registry.languageIdCodec;this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){LanguageService.instanceCount--;super.dispose()}isRegisteredLanguageId(languageId){return this._registry.isRegisteredLanguageId(languageId)}getLanguageIdByLanguageName(languageName){return this._registry.getLanguageIdByLanguageName(languageName)}getLanguageIdByMimeType(mimeType){return this._registry.getLanguageIdByMimeType(mimeType)}guessLanguageIdByFilepathOrFirstLine(resource,firstLine){const languageIds=this._registry.guessLanguageIdByFilepathOrFirstLine(resource,firstLine);return firstOrDefault(languageIds,null)}createById(languageId){return new LanguageSelection(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(languageId)))}createByFilepathOrFirstLine(resource,firstLine){return new LanguageSelection(this.onDidChange,(()=>{const languageId=this.guessLanguageIdByFilepathOrFirstLine(resource,firstLine);return this._createAndGetLanguageIdentifier(languageId)}))}_createAndGetLanguageIdentifier(languageId){if(!languageId||!this.isRegisteredLanguageId(languageId)){languageId=PLAINTEXT_LANGUAGE_ID}return languageId}requestBasicLanguageFeatures(languageId){if(!this._requestedBasicLanguages.has(languageId)){this._requestedBasicLanguages.add(languageId);this._onDidRequestBasicLanguageFeatures.fire(languageId)}}requestRichLanguageFeatures(languageId){if(!this._requestedRichLanguages.has(languageId)){this._requestedRichLanguages.add(languageId);this.requestBasicLanguageFeatures(languageId);TokenizationRegistry2.getOrCreate(languageId);this._onDidRequestRichLanguageFeatures.fire(languageId)}}};LanguageService.instanceCount=0;LanguageSelection=class{constructor(_onDidChangeLanguages,_selector){this._onDidChangeLanguages=_onDidChangeLanguages;this._selector=_selector;this._listener=null;this._emitter=null;this.languageId=this._selector()}_dispose(){if(this._listener){this._listener.dispose();this._listener=null}if(this._emitter){this._emitter.dispose();this._emitter=null}}get onDidChange(){if(!this._listener){this._listener=this._onDidChangeLanguages((()=>this._evaluate()))}if(!this._emitter){this._emitter=new Emitter({onDidRemoveLastListener:()=>{this._dispose()}})}return this._emitter.event}_evaluate(){var _a6;const languageId=this._selector();if(languageId===this.languageId){return}this.languageId=languageId;(_a6=this._emitter)===null||_a6===void 0?void 0:_a6.fire(this.languageId)}}}});var init_32=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.css"(){}});var BaseDropdown,DropdownMenu;var init_dropdown=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdown.js"(){init_dom();init_keyboardEvent();init_touch();init_actions();init_event();init_32();BaseDropdown=class extends ActionRunner{constructor(container,options2){super();this._onDidChangeVisibility=this._register(new Emitter);this.onDidChangeVisibility=this._onDidChangeVisibility.event;this._element=append(container,$(".monaco-dropdown"));this._label=append(this._element,$(".dropdown-label"));let labelRenderer=options2.labelRenderer;if(!labelRenderer){labelRenderer=container2=>{container2.textContent=options2.label||"";return null}}for(const event of[EventType.CLICK,EventType.MOUSE_DOWN,EventType2.Tap]){this._register(addDisposableListener(this.element,event,(e=>EventHelper.stop(e,true))))}for(const event of[EventType.MOUSE_DOWN,EventType2.Tap]){this._register(addDisposableListener(this._label,event,(e=>{if(e instanceof MouseEvent&&(e.detail>1||e.button!==0)){return}if(this.visible){this.hide()}else{this.show()}})))}this._register(addDisposableListener(this._label,EventType.KEY_UP,(e=>{const event=new StandardKeyboardEvent(e);if(event.equals(3)||event.equals(10)){EventHelper.stop(e,true);if(this.visible){this.hide()}else{this.show()}}})));const cleanupFn=labelRenderer(this._label);if(cleanupFn){this._register(cleanupFn)}this._register(Gesture.addTarget(this._label))}get element(){return this._element}show(){if(!this.visible){this.visible=true;this._onDidChangeVisibility.fire(true)}}hide(){if(this.visible){this.visible=false;this._onDidChangeVisibility.fire(false)}}dispose(){super.dispose();this.hide();if(this.boxContainer){this.boxContainer.remove();this.boxContainer=void 0}if(this.contents){this.contents.remove();this.contents=void 0}if(this._label){this._label.remove();this._label=void 0}}};DropdownMenu=class extends BaseDropdown{constructor(container,_options){super(container,_options);this._options=_options;this._actions=[];this.actions=_options.actions||[]}set menuOptions(options2){this._menuOptions=options2}get menuOptions(){return this._menuOptions}get actions(){if(this._options.actionProvider){return this._options.actionProvider.getActions()}return this._actions}set actions(actions){this._actions=actions}show(){super.show();this.element.classList.add("active");this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(action,options2)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(action,options2):void 0,getKeyBinding:action=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(action):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide();this.element.classList.remove("active")}}}});var DropdownMenuActionViewItem;var init_dropdownActionViewItem=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js"(){init_dom();init_actionViewItems();init_dropdown();init_event();init_32();DropdownMenuActionViewItem=class extends BaseActionViewItem{constructor(action,menuActionsOrProvider,contextMenuProvider,options2=Object.create(null)){super(null,action,options2);this.actionItem=null;this._onDidChangeVisibility=this._register(new Emitter);this.onDidChangeVisibility=this._onDidChangeVisibility.event;this.menuActionsOrProvider=menuActionsOrProvider;this.contextMenuProvider=contextMenuProvider;this.options=options2;if(this.options.actionRunner){this.actionRunner=this.options.actionRunner}}render(container){this.actionItem=container;const labelRenderer=el=>{this.element=append(el,$("a.action-label"));let classNames=[];if(typeof this.options.classNames==="string"){classNames=this.options.classNames.split(/\s+/g).filter((s=>!!s))}else if(this.options.classNames){classNames=this.options.classNames}if(!classNames.find((c=>c==="icon"))){classNames.push("codicon")}this.element.classList.add(...classNames);this.element.setAttribute("role","button");this.element.setAttribute("aria-haspopup","true");this.element.setAttribute("aria-expanded","false");this.element.title=this._action.label||"";this.element.ariaLabel=this._action.label||"";return null};const isActionsArray=Array.isArray(this.menuActionsOrProvider);const options2={contextMenuProvider:this.contextMenuProvider,labelRenderer:labelRenderer,menuAsChild:this.options.menuAsChild,actions:isActionsArray?this.menuActionsOrProvider:void 0,actionProvider:isActionsArray?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};this.dropdownMenu=this._register(new DropdownMenu(container,options2));this._register(this.dropdownMenu.onDidChangeVisibility((visible=>{var _a6;(_a6=this.element)===null||_a6===void 0?void 0:_a6.setAttribute("aria-expanded",`${visible}`);this._onDidChangeVisibility.fire(visible)})));this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context};if(this.options.anchorAlignmentProvider){const that=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return that.options.anchorAlignmentProvider()}})}this.updateTooltip();this.updateEnabled()}getTooltip(){let title=null;if(this.action.tooltip){title=this.action.tooltip}else if(this.action.label){title=this.action.label}return title!==null&&title!==void 0?title:void 0}setActionContext(newContext){super.setActionContext(newContext);if(this.dropdownMenu){if(this.dropdownMenu.menuOptions){this.dropdownMenu.menuOptions.context=newContext}else{this.dropdownMenu.menuOptions={context:newContext}}}}show(){var _a6;(_a6=this.dropdownMenu)===null||_a6===void 0?void 0:_a6.show()}updateEnabled(){var _a6,_b3;const disabled=!this.action.enabled;(_a6=this.actionItem)===null||_a6===void 0?void 0:_a6.classList.toggle("disabled",disabled);(_b3=this.element)===null||_b3===void 0?void 0:_b3.classList.toggle("disabled",disabled)}}}});var init_33=__esm({"node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.css"(){}});function isICommandActionToggleInfo(thing){return thing?thing.condition!==void 0:false}var init_action=__esm({"node_modules/monaco-editor/esm/vs/platform/action/common/action.js"(){}});var __awaiter20,StorageHint,StorageState,Storage,InMemoryStorageDatabase;var init_storage=__esm({"node_modules/monaco-editor/esm/vs/base/parts/storage/common/storage.js"(){init_async();init_event();init_lifecycle();init_marshalling();init_types();__awaiter20=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};(function(StorageHint2){StorageHint2[StorageHint2["STORAGE_DOES_NOT_EXIST"]=0]="STORAGE_DOES_NOT_EXIST";StorageHint2[StorageHint2["STORAGE_IN_MEMORY"]=1]="STORAGE_IN_MEMORY"})(StorageHint||(StorageHint={}));(function(StorageState2){StorageState2[StorageState2["None"]=0]="None";StorageState2[StorageState2["Initialized"]=1]="Initialized";StorageState2[StorageState2["Closed"]=2]="Closed"})(StorageState||(StorageState={}));Storage=class extends Disposable{constructor(database,options2=Object.create(null)){super();this.database=database;this.options=options2;this._onDidChangeStorage=this._register(new PauseableEmitter);this.onDidChangeStorage=this._onDidChangeStorage.event;this.state=StorageState.None;this.cache=new Map;this.flushDelayer=new ThrottledDelayer(Storage.DEFAULT_FLUSH_DELAY);this.pendingDeletes=new Set;this.pendingInserts=new Map;this.whenFlushedCallbacks=[];this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){var _a6,_b3;this._onDidChangeStorage.pause();try{(_a6=e.changed)===null||_a6===void 0?void 0:_a6.forEach(((value,key)=>this.acceptExternal(key,value)));(_b3=e.deleted)===null||_b3===void 0?void 0:_b3.forEach((key=>this.acceptExternal(key,void 0)))}finally{this._onDidChangeStorage.resume()}}acceptExternal(key,value){if(this.state===StorageState.Closed){return}let changed=false;if(isUndefinedOrNull(value)){changed=this.cache.delete(key)}else{const currentValue=this.cache.get(key);if(currentValue!==value){this.cache.set(key,value);changed=true}}if(changed){this._onDidChangeStorage.fire({key:key,external:true})}}get(key,fallbackValue){const value=this.cache.get(key);if(isUndefinedOrNull(value)){return fallbackValue}return value}getBoolean(key,fallbackValue){const value=this.get(key);if(isUndefinedOrNull(value)){return fallbackValue}return value==="true"}getNumber(key,fallbackValue){const value=this.get(key);if(isUndefinedOrNull(value)){return fallbackValue}return parseInt(value,10)}set(key,value,external=false){return __awaiter20(this,void 0,void 0,(function*(){if(this.state===StorageState.Closed){return}if(isUndefinedOrNull(value)){return this.delete(key,external)}const valueStr=isObject(value)||Array.isArray(value)?stringify(value):String(value);const currentValue=this.cache.get(key);if(currentValue===valueStr){return}this.cache.set(key,valueStr);this.pendingInserts.set(key,valueStr);this.pendingDeletes.delete(key);this._onDidChangeStorage.fire({key:key,external:external});return this.doFlush()}))}delete(key,external=false){return __awaiter20(this,void 0,void 0,(function*(){if(this.state===StorageState.Closed){return}const wasDeleted=this.cache.delete(key);if(!wasDeleted){return}if(!this.pendingDeletes.has(key)){this.pendingDeletes.add(key)}this.pendingInserts.delete(key);this._onDidChangeStorage.fire({key:key,external:external});return this.doFlush()}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return __awaiter20(this,void 0,void 0,(function*(){if(!this.hasPending){return}const updateRequest={insert:this.pendingInserts,delete:this.pendingDeletes};this.pendingDeletes=new Set;this.pendingInserts=new Map;return this.database.updateItems(updateRequest).finally((()=>{var _a6;if(!this.hasPending){while(this.whenFlushedCallbacks.length){(_a6=this.whenFlushedCallbacks.pop())===null||_a6===void 0?void 0:_a6()}}}))}))}doFlush(delay){return __awaiter20(this,void 0,void 0,(function*(){return this.flushDelayer.trigger((()=>this.flushPending()),delay)}))}dispose(){this.flushDelayer.dispose();super.dispose()}};Storage.DEFAULT_FLUSH_DELAY=100;InMemoryStorageDatabase=class{constructor(){this.onDidChangeItemsExternal=Event.None;this.items=new Map}updateItems(request){var _a6,_b3;return __awaiter20(this,void 0,void 0,(function*(){(_a6=request.insert)===null||_a6===void 0?void 0:_a6.forEach(((value,key)=>this.items.set(key,value)));(_b3=request.delete)===null||_b3===void 0?void 0:_b3.forEach((key=>this.items.delete(key)))}))}}}});function loadKeyTargets(storage){const keysRaw=storage.get(TARGET_KEY);if(keysRaw){try{return JSON.parse(keysRaw)}catch(error){}}return Object.create(null)}var TARGET_KEY,IStorageService,WillSaveStateReason,AbstractStorageService,InMemoryStorageService;var init_storage2=__esm({"node_modules/monaco-editor/esm/vs/platform/storage/common/storage.js"(){init_event();init_lifecycle();init_types();init_storage();init_instantiation();TARGET_KEY="__$__targetStorageMarker";IStorageService=createDecorator("storageService");(function(WillSaveStateReason2){WillSaveStateReason2[WillSaveStateReason2["NONE"]=0]="NONE";WillSaveStateReason2[WillSaveStateReason2["SHUTDOWN"]=1]="SHUTDOWN"})(WillSaveStateReason||(WillSaveStateReason={}));AbstractStorageService=class extends Disposable{constructor(options2={flushInterval:AbstractStorageService.DEFAULT_FLUSH_INTERVAL}){super();this.options=options2;this._onDidChangeValue=this._register(new PauseableEmitter);this._onDidChangeTarget=this._register(new PauseableEmitter);this._onWillSaveState=this._register(new Emitter);this.onWillSaveState=this._onWillSaveState.event;this._workspaceKeyTargets=void 0;this._profileKeyTargets=void 0;this._applicationKeyTargets=void 0}onDidChangeValue(scope,key,disposable){return Event.filter(this._onDidChangeValue.event,(e=>e.scope===scope&&(key===void 0||e.key===key)),disposable)}emitDidChangeValue(scope,event){const{key:key,external:external}=event;if(key===TARGET_KEY){switch(scope){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:scope})}else{this._onDidChangeValue.fire({scope:scope,key:key,target:this.getKeyTargets(scope)[key],external:external})}}get(key,scope,fallbackValue){var _a6;return(_a6=this.getStorage(scope))===null||_a6===void 0?void 0:_a6.get(key,fallbackValue)}getBoolean(key,scope,fallbackValue){var _a6;return(_a6=this.getStorage(scope))===null||_a6===void 0?void 0:_a6.getBoolean(key,fallbackValue)}getNumber(key,scope,fallbackValue){var _a6;return(_a6=this.getStorage(scope))===null||_a6===void 0?void 0:_a6.getNumber(key,fallbackValue)}store(key,value,scope,target,external=false){if(isUndefinedOrNull(value)){this.remove(key,scope,external);return}this.withPausedEmitters((()=>{var _a6;this.updateKeyTarget(key,scope,target);(_a6=this.getStorage(scope))===null||_a6===void 0?void 0:_a6.set(key,value,external)}))}remove(key,scope,external=false){this.withPausedEmitters((()=>{var _a6;this.updateKeyTarget(key,scope,void 0);(_a6=this.getStorage(scope))===null||_a6===void 0?void 0:_a6.delete(key,external)}))}withPausedEmitters(fn){this._onDidChangeValue.pause();this._onDidChangeTarget.pause();try{fn()}finally{this._onDidChangeValue.resume();this._onDidChangeTarget.resume()}}updateKeyTarget(key,scope,target,external=false){var _a6,_b3;const keyTargets=this.getKeyTargets(scope);if(typeof target==="number"){if(keyTargets[key]!==target){keyTargets[key]=target;(_a6=this.getStorage(scope))===null||_a6===void 0?void 0:_a6.set(TARGET_KEY,JSON.stringify(keyTargets),external)}}else{if(typeof keyTargets[key]==="number"){delete keyTargets[key];(_b3=this.getStorage(scope))===null||_b3===void 0?void 0:_b3.set(TARGET_KEY,JSON.stringify(keyTargets),external)}}}get workspaceKeyTargets(){if(!this._workspaceKeyTargets){this._workspaceKeyTargets=this.loadKeyTargets(1)}return this._workspaceKeyTargets}get profileKeyTargets(){if(!this._profileKeyTargets){this._profileKeyTargets=this.loadKeyTargets(0)}return this._profileKeyTargets}get applicationKeyTargets(){if(!this._applicationKeyTargets){this._applicationKeyTargets=this.loadKeyTargets(-1)}return this._applicationKeyTargets}getKeyTargets(scope){switch(scope){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(scope){const storage=this.getStorage(scope);return storage?loadKeyTargets(storage):Object.create(null)}};AbstractStorageService.DEFAULT_FLUSH_INTERVAL=60*1e3;InMemoryStorageService=class extends AbstractStorageService{constructor(){super();this.applicationStorage=this._register(new Storage(new InMemoryStorageDatabase,{hint:StorageHint.STORAGE_IN_MEMORY}));this.profileStorage=this._register(new Storage(new InMemoryStorageDatabase,{hint:StorageHint.STORAGE_IN_MEMORY}));this.workspaceStorage=this._register(new Storage(new InMemoryStorageDatabase,{hint:StorageHint.STORAGE_IN_MEMORY}));this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e))));this._register(this.profileStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e))));this._register(this.applicationStorage.onDidChangeStorage((e=>this.emitDidChangeValue(-1,e))))}getStorage(scope){switch(scope){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}}});function overrideStyles(override,styles){const result=Object.assign({},styles);for(const key in override){const val=override[key];result[key]=val!==void 0?asCssVariable(val):void 0}return result}function getListStyles(override){return overrideStyles(override,defaultListStyles)}var defaultKeybindingLabelStyles,defaultButtonStyles,defaultProgressBarStyles,defaultToggleStyles,defaultCheckboxStyles,defaultDialogStyles,defaultInputBoxStyles,defaultFindWidgetStyles,defaultCountBadgeStyles,defaultBreadcrumbsWidgetStyles,defaultListStyles,defaultSelectBoxStyles,defaultMenuStyles;var init_defaultStyles=__esm({"node_modules/monaco-editor/esm/vs/platform/theme/browser/defaultStyles.js"(){init_colorRegistry();init_color();defaultKeybindingLabelStyles={keybindingLabelBackground:asCssVariable(keybindingLabelBackground),keybindingLabelForeground:asCssVariable(keybindingLabelForeground),keybindingLabelBorder:asCssVariable(keybindingLabelBorder),keybindingLabelBottomBorder:asCssVariable(keybindingLabelBottomBorder),keybindingLabelShadow:asCssVariable(widgetShadow)};defaultButtonStyles={buttonForeground:asCssVariable(buttonForeground),buttonSeparator:asCssVariable(buttonSeparator),buttonBackground:asCssVariable(buttonBackground),buttonHoverBackground:asCssVariable(buttonHoverBackground),buttonSecondaryForeground:asCssVariable(buttonSecondaryForeground),buttonSecondaryBackground:asCssVariable(buttonSecondaryBackground),buttonSecondaryHoverBackground:asCssVariable(buttonSecondaryHoverBackground),buttonBorder:asCssVariable(buttonBorder)};defaultProgressBarStyles={progressBarBackground:asCssVariable(progressBarBackground)};defaultToggleStyles={inputActiveOptionBorder:asCssVariable(inputActiveOptionBorder),inputActiveOptionForeground:asCssVariable(inputActiveOptionForeground),inputActiveOptionBackground:asCssVariable(inputActiveOptionBackground)};defaultCheckboxStyles={checkboxBackground:asCssVariable(checkboxBackground),checkboxBorder:asCssVariable(checkboxBorder),checkboxForeground:asCssVariable(checkboxForeground)};defaultDialogStyles={dialogBackground:asCssVariable(editorWidgetBackground),dialogForeground:asCssVariable(editorWidgetForeground),dialogShadow:asCssVariable(widgetShadow),dialogBorder:asCssVariable(contrastBorder),errorIconForeground:asCssVariable(problemsErrorIconForeground),warningIconForeground:asCssVariable(problemsWarningIconForeground),infoIconForeground:asCssVariable(problemsInfoIconForeground),textLinkForeground:asCssVariable(textLinkForeground)};defaultInputBoxStyles={inputBackground:asCssVariable(inputBackground),inputForeground:asCssVariable(inputForeground),inputBorder:asCssVariable(inputBorder),inputValidationInfoBorder:asCssVariable(inputValidationInfoBorder),inputValidationInfoBackground:asCssVariable(inputValidationInfoBackground),inputValidationInfoForeground:asCssVariable(inputValidationInfoForeground),inputValidationWarningBorder:asCssVariable(inputValidationWarningBorder),inputValidationWarningBackground:asCssVariable(inputValidationWarningBackground),inputValidationWarningForeground:asCssVariable(inputValidationWarningForeground),inputValidationErrorBorder:asCssVariable(inputValidationErrorBorder),inputValidationErrorBackground:asCssVariable(inputValidationErrorBackground),inputValidationErrorForeground:asCssVariable(inputValidationErrorForeground)};defaultFindWidgetStyles={listFilterWidgetBackground:asCssVariable(listFilterWidgetBackground),listFilterWidgetOutline:asCssVariable(listFilterWidgetOutline),listFilterWidgetNoMatchesOutline:asCssVariable(listFilterWidgetNoMatchesOutline),listFilterWidgetShadow:asCssVariable(listFilterWidgetShadow),inputBoxStyles:defaultInputBoxStyles,toggleStyles:defaultToggleStyles};defaultCountBadgeStyles={badgeBackground:asCssVariable(badgeBackground),badgeForeground:asCssVariable(badgeForeground),badgeBorder:asCssVariable(contrastBorder)};defaultBreadcrumbsWidgetStyles={breadcrumbsBackground:asCssVariable(breadcrumbsBackground),breadcrumbsForeground:asCssVariable(breadcrumbsForeground),breadcrumbsHoverForeground:asCssVariable(breadcrumbsFocusForeground),breadcrumbsFocusForeground:asCssVariable(breadcrumbsFocusForeground),breadcrumbsFocusAndSelectionForeground:asCssVariable(breadcrumbsActiveSelectionForeground)};defaultListStyles={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:asCssVariable(listFocusBackground),listFocusForeground:asCssVariable(listFocusForeground),listFocusOutline:asCssVariable(listFocusOutline),listActiveSelectionBackground:asCssVariable(listActiveSelectionBackground),listActiveSelectionForeground:asCssVariable(listActiveSelectionForeground),listActiveSelectionIconForeground:asCssVariable(listActiveSelectionIconForeground),listFocusAndSelectionOutline:asCssVariable(listFocusAndSelectionOutline),listFocusAndSelectionBackground:asCssVariable(listActiveSelectionBackground),listFocusAndSelectionForeground:asCssVariable(listActiveSelectionForeground),listInactiveSelectionBackground:asCssVariable(listInactiveSelectionBackground),listInactiveSelectionIconForeground:asCssVariable(listInactiveSelectionIconForeground),listInactiveSelectionForeground:asCssVariable(listInactiveSelectionForeground),listInactiveFocusBackground:asCssVariable(listInactiveFocusBackground),listInactiveFocusOutline:asCssVariable(listInactiveFocusOutline),listHoverBackground:asCssVariable(listHoverBackground),listHoverForeground:asCssVariable(listHoverForeground),listDropBackground:asCssVariable(listDropBackground),listSelectionOutline:asCssVariable(activeContrastBorder),listHoverOutline:asCssVariable(activeContrastBorder),treeIndentGuidesStroke:asCssVariable(treeIndentGuidesStroke),treeInactiveIndentGuidesStroke:asCssVariable(treeInactiveIndentGuidesStroke),tableColumnsBorder:asCssVariable(tableColumnsBorder),tableOddRowsBackgroundColor:asCssVariable(tableOddRowsBackgroundColor)};defaultSelectBoxStyles={selectBackground:asCssVariable(selectBackground),selectListBackground:asCssVariable(selectListBackground),selectForeground:asCssVariable(selectForeground),decoratorRightForeground:asCssVariable(pickerGroupForeground),selectBorder:asCssVariable(selectBorder),focusBorder:asCssVariable(focusBorder),listFocusBackground:asCssVariable(quickInputListFocusBackground),listInactiveSelectionIconForeground:asCssVariable(quickInputListFocusIconForeground),listFocusForeground:asCssVariable(quickInputListFocusForeground),listFocusOutline:asCssVariableWithDefault(activeContrastBorder,Color.transparent.toString()),listHoverBackground:asCssVariable(listHoverBackground),listHoverForeground:asCssVariable(listHoverForeground),listHoverOutline:asCssVariable(activeContrastBorder),selectListBorder:asCssVariable(editorWidgetBorder),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0};defaultMenuStyles={shadowColor:asCssVariable(widgetShadow),borderColor:asCssVariable(menuBorder),foregroundColor:asCssVariable(menuForeground),backgroundColor:asCssVariable(menuBackground),selectionForegroundColor:asCssVariable(menuSelectionForeground),selectionBackgroundColor:asCssVariable(menuSelectionBackground),selectionBorderColor:asCssVariable(menuSelectionBorder),separatorColor:asCssVariable(menuSeparatorBackground),scrollbarShadow:asCssVariable(scrollbarShadow),scrollbarSliderBackground:asCssVariable(scrollbarSliderBackground),scrollbarSliderHoverBackground:asCssVariable(scrollbarSliderHoverBackground),scrollbarSliderActiveBackground:asCssVariable(scrollbarSliderActiveBackground)}}});function createAndFillInContextMenuActions(menu,options2,target,primaryGroup){const groups=menu.getActions(options2);const modifierKeyEmitter=ModifierKeyEmitter.getInstance();const useAlternativeActions=modifierKeyEmitter.keyStatus.altKey||(isWindows||isLinux)&&modifierKeyEmitter.keyStatus.shiftKey;fillInActions(groups,target,useAlternativeActions,primaryGroup?actionGroup=>actionGroup===primaryGroup:actionGroup=>actionGroup==="navigation")}function createAndFillInActionBarActions(menu,options2,target,primaryGroup,shouldInlineSubmenu,useSeparatorsInPrimaryActions){const groups=menu.getActions(options2);const isPrimaryAction=typeof primaryGroup==="string"?actionGroup=>actionGroup===primaryGroup:primaryGroup;fillInActions(groups,target,false,isPrimaryAction,shouldInlineSubmenu,useSeparatorsInPrimaryActions)}function fillInActions(groups,target,useAlternativeActions,isPrimaryAction=(actionGroup=>actionGroup==="navigation"),shouldInlineSubmenu=(()=>false),useSeparatorsInPrimaryActions=false){let primaryBucket;let secondaryBucket;if(Array.isArray(target)){primaryBucket=target;secondaryBucket=target}else{primaryBucket=target.primary;secondaryBucket=target.secondary}const submenuInfo=new Set;for(const[group3,actions]of groups){let target2;if(isPrimaryAction(group3)){target2=primaryBucket;if(target2.length>0&&useSeparatorsInPrimaryActions){target2.push(new Separator)}}else{target2=secondaryBucket;if(target2.length>0){target2.push(new Separator)}}for(let action of actions){if(useAlternativeActions){action=action instanceof MenuItemAction&&action.alt?action.alt:action}const newLen=target2.push(action);if(action instanceof SubmenuAction){submenuInfo.add({group:group3,action:action,index:newLen-1})}}}for(const{group:group3,action:action,index:index}of submenuInfo){const target2=isPrimaryAction(group3)?primaryBucket:secondaryBucket;const submenuActions=action.actions;if(submenuActions.length<=1&&shouldInlineSubmenu(action,group3,target2.length)){target2.splice(index,1,...submenuActions)}}}function createActionViewItem(instaService,action,options2){if(action instanceof MenuItemAction){return instaService.createInstance(MenuEntryActionViewItem,action,options2)}else if(action instanceof SubmenuItemAction){if(action.item.isSelection){return instaService.createInstance(SubmenuEntrySelectActionViewItem,action)}else{if(action.item.rememberDefaultAction){return instaService.createInstance(DropdownWithDefaultActionViewItem,action,Object.assign(Object.assign({},options2),{persistLastActionId:true}))}else{return instaService.createInstance(SubmenuEntryActionViewItem,action,options2)}}}else{return void 0}}var __decorate28,__param24,__awaiter21,MenuEntryActionViewItem,SubmenuEntryActionViewItem,DropdownWithDefaultActionViewItem,SubmenuEntrySelectActionViewItem;var init_menuEntryActionViewItem=__esm({"node_modules/monaco-editor/esm/vs/platform/actions/browser/menuEntryActionViewItem.js"(){init_dom();init_keyboardEvent();init_actionViewItems();init_dropdownActionViewItem();init_actions();init_keybindingLabels();init_lifecycle();init_platform();init_33();init_nls();init_actions2();init_action();init_contextkey();init_contextView();init_instantiation();init_keybinding();init_notification();init_storage2();init_themeService();init_themables();init_theme();init_types();init_colorRegistry();init_defaultStyles();init_accessibility();__decorate28=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param24=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter21=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};MenuEntryActionViewItem=class MenuEntryActionViewItem2 extends ActionViewItem{constructor(action,options2,_keybindingService,_notificationService,_contextKeyService,_themeService,_contextMenuService,_accessibilityService){super(void 0,action,{icon:!!(action.class||action.item.icon),label:!action.class&&!action.item.icon,draggable:options2===null||options2===void 0?void 0:options2.draggable,keybinding:options2===null||options2===void 0?void 0:options2.keybinding,hoverDelegate:options2===null||options2===void 0?void 0:options2.hoverDelegate});this._keybindingService=_keybindingService;this._notificationService=_notificationService;this._contextKeyService=_contextKeyService;this._themeService=_themeService;this._contextMenuService=_contextMenuService;this._accessibilityService=_accessibilityService;this._wantsAltCommand=false;this._itemClassDispose=this._register(new MutableDisposable);this._altKey=ModifierKeyEmitter.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(event){return __awaiter21(this,void 0,void 0,(function*(){event.preventDefault();event.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(err){this._notificationService.error(err)}}))}render(container){super.render(container);container.classList.add("menu-entry");if(this.options.icon){this._updateItemClass(this._menuItemAction.item)}if(this._menuItemAction.alt){let isMouseOver=false;const updateAltState=()=>{var _a6;const wantsAltCommand=!!((_a6=this._menuItemAction.alt)===null||_a6===void 0?void 0:_a6.enabled)&&(!this._accessibilityService.isMotionReduced()||isMouseOver)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&isMouseOver);if(wantsAltCommand!==this._wantsAltCommand){this._wantsAltCommand=wantsAltCommand;this.updateLabel();this.updateTooltip();this.updateClass()}};this._register(this._altKey.event(updateAltState));this._register(addDisposableListener(container,"mouseleave",(_=>{isMouseOver=false;updateAltState()})));this._register(addDisposableListener(container,"mouseenter",(_=>{isMouseOver=true;updateAltState()})));updateAltState()}}updateLabel(){if(this.options.label&&this.label){this.label.textContent=this._commandAction.label}}getTooltip(){var _a6;const keybinding=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService);const keybindingLabel=keybinding&&keybinding.getLabel();const tooltip=this._commandAction.tooltip||this._commandAction.label;let title=keybindingLabel?localize("titleAndKb","{0} ({1})",tooltip,keybindingLabel):tooltip;if(!this._wantsAltCommand&&((_a6=this._menuItemAction.alt)===null||_a6===void 0?void 0:_a6.enabled)){const altTooltip=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label;const altKeybinding=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService);const altKeybindingLabel=altKeybinding&&altKeybinding.getLabel();const altTitleSection=altKeybindingLabel?localize("titleAndKb","{0} ({1})",altTooltip,altKeybindingLabel):altTooltip;title=localize("titleAndKbAndAlt","{0}\n[{1}] {2}",title,UILabelProvider.modifierLabels[OS].altKey,altTitleSection)}return title}updateClass(){if(this.options.icon){if(this._commandAction!==this._menuItemAction){if(this._menuItemAction.alt){this._updateItemClass(this._menuItemAction.alt.item)}}else{this._updateItemClass(this._menuItemAction.item)}}}_updateItemClass(item){this._itemClassDispose.value=void 0;const{element:element,label:label}=this;if(!element||!label){return}const icon=this._commandAction.checked&&isICommandActionToggleInfo(item.toggled)&&item.toggled.icon?item.toggled.icon:item.icon;if(!icon){return}if(ThemeIcon.isThemeIcon(icon)){const iconClasses=ThemeIcon.asClassNameArray(icon);label.classList.add(...iconClasses);this._itemClassDispose.value=toDisposable((()=>{label.classList.remove(...iconClasses)}))}else{label.style.backgroundImage=isDark(this._themeService.getColorTheme().type)?asCSSUrl(icon.dark):asCSSUrl(icon.light);label.classList.add("icon");this._itemClassDispose.value=combinedDisposable(toDisposable((()=>{label.style.backgroundImage="";label.classList.remove("icon")})),this._themeService.onDidColorThemeChange((()=>{this.updateClass()})))}}};MenuEntryActionViewItem=__decorate28([__param24(2,IKeybindingService),__param24(3,INotificationService),__param24(4,IContextKeyService),__param24(5,IThemeService),__param24(6,IContextMenuService),__param24(7,IAccessibilityService)],MenuEntryActionViewItem);SubmenuEntryActionViewItem=class SubmenuEntryActionViewItem2 extends DropdownMenuActionViewItem{constructor(action,options2,_keybindingService,_contextMenuService,_themeService){var _a6,_b3,_c2;const dropdownOptions=Object.assign(Object.assign({},options2),{menuAsChild:(_a6=options2===null||options2===void 0?void 0:options2.menuAsChild)!==null&&_a6!==void 0?_a6:false,classNames:(_b3=options2===null||options2===void 0?void 0:options2.classNames)!==null&&_b3!==void 0?_b3:ThemeIcon.isThemeIcon(action.item.icon)?ThemeIcon.asClassName(action.item.icon):void 0,keybindingProvider:(_c2=options2===null||options2===void 0?void 0:options2.keybindingProvider)!==null&&_c2!==void 0?_c2:action2=>_keybindingService.lookupKeybinding(action2.id)});super(action,{getActions:()=>action.actions},_contextMenuService,dropdownOptions);this._keybindingService=_keybindingService;this._contextMenuService=_contextMenuService;this._themeService=_themeService}render(container){super.render(container);assertType(this.element);container.classList.add("menu-entry");const action=this._action;const{icon:icon}=action.item;if(icon&&!ThemeIcon.isThemeIcon(icon)){this.element.classList.add("icon");const setBackgroundImage=()=>{if(this.element){this.element.style.backgroundImage=isDark(this._themeService.getColorTheme().type)?asCSSUrl(icon.dark):asCSSUrl(icon.light)}};setBackgroundImage();this._register(this._themeService.onDidColorThemeChange((()=>{setBackgroundImage()})))}}};SubmenuEntryActionViewItem=__decorate28([__param24(2,IKeybindingService),__param24(3,IContextMenuService),__param24(4,IThemeService)],SubmenuEntryActionViewItem);DropdownWithDefaultActionViewItem=class DropdownWithDefaultActionViewItem2 extends BaseActionViewItem{constructor(submenuAction,options2,_keybindingService,_notificationService,_contextMenuService,_menuService,_instaService,_storageService){var _a6,_b3,_c2;super(null,submenuAction);this._keybindingService=_keybindingService;this._notificationService=_notificationService;this._contextMenuService=_contextMenuService;this._menuService=_menuService;this._instaService=_instaService;this._storageService=_storageService;this._container=null;this._options=options2;this._storageKey=`${submenuAction.item.submenu.id}_lastActionId`;let defaultAction;const defaultActionId=(options2===null||options2===void 0?void 0:options2.persistLastActionId)?_storageService.get(this._storageKey,1):void 0;if(defaultActionId){defaultAction=submenuAction.actions.find((a=>defaultActionId===a.id))}if(!defaultAction){defaultAction=submenuAction.actions[0]}this._defaultAction=this._instaService.createInstance(MenuEntryActionViewItem,defaultAction,{keybinding:this._getDefaultActionKeybindingLabel(defaultAction)});const dropdownOptions=Object.assign(Object.assign({keybindingProvider:action=>this._keybindingService.lookupKeybinding(action.id)},options2),{menuAsChild:(_a6=options2===null||options2===void 0?void 0:options2.menuAsChild)!==null&&_a6!==void 0?_a6:true,classNames:(_b3=options2===null||options2===void 0?void 0:options2.classNames)!==null&&_b3!==void 0?_b3:["codicon","codicon-chevron-down"],actionRunner:(_c2=options2===null||options2===void 0?void 0:options2.actionRunner)!==null&&_c2!==void 0?_c2:new ActionRunner});this._dropdown=new DropdownMenuActionViewItem(submenuAction,submenuAction.actions,this._contextMenuService,dropdownOptions);this._dropdown.actionRunner.onDidRun((e=>{if(e.action instanceof MenuItemAction){this.update(e.action)}}))}update(lastAction){var _a6;if((_a6=this._options)===null||_a6===void 0?void 0:_a6.persistLastActionId){this._storageService.store(this._storageKey,lastAction.id,1,1)}this._defaultAction.dispose();this._defaultAction=this._instaService.createInstance(MenuEntryActionViewItem,lastAction,{keybinding:this._getDefaultActionKeybindingLabel(lastAction)});this._defaultAction.actionRunner=new class extends ActionRunner{runAction(action,context){return __awaiter21(this,void 0,void 0,(function*(){yield action.run(void 0)}))}};if(this._container){this._defaultAction.render(prepend(this._container,$(".action-container")))}}_getDefaultActionKeybindingLabel(defaultAction){var _a6;let defaultActionKeybinding;if((_a6=this._options)===null||_a6===void 0?void 0:_a6.renderKeybindingWithDefaultActionLabel){const kb=this._keybindingService.lookupKeybinding(defaultAction.id);if(kb){defaultActionKeybinding=`(${kb.getLabel()})`}}return defaultActionKeybinding}setActionContext(newContext){super.setActionContext(newContext);this._defaultAction.setActionContext(newContext);this._dropdown.setActionContext(newContext)}render(container){this._container=container;super.render(this._container);this._container.classList.add("monaco-dropdown-with-default");const primaryContainer=$(".action-container");this._defaultAction.render(append(this._container,primaryContainer));this._register(addDisposableListener(primaryContainer,EventType.KEY_DOWN,(e=>{const event=new StandardKeyboardEvent(e);if(event.equals(17)){this._defaultAction.element.tabIndex=-1;this._dropdown.focus();event.stopPropagation()}})));const dropdownContainer=$(".dropdown-action-container");this._dropdown.render(append(this._container,dropdownContainer));this._register(addDisposableListener(dropdownContainer,EventType.KEY_DOWN,(e=>{var _a6;const event=new StandardKeyboardEvent(e);if(event.equals(15)){this._defaultAction.element.tabIndex=0;this._dropdown.setFocusable(false);(_a6=this._defaultAction.element)===null||_a6===void 0?void 0:_a6.focus();event.stopPropagation()}})))}focus(fromRight){if(fromRight){this._dropdown.focus()}else{this._defaultAction.element.tabIndex=0;this._defaultAction.element.focus()}}blur(){this._defaultAction.element.tabIndex=-1;this._dropdown.blur();this._container.blur()}setFocusable(focusable){if(focusable){this._defaultAction.element.tabIndex=0}else{this._defaultAction.element.tabIndex=-1;this._dropdown.setFocusable(false)}}dispose(){this._defaultAction.dispose();this._dropdown.dispose();super.dispose()}};DropdownWithDefaultActionViewItem=__decorate28([__param24(2,IKeybindingService),__param24(3,INotificationService),__param24(4,IContextMenuService),__param24(5,IMenuService),__param24(6,IInstantiationService),__param24(7,IStorageService)],DropdownWithDefaultActionViewItem);SubmenuEntrySelectActionViewItem=class SubmenuEntrySelectActionViewItem2 extends SelectActionViewItem{constructor(action,contextViewService){super(null,action,action.actions.map((a=>({text:a.id===Separator.ID?"─────────":a.label,isDisabled:!a.enabled}))),0,contextViewService,defaultSelectBoxStyles,{ariaLabel:action.tooltip,optionsAsChildren:true});this.select(Math.max(0,action.actions.findIndex((a=>a.checked))))}render(container){super.render(container);container.style.borderColor=asCssVariable(selectBorder)}runAction(option,index){const action=this.action.actions[index];if(action){this.actionRunner.run(action)}}};SubmenuEntrySelectActionViewItem=__decorate28([__param24(1,IContextViewService)],SubmenuEntrySelectActionViewItem)}});function cleanMnemonic(label){const regex=MENU_MNEMONIC_REGEX;const matches=regex.exec(label);if(!matches){return label}const mnemonicInText=!matches[1];return label.replace(regex,mnemonicInText?"$2$3":"").trim()}function formatRule(c){const fontCharacter=getCodiconFontCharacters()[c.id];return`.codicon-${c.id}:before { content: '\\${fontCharacter.toString(16)}'; }`}function getMenuWidgetCSS(style,isForShadowDom){let result=`\n.monaco-menu {\n\tfont-size: 13px;\n\tborder-radius: 5px;\n\tmin-width: 160px;\n}\n\n${formatRule(Codicon.menuSelection)}\n${formatRule(Codicon.menuSubmenu)}\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\tcolor: var(--vscode-disabledForeground);\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 var(--vscode-menu-separatorBackground);\n\tpadding-top: 1px;\n\tpadding: 30px;\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\tmargin: 0 4px;\n\tborder-radius: 4px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding {\n\topacity: unset;\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\twidth: 100%;\n\theight: 0px !important;\n\topacity: 1;\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.hc-black .context-view.monaco-menu-container,\n.hc-light .context-view.monaco-menu-container,\n:host-context(.hc-black) .context-view.monaco-menu-container,\n:host-context(.hc-light) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused,\n:host-context(.hc-light) .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: 4px 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 2em;\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\tmargin: 5px 0 !important;\n\tpadding: 0;\n\tborder-radius: 0;\n}\n\n.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator,\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.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator,\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}`;if(isForShadowDom){result+=`\n\t\t\t/* Arrows */\n\t\t\t.monaco-scrollable-element > .scrollbar > .scra {\n\t\t\t\tcursor: pointer;\n\t\t\t\tfont-size: 11px !important;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .visible {\n\t\t\t\topacity: 1;\n\n\t\t\t\t/* Background rule added for IE9 - to allow clicks on dom node */\n\t\t\t\tbackground:rgba(0,0,0,0);\n\n\t\t\t\ttransition: opacity 100ms linear;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible {\n\t\t\t\topacity: 0;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .invisible.fade {\n\t\t\t\ttransition: opacity 800ms linear;\n\t\t\t}\n\n\t\t\t/* Scrollable Content Inset Shadow */\n\t\t\t.monaco-scrollable-element > .shadow {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 3px;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t\t.monaco-scrollable-element > .shadow.top-left-corner {\n\t\t\t\tdisplay: block;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\theight: 3px;\n\t\t\t\twidth: 3px;\n\t\t\t}\n\t\t`;const scrollbarShadowColor=style.scrollbarShadow;if(scrollbarShadowColor){result+=`\n\t\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\t\tbox-shadow: ${scrollbarShadowColor} 0 6px 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\t\tbox-shadow: ${scrollbarShadowColor} 6px 0 6px -6px inset;\n\t\t\t\t}\n\n\t\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\t\tbox-shadow: ${scrollbarShadowColor} 6px 6px 6px -6px inset;\n\t\t\t\t}\n\t\t\t`}const scrollbarSliderBackgroundColor=style.scrollbarSliderBackground;if(scrollbarSliderBackgroundColor){result+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\t\tbackground: ${scrollbarSliderBackgroundColor};\n\t\t\t\t}\n\t\t\t`}const scrollbarSliderHoverBackgroundColor=style.scrollbarSliderHoverBackground;if(scrollbarSliderHoverBackgroundColor){result+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\t\tbackground: ${scrollbarSliderHoverBackgroundColor};\n\t\t\t\t}\n\t\t\t`}const scrollbarSliderActiveBackgroundColor=style.scrollbarSliderActiveBackground;if(scrollbarSliderActiveBackgroundColor){result+=`\n\t\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\t\tbackground: ${scrollbarSliderActiveBackgroundColor};\n\t\t\t\t}\n\t\t\t`}}return result}var MENU_MNEMONIC_REGEX,MENU_ESCAPED_MNEMONIC_REGEX,Direction,Menu,BaseMenuActionViewItem,SubmenuMenuActionViewItem,MenuSeparatorActionViewItem;var init_menu=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/menu/menu.js"(){init_browser();init_touch();init_dom();init_keyboardEvent();init_mouseEvent();init_actionbar();init_actionViewItems();init_contextview();init_scrollableElement();init_actions();init_async();init_codicons();init_themables();init_iconLabels();init_lifecycle();init_platform();init_strings();MENU_MNEMONIC_REGEX=/\(&([^\s&])\)|(^|[^&])&([^\s&])/;MENU_ESCAPED_MNEMONIC_REGEX=/(&)?(&)([^\s&])/g;(function(Direction2){Direction2[Direction2["Right"]=0]="Right";Direction2[Direction2["Left"]=1]="Left"})(Direction||(Direction={}));Menu=class extends ActionBar{constructor(container,actions,options2,menuStyles){container.classList.add("monaco-menu-container");container.setAttribute("role","presentation");const menuElement=document.createElement("div");menuElement.classList.add("monaco-menu");menuElement.setAttribute("role","presentation");super(menuElement,{orientation:1,actionViewItemProvider:action=>this.doGetActionViewItem(action,options2,parentData),context:options2.context,actionRunner:options2.actionRunner,ariaLabel:options2.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:true,triggerKeys:{keys:[3,...isMacintosh||isLinux?[10]:[]],keyDown:true}});this.menuStyles=menuStyles;this.menuElement=menuElement;this.actionsList.tabIndex=0;this.menuDisposables=this._register(new DisposableStore);this.initializeOrUpdateStyleSheet(container,menuStyles);this._register(Gesture.addTarget(menuElement));addDisposableListener(menuElement,EventType.KEY_DOWN,(e=>{const event=new StandardKeyboardEvent(e);if(event.equals(2)){e.preventDefault()}}));if(options2.enableMnemonics){this.menuDisposables.add(addDisposableListener(menuElement,EventType.KEY_DOWN,(e=>{const key=e.key.toLocaleLowerCase();if(this.mnemonics.has(key)){EventHelper.stop(e,true);const actions2=this.mnemonics.get(key);if(actions2.length===1){if(actions2[0]instanceof SubmenuMenuActionViewItem&&actions2[0].container){this.focusItemByElement(actions2[0].container)}actions2[0].onClick(e)}if(actions2.length>1){const action=actions2.shift();if(action&&action.container){this.focusItemByElement(action.container);actions2.push(action)}this.mnemonics.set(key,actions2)}}})))}if(isLinux){this._register(addDisposableListener(menuElement,EventType.KEY_DOWN,(e=>{const event=new StandardKeyboardEvent(e);if(event.equals(14)||event.equals(11)){this.focusedItem=this.viewItems.length-1;this.focusNext();EventHelper.stop(e,true)}else if(event.equals(13)||event.equals(12)){this.focusedItem=0;this.focusPrevious();EventHelper.stop(e,true)}})))}this._register(addDisposableListener(this.domNode,EventType.MOUSE_OUT,(e=>{const relatedTarget=e.relatedTarget;if(!isAncestor(relatedTarget,this.domNode)){this.focusedItem=void 0;this.updateFocus();e.stopPropagation()}})));this._register(addDisposableListener(this.actionsList,EventType.MOUSE_OVER,(e=>{let target=e.target;if(!target||!isAncestor(target,this.actionsList)||target===this.actionsList){return}while(target.parentElement!==this.actionsList&&target.parentElement!==null){target=target.parentElement}if(target.classList.contains("action-item")){const lastFocusedItem=this.focusedItem;this.setFocusedItem(target);if(lastFocusedItem!==this.focusedItem){this.updateFocus()}}})));this._register(Gesture.addTarget(this.actionsList));this._register(addDisposableListener(this.actionsList,EventType2.Tap,(e=>{let target=e.initialTarget;if(!target||!isAncestor(target,this.actionsList)||target===this.actionsList){return}while(target.parentElement!==this.actionsList&&target.parentElement!==null){target=target.parentElement}if(target.classList.contains("action-item")){const lastFocusedItem=this.focusedItem;this.setFocusedItem(target);if(lastFocusedItem!==this.focusedItem){this.updateFocus()}}})));const parentData={parent:this};this.mnemonics=new Map;this.scrollableElement=this._register(new DomScrollableElement(menuElement,{alwaysConsumeMouseWheel:true,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:true,useShadows:true}));const scrollElement=this.scrollableElement.getDomNode();scrollElement.style.position="";this.styleScrollElement(scrollElement,menuStyles);this._register(addDisposableListener(menuElement,EventType2.Change,(e=>{EventHelper.stop(e,true);const scrollTop=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:scrollTop-e.translationY})})));this._register(addDisposableListener(scrollElement,EventType.MOUSE_UP,(e=>{e.preventDefault()})));menuElement.style.maxHeight=`${Math.max(10,window.innerHeight-container.getBoundingClientRect().top-35)}px`;actions=actions.filter((a=>{var _a6;if((_a6=options2.submenuIds)===null||_a6===void 0?void 0:_a6.has(a.id)){console.warn(`Found submenu cycle: ${a.id}`);return false}return true}));this.push(actions,{icon:true,label:true,isMenu:true});container.appendChild(this.scrollableElement.getDomNode());this.scrollableElement.scanDomNode();this.viewItems.filter((item=>!(item instanceof MenuSeparatorActionViewItem))).forEach(((item,index,array2)=>{item.updatePositionInSet(index+1,array2.length)}))}initializeOrUpdateStyleSheet(container,style){if(!this.styleSheet){if(isInShadowDOM(container)){this.styleSheet=createStyleSheet(container)}else{if(!Menu.globalStyleSheet){Menu.globalStyleSheet=createStyleSheet()}this.styleSheet=Menu.globalStyleSheet}}this.styleSheet.textContent=getMenuWidgetCSS(style,isInShadowDOM(container))}styleScrollElement(scrollElement,style){var _a6,_b3;const fgColor=(_a6=style.foregroundColor)!==null&&_a6!==void 0?_a6:"";const bgColor=(_b3=style.backgroundColor)!==null&&_b3!==void 0?_b3:"";const border=style.borderColor?`1px solid ${style.borderColor}`:"";const borderRadius="5px";const shadow=style.shadowColor?`0 2px 8px ${style.shadowColor}`:"";scrollElement.style.outline=border;scrollElement.style.borderRadius=borderRadius;scrollElement.style.color=fgColor;scrollElement.style.backgroundColor=bgColor;scrollElement.style.boxShadow=shadow}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(element){const lastFocusedItem=this.focusedItem;this.setFocusedItem(element);if(lastFocusedItem!==this.focusedItem){this.updateFocus()}}setFocusedItem(element){for(let i=0;i{if(!this.element){return}this._register(addDisposableListener(this.element,EventType.MOUSE_UP,(e=>{EventHelper.stop(e,true);if(isFirefox2){const mouseEvent=new StandardMouseEvent(e);if(mouseEvent.rightButton){return}this.onClick(e)}else{setTimeout((()=>{this.onClick(e)}),0)}})));this._register(addDisposableListener(this.element,EventType.CONTEXT_MENU,(e=>{EventHelper.stop(e,true)})))}),100);this._register(this.runOnceToEnableMouseUp)}render(container){super.render(container);if(!this.element){return}this.container=container;this.item=append(this.element,$("a.action-menu-item"));if(this._action.id===Separator.ID){this.item.setAttribute("role","presentation")}else{this.item.setAttribute("role","menuitem");if(this.mnemonic){this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)}}this.check=append(this.item,$("span.menu-item-check"+ThemeIcon.asCSSSelector(Codicon.menuSelection)));this.check.setAttribute("role","none");this.label=append(this.item,$("span.action-label"));if(this.options.label&&this.options.keybinding){append(this.item,$("span.keybinding")).textContent=this.options.keybinding}this.runOnceToEnableMouseUp.schedule();this.updateClass();this.updateLabel();this.updateTooltip();this.updateEnabled();this.updateChecked();this.applyStyle()}blur(){super.blur();this.applyStyle()}focus(){var _a6;super.focus();(_a6=this.item)===null||_a6===void 0?void 0:_a6.focus();this.applyStyle()}updatePositionInSet(pos,setSize){if(this.item){this.item.setAttribute("aria-posinset",`${pos}`);this.item.setAttribute("aria-setsize",`${setSize}`)}}updateLabel(){var _a6;if(!this.label){return}if(this.options.label){clearNode(this.label);let label=stripIcons(this.action.label);if(label){const cleanLabel=cleanMnemonic(label);if(!this.options.enableMnemonics){label=cleanLabel}this.label.setAttribute("aria-label",cleanLabel.replace(/&&/g,"&"));const matches=MENU_MNEMONIC_REGEX.exec(label);if(matches){label=escape(label);MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let escMatch=MENU_ESCAPED_MNEMONIC_REGEX.exec(label);while(escMatch&&escMatch[1]){escMatch=MENU_ESCAPED_MNEMONIC_REGEX.exec(label)}const replaceDoubleEscapes=str=>str.replace(/&&/g,"&");if(escMatch){this.label.append(ltrim(replaceDoubleEscapes(label.substr(0,escMatch.index))," "),$("u",{"aria-hidden":"true"},escMatch[3]),rtrim(replaceDoubleEscapes(label.substr(escMatch.index+escMatch[0].length))," "))}else{this.label.innerText=replaceDoubleEscapes(label).trim()}(_a6=this.item)===null||_a6===void 0?void 0:_a6.setAttribute("aria-keyshortcuts",(!!matches[1]?matches[1]:matches[3]).toLocaleLowerCase())}else{this.label.innerText=label.replace(/&&/g,"&").trim()}}}}updateTooltip(){}updateClass(){if(this.cssClass&&this.item){this.item.classList.remove(...this.cssClass.split(" "))}if(this.options.icon&&this.label){this.cssClass=this.action.class||"";this.label.classList.add("icon");if(this.cssClass){this.label.classList.add(...this.cssClass.split(" "))}this.updateEnabled()}else if(this.label){this.label.classList.remove("icon")}}updateEnabled(){if(this.action.enabled){if(this.element){this.element.classList.remove("disabled");this.element.removeAttribute("aria-disabled")}if(this.item){this.item.classList.remove("disabled");this.item.removeAttribute("aria-disabled");this.item.tabIndex=0}}else{if(this.element){this.element.classList.add("disabled");this.element.setAttribute("aria-disabled","true")}if(this.item){this.item.classList.add("disabled");this.item.setAttribute("aria-disabled","true")}}}updateChecked(){if(!this.item){return}const checked=this.action.checked;this.item.classList.toggle("checked",!!checked);if(checked!==void 0){this.item.setAttribute("role","menuitemcheckbox");this.item.setAttribute("aria-checked",checked?"true":"false")}else{this.item.setAttribute("role","menuitem");this.item.setAttribute("aria-checked","")}}getMnemonic(){return this.mnemonic}applyStyle(){const isSelected=this.element&&this.element.classList.contains("focused");const fgColor=isSelected&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;const bgColor=isSelected&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0;const outline=isSelected&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"";const outlineOffset=isSelected&&this.menuStyle.selectionBorderColor?`-1px`:"";if(this.item){this.item.style.color=fgColor!==null&&fgColor!==void 0?fgColor:"";this.item.style.backgroundColor=bgColor!==null&&bgColor!==void 0?bgColor:"";this.item.style.outline=outline;this.item.style.outlineOffset=outlineOffset}if(this.check){this.check.style.color=fgColor!==null&&fgColor!==void 0?fgColor:""}}};SubmenuMenuActionViewItem=class extends BaseMenuActionViewItem{constructor(action,submenuActions,parentData,submenuOptions,menuStyles){super(action,action,submenuOptions,menuStyles);this.submenuActions=submenuActions;this.parentData=parentData;this.submenuOptions=submenuOptions;this.mysubmenu=null;this.submenuDisposables=this._register(new DisposableStore);this.mouseOver=false;this.expandDirection=submenuOptions&&submenuOptions.expandDirection!==void 0?submenuOptions.expandDirection:Direction.Right;this.showScheduler=new RunOnceScheduler((()=>{if(this.mouseOver){this.cleanupExistingSubmenu(false);this.createSubmenu(false)}}),250);this.hideScheduler=new RunOnceScheduler((()=>{if(this.element&&(!isAncestor(getActiveElement(),this.element)&&this.parentData.submenu===this.mysubmenu)){this.parentData.parent.focus(false);this.cleanupExistingSubmenu(true)}}),750)}render(container){super.render(container);if(!this.element){return}if(this.item){this.item.classList.add("monaco-submenu-item");this.item.tabIndex=0;this.item.setAttribute("aria-haspopup","true");this.updateAriaExpanded("false");this.submenuIndicator=append(this.item,$("span.submenu-indicator"+ThemeIcon.asCSSSelector(Codicon.menuSubmenu)));this.submenuIndicator.setAttribute("aria-hidden","true")}this._register(addDisposableListener(this.element,EventType.KEY_UP,(e=>{const event=new StandardKeyboardEvent(e);if(event.equals(17)||event.equals(3)){EventHelper.stop(e,true);this.createSubmenu(true)}})));this._register(addDisposableListener(this.element,EventType.KEY_DOWN,(e=>{const event=new StandardKeyboardEvent(e);if(getActiveElement()===this.item){if(event.equals(17)||event.equals(3)){EventHelper.stop(e,true)}}})));this._register(addDisposableListener(this.element,EventType.MOUSE_OVER,(e=>{if(!this.mouseOver){this.mouseOver=true;this.showScheduler.schedule()}})));this._register(addDisposableListener(this.element,EventType.MOUSE_LEAVE,(e=>{this.mouseOver=false})));this._register(addDisposableListener(this.element,EventType.FOCUS_OUT,(e=>{if(this.element&&!isAncestor(getActiveElement(),this.element)){this.hideScheduler.schedule()}})));this._register(this.parentData.parent.onScroll((()=>{if(this.parentData.submenu===this.mysubmenu){this.parentData.parent.focus(false);this.cleanupExistingSubmenu(true)}})))}updateEnabled(){}onClick(e){EventHelper.stop(e,true);this.cleanupExistingSubmenu(false);this.createSubmenu(true)}cleanupExistingSubmenu(force){if(this.parentData.submenu&&(force||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(_a6){}this.parentData.submenu=void 0;this.updateAriaExpanded("false");if(this.submenuContainer){this.submenuDisposables.clear();this.submenuContainer=void 0}}}calculateSubmenuMenuLayout(windowDimensions,submenu,entry,expandDirection){const ret={top:0,left:0};ret.left=layout(windowDimensions.width,submenu.width,{position:expandDirection===Direction.Right?0:1,offset:entry.left,size:entry.width});if(ret.left>=entry.left&&ret.left{const event=new StandardKeyboardEvent(e);if(event.equals(15)){EventHelper.stop(e,true);this.parentData.parent.focus();this.cleanupExistingSubmenu(true)}})));this.submenuDisposables.add(addDisposableListener(this.submenuContainer,EventType.KEY_DOWN,(e=>{const event=new StandardKeyboardEvent(e);if(event.equals(15)){EventHelper.stop(e,true)}})));this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus();this.cleanupExistingSubmenu(true)})));this.parentData.submenu.focus(selectFirstItem);this.mysubmenu=this.parentData.submenu}else{this.parentData.submenu.focus(false)}}updateAriaExpanded(value){var _a6;if(this.item){(_a6=this.item)===null||_a6===void 0?void 0:_a6.setAttribute("aria-expanded",value)}}applyStyle(){super.applyStyle();const isSelected=this.element&&this.element.classList.contains("focused");const fgColor=isSelected&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;if(this.submenuIndicator){this.submenuIndicator.style.color=fgColor!==null&&fgColor!==void 0?fgColor:""}}dispose(){super.dispose();this.hideScheduler.dispose();if(this.mysubmenu){this.mysubmenu.dispose();this.mysubmenu=null}if(this.submenuContainer){this.submenuContainer=void 0}}};MenuSeparatorActionViewItem=class extends ActionViewItem{constructor(context,action,options2,menuStyles){super(context,action,options2);this.menuStyles=menuStyles}render(container){super.render(container);if(this.label){this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:""}}}}});var ContextMenuHandler;var init_contextMenuHandler=__esm({"node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.js"(){init_dom();init_mouseEvent();init_menu();init_actions();init_errors();init_lifecycle();init_defaultStyles();ContextMenuHandler=class{constructor(contextViewService,telemetryService,notificationService,keybindingService){this.contextViewService=contextViewService;this.telemetryService=telemetryService;this.notificationService=notificationService;this.keybindingService=keybindingService;this.focusToReturn=null;this.lastContainer=null;this.block=null;this.blockDisposable=null;this.options={blockMouse:true}}configure(options2){this.options=options2}showContextMenu(delegate){const actions=delegate.getActions();if(!actions.length){return}this.focusToReturn=document.activeElement;let menu;const shadowRootElement=isHTMLElement(delegate.domForShadowRoot)?delegate.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>delegate.getAnchor(),canRelayout:false,anchorAlignment:delegate.anchorAlignment,anchorAxisAlignment:delegate.anchorAxisAlignment,render:container=>{var _a6;this.lastContainer=container;const className=delegate.getMenuClassName?delegate.getMenuClassName():"";if(className){container.className+=" "+className}if(this.options.blockMouse){this.block=container.appendChild($(".context-view-block"));this.block.style.position="fixed";this.block.style.cursor="initial";this.block.style.left="0";this.block.style.top="0";this.block.style.width="100%";this.block.style.height="100%";this.block.style.zIndex="-1";(_a6=this.blockDisposable)===null||_a6===void 0?void 0:_a6.dispose();this.blockDisposable=addDisposableListener(this.block,EventType.MOUSE_DOWN,(e=>e.stopPropagation()))}const menuDisposables=new DisposableStore;const actionRunner=delegate.actionRunner||new ActionRunner;actionRunner.onWillRun((evt=>this.onActionRun(evt,!delegate.skipTelemetry)),this,menuDisposables);actionRunner.onDidRun(this.onDidActionRun,this,menuDisposables);menu=new Menu(container,actions,{actionViewItemProvider:delegate.getActionViewItem,context:delegate.getActionsContext?delegate.getActionsContext():null,actionRunner:actionRunner,getKeyBinding:delegate.getKeyBinding?delegate.getKeyBinding:action=>this.keybindingService.lookupKeybinding(action.id)},defaultMenuStyles);menu.onDidCancel((()=>this.contextViewService.hideContextView(true)),null,menuDisposables);menu.onDidBlur((()=>this.contextViewService.hideContextView(true)),null,menuDisposables);menuDisposables.add(addDisposableListener(window,EventType.BLUR,(()=>this.contextViewService.hideContextView(true))));menuDisposables.add(addDisposableListener(window,EventType.MOUSE_DOWN,(e=>{if(e.defaultPrevented){return}const event=new StandardMouseEvent(e);let element=event.target;if(event.rightButton){return}while(element){if(element===container){return}element=element.parentElement}this.contextViewService.hideContextView(true)})));return combinedDisposable(menuDisposables,menu)},focus:()=>{menu===null||menu===void 0?void 0:menu.focus(!!delegate.autoSelectFirstItem)},onHide:didCancel=>{var _a6,_b3,_c2;(_a6=delegate.onHide)===null||_a6===void 0?void 0:_a6.call(delegate,!!didCancel);if(this.block){this.block.remove();this.block=null}(_b3=this.blockDisposable)===null||_b3===void 0?void 0:_b3.dispose();this.blockDisposable=null;if(!!this.lastContainer&&(getActiveElement()===this.lastContainer||isAncestor(getActiveElement(),this.lastContainer))){(_c2=this.focusToReturn)===null||_c2===void 0?void 0:_c2.focus()}this.lastContainer=null}},shadowRootElement,!!shadowRootElement)}onActionRun(e,logTelemetry){if(logTelemetry){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"})}this.contextViewService.hideContextView(false)}onDidActionRun(e){if(e.error&&!isCancellationError(e.error)){this.notificationService.error(e.error)}}}}});var __decorate29,__param25,ContextMenuService,ContextMenuMenuDelegate;var init_contextMenuService=__esm({"node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuService.js"(){init_dom();init_actions();init_event();init_lifecycle();init_menuEntryActionViewItem();init_actions2();init_contextkey();init_keybinding();init_notification();init_telemetry();init_contextMenuHandler();init_contextView();__decorate29=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param25=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};ContextMenuService=class ContextMenuService2 extends Disposable{get contextMenuHandler(){if(!this._contextMenuHandler){this._contextMenuHandler=new ContextMenuHandler(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)}return this._contextMenuHandler}constructor(telemetryService,notificationService,contextViewService,keybindingService,menuService,contextKeyService){super();this.telemetryService=telemetryService;this.notificationService=notificationService;this.contextViewService=contextViewService;this.keybindingService=keybindingService;this.menuService=menuService;this.contextKeyService=contextKeyService;this._contextMenuHandler=void 0;this._onDidShowContextMenu=this._store.add(new Emitter);this._onDidHideContextMenu=this._store.add(new Emitter)}configure(options2){this.contextMenuHandler.configure(options2)}showContextMenu(delegate){delegate=ContextMenuMenuDelegate.transform(delegate,this.menuService,this.contextKeyService);this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},delegate),{onHide:didCancel=>{var _a6;(_a6=delegate.onHide)===null||_a6===void 0?void 0:_a6.call(delegate,didCancel);this._onDidHideContextMenu.fire()}}));ModifierKeyEmitter.getInstance().resetKeyStatus();this._onDidShowContextMenu.fire()}};ContextMenuService=__decorate29([__param25(0,ITelemetryService),__param25(1,INotificationService),__param25(2,IContextViewService),__param25(3,IKeybindingService),__param25(4,IMenuService),__param25(5,IContextKeyService)],ContextMenuService);(function(ContextMenuMenuDelegate2){function is(thing){return thing&&thing.menuId instanceof MenuId}function transform(delegate,menuService,globalContextKeyService){if(!is(delegate)){return delegate}const{menuId:menuId,menuActionOptions:menuActionOptions,contextKeyService:contextKeyService}=delegate;return Object.assign(Object.assign({},delegate),{getActions:()=>{const target=[];if(menuId){const menu=menuService.createMenu(menuId,contextKeyService!==null&&contextKeyService!==void 0?contextKeyService:globalContextKeyService);createAndFillInContextMenuActions(menu,menuActionOptions,target);menu.dispose()}if(!delegate.getActions){return target}else{return Separator.join(delegate.getActions(),target)}}})}ContextMenuMenuDelegate2.transform=transform})(ContextMenuMenuDelegate||(ContextMenuMenuDelegate={}))}});var EditorOpenSource;var init_editor=__esm({"node_modules/monaco-editor/esm/vs/platform/editor/common/editor.js"(){(function(EditorOpenSource2){EditorOpenSource2[EditorOpenSource2["API"]=0]="API";EditorOpenSource2[EditorOpenSource2["USER"]=1]="USER"})(EditorOpenSource||(EditorOpenSource={}))}});var __decorate30,__param26,__awaiter22,CommandOpener,EditorOpener,OpenerService;var init_openerService=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/services/openerService.js"(){init_dom();init_cancellation();init_linkedList();init_map();init_marshalling();init_network();init_resources();init_uri();init_codeEditorService();init_commands();init_editor();init_opener();__decorate30=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param26=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter22=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};CommandOpener=class CommandOpener2{constructor(_commandService){this._commandService=_commandService}open(target,options2){return __awaiter22(this,void 0,void 0,(function*(){if(!matchesScheme(target,Schemas.command)){return false}if(!(options2===null||options2===void 0?void 0:options2.allowCommands)){return true}if(typeof target==="string"){target=URI.parse(target)}if(Array.isArray(options2.allowCommands)){if(!options2.allowCommands.includes(target.path)){return true}}let args=[];try{args=parse2(decodeURIComponent(target.query))}catch(_a6){try{args=parse2(target.query)}catch(_b3){}}if(!Array.isArray(args)){args=[args]}yield this._commandService.executeCommand(target.path,...args);return true}))}};CommandOpener=__decorate30([__param26(0,ICommandService)],CommandOpener);EditorOpener=class EditorOpener2{constructor(_editorService){this._editorService=_editorService}open(target,options2){return __awaiter22(this,void 0,void 0,(function*(){if(typeof target==="string"){target=URI.parse(target)}const{selection:selection,uri:uri}=extractSelection(target);target=uri;if(target.scheme===Schemas.file){target=normalizePath(target)}yield this._editorService.openCodeEditor({resource:target,options:Object.assign({selection:selection,source:(options2===null||options2===void 0?void 0:options2.fromUserGesture)?EditorOpenSource.USER:EditorOpenSource.API},options2===null||options2===void 0?void 0:options2.editorOptions)},this._editorService.getFocusedCodeEditor(),options2===null||options2===void 0?void 0:options2.openToSide);return true}))}};EditorOpener=__decorate30([__param26(0,ICodeEditorService)],EditorOpener);OpenerService=class OpenerService2{constructor(editorService,commandService){this._openers=new LinkedList;this._validators=new LinkedList;this._resolvers=new LinkedList;this._resolvedUriTargets=new ResourceMap((uri=>uri.with({path:null,fragment:null,query:null}).toString()));this._externalOpeners=new LinkedList;this._defaultExternalOpener={openExternal:href=>__awaiter22(this,void 0,void 0,(function*(){if(matchesSomeScheme(href,Schemas.http,Schemas.https)){windowOpenNoOpener(href)}else{window.location.href=href}return true}))};this._openers.push({open:(target,options2)=>__awaiter22(this,void 0,void 0,(function*(){if((options2===null||options2===void 0?void 0:options2.openExternal)||matchesSomeScheme(target,Schemas.mailto,Schemas.http,Schemas.https,Schemas.vsls)){yield this._doOpenExternal(target,options2);return true}return false}))});this._openers.push(new CommandOpener(commandService));this._openers.push(new EditorOpener(editorService))}registerOpener(opener){const remove=this._openers.unshift(opener);return{dispose:remove}}open(target,options2){var _a6;return __awaiter22(this,void 0,void 0,(function*(){const targetURI=typeof target==="string"?URI.parse(target):target;const validationTarget=(_a6=this._resolvedUriTargets.get(targetURI))!==null&&_a6!==void 0?_a6:target;for(const validator of this._validators){if(!(yield validator.shouldOpen(validationTarget,options2))){return false}}for(const opener of this._openers){const handled=yield opener.open(target,options2);if(handled){return true}}return false}))}resolveExternalUri(resource,options2){return __awaiter22(this,void 0,void 0,(function*(){for(const resolver of this._resolvers){try{const result=yield resolver.resolveExternalUri(resource,options2);if(result){if(!this._resolvedUriTargets.has(result.resolved)){this._resolvedUriTargets.set(result.resolved,resource)}return result}}catch(_a6){}}throw new Error("Could not resolve external URI: "+resource.toString())}))}_doOpenExternal(resource,options2){return __awaiter22(this,void 0,void 0,(function*(){const uri=typeof resource==="string"?URI.parse(resource):resource;let externalUri;try{externalUri=(yield this.resolveExternalUri(uri,options2)).resolved}catch(_a6){externalUri=uri}let href;if(typeof resource==="string"&&uri.toString()===externalUri.toString()){href=resource}else{href=encodeURI(externalUri.toString(true))}if(options2===null||options2===void 0?void 0:options2.allowContributedOpeners){const preferredOpenerId=typeof(options2===null||options2===void 0?void 0:options2.allowContributedOpeners)==="string"?options2===null||options2===void 0?void 0:options2.allowContributedOpeners:void 0;for(const opener of this._externalOpeners){const didOpen=yield opener.openExternal(href,{sourceUri:uri,preferredOpenerId:preferredOpenerId},CancellationToken.None);if(didOpen){return true}}}return this._defaultExternalOpener.openExternal(href,{sourceUri:uri},CancellationToken.None)}))}dispose(){this._validators.clear()}};OpenerService=__decorate30([__param26(0,ICodeEditorService),__param26(1,ICommandService)],OpenerService)}});var MarkerSeverity2,IMarkerData,IMarkerService;var init_markers=__esm({"node_modules/monaco-editor/esm/vs/platform/markers/common/markers.js"(){init_severity();init_nls();init_instantiation();(function(MarkerSeverity4){MarkerSeverity4[MarkerSeverity4["Hint"]=1]="Hint";MarkerSeverity4[MarkerSeverity4["Info"]=2]="Info";MarkerSeverity4[MarkerSeverity4["Warning"]=4]="Warning";MarkerSeverity4[MarkerSeverity4["Error"]=8]="Error"})(MarkerSeverity2||(MarkerSeverity2={}));(function(MarkerSeverity4){function compare2(a,b){return b-a}MarkerSeverity4.compare=compare2;const _displayStrings=Object.create(null);_displayStrings[MarkerSeverity4.Error]=localize("sev.error","Error");_displayStrings[MarkerSeverity4.Warning]=localize("sev.warning","Warning");_displayStrings[MarkerSeverity4.Info]=localize("sev.info","Info");function toString(a){return _displayStrings[a]||""}MarkerSeverity4.toString=toString;function fromSeverity(severity){switch(severity){case severity_default.Error:return MarkerSeverity4.Error;case severity_default.Warning:return MarkerSeverity4.Warning;case severity_default.Info:return MarkerSeverity4.Info;case severity_default.Ignore:return MarkerSeverity4.Hint}}MarkerSeverity4.fromSeverity=fromSeverity;function toSeverity4(severity){switch(severity){case MarkerSeverity4.Error:return severity_default.Error;case MarkerSeverity4.Warning:return severity_default.Warning;case MarkerSeverity4.Info:return severity_default.Info;case MarkerSeverity4.Hint:return severity_default.Ignore}}MarkerSeverity4.toSeverity=toSeverity4})(MarkerSeverity2||(MarkerSeverity2={}));(function(IMarkerData2){const emptyString="";function makeKey(markerData){return makeKeyOptionalMessage(markerData,true)}IMarkerData2.makeKey=makeKey;function makeKeyOptionalMessage(markerData,useMessage){const result=[emptyString];if(markerData.source){result.push(markerData.source.replace("¦","\\¦"))}else{result.push(emptyString)}if(markerData.code){if(typeof markerData.code==="string"){result.push(markerData.code.replace("¦","\\¦"))}else{result.push(markerData.code.value.replace("¦","\\¦"))}}else{result.push(emptyString)}if(markerData.severity!==void 0&&markerData.severity!==null){result.push(MarkerSeverity2.toString(markerData.severity))}else{result.push(emptyString)}if(markerData.message&&useMessage){result.push(markerData.message.replace("¦","\\¦"))}else{result.push(emptyString)}if(markerData.startLineNumber!==void 0&&markerData.startLineNumber!==null){result.push(markerData.startLineNumber.toString())}else{result.push(emptyString)}if(markerData.startColumn!==void 0&&markerData.startColumn!==null){result.push(markerData.startColumn.toString())}else{result.push(emptyString)}if(markerData.endLineNumber!==void 0&&markerData.endLineNumber!==null){result.push(markerData.endLineNumber.toString())}else{result.push(emptyString)}if(markerData.endColumn!==void 0&&markerData.endColumn!==null){result.push(markerData.endColumn.toString())}else{result.push(emptyString)}result.push(emptyString);return result.join("¦")}IMarkerData2.makeKeyOptionalMessage=makeKeyOptionalMessage})(IMarkerData||(IMarkerData={}));IMarkerService=createDecorator("markerService")}});var __decorate31,__param27,MarkerDecorations,MarkerDecorationsService;var init_markerDecorationsService=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/markerDecorationsService.js"(){init_markers();init_lifecycle();init_model();init_themeService();init_editorColorRegistry();init_model2();init_range();init_network();init_event();init_colorRegistry();init_map();__decorate31=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param27=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};MarkerDecorations=class extends Disposable{constructor(model){super();this.model=model;this._markersData=new Map;this._register(toDisposable((()=>{this.model.deltaDecorations([...this._markersData.keys()],[]);this._markersData.clear()})))}update(markers,newDecorations){const oldIds=[...this._markersData.keys()];this._markersData.clear();const ids=this.model.deltaDecorations(oldIds,newDecorations);for(let index=0;indexthis._onModelAdded(model)));this._register(modelService.onModelAdded(this._onModelAdded,this));this._register(modelService.onModelRemoved(this._onModelRemoved,this));this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose();this._markerDecorations.forEach((value=>value.dispose()));this._markerDecorations.clear()}getMarker(uri,decoration2){const markerDecorations=this._markerDecorations.get(uri);return markerDecorations?markerDecorations.getMarker(decoration2)||null:null}_handleMarkerChange(changedResources){changedResources.forEach((resource=>{const markerDecorations=this._markerDecorations.get(resource);if(markerDecorations){this._updateDecorations(markerDecorations)}}))}_onModelAdded(model){const markerDecorations=new MarkerDecorations(model);this._markerDecorations.set(model.uri,markerDecorations);this._updateDecorations(markerDecorations)}_onModelRemoved(model){var _a6;const markerDecorations=this._markerDecorations.get(model.uri);if(markerDecorations){markerDecorations.dispose();this._markerDecorations.delete(model.uri)}if(model.uri.scheme===Schemas.inMemory||model.uri.scheme===Schemas.internal||model.uri.scheme===Schemas.vscode){(_a6=this._markerService)===null||_a6===void 0?void 0:_a6.read({resource:model.uri}).map((marker=>marker.owner)).forEach((owner=>this._markerService.remove(owner,[model.uri])))}}_updateDecorations(markerDecorations){const markers=this._markerService.read({resource:markerDecorations.model.uri,take:500});const newModelDecorations=markers.map((marker=>({range:this._createDecorationRange(markerDecorations.model,marker),options:this._createDecorationOption(marker)})));if(markerDecorations.update(markers,newModelDecorations)){this._onDidChangeMarker.fire(markerDecorations.model)}}_createDecorationRange(model,rawMarker){let ret=Range.lift(rawMarker);if(rawMarker.severity===MarkerSeverity2.Hint&&!this._hasMarkerTag(rawMarker,1)&&!this._hasMarkerTag(rawMarker,2)){ret=ret.setEndPosition(ret.startLineNumber,ret.startColumn+2)}ret=model.validateRange(ret);if(ret.isEmpty()){const maxColumn=model.getLineLastNonWhitespaceColumn(ret.startLineNumber)||model.getLineMaxColumn(ret.startLineNumber);if(maxColumn===1||ret.endColumn>=maxColumn){return ret}const word=model.getWordAtPosition(ret.getStartPosition());if(word){ret=new Range(ret.startLineNumber,word.startColumn,ret.endLineNumber,word.endColumn)}}else if(rawMarker.endColumn===Number.MAX_VALUE&&rawMarker.startColumn===1&&ret.startLineNumber===ret.endLineNumber){const minColumn=model.getLineFirstNonWhitespaceColumn(rawMarker.startLineNumber);if(minColumn=0}return false}};MarkerDecorationsService=__decorate31([__param27(0,IModelService),__param27(1,IMarkerService)],MarkerDecorationsService)}});function MODEL_ID2(resource){return resource.toString()}function computeModelSha1(model){const shaComputer=new StringSHA1;const snapshot=model.createSnapshot();let text2;while(text2=snapshot.read()){shaComputer.update(text2)}return shaComputer.digest()}var __decorate32,__param28,ModelService_1,ModelData2,DEFAULT_EOL,DisposedModelInfo,ModelService;var init_modelService=__esm({"node_modules/monaco-editor/esm/vs/editor/common/services/modelService.js"(){init_event();init_lifecycle();init_platform();init_textModel();init_textModelDefaults();init_modesRegistry();init_language();init_textResourceConfiguration();init_configuration();init_undoRedo();init_hash();init_editStack();init_network();init_objects();init_languageConfigurationRegistry();__decorate32=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param28=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};ModelData2=class{constructor(model,onWillDispose,onDidChangeLanguage){this.model=model;this._modelEventListeners=new DisposableStore;this.model=model;this._modelEventListeners.add(model.onWillDispose((()=>onWillDispose(model))));this._modelEventListeners.add(model.onDidChangeLanguage((e=>onDidChangeLanguage(model,e))))}dispose(){this._modelEventListeners.dispose()}};DEFAULT_EOL=isLinux||isMacintosh?1:2;DisposedModelInfo=class{constructor(uri,initialUndoRedoSnapshot,time,sharesUndoRedoStack,heapSize,sha1,versionId,alternativeVersionId){this.uri=uri;this.initialUndoRedoSnapshot=initialUndoRedoSnapshot;this.time=time;this.sharesUndoRedoStack=sharesUndoRedoStack;this.heapSize=heapSize;this.sha1=sha1;this.versionId=versionId;this.alternativeVersionId=alternativeVersionId}};ModelService=ModelService_1=class ModelService2 extends Disposable{constructor(_configurationService,_resourcePropertiesService,_undoRedoService,_languageService,_languageConfigurationService){super();this._configurationService=_configurationService;this._resourcePropertiesService=_resourcePropertiesService;this._undoRedoService=_undoRedoService;this._languageService=_languageService;this._languageConfigurationService=_languageConfigurationService;this._onModelAdded=this._register(new Emitter);this.onModelAdded=this._onModelAdded.event;this._onModelRemoved=this._register(new Emitter);this.onModelRemoved=this._onModelRemoved.event;this._onModelModeChanged=this._register(new Emitter);this.onModelLanguageChanged=this._onModelModeChanged.event;this._modelCreationOptionsByLanguageAndResource=Object.create(null);this._models={};this._disposedModels=new Map;this._disposedModelsHeapSize=0;this._register(this._configurationService.onDidChangeConfiguration((e=>this._updateModelOptions(e))));this._updateModelOptions(void 0)}static _readModelOptions(config,isForSimpleWidget){var _a6;let tabSize=EDITOR_MODEL_DEFAULTS.tabSize;if(config.editor&&typeof config.editor.tabSize!=="undefined"){const parsedTabSize=parseInt(config.editor.tabSize,10);if(!isNaN(parsedTabSize)){tabSize=parsedTabSize}if(tabSize<1){tabSize=1}}let indentSize="tabSize";if(config.editor&&typeof config.editor.indentSize!=="undefined"&&config.editor.indentSize!=="tabSize"){const parsedIndentSize=parseInt(config.editor.indentSize,10);if(!isNaN(parsedIndentSize)){indentSize=Math.max(parsedIndentSize,1)}}let insertSpaces=EDITOR_MODEL_DEFAULTS.insertSpaces;if(config.editor&&typeof config.editor.insertSpaces!=="undefined"){insertSpaces=config.editor.insertSpaces==="false"?false:Boolean(config.editor.insertSpaces)}let newDefaultEOL=DEFAULT_EOL;const eol=config.eol;if(eol==="\r\n"){newDefaultEOL=2}else if(eol==="\n"){newDefaultEOL=1}let trimAutoWhitespace=EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;if(config.editor&&typeof config.editor.trimAutoWhitespace!=="undefined"){trimAutoWhitespace=config.editor.trimAutoWhitespace==="false"?false:Boolean(config.editor.trimAutoWhitespace)}let detectIndentation=EDITOR_MODEL_DEFAULTS.detectIndentation;if(config.editor&&typeof config.editor.detectIndentation!=="undefined"){detectIndentation=config.editor.detectIndentation==="false"?false:Boolean(config.editor.detectIndentation)}let largeFileOptimizations=EDITOR_MODEL_DEFAULTS.largeFileOptimizations;if(config.editor&&typeof config.editor.largeFileOptimizations!=="undefined"){largeFileOptimizations=config.editor.largeFileOptimizations==="false"?false:Boolean(config.editor.largeFileOptimizations)}let bracketPairColorizationOptions=EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions;if(((_a6=config.editor)===null||_a6===void 0?void 0:_a6.bracketPairColorization)&&typeof config.editor.bracketPairColorization==="object"){bracketPairColorizationOptions={enabled:!!config.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!config.editor.bracketPairColorization.independentColorPoolPerBracketType}}return{isForSimpleWidget:isForSimpleWidget,tabSize:tabSize,indentSize:indentSize,insertSpaces:insertSpaces,detectIndentation:detectIndentation,defaultEOL:newDefaultEOL,trimAutoWhitespace:trimAutoWhitespace,largeFileOptimizations:largeFileOptimizations,bracketPairColorizationOptions:bracketPairColorizationOptions}}_getEOL(resource,language81){if(resource){return this._resourcePropertiesService.getEOL(resource,language81)}const eol=this._configurationService.getValue("files.eol",{overrideIdentifier:language81});if(eol&&typeof eol==="string"&&eol!=="auto"){return eol}return OS===3||OS===2?"\n":"\r\n"}_shouldRestoreUndoStack(){const result=this._configurationService.getValue("files.restoreUndoStack");if(typeof result==="boolean"){return result}return true}getCreationOptions(languageIdOrSelection,resource,isForSimpleWidget){const language81=typeof languageIdOrSelection==="string"?languageIdOrSelection:languageIdOrSelection.languageId;let creationOptions=this._modelCreationOptionsByLanguageAndResource[language81+resource];if(!creationOptions){const editor2=this._configurationService.getValue("editor",{overrideIdentifier:language81,resource:resource});const eol=this._getEOL(resource,language81);creationOptions=ModelService_1._readModelOptions({editor:editor2,eol:eol},isForSimpleWidget);this._modelCreationOptionsByLanguageAndResource[language81+resource]=creationOptions}return creationOptions}_updateModelOptions(e){const oldOptionsByLanguageAndResource=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const keys=Object.keys(this._models);for(let i=0,len=keys.length;imaxModelsHeapSize){const disposedModels=[];this._disposedModels.forEach((entry=>{if(!entry.sharesUndoRedoStack){disposedModels.push(entry)}}));disposedModels.sort(((a,b)=>a.time-b.time));while(disposedModels.length>0&&this._disposedModelsHeapSize>maxModelsHeapSize){const disposedModel=disposedModels.shift();this._removeDisposedModel(disposedModel.uri);if(disposedModel.initialUndoRedoSnapshot!==null){this._undoRedoService.restoreSnapshot(disposedModel.initialUndoRedoSnapshot)}}}}_createModelData(value,languageIdOrSelection,resource,isForSimpleWidget){const options2=this.getCreationOptions(languageIdOrSelection,resource,isForSimpleWidget);const model=new TextModel(value,languageIdOrSelection,options2,resource,this._undoRedoService,this._languageService,this._languageConfigurationService);if(resource&&this._disposedModels.has(MODEL_ID2(resource))){const disposedModelData=this._removeDisposedModel(resource);const elements=this._undoRedoService.getElements(resource);const sha1IsEqual=computeModelSha1(model)===disposedModelData.sha1;if(sha1IsEqual||disposedModelData.sharesUndoRedoStack){for(const element of elements.past){if(isEditStackElement(element)&&element.matchesResource(resource)){element.setModel(model)}}for(const element of elements.future){if(isEditStackElement(element)&&element.matchesResource(resource)){element.setModel(model)}}this._undoRedoService.setElementsValidFlag(resource,true,(element=>isEditStackElement(element)&&element.matchesResource(resource)));if(sha1IsEqual){model._overwriteVersionId(disposedModelData.versionId);model._overwriteAlternativeVersionId(disposedModelData.alternativeVersionId);model._overwriteInitialUndoRedoSnapshot(disposedModelData.initialUndoRedoSnapshot)}}else{if(disposedModelData.initialUndoRedoSnapshot!==null){this._undoRedoService.restoreSnapshot(disposedModelData.initialUndoRedoSnapshot)}}}const modelId=MODEL_ID2(model.uri);if(this._models[modelId]){throw new Error("ModelService: Cannot add model because it already exists!")}const modelData=new ModelData2(model,(model2=>this._onWillDispose(model2)),((model2,e)=>this._onDidChangeLanguage(model2,e)));this._models[modelId]=modelData;return modelData}createModel(value,languageSelection,resource,isForSimpleWidget=false){let modelData;if(languageSelection){modelData=this._createModelData(value,languageSelection,resource,isForSimpleWidget)}else{modelData=this._createModelData(value,PLAINTEXT_LANGUAGE_ID,resource,isForSimpleWidget)}this._onModelAdded.fire(modelData.model);return modelData.model}getModels(){const ret=[];const keys=Object.keys(this._models);for(let i=0,len=keys.length;i0||elements.future.length>0){for(const element of elements.past){if(isEditStackElement(element)&&element.matchesResource(model.uri)){maintainUndoRedoStack=true;heapSize+=element.heapSize(model.uri);element.setModel(model.uri)}}for(const element of elements.future){if(isEditStackElement(element)&&element.matchesResource(model.uri)){maintainUndoRedoStack=true;heapSize+=element.heapSize(model.uri);element.setModel(model.uri)}}}}const maxMemory=ModelService_1.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(!maintainUndoRedoStack){if(!sharesUndoRedoStack){const initialUndoRedoSnapshot=modelData.model.getInitialUndoRedoSnapshot();if(initialUndoRedoSnapshot!==null){this._undoRedoService.restoreSnapshot(initialUndoRedoSnapshot)}}}else if(!sharesUndoRedoStack&&heapSize>maxMemory){const initialUndoRedoSnapshot=modelData.model.getInitialUndoRedoSnapshot();if(initialUndoRedoSnapshot!==null){this._undoRedoService.restoreSnapshot(initialUndoRedoSnapshot)}}else{this._ensureDisposedModelsHeapSize(maxMemory-heapSize);this._undoRedoService.setElementsValidFlag(model.uri,false,(element=>isEditStackElement(element)&&element.matchesResource(model.uri)));this._insertDisposedModel(new DisposedModelInfo(model.uri,modelData.model.getInitialUndoRedoSnapshot(),Date.now(),sharesUndoRedoStack,heapSize,computeModelSha1(model),model.getVersionId(),model.getAlternativeVersionId()))}delete this._models[modelId];modelData.dispose();delete this._modelCreationOptionsByLanguageAndResource[model.getLanguageId()+model.uri];this._onModelRemoved.fire(model)}_onDidChangeLanguage(model,e){const oldLanguageId=e.oldLanguage;const newLanguageId=model.getLanguageId();const oldOptions=this.getCreationOptions(oldLanguageId,model.uri,model.isForSimpleWidget);const newOptions=this.getCreationOptions(newLanguageId,model.uri,model.isForSimpleWidget);ModelService_1._setModelOptionsForModel(model,newOptions,oldOptions);this._onModelModeChanged.fire({model:model,oldLanguageId:oldLanguageId})}};ModelService.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024;ModelService=ModelService_1=__decorate32([__param28(0,IConfigurationService),__param28(1,ITextResourcePropertiesService),__param28(2,IUndoRedoService),__param28(3,ILanguageService),__param28(4,ILanguageConfigurationService)],ModelService)}});var init_34=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInput.css"(){}});function fromPagedListOptions(modelProvider,options2){return Object.assign(Object.assign({},options2),{accessibilityProvider:options2.accessibilityProvider&&new PagedAccessibilityProvider(modelProvider,options2.accessibilityProvider)})}var PagedRenderer,PagedAccessibilityProvider,PagedList;var init_listPaging=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/list/listPaging.js"(){init_arrays();init_cancellation();init_event();init_lifecycle();init_26();init_listWidget();PagedRenderer=class{get templateId(){return this.renderer.templateId}constructor(renderer,modelProvider){this.renderer=renderer;this.modelProvider=modelProvider}renderTemplate(container){const data=this.renderer.renderTemplate(container);return{data:data,disposable:Disposable.None}}renderElement(index,_,data,height){var _a6;(_a6=data.disposable)===null||_a6===void 0?void 0:_a6.dispose();if(!data.data){return}const model=this.modelProvider();if(model.isResolved(index)){return this.renderer.renderElement(model.get(index),index,data.data,height)}const cts=new CancellationTokenSource;const promise=model.resolve(index,cts.token);data.disposable={dispose:()=>cts.cancel()};this.renderer.renderPlaceholder(index,data.data);promise.then((entry=>this.renderer.renderElement(entry,index,data.data,height)))}disposeTemplate(data){if(data.disposable){data.disposable.dispose();data.disposable=void 0}if(data.data){this.renderer.disposeTemplate(data.data);data.data=void 0}}};PagedAccessibilityProvider=class{constructor(modelProvider,accessibilityProvider){this.modelProvider=modelProvider;this.accessibilityProvider=accessibilityProvider}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(index){const model=this.modelProvider();if(!model.isResolved(index)){return null}return this.accessibilityProvider.getAriaLabel(model.get(index))}};PagedList=class{constructor(user,container,virtualDelegate,renderers,options2={}){const modelProvider=()=>this.model;const pagedRenderers=renderers.map((r=>new PagedRenderer(r,modelProvider)));this.list=new List(user,container,virtualDelegate,pagedRenderers,fromPagedListOptions(modelProvider,options2))}updateOptions(options2){this.list.updateOptions(options2)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return Event.map(this.list.onMouseDblClick,(({element:element,index:index,browserEvent:browserEvent})=>({element:element===void 0?void 0:this._model.get(element),index:index,browserEvent:browserEvent})))}get onPointer(){return Event.map(this.list.onPointer,(({element:element,index:index,browserEvent:browserEvent})=>({element:element===void 0?void 0:this._model.get(element),index:index,browserEvent:browserEvent})))}get onDidChangeSelection(){return Event.map(this.list.onDidChangeSelection,(({elements:elements,indexes:indexes,browserEvent:browserEvent})=>({elements:elements.map((e=>this._model.get(e))),indexes:indexes,browserEvent:browserEvent})))}get model(){return this._model}set model(model){this._model=model;this.list.splice(0,this.list.length,range(model.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((i=>this.model.get(i)))}style(styles){this.list.style(styles)}dispose(){this.list.dispose()}}}});var init_35=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css"(){}});var defaultStyles,ViewItem,VerticalViewItem,HorizontalViewItem,State,Sizing,SplitView;var init_splitview=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.js"(){init_dom();init_event2();init_sash();init_scrollableElement();init_arrays();init_color();init_event();init_lifecycle();init_numbers();init_scrollable();init_types();init_35();defaultStyles={separatorBorder:Color.transparent};ViewItem=class{set size(size2){this._size=size2}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize==="undefined"}setVisible(visible,size2){var _a6,_b3;if(visible===this.visible){return}if(visible){this.size=clamp(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize);this._cachedVisibleSize=void 0}else{this._cachedVisibleSize=typeof size2==="number"?size2:this.size;this.size=0}this.container.classList.toggle("visible",visible);(_b3=(_a6=this.view).setVisible)===null||_b3===void 0?void 0:_b3.call(_a6,visible)}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var _a6;return(_a6=this.view.proportionalLayout)!==null&&_a6!==void 0?_a6:true}get snap(){return!!this.view.snap}set enabled(enabled){this.container.style.pointerEvents=enabled?"":"none"}constructor(container,view,size2,disposable){this.container=container;this.view=view;this.disposable=disposable;this._cachedVisibleSize=void 0;if(typeof size2==="number"){this._size=size2;this._cachedVisibleSize=void 0;container.classList.add("visible")}else{this._size=0;this._cachedVisibleSize=size2.cachedVisibleSize}}layout(offset,layoutContext){this.layoutContainer(offset);this.view.layout(this.size,offset,layoutContext)}dispose(){this.disposable.dispose()}};VerticalViewItem=class extends ViewItem{layoutContainer(offset){this.container.style.top=`${offset}px`;this.container.style.height=`${this.size}px`}};HorizontalViewItem=class extends ViewItem{layoutContainer(offset){this.container.style.left=`${offset}px`;this.container.style.width=`${this.size}px`}};(function(State2){State2[State2["Idle"]=0]="Idle";State2[State2["Busy"]=1]="Busy"})(State||(State={}));(function(Sizing2){Sizing2.Distribute={type:"distribute"};function Split(index){return{type:"split",index:index}}Sizing2.Split=Split;function Auto(index){return{type:"auto",index:index}}Sizing2.Auto=Auto;function Invisible(cachedVisibleSize){return{type:"invisible",cachedVisibleSize:cachedVisibleSize}}Sizing2.Invisible=Invisible})(Sizing||(Sizing={}));SplitView=class extends Disposable{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(sash){for(const sashItem of this.sashItems){sashItem.sash.orthogonalStartSash=sash}this._orthogonalStartSash=sash}set orthogonalEndSash(sash){for(const sashItem of this.sashItems){sashItem.sash.orthogonalEndSash=sash}this._orthogonalEndSash=sash}set startSnappingEnabled(startSnappingEnabled){if(this._startSnappingEnabled===startSnappingEnabled){return}this._startSnappingEnabled=startSnappingEnabled;this.updateSashEnablement()}set endSnappingEnabled(endSnappingEnabled){if(this._endSnappingEnabled===endSnappingEnabled){return}this._endSnappingEnabled=endSnappingEnabled;this.updateSashEnablement()}constructor(container,options2={}){var _a6,_b3,_c2,_d2,_e2;super();this.size=0;this.contentSize=0;this.proportions=void 0;this.viewItems=[];this.sashItems=[];this.state=State.Idle;this._onDidSashChange=this._register(new Emitter);this._onDidSashReset=this._register(new Emitter);this._startSnappingEnabled=true;this._endSnappingEnabled=true;this.onDidSashChange=this._onDidSashChange.event;this.onDidSashReset=this._onDidSashReset.event;this.orientation=(_a6=options2.orientation)!==null&&_a6!==void 0?_a6:0;this.inverseAltBehavior=(_b3=options2.inverseAltBehavior)!==null&&_b3!==void 0?_b3:false;this.proportionalLayout=(_c2=options2.proportionalLayout)!==null&&_c2!==void 0?_c2:true;this.getSashOrthogonalSize=options2.getSashOrthogonalSize;this.el=document.createElement("div");this.el.classList.add("monaco-split-view2");this.el.classList.add(this.orientation===0?"vertical":"horizontal");container.appendChild(this.el);this.sashContainer=append(this.el,$(".sash-container"));this.viewContainer=$(".split-view-container");this.scrollable=this._register(new Scrollable({forceIntegerValues:true,smoothScrollDuration:125,scheduleAtNextAnimationFrame:scheduleAtNextAnimationFrame}));this.scrollableElement=this._register(new SmoothScrollableElement(this.viewContainer,{vertical:this.orientation===0?(_d2=options2.scrollbarVisibility)!==null&&_d2!==void 0?_d2:1:2,horizontal:this.orientation===1?(_e2=options2.scrollbarVisibility)!==null&&_e2!==void 0?_e2:1:2},this.scrollable));const onDidScrollViewContainer=this._register(new DomEmitter(this.viewContainer,"scroll")).event;this._register(onDidScrollViewContainer((_=>{const position=this.scrollableElement.getScrollPosition();const scrollLeft=Math.abs(this.viewContainer.scrollLeft-position.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft;const scrollTop=Math.abs(this.viewContainer.scrollTop-position.scrollTop)<=1?void 0:this.viewContainer.scrollTop;if(scrollLeft!==void 0||scrollTop!==void 0){this.scrollableElement.setScrollPosition({scrollLeft:scrollLeft,scrollTop:scrollTop})}})));this.onDidScroll=this.scrollableElement.onScroll;this._register(this.onDidScroll((e=>{if(e.scrollTopChanged){this.viewContainer.scrollTop=e.scrollTop}if(e.scrollLeftChanged){this.viewContainer.scrollLeft=e.scrollLeft}})));append(this.el,this.scrollableElement.getDomNode());this.style(options2.styles||defaultStyles);if(options2.descriptor){this.size=options2.descriptor.size;options2.descriptor.views.forEach(((viewDescriptor,index)=>{const sizing=isUndefined(viewDescriptor.visible)||viewDescriptor.visible?viewDescriptor.size:{type:"invisible",cachedVisibleSize:viewDescriptor.size};const view=viewDescriptor.view;this.doAddView(view,sizing,index,true)}));this.contentSize=this.viewItems.reduce(((r,i)=>r+i.size),0);this.saveProportions()}}style(styles){if(styles.separatorBorder.isTransparent()){this.el.classList.remove("separator-border");this.el.style.removeProperty("--separator-border")}else{this.el.classList.add("separator-border");this.el.style.setProperty("--separator-border",styles.separatorBorder.toString())}}addView(view,size2,index=this.viewItems.length,skipLayout){this.doAddView(view,size2,index,skipLayout)}layout(size2,layoutContext){const previousSize=Math.max(this.size,this.contentSize);this.size=size2;this.layoutContext=layoutContext;if(!this.proportions){const indexes=range(this.viewItems.length);const lowPriorityIndexes=indexes.filter((i=>this.viewItems[i].priority===1));const highPriorityIndexes=indexes.filter((i=>this.viewItems[i].priority===2));this.resize(this.viewItems.length-1,size2-previousSize,void 0,lowPriorityIndexes,highPriorityIndexes)}else{let total=0;for(let i=0;i0){this.proportions=this.viewItems.map((i=>i.proportionalLayout?i.size/this.contentSize:void 0))}}onSashStart({sash:sash,start:start,alt:alt}){for(const item of this.viewItems){item.enabled=false}const index=this.sashItems.findIndex((item=>item.sash===sash));const disposable=combinedDisposable(addDisposableListener(document.body,"keydown",(e=>resetSashDragState(this.sashDragState.current,e.altKey))),addDisposableListener(document.body,"keyup",(()=>resetSashDragState(this.sashDragState.current,false))));const resetSashDragState=(start2,alt2)=>{const sizes=this.viewItems.map((i=>i.size));let minDelta=Number.NEGATIVE_INFINITY;let maxDelta=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior){alt2=!alt2}if(alt2){const isLastSash=index===this.sashItems.length-1;if(isLastSash){const viewItem=this.viewItems[index];minDelta=(viewItem.minimumSize-viewItem.size)/2;maxDelta=(viewItem.maximumSize-viewItem.size)/2}else{const viewItem=this.viewItems[index+1];minDelta=(viewItem.size-viewItem.maximumSize)/2;maxDelta=(viewItem.size-viewItem.minimumSize)/2}}let snapBefore;let snapAfter;if(!alt2){const upIndexes=range(index,-1);const downIndexes=range(index+1,this.viewItems.length);const minDeltaUp=upIndexes.reduce(((r,i)=>r+(this.viewItems[i].minimumSize-sizes[i])),0);const maxDeltaUp=upIndexes.reduce(((r,i)=>r+(this.viewItems[i].viewMaximumSize-sizes[i])),0);const maxDeltaDown=downIndexes.length===0?Number.POSITIVE_INFINITY:downIndexes.reduce(((r,i)=>r+(sizes[i]-this.viewItems[i].minimumSize)),0);const minDeltaDown=downIndexes.length===0?Number.NEGATIVE_INFINITY:downIndexes.reduce(((r,i)=>r+(sizes[i]-this.viewItems[i].viewMaximumSize)),0);const minDelta2=Math.max(minDeltaUp,minDeltaDown);const maxDelta2=Math.min(maxDeltaDown,maxDeltaUp);const snapBeforeIndex=this.findFirstSnapIndex(upIndexes);const snapAfterIndex=this.findFirstSnapIndex(downIndexes);if(typeof snapBeforeIndex==="number"){const viewItem=this.viewItems[snapBeforeIndex];const halfSize=Math.floor(viewItem.viewMinimumSize/2);snapBefore={index:snapBeforeIndex,limitDelta:viewItem.visible?minDelta2-halfSize:minDelta2+halfSize,size:viewItem.size}}if(typeof snapAfterIndex==="number"){const viewItem=this.viewItems[snapAfterIndex];const halfSize=Math.floor(viewItem.viewMinimumSize/2);snapAfter={index:snapAfterIndex,limitDelta:viewItem.visible?maxDelta2+halfSize:maxDelta2-halfSize,size:viewItem.size}}}this.sashDragState={start:start2,current:start2,index:index,sizes:sizes,minDelta:minDelta,maxDelta:maxDelta,alt:alt2,snapBefore:snapBefore,snapAfter:snapAfter,disposable:disposable}};resetSashDragState(start,alt)}onSashChange({current:current}){const{index:index,start:start,sizes:sizes,alt:alt,minDelta:minDelta,maxDelta:maxDelta,snapBefore:snapBefore,snapAfter:snapAfter}=this.sashDragState;this.sashDragState.current=current;const delta=current-start;const newDelta=this.resize(index,delta,sizes,void 0,void 0,minDelta,maxDelta,snapBefore,snapAfter);if(alt){const isLastSash=index===this.sashItems.length-1;const newSizes=this.viewItems.map((i=>i.size));const viewItemIndex=isLastSash?index:index+1;const viewItem=this.viewItems[viewItemIndex];const newMinDelta=viewItem.size-viewItem.maximumSize;const newMaxDelta=viewItem.size-viewItem.minimumSize;const resizeIndex=isLastSash?index-1:index+1;this.resize(resizeIndex,-newDelta,newSizes,void 0,void 0,newMinDelta,newMaxDelta)}this.distributeEmptySpace();this.layoutViews()}onSashEnd(index){this._onDidSashChange.fire(index);this.sashDragState.disposable.dispose();this.saveProportions();for(const item of this.viewItems){item.enabled=true}}onViewChange(item,size2){const index=this.viewItems.indexOf(item);if(index<0||index>=this.viewItems.length){return}size2=typeof size2==="number"?size2:item.size;size2=clamp(size2,item.minimumSize,item.maximumSize);if(this.inverseAltBehavior&&index>0){this.resize(index-1,Math.floor((item.size-size2)/2));this.distributeEmptySpace();this.layoutViews()}else{item.size=size2;this.relayout([index],void 0)}}resizeView(index,size2){if(this.state!==State.Idle){throw new Error("Cant modify splitview")}this.state=State.Busy;if(index<0||index>=this.viewItems.length){return}const indexes=range(this.viewItems.length).filter((i=>i!==index));const lowPriorityIndexes=[...indexes.filter((i=>this.viewItems[i].priority===1)),index];const highPriorityIndexes=indexes.filter((i=>this.viewItems[i].priority===2));const item=this.viewItems[index];size2=Math.round(size2);size2=clamp(size2,item.minimumSize,Math.min(item.maximumSize,this.size));item.size=size2;this.relayout(lowPriorityIndexes,highPriorityIndexes);this.state=State.Idle}distributeViewSizes(){const flexibleViewItems=[];let flexibleSize=0;for(const item of this.viewItems){if(item.maximumSize-item.minimumSize>0){flexibleViewItems.push(item);flexibleSize+=item.size}}const size2=Math.floor(flexibleSize/flexibleViewItems.length);for(const item of flexibleViewItems){item.size=clamp(size2,item.minimumSize,item.maximumSize)}const indexes=range(this.viewItems.length);const lowPriorityIndexes=indexes.filter((i=>this.viewItems[i].priority===1));const highPriorityIndexes=indexes.filter((i=>this.viewItems[i].priority===2));this.relayout(lowPriorityIndexes,highPriorityIndexes)}getViewSize(index){if(index<0||index>=this.viewItems.length){return-1}return this.viewItems[index].size}doAddView(view,size2,index=this.viewItems.length,skipLayout){if(this.state!==State.Idle){throw new Error("Cant modify splitview")}this.state=State.Busy;const container=$(".split-view-view");if(index===this.viewItems.length){this.viewContainer.appendChild(container)}else{this.viewContainer.insertBefore(container,this.viewContainer.children.item(index))}const onChangeDisposable=view.onDidChange((size3=>this.onViewChange(item,size3)));const containerDisposable=toDisposable((()=>this.viewContainer.removeChild(container)));const disposable=combinedDisposable(onChangeDisposable,containerDisposable);let viewSize;if(typeof size2==="number"){viewSize=size2}else{if(size2.type==="auto"){if(this.areViewsDistributed()){size2={type:"distribute"}}else{size2={type:"split",index:size2.index}}}if(size2.type==="split"){viewSize=this.getViewSize(size2.index)/2}else if(size2.type==="invisible"){viewSize={cachedVisibleSize:size2.cachedVisibleSize}}else{viewSize=view.minimumSize}}const item=this.orientation===0?new VerticalViewItem(container,view,viewSize,disposable):new HorizontalViewItem(container,view,viewSize,disposable);this.viewItems.splice(index,0,item);if(this.viewItems.length>1){const opts={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const sash=this.orientation===0?new Sash(this.sashContainer,{getHorizontalSashTop:s=>this.getSashPosition(s),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},opts),{orientation:1})):new Sash(this.sashContainer,{getVerticalSashLeft:s=>this.getSashPosition(s),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},opts),{orientation:0}));const sashEventMapper=this.orientation===0?e=>({sash:sash,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:sash,start:e.startX,current:e.currentX,alt:e.altKey});const onStart=Event.map(sash.onDidStart,sashEventMapper);const onStartDisposable=onStart(this.onSashStart,this);const onChange=Event.map(sash.onDidChange,sashEventMapper);const onChangeDisposable2=onChange(this.onSashChange,this);const onEnd=Event.map(sash.onDidEnd,(()=>this.sashItems.findIndex((item2=>item2.sash===sash))));const onEndDisposable=onEnd(this.onSashEnd,this);const onDidResetDisposable=sash.onDidReset((()=>{const index2=this.sashItems.findIndex((item2=>item2.sash===sash));const upIndexes=range(index2,-1);const downIndexes=range(index2+1,this.viewItems.length);const snapBeforeIndex=this.findFirstSnapIndex(upIndexes);const snapAfterIndex=this.findFirstSnapIndex(downIndexes);if(typeof snapBeforeIndex==="number"&&!this.viewItems[snapBeforeIndex].visible){return}if(typeof snapAfterIndex==="number"&&!this.viewItems[snapAfterIndex].visible){return}this._onDidSashReset.fire(index2)}));const disposable2=combinedDisposable(onStartDisposable,onChangeDisposable2,onEndDisposable,onDidResetDisposable,sash);const sashItem={sash:sash,disposable:disposable2};this.sashItems.splice(index-1,0,sashItem)}container.appendChild(view.element);let highPriorityIndexes;if(typeof size2!=="number"&&size2.type==="split"){highPriorityIndexes=[size2.index]}if(!skipLayout){this.relayout([index],highPriorityIndexes)}this.state=State.Idle;if(!skipLayout&&typeof size2!=="number"&&size2.type==="distribute"){this.distributeViewSizes()}}relayout(lowPriorityIndexes,highPriorityIndexes){const contentSize=this.viewItems.reduce(((r,i)=>r+i.size),0);this.resize(this.viewItems.length-1,this.size-contentSize,void 0,lowPriorityIndexes,highPriorityIndexes);this.distributeEmptySpace();this.layoutViews();this.saveProportions()}resize(index,delta,sizes=this.viewItems.map((i=>i.size)),lowPriorityIndexes,highPriorityIndexes,overloadMinDelta=Number.NEGATIVE_INFINITY,overloadMaxDelta=Number.POSITIVE_INFINITY,snapBefore,snapAfter){if(index<0||index>=this.viewItems.length){return 0}const upIndexes=range(index,-1);const downIndexes=range(index+1,this.viewItems.length);if(highPriorityIndexes){for(const index2 of highPriorityIndexes){pushToStart(upIndexes,index2);pushToStart(downIndexes,index2)}}if(lowPriorityIndexes){for(const index2 of lowPriorityIndexes){pushToEnd(upIndexes,index2);pushToEnd(downIndexes,index2)}}const upItems=upIndexes.map((i=>this.viewItems[i]));const upSizes=upIndexes.map((i=>sizes[i]));const downItems=downIndexes.map((i=>this.viewItems[i]));const downSizes=downIndexes.map((i=>sizes[i]));const minDeltaUp=upIndexes.reduce(((r,i)=>r+(this.viewItems[i].minimumSize-sizes[i])),0);const maxDeltaUp=upIndexes.reduce(((r,i)=>r+(this.viewItems[i].maximumSize-sizes[i])),0);const maxDeltaDown=downIndexes.length===0?Number.POSITIVE_INFINITY:downIndexes.reduce(((r,i)=>r+(sizes[i]-this.viewItems[i].minimumSize)),0);const minDeltaDown=downIndexes.length===0?Number.NEGATIVE_INFINITY:downIndexes.reduce(((r,i)=>r+(sizes[i]-this.viewItems[i].maximumSize)),0);const minDelta=Math.max(minDeltaUp,minDeltaDown,overloadMinDelta);const maxDelta=Math.min(maxDeltaDown,maxDeltaUp,overloadMaxDelta);let snapped=false;if(snapBefore){const snapView=this.viewItems[snapBefore.index];const visible=delta>=snapBefore.limitDelta;snapped=visible!==snapView.visible;snapView.setVisible(visible,snapBefore.size)}if(!snapped&&snapAfter){const snapView=this.viewItems[snapAfter.index];const visible=deltar+i.size),0);let emptyDelta=this.size-contentSize;const indexes=range(this.viewItems.length-1,-1);const lowPriorityIndexes=indexes.filter((i=>this.viewItems[i].priority===1));const highPriorityIndexes=indexes.filter((i=>this.viewItems[i].priority===2));for(const index of highPriorityIndexes){pushToStart(indexes,index)}for(const index of lowPriorityIndexes){pushToEnd(indexes,index)}if(typeof lowPriorityIndex==="number"){pushToEnd(indexes,lowPriorityIndex)}for(let i=0;emptyDelta!==0&&ir+i.size),0);let offset=0;for(const viewItem of this.viewItems){viewItem.layout(offset,this.layoutContext);offset+=viewItem.size}this.sashItems.forEach((item=>item.sash.layout()));this.updateSashEnablement();this.updateScrollableElement()}updateScrollableElement(){if(this.orientation===0){this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize})}else{this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}}updateSashEnablement(){let previous=false;const collapsesDown=this.viewItems.map((i=>previous=i.size-i.minimumSize>0||previous));previous=false;const expandsDown=this.viewItems.map((i=>previous=i.maximumSize-i.size>0||previous));const reverseViews=[...this.viewItems].reverse();previous=false;const collapsesUp=reverseViews.map((i=>previous=i.size-i.minimumSize>0||previous)).reverse();previous=false;const expandsUp=reverseViews.map((i=>previous=i.maximumSize-i.size>0||previous)).reverse();let position=0;for(let index=0;index0||this.startSnappingEnabled)){sash.state=1}else if(snappedAfter&&collapsesDown[index]&&(position0){return void 0}if(!viewItem.visible&&viewItem.snap){return index}}return void 0}areViewsDistributed(){let min=void 0,max=void 0;for(const view of this.viewItems){min=min===void 0?view.size:Math.min(min,view.size);max=max===void 0?view.size:Math.max(max,view.size);if(max-min>2){return false}}return true}dispose(){var _a6;(_a6=this.sashDragState)===null||_a6===void 0?void 0:_a6.disposable.dispose();dispose(this.viewItems);this.viewItems=[];this.sashItems.forEach((i=>i.disposable.dispose()));this.sashItems=[];super.dispose()}}}});var init_36=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/table/table.css"(){}});function asListVirtualDelegate(delegate){return{getHeight(row){return delegate.getHeight(row)},getTemplateId(){return TableListRenderer.TemplateId}}}var TableListRenderer,ColumnHeader,Table;var init_tableWidget=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/table/tableWidget.js"(){init_dom();init_listWidget();init_splitview();init_event();init_lifecycle();init_36();TableListRenderer=class{constructor(columns,renderers,getColumnSize){this.columns=columns;this.getColumnSize=getColumnSize;this.templateId=TableListRenderer.TemplateId;this.renderedTemplates=new Set;const rendererMap=new Map(renderers.map((r=>[r.templateId,r])));this.renderers=[];for(const column of columns){const renderer=rendererMap.get(column.templateId);if(!renderer){throw new Error(`Table cell renderer for template id ${column.templateId} not found.`)}this.renderers.push(renderer)}}renderTemplate(container){const rowContainer=append(container,$(".monaco-table-tr"));const cellContainers=[];const cellTemplateData=[];for(let i=0;inew ColumnHeader(c,i)));const descriptor={size:headers.reduce(((a,b)=>a+b.column.weight),0),views:headers.map((view=>({size:view.column.weight,view:view})))};this.splitview=this.disposables.add(new SplitView(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:descriptor}));this.splitview.el.style.height=`${virtualDelegate.headerRowHeight}px`;this.splitview.el.style.lineHeight=`${virtualDelegate.headerRowHeight}px`;const renderer=new TableListRenderer(columns,renderers,(i=>this.splitview.getViewSize(i)));this.list=this.disposables.add(new List(user,this.domNode,asListVirtualDelegate(virtualDelegate),[renderer],_options));Event.any(...headers.map((h2=>h2.onDidLayout)))((([index,size2])=>renderer.layoutColumn(index,size2)),null,this.disposables);this.splitview.onDidSashReset((index=>{const totalWeight=columns.reduce(((r,c)=>r+c.weight),0);const size2=columns[index].weight/totalWeight*this.cachedWidth;this.splitview.resizeView(index,size2)}),null,this.disposables);this.styleElement=createStyleSheet(this.domNode);this.style(unthemedListStyles)}updateOptions(options2){this.list.updateOptions(options2)}splice(start,deleteCount,elements=[]){this.list.splice(start,deleteCount,elements)}getHTMLElement(){return this.domNode}style(styles){const content=[];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}`);this.styleElement.textContent=content.join("\n");this.list.style(styles)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}};Table.InstanceCount=0}});var init_37=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/toggle/toggle.css"(){}});var Toggle;var init_toggle=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/toggle/toggle.js"(){init_widget();init_themables();init_event();init_37();Toggle=class extends Widget{constructor(opts){super();this._onChange=this._register(new Emitter);this.onChange=this._onChange.event;this._onKeyDown=this._register(new Emitter);this.onKeyDown=this._onKeyDown.event;this._opts=opts;this._checked=this._opts.isChecked;const classes=["monaco-custom-toggle"];if(this._opts.icon){this._icon=this._opts.icon;classes.push(...ThemeIcon.asClassNameArray(this._icon))}if(this._opts.actionClassName){classes.push(...this._opts.actionClassName.split(" "))}if(this._checked){classes.push("checked")}this.domNode=document.createElement("div");this.domNode.title=this._opts.title;this.domNode.classList.add(...classes);if(!this._opts.notFocusable){this.domNode.tabIndex=0}this.domNode.setAttribute("role","checkbox");this.domNode.setAttribute("aria-checked",String(this._checked));this.domNode.setAttribute("aria-label",this._opts.title);this.applyStyles();this.onclick(this.domNode,(ev=>{if(this.enabled){this.checked=!this._checked;this._onChange.fire(false);ev.preventDefault()}}));this._register(this.ignoreGesture(this.domNode));this.onkeydown(this.domNode,(keyboardEvent=>{if(keyboardEvent.keyCode===10||keyboardEvent.keyCode===3){this.checked=!this._checked;this._onChange.fire(true);keyboardEvent.preventDefault();keyboardEvent.stopPropagation();return}this._onKeyDown.fire(keyboardEvent)}))}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(newIsChecked){this._checked=newIsChecked;this.domNode.setAttribute("aria-checked",String(this._checked));this.domNode.classList.toggle("checked",this._checked);this.applyStyles()}width(){return 2+2+2+16}applyStyles(){if(this.domNode){this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"";this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit";this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||""}}enable(){this.domNode.setAttribute("aria-disabled",String(false))}disable(){this.domNode.setAttribute("aria-disabled",String(true))}}}});var NLS_CASE_SENSITIVE_TOGGLE_LABEL,NLS_WHOLE_WORD_TOGGLE_LABEL,NLS_REGEX_TOGGLE_LABEL,CaseSensitiveToggle,WholeWordsToggle,RegexToggle;var init_findInputToggles=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInputToggles.js"(){init_toggle();init_codicons();init_nls();NLS_CASE_SENSITIVE_TOGGLE_LABEL=localize("caseDescription","Match Case");NLS_WHOLE_WORD_TOGGLE_LABEL=localize("wordsDescription","Match Whole Word");NLS_REGEX_TOGGLE_LABEL=localize("regexDescription","Use Regular Expression");CaseSensitiveToggle=class extends Toggle{constructor(opts){super({icon:Codicon.caseSensitive,title:NLS_CASE_SENSITIVE_TOGGLE_LABEL+opts.appendTitle,isChecked:opts.isChecked,inputActiveOptionBorder:opts.inputActiveOptionBorder,inputActiveOptionForeground:opts.inputActiveOptionForeground,inputActiveOptionBackground:opts.inputActiveOptionBackground})}};WholeWordsToggle=class extends Toggle{constructor(opts){super({icon:Codicon.wholeWord,title:NLS_WHOLE_WORD_TOGGLE_LABEL+opts.appendTitle,isChecked:opts.isChecked,inputActiveOptionBorder:opts.inputActiveOptionBorder,inputActiveOptionForeground:opts.inputActiveOptionForeground,inputActiveOptionBackground:opts.inputActiveOptionBackground})}};RegexToggle=class extends Toggle{constructor(opts){super({icon:Codicon.regex,title:NLS_REGEX_TOGGLE_LABEL+opts.appendTitle,isChecked:opts.isChecked,inputActiveOptionBorder:opts.inputActiveOptionBorder,inputActiveOptionForeground:opts.inputActiveOptionForeground,inputActiveOptionBackground:opts.inputActiveOptionBackground})}}}});var ArrayNavigator;var init_navigator=__esm({"node_modules/monaco-editor/esm/vs/base/common/navigator.js"(){ArrayNavigator=class{constructor(items,start=0,end=items.length,index=start-1){this.items=items;this.start=start;this.end=end;this.index=index}current(){if(this.index===this.start-1||this.index===this.end){return null}return this.items[this.index]}next(){this.index=Math.min(this.index+1,this.end);return this.current()}previous(){this.index=Math.max(this.index-1,this.start-1);return this.current()}first(){this.index=this.start;return this.current()}last(){this.index=this.end-1;return this.current()}}}});var HistoryNavigator;var init_history=__esm({"node_modules/monaco-editor/esm/vs/base/common/history.js"(){init_navigator();HistoryNavigator=class{constructor(history=[],limit=10){this._initialize(history);this._limit=limit;this._onChange()}getHistory(){return this._elements}add(t2){this._history.delete(t2);this._history.add(t2);this._onChange()}next(){return this._navigator.next()}previous(){if(this._currentPosition()!==0){return this._navigator.previous()}return null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(t2){return this._history.has(t2)}_onChange(){this._reduceToLimit();const elements=this._elements;this._navigator=new ArrayNavigator(elements,0,elements.length,elements.length)}_reduceToLimit(){const data=this._elements;if(data.length>this._limit){this._initialize(data.slice(data.length-this._limit))}}_currentPosition(){const currentElement=this._navigator.current();if(!currentElement){return-1}return this._elements.indexOf(currentElement)}_initialize(history){this._history=new Set;for(const entry of history){this._history.add(entry)}}get _elements(){const elements=[];this._history.forEach((e=>elements.push(e)));return elements}}}});var init_38=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.css"(){}});var $3,InputBox,HistoryInputBox;var init_inputBox=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/inputbox/inputBox.js"(){init_dom();init_event2();init_formattedTextRenderer();init_actionbar();init_aria();init_scrollableElement();init_widget();init_event();init_history();init_objects();init_38();init_nls();$3=$;InputBox=class extends Widget{constructor(container,contextViewProvider,options2){var _a6;super();this.state="idle";this.maxHeight=Number.POSITIVE_INFINITY;this._onDidChange=this._register(new Emitter);this.onDidChange=this._onDidChange.event;this._onDidHeightChange=this._register(new Emitter);this.onDidHeightChange=this._onDidHeightChange.event;this.contextViewProvider=contextViewProvider;this.options=options2;this.message=null;this.placeholder=this.options.placeholder||"";this.tooltip=(_a6=this.options.tooltip)!==null&&_a6!==void 0?_a6:this.placeholder||"";this.ariaLabel=this.options.ariaLabel||"";if(this.options.validationOptions){this.validation=this.options.validationOptions.validation}this.element=append(container,$3(".monaco-inputbox.idle"));const tagName=this.options.flexibleHeight?"textarea":"input";const wrapper=append(this.element,$3(".ibwrapper"));this.input=append(wrapper,$3(tagName+".input.empty"));this.input.setAttribute("autocorrect","off");this.input.setAttribute("autocapitalize","off");this.input.setAttribute("spellcheck","false");this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus")));this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus")));if(this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight==="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY;this.mirror=append(wrapper,$3("div.mirror"));this.mirror.innerText=" ";this.scrollableElement=new ScrollableElement(this.element,{vertical:1});if(this.options.flexibleWidth){this.input.setAttribute("wrap","off");this.mirror.style.whiteSpace="pre";this.mirror.style.wordWrap="initial"}append(container,this.scrollableElement.getDomNode());this._register(this.scrollableElement);this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const onSelectionChange=this._register(new DomEmitter(document,"selectionchange"));const onAnchoredSelectionChange=Event.filter(onSelectionChange.event,(()=>{const selection=document.getSelection();return(selection===null||selection===void 0?void 0:selection.anchorNode)===wrapper}));this._register(onAnchoredSelectionChange(this.updateScrollDimensions,this));this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else{this.input.type=this.options.type||"text";this.input.setAttribute("wrap","off")}if(this.ariaLabel){this.input.setAttribute("aria-label",this.ariaLabel)}if(this.placeholder&&!this.options.showPlaceholderOnFocus){this.setPlaceHolder(this.placeholder)}if(this.tooltip){this.setTooltip(this.tooltip)}this.oninput(this.input,(()=>this.onValueChange()));this.onblur(this.input,(()=>this.onBlur()));this.onfocus(this.input,(()=>this.onFocus()));this._register(this.ignoreGesture(this.input));setTimeout((()=>this.updateMirror()),0);if(this.options.actions){this.actionbar=this._register(new ActionBar(this.element));this.actionbar.push(this.options.actions,{icon:true,label:false})}this.applyStyles()}onBlur(){this._hideMessage();if(this.options.showPlaceholderOnFocus){this.input.setAttribute("placeholder","")}}onFocus(){this._showMessage();if(this.options.showPlaceholderOnFocus){this.input.setAttribute("placeholder",this.placeholder||"")}}setPlaceHolder(placeHolder){this.placeholder=placeHolder;this.input.setAttribute("placeholder",placeHolder)}setTooltip(tooltip){this.tooltip=tooltip;this.input.title=tooltip}get inputElement(){return this.input}get value(){return this.input.value}set value(newValue){if(this.input.value!==newValue){this.input.value=newValue;this.onValueChange()}}get height(){return typeof this.cachedHeight==="number"?this.cachedHeight:getTotalHeight(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(range2=null){this.input.select();if(range2){this.input.setSelectionRange(range2.start,range2.end);if(range2.end===this.input.value.length){this.input.scrollLeft=this.input.scrollWidth}}}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur();this.input.disabled=true;this._hideMessage()}set paddingRight(paddingRight){this.input.style.width=`calc(100% - ${paddingRight}px)`;if(this.mirror){this.mirror.style.paddingRight=paddingRight+"px"}}updateScrollDimensions(){if(typeof this.cachedContentHeight!=="number"||typeof this.cachedHeight!=="number"||!this.scrollableElement){return}const scrollHeight=this.cachedContentHeight;const height=this.cachedHeight;const scrollTop=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:scrollHeight,height:height});this.scrollableElement.setScrollPosition({scrollTop:scrollTop})}showMessage(message,force){if(this.state==="open"&&equals2(this.message,message)){return}this.message=message;this.element.classList.remove("idle");this.element.classList.remove("info");this.element.classList.remove("warning");this.element.classList.remove("error");this.element.classList.add(this.classForType(message.type));const styles=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${asCssValueWithDefault(styles.border,"transparent")}`;if(this.message.content&&(this.hasFocus()||force)){this._showMessage()}}hideMessage(){this.message=null;this.element.classList.remove("info");this.element.classList.remove("warning");this.element.classList.remove("error");this.element.classList.add("idle");this._hideMessage();this.applyStyles()}validate(){let errorMsg=null;if(this.validation){errorMsg=this.validation(this.value);if(errorMsg){this.inputElement.setAttribute("aria-invalid","true");this.showMessage(errorMsg)}else if(this.inputElement.hasAttribute("aria-invalid")){this.inputElement.removeAttribute("aria-invalid");this.hideMessage()}}return errorMsg===null||errorMsg===void 0?void 0:errorMsg.type}stylesForType(type){const styles=this.options.inputBoxStyles;switch(type){case 1:return{border:styles.inputValidationInfoBorder,background:styles.inputValidationInfoBackground,foreground:styles.inputValidationInfoForeground};case 2:return{border:styles.inputValidationWarningBorder,background:styles.inputValidationWarningBackground,foreground:styles.inputValidationWarningForeground};default:return{border:styles.inputValidationErrorBorder,background:styles.inputValidationErrorBackground,foreground:styles.inputValidationErrorForeground}}}classForType(type){switch(type){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message){return}let div;const layout2=()=>div.style.width=getTotalWidth(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:container=>{var _a6,_b3;if(!this.message){return null}div=append(container,$3(".monaco-inputbox-container"));layout2();const renderOptions={inline:true,className:"monaco-inputbox-message"};const spanElement=this.message.formatContent?renderFormattedText(this.message.content,renderOptions):renderText(this.message.content,renderOptions);spanElement.classList.add(this.classForType(this.message.type));const styles=this.stylesForType(this.message.type);spanElement.style.backgroundColor=(_a6=styles.background)!==null&&_a6!==void 0?_a6:"";spanElement.style.color=(_b3=styles.foreground)!==null&&_b3!==void 0?_b3:"";spanElement.style.border=styles.border?`1px solid ${styles.border}`:"";append(div,spanElement);return null},onHide:()=>{this.state="closed"},layout:layout2});let alertText;if(this.message.type===3){alertText=localize("alertErrorMessage","Error: {0}",this.message.content)}else if(this.message.type===2){alertText=localize("alertWarningMessage","Warning: {0}",this.message.content)}else{alertText=localize("alertInfoMessage","Info: {0}",this.message.content)}alert(alertText);this.state="open"}_hideMessage(){if(!this.contextViewProvider){return}if(this.state==="open"){this.contextViewProvider.hideContextView()}this.state="idle"}onValueChange(){this._onDidChange.fire(this.value);this.validate();this.updateMirror();this.input.classList.toggle("empty",!this.value);if(this.state==="open"&&this.contextViewProvider){this.contextViewProvider.layout()}}updateMirror(){if(!this.mirror){return}const value=this.value;const lastCharCode=value.charCodeAt(value.length-1);const suffix=lastCharCode===10?" ":"";const mirrorTextContent=(value+suffix).replace(/\u000c/g,"");if(mirrorTextContent){this.mirror.textContent=value+suffix}else{this.mirror.innerText=" "}this.layout()}applyStyles(){var _a6,_b3,_c2;const styles=this.options.inputBoxStyles;const background=(_a6=styles.inputBackground)!==null&&_a6!==void 0?_a6:"";const foreground2=(_b3=styles.inputForeground)!==null&&_b3!==void 0?_b3:"";const border=(_c2=styles.inputBorder)!==null&&_c2!==void 0?_c2:"";this.element.style.backgroundColor=background;this.element.style.color=foreground2;this.input.style.backgroundColor="inherit";this.input.style.color=foreground2;this.element.style.border=`1px solid ${asCssValueWithDefault(border,"transparent")}`}layout(){if(!this.mirror){return}const previousHeight=this.cachedContentHeight;this.cachedContentHeight=getTotalHeight(this.mirror);if(previousHeight!==this.cachedContentHeight){this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight);this.input.style.height=this.cachedHeight+"px";this._onDidHeightChange.fire(this.cachedContentHeight)}}insertAtCursor(text2){const inputElement=this.inputElement;const start=inputElement.selectionStart;const end=inputElement.selectionEnd;const content=inputElement.value;if(start!==null&&end!==null){this.value=content.substr(0,start)+text2+content.substr(end);inputElement.setSelectionRange(start+1,start+1);this.layout()}}dispose(){var _a6;this._hideMessage();this.message=null;(_a6=this.actionbar)===null||_a6===void 0?void 0:_a6.dispose();super.dispose()}};HistoryInputBox=class extends InputBox{constructor(container,contextViewProvider,options2){const NLS_PLACEHOLDER_HISTORY_HINT=localize({key:"history.inputbox.hint",comment:["Text will be prefixed with ⇅ plus a single space, then used as a hint where input field keeps history"]},"for history");const NLS_PLACEHOLDER_HISTORY_HINT_SUFFIX=` or ⇅ ${NLS_PLACEHOLDER_HISTORY_HINT}`;const NLS_PLACEHOLDER_HISTORY_HINT_SUFFIX_IN_PARENS=` (⇅ ${NLS_PLACEHOLDER_HISTORY_HINT})`;super(container,contextViewProvider,options2);this._onDidFocus=this._register(new Emitter);this.onDidFocus=this._onDidFocus.event;this._onDidBlur=this._register(new Emitter);this.onDidBlur=this._onDidBlur.event;this.history=new HistoryNavigator(options2.history,100);const addSuffix=()=>{if(options2.showHistoryHint&&options2.showHistoryHint()&&!this.placeholder.endsWith(NLS_PLACEHOLDER_HISTORY_HINT_SUFFIX)&&!this.placeholder.endsWith(NLS_PLACEHOLDER_HISTORY_HINT_SUFFIX_IN_PARENS)&&this.history.getHistory().length){const suffix=this.placeholder.endsWith(")")?NLS_PLACEHOLDER_HISTORY_HINT_SUFFIX:NLS_PLACEHOLDER_HISTORY_HINT_SUFFIX_IN_PARENS;const suffixedPlaceholder=this.placeholder+suffix;if(options2.showPlaceholderOnFocus&&document.activeElement!==this.input){this.placeholder=suffixedPlaceholder}else{this.setPlaceHolder(suffixedPlaceholder)}}};this.observer=new MutationObserver(((mutationList,observer)=>{mutationList.forEach((mutation=>{if(!mutation.target.textContent){addSuffix()}}))}));this.observer.observe(this.input,{attributeFilter:["class"]});this.onfocus(this.input,(()=>addSuffix()));this.onblur(this.input,(()=>{const resetPlaceholder=historyHint=>{if(!this.placeholder.endsWith(historyHint)){return false}else{const revertedPlaceholder=this.placeholder.slice(0,this.placeholder.length-historyHint.length);if(options2.showPlaceholderOnFocus){this.placeholder=revertedPlaceholder}else{this.setPlaceHolder(revertedPlaceholder)}return true}};if(!resetPlaceholder(NLS_PLACEHOLDER_HISTORY_HINT_SUFFIX_IN_PARENS)){resetPlaceholder(NLS_PLACEHOLDER_HISTORY_HINT_SUFFIX)}}))}dispose(){super.dispose();if(this.observer){this.observer.disconnect();this.observer=void 0}}addToHistory(always){if(this.value&&(always||this.value!==this.getCurrentValue())){this.history.add(this.value)}}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){if(!this.history.has(this.value)){this.addToHistory()}let next=this.getNextValue();if(next){next=next===this.value?this.getNextValue():next}this.value=next!==null&&next!==void 0?next:"";status(this.value?this.value:localize("clearedInput","Cleared Input"))}showPreviousValue(){if(!this.history.has(this.value)){this.addToHistory()}let previous=this.getPreviousValue();if(previous){previous=previous===this.value?this.getPreviousValue():previous}if(previous){this.value=previous;status(this.value)}}onBlur(){super.onBlur();this._onDidBlur.fire()}onFocus(){super.onFocus();this._onDidFocus.fire()}getCurrentValue(){let currentValue=this.history.current();if(!currentValue){currentValue=this.history.last();this.history.next()}return currentValue}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}}});var init_39=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.css"(){}});var NLS_DEFAULT_LABEL,FindInput;var init_findInput=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/findinput/findInput.js"(){init_dom();init_findInputToggles();init_inputBox();init_widget();init_event();init_39();init_nls();init_lifecycle();NLS_DEFAULT_LABEL=localize("defaultLabel","input");FindInput=class extends Widget{constructor(parent,contextViewProvider,options2){super();this.fixFocusOnOptionClickEnabled=true;this.imeSessionInProgress=false;this.additionalTogglesDisposables=new DisposableStore;this.additionalToggles=[];this._onDidOptionChange=this._register(new Emitter);this.onDidOptionChange=this._onDidOptionChange.event;this._onKeyDown=this._register(new Emitter);this.onKeyDown=this._onKeyDown.event;this._onMouseDown=this._register(new Emitter);this.onMouseDown=this._onMouseDown.event;this._onInput=this._register(new Emitter);this._onKeyUp=this._register(new Emitter);this._onCaseSensitiveKeyDown=this._register(new Emitter);this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event;this._onRegexKeyDown=this._register(new Emitter);this.onRegexKeyDown=this._onRegexKeyDown.event;this._lastHighlightFindOptions=0;this.placeholder=options2.placeholder||"";this.validation=options2.validation;this.label=options2.label||NLS_DEFAULT_LABEL;this.showCommonFindToggles=!!options2.showCommonFindToggles;const appendCaseSensitiveLabel=options2.appendCaseSensitiveLabel||"";const appendWholeWordsLabel=options2.appendWholeWordsLabel||"";const appendRegexLabel=options2.appendRegexLabel||"";const history=options2.history||[];const flexibleHeight=!!options2.flexibleHeight;const flexibleWidth=!!options2.flexibleWidth;const flexibleMaxHeight=options2.flexibleMaxHeight;this.domNode=document.createElement("div");this.domNode.classList.add("monaco-findInput");this.inputBox=this._register(new HistoryInputBox(this.domNode,contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:history,showHistoryHint:options2.showHistoryHint,flexibleHeight:flexibleHeight,flexibleWidth:flexibleWidth,flexibleMaxHeight:flexibleMaxHeight,inputBoxStyles:options2.inputBoxStyles}));if(this.showCommonFindToggles){this.regex=this._register(new RegexToggle(Object.assign({appendTitle:appendRegexLabel,isChecked:false},options2.toggleStyles)));this._register(this.regex.onChange((viaKeyboard=>{this._onDidOptionChange.fire(viaKeyboard);if(!viaKeyboard&&this.fixFocusOnOptionClickEnabled){this.inputBox.focus()}this.validate()})));this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)})));this.wholeWords=this._register(new WholeWordsToggle(Object.assign({appendTitle:appendWholeWordsLabel,isChecked:false},options2.toggleStyles)));this._register(this.wholeWords.onChange((viaKeyboard=>{this._onDidOptionChange.fire(viaKeyboard);if(!viaKeyboard&&this.fixFocusOnOptionClickEnabled){this.inputBox.focus()}this.validate()})));this.caseSensitive=this._register(new CaseSensitiveToggle(Object.assign({appendTitle:appendCaseSensitiveLabel,isChecked:false},options2.toggleStyles)));this._register(this.caseSensitive.onChange((viaKeyboard=>{this._onDidOptionChange.fire(viaKeyboard);if(!viaKeyboard&&this.fixFocusOnOptionClickEnabled){this.inputBox.focus()}this.validate()})));this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)})));const indexes=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(event=>{if(event.equals(15)||event.equals(17)||event.equals(9)){const index=indexes.indexOf(document.activeElement);if(index>=0){let newIndex=-1;if(event.equals(17)){newIndex=(index+1)%indexes.length}else if(event.equals(15)){if(index===0){newIndex=indexes.length-1}else{newIndex=index-1}}if(event.equals(9)){indexes[index].blur();this.inputBox.focus()}else if(newIndex>=0){indexes[newIndex].focus()}EventHelper.stop(event,true)}}}))}this.controls=document.createElement("div");this.controls.className="controls";this.controls.style.display=this.showCommonFindToggles?"":"none";if(this.caseSensitive){this.controls.append(this.caseSensitive.domNode)}if(this.wholeWords){this.controls.appendChild(this.wholeWords.domNode)}if(this.regex){this.controls.appendChild(this.regex.domNode)}this.setAdditionalToggles(options2===null||options2===void 0?void 0:options2.additionalToggles);if(this.controls){this.domNode.appendChild(this.controls)}parent===null||parent===void 0?void 0:parent.appendChild(this.domNode);this._register(addDisposableListener(this.inputBox.inputElement,"compositionstart",(e=>{this.imeSessionInProgress=true})));this._register(addDisposableListener(this.inputBox.inputElement,"compositionend",(e=>{this.imeSessionInProgress=false;this._onInput.fire()})));this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e)));this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e)));this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire()));this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}get onDidChange(){return this.inputBox.onDidChange}layout(style){this.inputBox.layout();this.updateInputBoxPadding(style.collapsedFindWidget)}enable(){var _a6,_b3,_c2;this.domNode.classList.remove("disabled");this.inputBox.enable();(_a6=this.regex)===null||_a6===void 0?void 0:_a6.enable();(_b3=this.wholeWords)===null||_b3===void 0?void 0:_b3.enable();(_c2=this.caseSensitive)===null||_c2===void 0?void 0:_c2.enable();for(const toggle of this.additionalToggles){toggle.enable()}}disable(){var _a6,_b3,_c2;this.domNode.classList.add("disabled");this.inputBox.disable();(_a6=this.regex)===null||_a6===void 0?void 0:_a6.disable();(_b3=this.wholeWords)===null||_b3===void 0?void 0:_b3.disable();(_c2=this.caseSensitive)===null||_c2===void 0?void 0:_c2.disable();for(const toggle of this.additionalToggles){toggle.disable()}}setFocusInputOnOptionClick(value){this.fixFocusOnOptionClickEnabled=value}setEnabled(enabled){if(enabled){this.enable()}else{this.disable()}}setAdditionalToggles(toggles){for(const currentToggle of this.additionalToggles){currentToggle.domNode.remove()}this.additionalToggles=[];this.additionalTogglesDisposables.dispose();this.additionalTogglesDisposables=new DisposableStore;for(const toggle of toggles!==null&&toggles!==void 0?toggles:[]){this.additionalTogglesDisposables.add(toggle);this.controls.appendChild(toggle.domNode);this.additionalTogglesDisposables.add(toggle.onChange((viaKeyboard=>{this._onDidOptionChange.fire(viaKeyboard);if(!viaKeyboard&&this.fixFocusOnOptionClickEnabled){this.inputBox.focus()}})));this.additionalToggles.push(toggle)}if(this.additionalToggles.length>0){this.controls.style.display=""}this.updateInputBoxPadding()}updateInputBoxPadding(controlsHidden=false){var _a6,_b3,_c2,_d2,_e2,_f2;if(controlsHidden){this.inputBox.paddingRight=0}else{this.inputBox.paddingRight=((_b3=(_a6=this.caseSensitive)===null||_a6===void 0?void 0:_a6.width())!==null&&_b3!==void 0?_b3:0)+((_d2=(_c2=this.wholeWords)===null||_c2===void 0?void 0:_c2.width())!==null&&_d2!==void 0?_d2:0)+((_f2=(_e2=this.regex)===null||_e2===void 0?void 0:_e2.width())!==null&&_f2!==void 0?_f2:0)+this.additionalToggles.reduce(((r,t2)=>r+t2.width()),0)}}getValue(){return this.inputBox.value}setValue(value){if(this.inputBox.value!==value){this.inputBox.value=value}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var _a6,_b3;return(_b3=(_a6=this.caseSensitive)===null||_a6===void 0?void 0:_a6.checked)!==null&&_b3!==void 0?_b3:false}setCaseSensitive(value){if(this.caseSensitive){this.caseSensitive.checked=value}}getWholeWords(){var _a6,_b3;return(_b3=(_a6=this.wholeWords)===null||_a6===void 0?void 0:_a6.checked)!==null&&_b3!==void 0?_b3:false}setWholeWords(value){if(this.wholeWords){this.wholeWords.checked=value}}getRegex(){var _a6,_b3;return(_b3=(_a6=this.regex)===null||_a6===void 0?void 0:_a6.checked)!==null&&_b3!==void 0?_b3:false}setRegex(value){if(this.regex){this.regex.checked=value;this.validate()}}focusOnCaseSensitive(){var _a6;(_a6=this.caseSensitive)===null||_a6===void 0?void 0:_a6.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions);this._lastHighlightFindOptions=1-this._lastHighlightFindOptions;this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(message){this.inputBox.showMessage(message)}clearMessage(){this.inputBox.hideMessage()}}}});var ObjectTreeElementCollapseState,TreeMouseEventTarget,TreeError,WeakMapper;var init_tree=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/tree/tree.js"(){(function(ObjectTreeElementCollapseState2){ObjectTreeElementCollapseState2[ObjectTreeElementCollapseState2["Expanded"]=0]="Expanded";ObjectTreeElementCollapseState2[ObjectTreeElementCollapseState2["Collapsed"]=1]="Collapsed";ObjectTreeElementCollapseState2[ObjectTreeElementCollapseState2["PreserveOrExpanded"]=2]="PreserveOrExpanded";ObjectTreeElementCollapseState2[ObjectTreeElementCollapseState2["PreserveOrCollapsed"]=3]="PreserveOrCollapsed"})(ObjectTreeElementCollapseState||(ObjectTreeElementCollapseState={}));(function(TreeMouseEventTarget2){TreeMouseEventTarget2[TreeMouseEventTarget2["Unknown"]=0]="Unknown";TreeMouseEventTarget2[TreeMouseEventTarget2["Twistie"]=1]="Twistie";TreeMouseEventTarget2[TreeMouseEventTarget2["Element"]=2]="Element";TreeMouseEventTarget2[TreeMouseEventTarget2["Filter"]=3]="Filter"})(TreeMouseEventTarget||(TreeMouseEventTarget={}));TreeError=class extends Error{constructor(user,message){super(`TreeError [${user}] ${message}`)}};WeakMapper=class{constructor(fn){this.fn=fn;this._map=new WeakMap}map(key){let result=this._map.get(key);if(!result){result=this.fn(key);this._map.set(key,result)}return result}}}});function isFilterResult(obj){return typeof obj==="object"&&"visibility"in obj&&"data"in obj}function getVisibleState(visibility){switch(visibility){case true:return 1;case false:return 0;default:return visibility}}function isCollapsibleStateUpdate(update){return typeof update.collapsible==="boolean"}var IndexTreeModel;var init_indexTreeModel=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/tree/indexTreeModel.js"(){init_tree();init_arrays();init_async();init_symbols();init_diff();init_event();init_iterator();IndexTreeModel=class{constructor(user,list,rootElement,options2={}){this.user=user;this.list=list;this.rootRef=[];this.eventBufferer=new EventBufferer;this._onDidChangeCollapseState=new Emitter;this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event);this._onDidChangeRenderNodeCount=new Emitter;this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event);this._onDidSplice=new Emitter;this.onDidSplice=this._onDidSplice.event;this.refilterDelayer=new Delayer(MicrotaskDelay);this.collapseByDefault=typeof options2.collapseByDefault==="undefined"?false:options2.collapseByDefault;this.filter=options2.filter;this.autoExpandSingleChildren=typeof options2.autoExpandSingleChildren==="undefined"?false:options2.autoExpandSingleChildren;this.root={parent:void 0,element:rootElement,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:false,collapsed:false,renderNodeCount:0,visibility:1,visible:true,filterData:void 0}}splice(location,deleteCount,toInsert=Iterable.empty(),options2={}){if(location.length===0){throw new TreeError(this.user,"Invalid tree location")}if(options2.diffIdentityProvider){this.spliceSmart(options2.diffIdentityProvider,location,deleteCount,toInsert,options2)}else{this.spliceSimple(location,deleteCount,toInsert,options2)}}spliceSmart(identity,location,deleteCount,toInsertIterable,options2,recurseLevels){var _a6;if(toInsertIterable===void 0){toInsertIterable=Iterable.empty()}if(recurseLevels===void 0){recurseLevels=(_a6=options2.diffDepth)!==null&&_a6!==void 0?_a6:0}const{parentNode:parentNode}=this.getParentNodeWithListIndex(location);if(!parentNode.lastDiffIds){return this.spliceSimple(location,deleteCount,toInsertIterable,options2)}const toInsert=[...toInsertIterable];const index=location[location.length-1];const diff=new LcsDiff({getElements:()=>parentNode.lastDiffIds},{getElements:()=>[...parentNode.children.slice(0,index),...toInsert,...parentNode.children.slice(index+deleteCount)].map((e=>identity.getId(e.element).toString()))}).ComputeDiff(false);if(diff.quitEarly){parentNode.lastDiffIds=void 0;return this.spliceSimple(location,deleteCount,toInsert,options2)}const locationPrefix=location.slice(0,-1);const recurseSplice=(fromOriginal,fromModified,count)=>{if(recurseLevels>0){for(let i=0;ib.originalStart-a.originalStart))){recurseSplice(lastStartO,lastStartM,lastStartO-(change.originalStart+change.originalLength));lastStartO=change.originalStart;lastStartM=change.modifiedStart-index;this.spliceSimple([...locationPrefix,lastStartO],change.originalLength,Iterable.slice(toInsert,lastStartM,lastStartM+change.modifiedLength),options2)}recurseSplice(lastStartO,lastStartM,lastStartO)}spliceSimple(location,deleteCount,toInsert=Iterable.empty(),{onDidCreateNode:onDidCreateNode,onDidDeleteNode:onDidDeleteNode,diffIdentityProvider:diffIdentityProvider}){const{parentNode:parentNode,listIndex:listIndex,revealed:revealed,visible:visible}=this.getParentNodeWithListIndex(location);const treeListElementsToInsert=[];const nodesToInsertIterator=Iterable.map(toInsert,(el=>this.createTreeNode(el,parentNode,parentNode.visible?1:0,revealed,treeListElementsToInsert,onDidCreateNode)));const lastIndex=location[location.length-1];const lastHadChildren=parentNode.children.length>0;let visibleChildStartIndex=0;for(let i=lastIndex;i>=0&&idiffIdentityProvider.getId(n.element).toString())))}else{parentNode.lastDiffIds=parentNode.children.map((n=>diffIdentityProvider.getId(n.element).toString()))}let deletedVisibleChildrenCount=0;for(const child of deletedNodes){if(child.visible){deletedVisibleChildrenCount++}}if(deletedVisibleChildrenCount!==0){for(let i=lastIndex+nodesToInsert.length;ir+(node2.visible?node2.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(parentNode,renderNodeCount-visibleDeleteCount);this.list.splice(listIndex,visibleDeleteCount,treeListElementsToInsert)}if(deletedNodes.length>0&&onDidDeleteNode){const visit=node2=>{onDidDeleteNode(node2);node2.children.forEach(visit)};deletedNodes.forEach(visit)}this._onDidSplice.fire({insertedNodes:nodesToInsert,deletedNodes:deletedNodes});const currentlyHasChildren=parentNode.children.length>0;if(lastHadChildren!==currentlyHasChildren){this.setCollapsible(location.slice(0,-1),currentlyHasChildren)}let node=parentNode;while(node){if(node.visibility===2){this.refilterDelayer.trigger((()=>this.refilter()));break}node=node.parent}}rerender(location){if(location.length===0){throw new TreeError(this.user,"Invalid tree location")}const{node:node,listIndex:listIndex,revealed:revealed}=this.getTreeNodeWithListIndex(location);if(node.visible&&revealed){this.list.splice(listIndex,1,[node])}}has(location){return this.hasTreeNode(location)}getListIndex(location){const{listIndex:listIndex,visible:visible,revealed:revealed}=this.getTreeNodeWithListIndex(location);return visible&&revealed?listIndex:-1}getListRenderCount(location){return this.getTreeNode(location).renderNodeCount}isCollapsible(location){return this.getTreeNode(location).collapsible}setCollapsible(location,collapsible){const node=this.getTreeNode(location);if(typeof collapsible==="undefined"){collapsible=!node.collapsible}const update={collapsible:collapsible};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(location,update)))}isCollapsed(location){return this.getTreeNode(location).collapsed}setCollapsed(location,collapsed,recursive){const node=this.getTreeNode(location);if(typeof collapsed==="undefined"){collapsed=!node.collapsed}const update={collapsed:collapsed,recursive:recursive||false};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(location,update)))}_setCollapseState(location,update){const{node:node,listIndex:listIndex,revealed:revealed}=this.getTreeNodeWithListIndex(location);const result=this._setListNodeCollapseState(node,listIndex,revealed,update);if(node!==this.root&&this.autoExpandSingleChildren&&result&&!isCollapsibleStateUpdate(update)&&node.collapsible&&!node.collapsed&&!update.recursive){let onlyVisibleChildIndex=-1;for(let i=0;i-1){onlyVisibleChildIndex=-1;break}else{onlyVisibleChildIndex=i}}}if(onlyVisibleChildIndex>-1){this._setCollapseState([...location,onlyVisibleChildIndex],update)}}return result}_setListNodeCollapseState(node,listIndex,revealed,update){const result=this._setNodeCollapseState(node,update,false);if(!revealed||!node.visible||!result){return result}const previousRenderNodeCount=node.renderNodeCount;const toInsert=this.updateNodeAfterCollapseChange(node);const deleteCount=previousRenderNodeCount-(listIndex===-1?0:1);this.list.splice(listIndex+1,deleteCount,toInsert.slice(1));return result}_setNodeCollapseState(node,update,deep){let result;if(node===this.root){result=false}else{if(isCollapsibleStateUpdate(update)){result=node.collapsible!==update.collapsible;node.collapsible=update.collapsible}else if(!node.collapsible){result=false}else{result=node.collapsed!==update.collapsed;node.collapsed=update.collapsed}if(result){this._onDidChangeCollapseState.fire({node:node,deep:deep})}}if(!isCollapsibleStateUpdate(update)&&update.recursive){for(const child of node.children){result=this._setNodeCollapseState(child,update,true)||result}}return result}expandTo(location){this.eventBufferer.bufferEvents((()=>{let node=this.getTreeNode(location);while(node.parent){node=node.parent;location=location.slice(0,location.length-1);if(node.collapsed){this._setCollapseState(location,{collapsed:false,recursive:false})}}}))}refilter(){const previousRenderNodeCount=this.root.renderNodeCount;const toInsert=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,previousRenderNodeCount,toInsert);this.refilterDelayer.cancel()}createTreeNode(treeElement,parent,parentVisibility,revealed,treeListElements,onDidCreateNode){const node={parent:parent,element:treeElement.element,children:[],depth:parent.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof treeElement.collapsible==="boolean"?treeElement.collapsible:typeof treeElement.collapsed!=="undefined",collapsed:typeof treeElement.collapsed==="undefined"?this.collapseByDefault:treeElement.collapsed,renderNodeCount:1,visibility:1,visible:true,filterData:void 0};const visibility=this._filterNode(node,parentVisibility);node.visibility=visibility;if(revealed){treeListElements.push(node)}const childElements=treeElement.children||Iterable.empty();const childRevealed=revealed&&visibility!==0&&!node.collapsed;let visibleChildrenCount=0;let renderNodeCount=1;for(const el of childElements){const child=this.createTreeNode(el,node,visibility,childRevealed,treeListElements,onDidCreateNode);node.children.push(child);renderNodeCount+=child.renderNodeCount;if(child.visible){child.visibleChildIndex=visibleChildrenCount++}}node.collapsible=node.collapsible||node.children.length>0;node.visibleChildrenCount=visibleChildrenCount;node.visible=visibility===2?visibleChildrenCount>0:visibility===1;if(!node.visible){node.renderNodeCount=0;if(revealed){treeListElements.pop()}}else if(!node.collapsed){node.renderNodeCount=renderNodeCount}onDidCreateNode===null||onDidCreateNode===void 0?void 0:onDidCreateNode(node);return node}updateNodeAfterCollapseChange(node){const previousRenderNodeCount=node.renderNodeCount;const result=[];this._updateNodeAfterCollapseChange(node,result);this._updateAncestorsRenderNodeCount(node.parent,result.length-previousRenderNodeCount);return result}_updateNodeAfterCollapseChange(node,result){if(node.visible===false){return 0}result.push(node);node.renderNodeCount=1;if(!node.collapsed){for(const child of node.children){node.renderNodeCount+=this._updateNodeAfterCollapseChange(child,result)}}this._onDidChangeRenderNodeCount.fire(node);return node.renderNodeCount}updateNodeAfterFilterChange(node){const previousRenderNodeCount=node.renderNodeCount;const result=[];this._updateNodeAfterFilterChange(node,node.visible?1:0,result);this._updateAncestorsRenderNodeCount(node.parent,result.length-previousRenderNodeCount);return result}_updateNodeAfterFilterChange(node,parentVisibility,result,revealed=true){let visibility;if(node!==this.root){visibility=this._filterNode(node,parentVisibility);if(visibility===0){node.visible=false;node.renderNodeCount=0;return false}if(revealed){result.push(node)}}const resultStartLength=result.length;node.renderNodeCount=node===this.root?0:1;let hasVisibleDescendants=false;if(!node.collapsed||visibility!==0){let visibleChildIndex=0;for(const child of node.children){hasVisibleDescendants=this._updateNodeAfterFilterChange(child,visibility,result,revealed&&!node.collapsed)||hasVisibleDescendants;if(child.visible){child.visibleChildIndex=visibleChildIndex++}}node.visibleChildrenCount=visibleChildIndex}else{node.visibleChildrenCount=0}if(node!==this.root){node.visible=visibility===2?hasVisibleDescendants:visibility===1;node.visibility=visibility}if(!node.visible){node.renderNodeCount=0;if(revealed){result.pop()}}else if(!node.collapsed){node.renderNodeCount+=result.length-resultStartLength}this._onDidChangeRenderNodeCount.fire(node);return node.visible}_updateAncestorsRenderNodeCount(node,diff){if(diff===0){return}while(node){node.renderNodeCount+=diff;this._onDidChangeRenderNodeCount.fire(node);node=node.parent}}_filterNode(node,parentVisibility){const result=this.filter?this.filter.filter(node.element,parentVisibility):1;if(typeof result==="boolean"){node.filterData=void 0;return result?1:0}else if(isFilterResult(result)){node.filterData=result.data;return getVisibleState(result.visibility)}else{node.filterData=void 0;return getVisibleState(result)}}hasTreeNode(location,node=this.root){if(!location||location.length===0){return true}const[index,...rest]=location;if(index<0||index>node.children.length){return false}return this.hasTreeNode(rest,node.children[index])}getTreeNode(location,node=this.root){if(!location||location.length===0){return node}const[index,...rest]=location;if(index<0||index>node.children.length){throw new TreeError(this.user,"Invalid tree location")}return this.getTreeNode(rest,node.children[index])}getTreeNodeWithListIndex(location){if(location.length===0){return{node:this.root,listIndex:-1,revealed:true,visible:false}}const{parentNode:parentNode,listIndex:listIndex,revealed:revealed,visible:visible}=this.getParentNodeWithListIndex(location);const index=location[location.length-1];if(index<0||index>parentNode.children.length){throw new TreeError(this.user,"Invalid tree location")}const node=parentNode.children[index];return{node:node,listIndex:listIndex,revealed:revealed,visible:visible&&node.visible}}getParentNodeWithListIndex(location,node=this.root,listIndex=0,revealed=true,visible=true){const[index,...rest]=location;if(index<0||index>node.children.length){throw new TreeError(this.user,"Invalid tree location")}for(let i=0;ioptions2.accessibilityProvider.isChecked(node.element):void 0,getRole:options2.accessibilityProvider&&options2.accessibilityProvider.getRole?node=>options2.accessibilityProvider.getRole(node.element):()=>"treeitem",getAriaLabel(e){return options2.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return options2.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:options2.accessibilityProvider&&options2.accessibilityProvider.getWidgetRole?()=>options2.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:options2.accessibilityProvider&&options2.accessibilityProvider.getAriaLevel?node=>options2.accessibilityProvider.getAriaLevel(node.element):node=>node.depth,getActiveDescendantId:options2.accessibilityProvider.getActiveDescendantId&&(node=>options2.accessibilityProvider.getActiveDescendantId(node.element))}),keyboardNavigationLabelProvider:options2.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},options2.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(node){return options2.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(node.element)}})})}function asTreeMouseEvent(event){let target=TreeMouseEventTarget.Unknown;if(hasParentWithClass(event.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")){target=TreeMouseEventTarget.Twistie}else if(hasParentWithClass(event.browserEvent.target,"monaco-tl-contents","monaco-tl-row")){target=TreeMouseEventTarget.Element}else if(hasParentWithClass(event.browserEvent.target,"monaco-tree-type-filter","monaco-list")){target=TreeMouseEventTarget.Filter}return{browserEvent:event.browserEvent,element:event.element?event.element.element:null,target:target}}function dfs(node,fn){fn(node);node.children.forEach((child=>dfs(child,fn)))}var TreeElementsDragAndDropData,TreeNodeListDragAndDrop,ComposedTreeDelegate,RenderIndentGuides,EventCollection,TreeRenderer,FindFilter,TreeFindMode,TreeFindMatchType,FindController,Trait2,TreeNodeListMouseController,TreeNodeList,AbstractTree;var init_abstractTree=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/tree/abstractTree.js"(){init_dom();init_event2();init_keyboardEvent();init_actionbar();init_findInput();init_inputBox();init_listView();init_listWidget();init_toggle();init_indexTreeModel();init_tree();init_actions();init_arrays();init_async();init_codicons();init_themables();init_collections();init_event();init_filters();init_lifecycle();init_numbers();init_types();init_40();init_nls();TreeElementsDragAndDropData=class extends ElementsDragAndDropData{constructor(data){super(data.elements.map((node=>node.element)));this.data=data}};TreeNodeListDragAndDrop=class{constructor(modelProvider,dnd){this.modelProvider=modelProvider;this.dnd=dnd;this.autoExpandDisposable=Disposable.None}getDragURI(node){return this.dnd.getDragURI(node.element)}getDragLabel(nodes,originalEvent){if(this.dnd.getDragLabel){return this.dnd.getDragLabel(nodes.map((node=>node.element)),originalEvent)}return void 0}onDragStart(data,originalEvent){var _a6,_b3;(_b3=(_a6=this.dnd).onDragStart)===null||_b3===void 0?void 0:_b3.call(_a6,asTreeDragAndDropData(data),originalEvent)}onDragOver(data,targetNode,targetIndex,originalEvent,raw=true){const result=this.dnd.onDragOver(asTreeDragAndDropData(data),targetNode&&targetNode.element,targetIndex,originalEvent);const didChangeAutoExpandNode=this.autoExpandNode!==targetNode;if(didChangeAutoExpandNode){this.autoExpandDisposable.dispose();this.autoExpandNode=targetNode}if(typeof targetNode==="undefined"){return result}if(didChangeAutoExpandNode&&typeof result!=="boolean"&&result.autoExpand){this.autoExpandDisposable=disposableTimeout((()=>{const model2=this.modelProvider();const ref2=model2.getNodeLocation(targetNode);if(model2.isCollapsed(ref2)){model2.setCollapsed(ref2,false)}this.autoExpandNode=void 0}),500)}if(typeof result==="boolean"||!result.accept||typeof result.bubble==="undefined"||result.feedback){if(!raw){const accept=typeof result==="boolean"?result:result.accept;const effect=typeof result==="boolean"?void 0:result.effect;return{accept:accept,effect:effect,feedback:[targetIndex]}}return result}if(result.bubble===1){const model2=this.modelProvider();const ref2=model2.getNodeLocation(targetNode);const parentRef=model2.getParentNodeLocation(ref2);const parentNode=model2.getNode(parentRef);const parentIndex=parentRef&&model2.getListIndex(parentRef);return this.onDragOver(data,parentNode,parentIndex,originalEvent,false)}const model=this.modelProvider();const ref=model.getNodeLocation(targetNode);const start=model.getListIndex(ref);const length2=model.getListRenderCount(ref);return Object.assign(Object.assign({},result),{feedback:range(start,start+length2)})}drop(data,targetNode,targetIndex,originalEvent){this.autoExpandDisposable.dispose();this.autoExpandNode=void 0;this.dnd.drop(asTreeDragAndDropData(data),targetNode&&targetNode.element,targetIndex,originalEvent)}onDragEnd(originalEvent){var _a6,_b3;(_b3=(_a6=this.dnd).onDragEnd)===null||_b3===void 0?void 0:_b3.call(_a6,originalEvent)}};ComposedTreeDelegate=class{constructor(delegate){this.delegate=delegate}getHeight(element){return this.delegate.getHeight(element.element)}getTemplateId(element){return this.delegate.getTemplateId(element.element)}hasDynamicHeight(element){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(element.element)}setDynamicHeight(element,height){var _a6,_b3;(_b3=(_a6=this.delegate).setDynamicHeight)===null||_b3===void 0?void 0:_b3.call(_a6,element.element,height)}};(function(RenderIndentGuides2){RenderIndentGuides2["None"]="none";RenderIndentGuides2["OnHover"]="onHover";RenderIndentGuides2["Always"]="always"})(RenderIndentGuides||(RenderIndentGuides={}));EventCollection=class{get elements(){return this._elements}constructor(onDidChange,_elements=[]){this._elements=_elements;this.disposables=new DisposableStore;this.onDidChange=Event.forEach(onDidChange,(elements=>this._elements=elements),this.disposables)}dispose(){this.disposables.dispose()}};TreeRenderer=class{constructor(renderer,modelProvider,onDidChangeCollapseState,activeNodes,renderedIndentGuides,options2={}){var _a6;this.renderer=renderer;this.modelProvider=modelProvider;this.activeNodes=activeNodes;this.renderedIndentGuides=renderedIndentGuides;this.renderedElements=new Map;this.renderedNodes=new Map;this.indent=TreeRenderer.DefaultIndent;this.hideTwistiesOfChildlessElements=false;this.shouldRenderIndentGuides=false;this.activeIndentNodes=new Set;this.indentGuidesDisposable=Disposable.None;this.disposables=new DisposableStore;this.templateId=renderer.templateId;this.updateOptions(options2);Event.map(onDidChangeCollapseState,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables);(_a6=renderer.onDidChangeTwistieState)===null||_a6===void 0?void 0:_a6.call(renderer,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(options2={}){if(typeof options2.indent!=="undefined"){const indent=clamp(options2.indent,0,40);if(indent!==this.indent){this.indent=indent;for(const[node,templateData]of this.renderedNodes){this.renderTreeElement(node,templateData)}}}if(typeof options2.renderIndentGuides!=="undefined"){const shouldRenderIndentGuides=options2.renderIndentGuides!==RenderIndentGuides.None;if(shouldRenderIndentGuides!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=shouldRenderIndentGuides;for(const[node,templateData]of this.renderedNodes){this._renderIndentGuides(node,templateData)}this.indentGuidesDisposable.dispose();if(shouldRenderIndentGuides){const disposables=new DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,disposables);this.indentGuidesDisposable=disposables;this._onDidChangeActiveNodes(this.activeNodes.elements)}}}if(typeof options2.hideTwistiesOfChildlessElements!=="undefined"){this.hideTwistiesOfChildlessElements=options2.hideTwistiesOfChildlessElements}}renderTemplate(container){const el=append(container,$(".monaco-tl-row"));const indent=append(el,$(".monaco-tl-indent"));const twistie=append(el,$(".monaco-tl-twistie"));const contents=append(el,$(".monaco-tl-contents"));const templateData=this.renderer.renderTemplate(contents);return{container:container,indent:indent,twistie:twistie,indentGuidesDisposable:Disposable.None,templateData:templateData}}renderElement(node,index,templateData,height){this.renderedNodes.set(node,templateData);this.renderedElements.set(node.element,node);this.renderTreeElement(node,templateData);this.renderer.renderElement(node,index,templateData.templateData,height)}disposeElement(node,index,templateData,height){var _a6,_b3;templateData.indentGuidesDisposable.dispose();(_b3=(_a6=this.renderer).disposeElement)===null||_b3===void 0?void 0:_b3.call(_a6,node,index,templateData.templateData,height);if(typeof height==="number"){this.renderedNodes.delete(node);this.renderedElements.delete(node.element)}}disposeTemplate(templateData){this.renderer.disposeTemplate(templateData.templateData)}onDidChangeTwistieState(element){const node=this.renderedElements.get(element);if(!node){return}this.onDidChangeNodeTwistieState(node)}onDidChangeNodeTwistieState(node){const templateData=this.renderedNodes.get(node);if(!templateData){return}this._onDidChangeActiveNodes(this.activeNodes.elements);this.renderTreeElement(node,templateData)}renderTreeElement(node,templateData){const indent=TreeRenderer.DefaultIndent+(node.depth-1)*this.indent;templateData.twistie.style.paddingLeft=`${indent}px`;templateData.indent.style.width=`${indent+this.indent-16}px`;if(node.collapsible){templateData.container.setAttribute("aria-expanded",String(!node.collapsed))}else{templateData.container.removeAttribute("aria-expanded")}templateData.twistie.classList.remove(...ThemeIcon.asClassNameArray(Codicon.treeItemExpanded));let twistieRendered=false;if(this.renderer.renderTwistie){twistieRendered=this.renderer.renderTwistie(node.element,templateData.twistie)}if(node.collapsible&&(!this.hideTwistiesOfChildlessElements||node.visibleChildrenCount>0)){if(!twistieRendered){templateData.twistie.classList.add(...ThemeIcon.asClassNameArray(Codicon.treeItemExpanded))}templateData.twistie.classList.add("collapsible");templateData.twistie.classList.toggle("collapsed",node.collapsed)}else{templateData.twistie.classList.remove("collapsible","collapsed")}this._renderIndentGuides(node,templateData)}_renderIndentGuides(node,templateData){clearNode(templateData.indent);templateData.indentGuidesDisposable.dispose();if(!this.shouldRenderIndentGuides){return}const disposableStore=new DisposableStore;const model=this.modelProvider();while(true){const ref=model.getNodeLocation(node);const parentRef=model.getParentNodeLocation(ref);if(!parentRef){break}const parent=model.getNode(parentRef);const guide=$(".indent-guide",{style:`width: ${this.indent}px`});if(this.activeIndentNodes.has(parent)){guide.classList.add("active")}if(templateData.indent.childElementCount===0){templateData.indent.appendChild(guide)}else{templateData.indent.insertBefore(guide,templateData.indent.firstElementChild)}this.renderedIndentGuides.add(parent,guide);disposableStore.add(toDisposable((()=>this.renderedIndentGuides.delete(parent,guide))));node=parent}templateData.indentGuidesDisposable=disposableStore}_onDidChangeActiveNodes(nodes){if(!this.shouldRenderIndentGuides){return}const set=new Set;const model=this.modelProvider();nodes.forEach((node=>{const ref=model.getNodeLocation(node);try{const parentRef=model.getParentNodeLocation(ref);if(node.collapsible&&node.children.length>0&&!node.collapsed){set.add(node)}else if(parentRef){set.add(model.getNode(parentRef))}}catch(_a6){}}));this.activeIndentNodes.forEach((node=>{if(!set.has(node)){this.renderedIndentGuides.forEach(node,(line=>line.classList.remove("active")))}}));set.forEach((node=>{if(!this.activeIndentNodes.has(node)){this.renderedIndentGuides.forEach(node,(line=>line.classList.add("active")))}}));this.activeIndentNodes=set}dispose(){this.renderedNodes.clear();this.renderedElements.clear();this.indentGuidesDisposable.dispose();dispose(this.disposables)}};TreeRenderer.DefaultIndent=8;FindFilter=class{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(tree,keyboardNavigationLabelProvider,_filter){this.tree=tree;this.keyboardNavigationLabelProvider=keyboardNavigationLabelProvider;this._filter=_filter;this._totalCount=0;this._matchCount=0;this._pattern="";this._lowercasePattern="";this.disposables=new DisposableStore;tree.onWillRefilter(this.reset,this,this.disposables)}filter(element,parentVisibility){let visibility=1;if(this._filter){const result=this._filter.filter(element,parentVisibility);if(typeof result==="boolean"){visibility=result?1:0}else if(isFilterResult(result)){visibility=getVisibleState(result.visibility)}else{visibility=result}if(visibility===0){return false}}this._totalCount++;if(!this._pattern){this._matchCount++;return{data:FuzzyScore.Default,visibility:visibility}}const label=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(element);const labels=Array.isArray(label)?label:[label];for(const l of labels){const labelStr=l&&l.toString();if(typeof labelStr==="undefined"){return{data:FuzzyScore.Default,visibility:visibility}}let score3;if(this.tree.findMatchType===TreeFindMatchType.Contiguous){const index=labelStr.toLowerCase().indexOf(this._lowercasePattern);if(index>-1){score3=[Number.MAX_SAFE_INTEGER,0];for(let i=this._lowercasePattern.length;i>0;i--){score3.push(index+i-1)}}}else{score3=fuzzyScore(this._pattern,this._lowercasePattern,0,labelStr,labelStr.toLowerCase(),0,{firstMatchCanBeWeak:true,boostFullMatch:true})}if(score3){this._matchCount++;return labels.length===1?{data:score3,visibility:visibility}:{data:{label:labelStr,score:score3},visibility:visibility}}}if(this.tree.findMode===TreeFindMode.Filter){if(typeof this.tree.options.defaultFindVisibility==="number"){return this.tree.options.defaultFindVisibility}else if(this.tree.options.defaultFindVisibility){return this.tree.options.defaultFindVisibility(element)}else{return 2}}else{return{data:FuzzyScore.Default,visibility:visibility}}}reset(){this._totalCount=0;this._matchCount=0}dispose(){dispose(this.disposables)}};(function(TreeFindMode2){TreeFindMode2[TreeFindMode2["Highlight"]=0]="Highlight";TreeFindMode2[TreeFindMode2["Filter"]=1]="Filter"})(TreeFindMode||(TreeFindMode={}));(function(TreeFindMatchType2){TreeFindMatchType2[TreeFindMatchType2["Fuzzy"]=0]="Fuzzy";TreeFindMatchType2[TreeFindMatchType2["Contiguous"]=1]="Contiguous"})(TreeFindMatchType||(TreeFindMatchType={}));FindController=class{get pattern(){return this._pattern}get mode(){return this._mode}set mode(mode){if(mode===this._mode){return}this._mode=mode;if(this.widget){this.widget.mode=this._mode}this.tree.refilter();this.render();this._onDidChangeMode.fire(mode)}get matchType(){return this._matchType}set matchType(matchType){if(matchType===this._matchType){return}this._matchType=matchType;if(this.widget){this.widget.matchType=this._matchType}this.tree.refilter();this.render();this._onDidChangeMatchType.fire(matchType)}constructor(tree,model,view,filter,contextViewProvider,options2={}){var _a6,_b3;this.tree=tree;this.view=view;this.filter=filter;this.contextViewProvider=contextViewProvider;this.options=options2;this._pattern="";this.width=0;this._onDidChangeMode=new Emitter;this.onDidChangeMode=this._onDidChangeMode.event;this._onDidChangeMatchType=new Emitter;this.onDidChangeMatchType=this._onDidChangeMatchType.event;this._onDidChangePattern=new Emitter;this._onDidChangeOpenState=new Emitter;this.onDidChangeOpenState=this._onDidChangeOpenState.event;this.enabledDisposables=new DisposableStore;this.disposables=new DisposableStore;this._mode=(_a6=tree.options.defaultFindMode)!==null&&_a6!==void 0?_a6:TreeFindMode.Highlight;this._matchType=(_b3=tree.options.defaultFindMatchType)!==null&&_b3!==void 0?_b3:TreeFindMatchType.Fuzzy;model.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(optionsUpdate={}){if(optionsUpdate.defaultFindMode!==void 0){this.mode=optionsUpdate.defaultFindMode}if(optionsUpdate.defaultFindMatchType!==void 0){this.matchType=optionsUpdate.defaultFindMatchType}}onDidSpliceModel(){if(!this.widget||this.pattern.length===0){return}this.tree.refilter();this.render()}render(){var _a6,_b3,_c2,_d2;const noMatches=this.filter.totalCount>0&&this.filter.matchCount===0;if(this.pattern&&noMatches){if((_a6=this.tree.options.showNotFoundMessage)!==null&&_a6!==void 0?_a6:true){(_b3=this.widget)===null||_b3===void 0?void 0:_b3.showMessage({type:2,content:localize("not found","No elements found.")})}else{(_c2=this.widget)===null||_c2===void 0?void 0:_c2.showMessage({type:2})}}else{(_d2=this.widget)===null||_d2===void 0?void 0:_d2.clearMessage()}}shouldAllowFocus(node){if(!this.widget||!this.pattern||this._mode===TreeFindMode.Filter){return true}if(this.filter.totalCount>0&&this.filter.matchCount<=1){return true}return!FuzzyScore.isDefault(node.filterData)}layout(width){var _a6;this.width=width;(_a6=this.widget)===null||_a6===void 0?void 0:_a6.layout(width)}dispose(){this._history=void 0;this._onDidChangePattern.dispose();this.enabledDisposables.dispose();this.disposables.dispose()}};Trait2=class{get nodeSet(){if(!this._nodeSet){this._nodeSet=this.createNodeSet()}return this._nodeSet}constructor(getFirstViewElementWithTrait,identityProvider){this.getFirstViewElementWithTrait=getFirstViewElementWithTrait;this.identityProvider=identityProvider;this.nodes=[];this._onDidChange=new Emitter;this.onDidChange=this._onDidChange.event}set(nodes,browserEvent){if(!(browserEvent===null||browserEvent===void 0?void 0:browserEvent.__forceEvent)&&equals(this.nodes,nodes)){return}this._set(nodes,false,browserEvent)}_set(nodes,silent,browserEvent){this.nodes=[...nodes];this.elements=void 0;this._nodeSet=void 0;if(!silent){const that=this;this._onDidChange.fire({get elements(){return that.get()},browserEvent:browserEvent})}}get(){if(!this.elements){this.elements=this.nodes.map((node=>node.element))}return[...this.elements]}getNodes(){return this.nodes}has(node){return this.nodeSet.has(node)}onDidModelSplice({insertedNodes:insertedNodes,deletedNodes:deletedNodes}){if(!this.identityProvider){const set=this.createNodeSet();const visit=node=>set.delete(node);deletedNodes.forEach((node=>dfs(node,visit)));this.set([...set.values()]);return}const deletedNodesIdSet=new Set;const deletedNodesVisitor=node=>deletedNodesIdSet.add(this.identityProvider.getId(node.element).toString());deletedNodes.forEach((node=>dfs(node,deletedNodesVisitor)));const insertedNodesMap=new Map;const insertedNodesVisitor=node=>insertedNodesMap.set(this.identityProvider.getId(node.element).toString(),node);insertedNodes.forEach((node=>dfs(node,insertedNodesVisitor)));const nodes=[];for(const node of this.nodes){const id=this.identityProvider.getId(node.element).toString();const wasDeleted=deletedNodesIdSet.has(id);if(!wasDeleted){nodes.push(node)}else{const insertedNode=insertedNodesMap.get(id);if(insertedNode&&insertedNode.visible){nodes.push(insertedNode)}}}if(this.nodes.length>0&&nodes.length===0){const node=this.getFirstViewElementWithTrait();if(node){nodes.push(node)}}this._set(nodes,true)}createNodeSet(){const set=new Set;for(const node of this.nodes){set.add(node)}return set}};TreeNodeListMouseController=class extends MouseController{constructor(list,tree){super(list);this.tree=tree}onViewPointer(e){if(isButton(e.browserEvent.target)||isInputElement(e.browserEvent.target)||isMonacoEditor(e.browserEvent.target)){return}if(e.browserEvent.isHandledByList){return}const node=e.element;if(!node){return super.onViewPointer(e)}if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e)){return super.onViewPointer(e)}const target=e.browserEvent.target;const onTwistie=target.classList.contains("monaco-tl-twistie")||target.classList.contains("monaco-icon-label")&&target.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let expandOnlyOnTwistieClick=false;if(typeof this.tree.expandOnlyOnTwistieClick==="function"){expandOnlyOnTwistieClick=this.tree.expandOnlyOnTwistieClick(node.element)}else{expandOnlyOnTwistieClick=!!this.tree.expandOnlyOnTwistieClick}if(expandOnlyOnTwistieClick&&!onTwistie&&e.browserEvent.detail!==2){return super.onViewPointer(e)}if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2){return super.onViewPointer(e)}if(node.collapsible){const location=this.tree.getNodeLocation(node);const recursive=e.browserEvent.altKey;this.tree.setFocus([location]);this.tree.toggleCollapsed(location,recursive);if(expandOnlyOnTwistieClick&&onTwistie){e.browserEvent.isHandledByList=true;return}}super.onViewPointer(e)}onDoubleClick(e){const onTwistie=e.browserEvent.target.classList.contains("monaco-tl-twistie");if(onTwistie||!this.tree.expandOnDoubleClick){return}if(e.browserEvent.isHandledByList){return}super.onDoubleClick(e)}};TreeNodeList=class extends List{constructor(user,container,virtualDelegate,renderers,focusTrait,selectionTrait,anchorTrait,options2){super(user,container,virtualDelegate,renderers,options2);this.focusTrait=focusTrait;this.selectionTrait=selectionTrait;this.anchorTrait=anchorTrait}createMouseController(options2){return new TreeNodeListMouseController(this,options2.tree)}splice(start,deleteCount,elements=[]){super.splice(start,deleteCount,elements);if(elements.length===0){return}const additionalFocus=[];const additionalSelection=[];let anchor;elements.forEach(((node,index)=>{if(this.focusTrait.has(node)){additionalFocus.push(start+index)}if(this.selectionTrait.has(node)){additionalSelection.push(start+index)}if(this.anchorTrait.has(node)){anchor=start+index}}));if(additionalFocus.length>0){super.setFocus(distinct([...super.getFocus(),...additionalFocus]))}if(additionalSelection.length>0){super.setSelection(distinct([...super.getSelection(),...additionalSelection]))}if(typeof anchor==="number"){super.setAnchor(anchor)}}setFocus(indexes,browserEvent,fromAPI=false){super.setFocus(indexes,browserEvent);if(!fromAPI){this.focusTrait.set(indexes.map((i=>this.element(i))),browserEvent)}}setSelection(indexes,browserEvent,fromAPI=false){super.setSelection(indexes,browserEvent);if(!fromAPI){this.selectionTrait.set(indexes.map((i=>this.element(i))),browserEvent)}}setAnchor(index,fromAPI=false){super.setAnchor(index);if(!fromAPI){if(typeof index==="undefined"){this.anchorTrait.set([])}else{this.anchorTrait.set([this.element(index)])}}}};AbstractTree=class{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Event.filter(Event.map(this.view.onMouseDblClick,asTreeMouseEvent),(e=>e.target!==TreeMouseEventTarget.Filter))}get onPointer(){return Event.map(this.view.onPointer,asTreeMouseEvent)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return Event.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var _a6,_b3;return(_b3=(_a6=this.findController)===null||_a6===void 0?void 0:_a6.mode)!==null&&_b3!==void 0?_b3:TreeFindMode.Highlight}set findMode(findMode){if(this.findController){this.findController.mode=findMode}}get findMatchType(){var _a6,_b3;return(_b3=(_a6=this.findController)===null||_a6===void 0?void 0:_a6.matchType)!==null&&_b3!==void 0?_b3:TreeFindMatchType.Fuzzy}set findMatchType(findFuzzy){if(this.findController){this.findController.matchType=findFuzzy}}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick==="undefined"?true:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick==="undefined"?true:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(_user,container,delegate,renderers,_options={}){var _a6;this._user=_user;this._options=_options;this.eventBufferer=new EventBufferer;this.onDidChangeFindOpenState=Event.None;this.disposables=new DisposableStore;this._onWillRefilter=new Emitter;this.onWillRefilter=this._onWillRefilter.event;this._onDidUpdateOptions=new Emitter;const treeDelegate=new ComposedTreeDelegate(delegate);const onDidChangeCollapseStateRelay=new Relay;const onDidChangeActiveNodes=new Relay;const activeNodes=this.disposables.add(new EventCollection(onDidChangeActiveNodes.event));const renderedIndentGuides=new SetMap;this.renderers=renderers.map((r=>new TreeRenderer(r,(()=>this.model),onDidChangeCollapseStateRelay.event,activeNodes,renderedIndentGuides,_options)));for(const r of this.renderers){this.disposables.add(r)}let filter;if(_options.keyboardNavigationLabelProvider){filter=new FindFilter(this,_options.keyboardNavigationLabelProvider,_options.filter);_options=Object.assign(Object.assign({},_options),{filter:filter});this.disposables.add(filter)}this.focus=new Trait2((()=>this.view.getFocusedElements()[0]),_options.identityProvider);this.selection=new Trait2((()=>this.view.getSelectedElements()[0]),_options.identityProvider);this.anchor=new Trait2((()=>this.view.getAnchorElement()),_options.identityProvider);this.view=new TreeNodeList(_user,container,treeDelegate,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},asListOptions((()=>this.model),_options)),{tree:this}));this.model=this.createModel(_user,this.view,_options);onDidChangeCollapseStateRelay.input=this.model.onDidChangeCollapseState;const onDidModelSplice=Event.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e);this.selection.onDidModelSplice(e)}))}),this.disposables);onDidModelSplice((()=>null),null,this.disposables);onDidChangeActiveNodes.input=Event.chain(Event.any(onDidModelSplice,this.focus.onDidChange,this.selection.onDidChange)).debounce((()=>null),0).map((()=>{const set=new Set;for(const node of this.focus.getNodes()){set.add(node)}for(const node of this.selection.getNodes()){set.add(node)}return[...set.values()]})).event;if(_options.keyboardSupport!==false){const onKeyDown=Event.chain(this.view.onKeyDown).filter((e=>!isInputElement(e.target))).map((e=>new StandardKeyboardEvent(e)));onKeyDown.filter((e=>e.keyCode===15)).on(this.onLeftArrow,this,this.disposables);onKeyDown.filter((e=>e.keyCode===17)).on(this.onRightArrow,this,this.disposables);onKeyDown.filter((e=>e.keyCode===10)).on(this.onSpace,this,this.disposables)}if(((_a6=_options.findWidgetEnabled)!==null&&_a6!==void 0?_a6:true)&&_options.keyboardNavigationLabelProvider&&_options.contextViewProvider){const opts=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new FindController(this,this.model,this.view,filter,_options.contextViewProvider,opts);this.focusNavigationFilter=node=>this.findController.shouldAllowFocus(node);this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState;this.disposables.add(this.findController);this.onDidChangeFindMode=this.findController.onDidChangeMode;this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else{this.onDidChangeFindMode=Event.None;this.onDidChangeFindMatchType=Event.None}this.styleElement=createStyleSheet(this.view.getHTMLElement());this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===RenderIndentGuides.Always)}updateOptions(optionsUpdate={}){var _a6;this._options=Object.assign(Object.assign({},this._options),optionsUpdate);for(const renderer of this.renderers){renderer.updateOptions(optionsUpdate)}this.view.updateOptions(this._options);(_a6=this.findController)===null||_a6===void 0?void 0:_a6.updateOptions(optionsUpdate);this._onDidUpdateOptions.fire(this._options);this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===RenderIndentGuides.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(scrollTop){this.view.scrollTop=scrollTop}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}domFocus(){this.view.domFocus()}layout(height,width){var _a6;this.view.layout(height,width);if(isNumber(width)){(_a6=this.findController)===null||_a6===void 0?void 0:_a6.layout(width)}}style(styles){const suffix=`.${this.view.domId}`;const content=[];if(styles.treeIndentGuidesStroke){content.push(`.monaco-list${suffix}:hover .monaco-tl-indent > .indent-guide, .monaco-list${suffix}.always .monaco-tl-indent > .indent-guide { border-color: ${styles.treeInactiveIndentGuidesStroke}; }`);content.push(`.monaco-list${suffix} .monaco-tl-indent > .indent-guide.active { border-color: ${styles.treeIndentGuidesStroke}; }`)}this.styleElement.textContent=content.join("\n");this.view.style(styles)}getParentElement(location){const parentRef=this.model.getParentNodeLocation(location);const parentNode=this.model.getNode(parentRef);return parentNode.element}getFirstElementChild(location){return this.model.getFirstElementChild(location)}getNode(location){return this.model.getNode(location)}getNodeLocation(node){return this.model.getNodeLocation(node)}collapse(location,recursive=false){return this.model.setCollapsed(location,true,recursive)}expand(location,recursive=false){return this.model.setCollapsed(location,false,recursive)}toggleCollapsed(location,recursive=false){return this.model.setCollapsed(location,void 0,recursive)}isCollapsible(location){return this.model.isCollapsible(location)}setCollapsible(location,collapsible){return this.model.setCollapsible(location,collapsible)}isCollapsed(location){return this.model.isCollapsed(location)}refilter(){this._onWillRefilter.fire(void 0);this.model.refilter()}setSelection(elements,browserEvent){const nodes=elements.map((e=>this.model.getNode(e)));this.selection.set(nodes,browserEvent);const indexes=elements.map((e=>this.model.getListIndex(e))).filter((i=>i>-1));this.view.setSelection(indexes,browserEvent,true)}getSelection(){return this.selection.get()}setFocus(elements,browserEvent){const nodes=elements.map((e=>this.model.getNode(e)));this.focus.set(nodes,browserEvent);const indexes=elements.map((e=>this.model.getListIndex(e))).filter((i=>i>-1));this.view.setFocus(indexes,browserEvent,true)}getFocus(){return this.focus.get()}reveal(location,relativeTop){this.model.expandTo(location);const index=this.model.getListIndex(location);if(index===-1){return}this.view.reveal(index,relativeTop)}onLeftArrow(e){e.preventDefault();e.stopPropagation();const nodes=this.view.getFocusedElements();if(nodes.length===0){return}const node=nodes[0];const location=this.model.getNodeLocation(node);const didChange=this.model.setCollapsed(location,true);if(!didChange){const parentLocation=this.model.getParentNodeLocation(location);if(!parentLocation){return}const parentListIndex=this.model.getListIndex(parentLocation);this.view.reveal(parentListIndex);this.view.setFocus([parentListIndex])}}onRightArrow(e){e.preventDefault();e.stopPropagation();const nodes=this.view.getFocusedElements();if(nodes.length===0){return}const node=nodes[0];const location=this.model.getNodeLocation(node);const didChange=this.model.setCollapsed(location,false);if(!didChange){if(!node.children.some((child=>child.visible))){return}const[focusedIndex]=this.view.getFocus();const firstChildIndex=focusedIndex+1;this.view.reveal(firstChildIndex);this.view.setFocus([firstChildIndex])}}onSpace(e){e.preventDefault();e.stopPropagation();const nodes=this.view.getFocusedElements();if(nodes.length===0){return}const node=nodes[0];const location=this.model.getNodeLocation(node);const recursive=e.browserEvent.altKey;this.model.setCollapsed(location,void 0,recursive)}dispose(){dispose(this.disposables);this.view.dispose()}}}});var ObjectTreeModel;var init_objectTreeModel=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTreeModel.js"(){init_indexTreeModel();init_tree();init_iterator();ObjectTreeModel=class{constructor(user,list,options2={}){this.user=user;this.rootRef=null;this.nodes=new Map;this.nodesByIdentity=new Map;this.model=new IndexTreeModel(user,list,null,options2);this.onDidSplice=this.model.onDidSplice;this.onDidChangeCollapseState=this.model.onDidChangeCollapseState;this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount;if(options2.sorter){this.sorter={compare(a,b){return options2.sorter.compare(a.element,b.element)}}}this.identityProvider=options2.identityProvider}setChildren(element,children=Iterable.empty(),options2={}){const location=this.getElementLocation(element);this._setChildren(location,this.preserveCollapseState(children),options2)}_setChildren(location,children=Iterable.empty(),options2){const insertedElements=new Set;const insertedElementIds=new Set;const onDidCreateNode=node=>{var _a6;if(node.element===null){return}const tnode=node;insertedElements.add(tnode.element);this.nodes.set(tnode.element,tnode);if(this.identityProvider){const id=this.identityProvider.getId(tnode.element).toString();insertedElementIds.add(id);this.nodesByIdentity.set(id,tnode)}(_a6=options2.onDidCreateNode)===null||_a6===void 0?void 0:_a6.call(options2,tnode)};const onDidDeleteNode=node=>{var _a6;if(node.element===null){return}const tnode=node;if(!insertedElements.has(tnode.element)){this.nodes.delete(tnode.element)}if(this.identityProvider){const id=this.identityProvider.getId(tnode.element).toString();if(!insertedElementIds.has(id)){this.nodesByIdentity.delete(id)}}(_a6=options2.onDidDeleteNode)===null||_a6===void 0?void 0:_a6.call(options2,tnode)};this.model.splice([...location,0],Number.MAX_VALUE,children,Object.assign(Object.assign({},options2),{onDidCreateNode:onDidCreateNode,onDidDeleteNode:onDidDeleteNode}))}preserveCollapseState(elements=Iterable.empty()){if(this.sorter){elements=[...elements].sort(this.sorter.compare.bind(this.sorter))}return Iterable.map(elements,(treeElement=>{let node=this.nodes.get(treeElement.element);if(!node&&this.identityProvider){const id=this.identityProvider.getId(treeElement.element).toString();node=this.nodesByIdentity.get(id)}if(!node){let collapsed2;if(typeof treeElement.collapsed==="undefined"){collapsed2=void 0}else if(treeElement.collapsed===ObjectTreeElementCollapseState.Collapsed||treeElement.collapsed===ObjectTreeElementCollapseState.PreserveOrCollapsed){collapsed2=true}else if(treeElement.collapsed===ObjectTreeElementCollapseState.Expanded||treeElement.collapsed===ObjectTreeElementCollapseState.PreserveOrExpanded){collapsed2=false}else{collapsed2=Boolean(treeElement.collapsed)}return Object.assign(Object.assign({},treeElement),{children:this.preserveCollapseState(treeElement.children),collapsed:collapsed2})}const collapsible=typeof treeElement.collapsible==="boolean"?treeElement.collapsible:node.collapsible;let collapsed;if(typeof treeElement.collapsed==="undefined"||treeElement.collapsed===ObjectTreeElementCollapseState.PreserveOrCollapsed||treeElement.collapsed===ObjectTreeElementCollapseState.PreserveOrExpanded){collapsed=node.collapsed}else if(treeElement.collapsed===ObjectTreeElementCollapseState.Collapsed){collapsed=true}else if(treeElement.collapsed===ObjectTreeElementCollapseState.Expanded){collapsed=false}else{collapsed=Boolean(treeElement.collapsed)}return Object.assign(Object.assign({},treeElement),{collapsible:collapsible,collapsed:collapsed,children:this.preserveCollapseState(treeElement.children)})}))}rerender(element){const location=this.getElementLocation(element);this.model.rerender(location)}getFirstElementChild(ref=null){const location=this.getElementLocation(ref);return this.model.getFirstElementChild(location)}has(element){return this.nodes.has(element)}getListIndex(element){const location=this.getElementLocation(element);return this.model.getListIndex(location)}getListRenderCount(element){const location=this.getElementLocation(element);return this.model.getListRenderCount(location)}isCollapsible(element){const location=this.getElementLocation(element);return this.model.isCollapsible(location)}setCollapsible(element,collapsible){const location=this.getElementLocation(element);return this.model.setCollapsible(location,collapsible)}isCollapsed(element){const location=this.getElementLocation(element);return this.model.isCollapsed(location)}setCollapsed(element,collapsed,recursive){const location=this.getElementLocation(element);return this.model.setCollapsed(location,collapsed,recursive)}expandTo(element){const location=this.getElementLocation(element);this.model.expandTo(location)}refilter(){this.model.refilter()}getNode(element=null){if(element===null){return this.model.getNode(this.model.rootRef)}const node=this.nodes.get(element);if(!node){throw new TreeError(this.user,`Tree element not found: ${element}`)}return node}getNodeLocation(node){return node.element}getParentNodeLocation(element){if(element===null){throw new TreeError(this.user,`Invalid getParentNodeLocation call`)}const node=this.nodes.get(element);if(!node){throw new TreeError(this.user,`Tree element not found: ${element}`)}const location=this.model.getNodeLocation(node);const parentLocation=this.model.getParentNodeLocation(location);const parent=this.model.getNode(parentLocation);return parent.element}getElementLocation(element){if(element===null){return[]}const node=this.nodes.get(element);if(!node){throw new TreeError(this.user,`Tree element not found: ${element}`)}return this.model.getNodeLocation(node)}}}});function noCompress(element){const elements=[element.element];const incompressible=element.incompressible||false;return{element:{elements:elements,incompressible:incompressible},children:Iterable.map(Iterable.from(element.children),noCompress),collapsible:element.collapsible,collapsed:element.collapsed}}function compress(element){const elements=[element.element];const incompressible=element.incompressible||false;let childrenIterator;let children;while(true){[children,childrenIterator]=Iterable.consume(Iterable.from(element.children),2);if(children.length!==1){break}if(children[0].incompressible){break}element=children[0];elements.push(element.element)}return{element:{elements:elements,incompressible:incompressible},children:Iterable.map(Iterable.concat(children,childrenIterator),compress),collapsible:element.collapsible,collapsed:element.collapsed}}function _decompress(element,index=0){let children;if(index_decompress(el,0)))}if(index===0&&element.element.incompressible){return{element:element.element.elements[index],children:children,incompressible:true,collapsible:element.collapsible,collapsed:element.collapsed}}return{element:element.element.elements[index],children:children,collapsible:element.collapsible,collapsed:element.collapsed}}function decompress(element){return _decompress(element,0)}function splice2(treeElement,element,children){if(treeElement.element===element){return Object.assign(Object.assign({},treeElement),{children:children})}return Object.assign(Object.assign({},treeElement),{children:Iterable.map(Iterable.from(treeElement.children),(e=>splice2(e,element,children)))})}function mapList(nodeMapper,list){return{splice(start,deleteCount,toInsert){list.splice(start,deleteCount,toInsert.map((node=>nodeMapper.map(node))))},updateElementHeight(index,height){list.updateElementHeight(index,height)}}}function mapOptions(compressedNodeUnwrapper,options2){return Object.assign(Object.assign({},options2),{identityProvider:options2.identityProvider&&{getId(node){return options2.identityProvider.getId(compressedNodeUnwrapper(node))}},sorter:options2.sorter&&{compare(node,otherNode){return options2.sorter.compare(node.elements[0],otherNode.elements[0])}},filter:options2.filter&&{filter(node,parentVisibility){return options2.filter.filter(compressedNodeUnwrapper(node),parentVisibility)}}})}var wrapIdentityProvider,CompressedObjectTreeModel,DefaultElementMapper,CompressedTreeNodeWrapper,CompressibleObjectTreeModel;var init_compressedObjectTreeModel=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js"(){init_objectTreeModel();init_tree();init_arrays();init_event();init_iterator();wrapIdentityProvider=base=>({getId(node){return node.elements.map((e=>base.getId(e).toString())).join("\0")}});CompressedObjectTreeModel=class{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(user,list,options2={}){this.user=user;this.rootRef=null;this.nodes=new Map;this.model=new ObjectTreeModel(user,list,options2);this.enabled=typeof options2.compressionEnabled==="undefined"?true:options2.compressionEnabled;this.identityProvider=options2.identityProvider}setChildren(element,children=Iterable.empty(),options2){const diffIdentityProvider=options2.diffIdentityProvider&&wrapIdentityProvider(options2.diffIdentityProvider);if(element===null){const compressedChildren=Iterable.map(children,this.enabled?compress:noCompress);this._setChildren(null,compressedChildren,{diffIdentityProvider:diffIdentityProvider,diffDepth:Infinity});return}const compressedNode=this.nodes.get(element);if(!compressedNode){throw new TreeError(this.user,"Unknown compressed tree node")}const node=this.model.getNode(compressedNode);const compressedParentNode=this.model.getParentNodeLocation(compressedNode);const parent=this.model.getNode(compressedParentNode);const decompressedElement=decompress(node);const splicedElement=splice2(decompressedElement,element,children);const recompressedElement=(this.enabled?compress:noCompress)(splicedElement);const elementComparator=options2.diffIdentityProvider?(a,b)=>options2.diffIdentityProvider.getId(a)===options2.diffIdentityProvider.getId(b):void 0;if(equals(recompressedElement.element.elements,node.element.elements,elementComparator)){this._setChildren(compressedNode,recompressedElement.children||Iterable.empty(),{diffIdentityProvider:diffIdentityProvider,diffDepth:1});return}const parentChildren=parent.children.map((child=>child===node?recompressedElement:child));this._setChildren(parent.element,parentChildren,{diffIdentityProvider:diffIdentityProvider,diffDepth:node.depth-parent.depth})}setCompressionEnabled(enabled){if(enabled===this.enabled){return}this.enabled=enabled;const root=this.model.getNode();const rootChildren=root.children;const decompressedRootChildren=Iterable.map(rootChildren,decompress);const recompressedRootChildren=Iterable.map(decompressedRootChildren,enabled?compress:noCompress);this._setChildren(null,recompressedRootChildren,{diffIdentityProvider:this.identityProvider,diffDepth:Infinity})}_setChildren(node,children,options2){const insertedElements=new Set;const onDidCreateNode=node2=>{for(const element of node2.element.elements){insertedElements.add(element);this.nodes.set(element,node2.element)}};const onDidDeleteNode=node2=>{for(const element of node2.element.elements){if(!insertedElements.has(element)){this.nodes.delete(element)}}};this.model.setChildren(node,children,Object.assign(Object.assign({},options2),{onDidCreateNode:onDidCreateNode,onDidDeleteNode:onDidDeleteNode}))}has(element){return this.nodes.has(element)}getListIndex(location){const node=this.getCompressedNode(location);return this.model.getListIndex(node)}getListRenderCount(location){const node=this.getCompressedNode(location);return this.model.getListRenderCount(node)}getNode(location){if(typeof location==="undefined"){return this.model.getNode()}const node=this.getCompressedNode(location);return this.model.getNode(node)}getNodeLocation(node){const compressedNode=this.model.getNodeLocation(node);if(compressedNode===null){return null}return compressedNode.elements[compressedNode.elements.length-1]}getParentNodeLocation(location){const compressedNode=this.getCompressedNode(location);const parentNode=this.model.getParentNodeLocation(compressedNode);if(parentNode===null){return null}return parentNode.elements[parentNode.elements.length-1]}getFirstElementChild(location){const compressedNode=this.getCompressedNode(location);return this.model.getFirstElementChild(compressedNode)}isCollapsible(location){const compressedNode=this.getCompressedNode(location);return this.model.isCollapsible(compressedNode)}setCollapsible(location,collapsible){const compressedNode=this.getCompressedNode(location);return this.model.setCollapsible(compressedNode,collapsible)}isCollapsed(location){const compressedNode=this.getCompressedNode(location);return this.model.isCollapsed(compressedNode)}setCollapsed(location,collapsed,recursive){const compressedNode=this.getCompressedNode(location);return this.model.setCollapsed(compressedNode,collapsed,recursive)}expandTo(location){const compressedNode=this.getCompressedNode(location);this.model.expandTo(compressedNode)}rerender(location){const compressedNode=this.getCompressedNode(location);this.model.rerender(compressedNode)}refilter(){this.model.refilter()}getCompressedNode(element){if(element===null){return null}const node=this.nodes.get(element);if(!node){throw new TreeError(this.user,`Tree element not found: ${element}`)}return node}};DefaultElementMapper=elements=>elements[elements.length-1];CompressedTreeNodeWrapper=class{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((node=>new CompressedTreeNodeWrapper(this.unwrapper,node)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(unwrapper,node){this.unwrapper=unwrapper;this.node=node}};CompressibleObjectTreeModel=class{get onDidSplice(){return Event.map(this.model.onDidSplice,(({insertedNodes:insertedNodes,deletedNodes:deletedNodes})=>({insertedNodes:insertedNodes.map((node=>this.nodeMapper.map(node))),deletedNodes:deletedNodes.map((node=>this.nodeMapper.map(node)))})))}get onDidChangeCollapseState(){return Event.map(this.model.onDidChangeCollapseState,(({node:node,deep:deep})=>({node:this.nodeMapper.map(node),deep:deep})))}get onDidChangeRenderNodeCount(){return Event.map(this.model.onDidChangeRenderNodeCount,(node=>this.nodeMapper.map(node)))}constructor(user,list,options2={}){this.rootRef=null;this.elementMapper=options2.elementMapper||DefaultElementMapper;const compressedNodeUnwrapper=node=>this.elementMapper(node.elements);this.nodeMapper=new WeakMapper((node=>new CompressedTreeNodeWrapper(compressedNodeUnwrapper,node)));this.model=new CompressedObjectTreeModel(user,mapList(this.nodeMapper,list),mapOptions(compressedNodeUnwrapper,options2))}setChildren(element,children=Iterable.empty(),options2={}){this.model.setChildren(element,children,options2)}setCompressionEnabled(enabled){this.model.setCompressionEnabled(enabled)}has(location){return this.model.has(location)}getListIndex(location){return this.model.getListIndex(location)}getListRenderCount(location){return this.model.getListRenderCount(location)}getNode(location){return this.nodeMapper.map(this.model.getNode(location))}getNodeLocation(node){return node.element}getParentNodeLocation(location){return this.model.getParentNodeLocation(location)}getFirstElementChild(location){const result=this.model.getFirstElementChild(location);if(result===null||typeof result==="undefined"){return result}return this.elementMapper(result.elements)}isCollapsible(location){return this.model.isCollapsible(location)}setCollapsible(location,collapsed){return this.model.setCollapsible(location,collapsed)}isCollapsed(location){return this.model.isCollapsed(location)}setCollapsed(location,collapsed,recursive){return this.model.setCollapsed(location,collapsed,recursive)}expandTo(location){return this.model.expandTo(location)}rerender(location){return this.model.rerender(location)}refilter(){return this.model.refilter()}getCompressedTreeNode(location=null){return this.model.getNode(location)}}}});function asObjectTreeOptions(compressedTreeNodeProvider,options2){return options2&&Object.assign(Object.assign({},options2),{keyboardNavigationLabelProvider:options2.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(e){let compressedTreeNode;try{compressedTreeNode=compressedTreeNodeProvider().getCompressedTreeNode(e)}catch(_a6){return options2.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e)}if(compressedTreeNode.element.elements.length===1){return options2.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e)}else{return options2.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(compressedTreeNode.element.elements)}}}})}var __decorate33,ObjectTree,CompressibleRenderer,CompressibleObjectTree;var init_objectTree=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/tree/objectTree.js"(){init_abstractTree();init_compressedObjectTreeModel();init_objectTreeModel();init_decorators();init_iterator();__decorate33=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};ObjectTree=class extends AbstractTree{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(user,container,delegate,renderers,options2={}){super(user,container,delegate,renderers,options2);this.user=user}setChildren(element,children=Iterable.empty(),options2){this.model.setChildren(element,children,options2)}rerender(element){if(element===void 0){this.view.rerender();return}this.model.rerender(element)}hasElement(element){return this.model.has(element)}createModel(user,view,options2){return new ObjectTreeModel(user,view,options2)}};CompressibleRenderer=class{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(_compressedTreeNodeProvider,renderer){this._compressedTreeNodeProvider=_compressedTreeNodeProvider;this.renderer=renderer;this.templateId=renderer.templateId;if(renderer.onDidChangeTwistieState){this.onDidChangeTwistieState=renderer.onDidChangeTwistieState}}renderTemplate(container){const data=this.renderer.renderTemplate(container);return{compressedTreeNode:void 0,data:data}}renderElement(node,index,templateData,height){const compressedTreeNode=this.compressedTreeNodeProvider.getCompressedTreeNode(node.element);if(compressedTreeNode.element.elements.length===1){templateData.compressedTreeNode=void 0;this.renderer.renderElement(node,index,templateData.data,height)}else{templateData.compressedTreeNode=compressedTreeNode;this.renderer.renderCompressedElements(compressedTreeNode,index,templateData.data,height)}}disposeElement(node,index,templateData,height){var _a6,_b3,_c2,_d2;if(templateData.compressedTreeNode){(_b3=(_a6=this.renderer).disposeCompressedElements)===null||_b3===void 0?void 0:_b3.call(_a6,templateData.compressedTreeNode,index,templateData.data,height)}else{(_d2=(_c2=this.renderer).disposeElement)===null||_d2===void 0?void 0:_d2.call(_c2,node,index,templateData.data,height)}}disposeTemplate(templateData){this.renderer.disposeTemplate(templateData.data)}renderTwistie(element,twistieElement){if(this.renderer.renderTwistie){return this.renderer.renderTwistie(element,twistieElement)}return false}};__decorate33([memoize],CompressibleRenderer.prototype,"compressedTreeNodeProvider",null);CompressibleObjectTree=class extends ObjectTree{constructor(user,container,delegate,renderers,options2={}){const compressedTreeNodeProvider=()=>this;const compressibleRenderers=renderers.map((r=>new CompressibleRenderer(compressedTreeNodeProvider,r)));super(user,container,delegate,compressibleRenderers,asObjectTreeOptions(compressedTreeNodeProvider,options2))}setChildren(element,children=Iterable.empty(),options2){this.model.setChildren(element,children,options2)}createModel(user,view,options2){return new CompressibleObjectTreeModel(user,view,options2)}updateOptions(optionsUpdate={}){super.updateOptions(optionsUpdate);if(typeof optionsUpdate.compressionEnabled!=="undefined"){this.model.setCompressionEnabled(optionsUpdate.compressionEnabled)}}getCompressedTreeNode(element=null){return this.model.getCompressedTreeNode(element)}}}});function createAsyncDataTreeNode(props){return Object.assign(Object.assign({},props),{children:[],refreshPromise:void 0,stale:true,slow:false,collapsedByDefault:void 0})}function isAncestor2(ancestor,descendant){if(!descendant.parent){return false}else if(descendant.parent===ancestor){return true}else{return isAncestor2(ancestor,descendant.parent)}}function intersects(node,other){return node===other||isAncestor2(node,other)||isAncestor2(other,node)}function asTreeEvent(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e2=>e2.element))}}function asTreeMouseEvent2(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}function asAsyncDataTreeDragAndDropData(data){if(data instanceof ElementsDragAndDropData){return new AsyncDataTreeElementsDragAndDropData(data)}return data}function asObjectTreeOptions2(options2){return options2&&Object.assign(Object.assign({},options2),{collapseByDefault:true,identityProvider:options2.identityProvider&&{getId(el){return options2.identityProvider.getId(el.element)}},dnd:options2.dnd&&new AsyncDataTreeNodeListDragAndDrop(options2.dnd),multipleSelectionController:options2.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return options2.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},isSelectionRangeChangeEvent(e){return options2.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))}},accessibilityProvider:options2.accessibilityProvider&&Object.assign(Object.assign({},options2.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:options2.accessibilityProvider.getRole?el=>options2.accessibilityProvider.getRole(el.element):()=>"treeitem",isChecked:options2.accessibilityProvider.isChecked?e=>{var _a6;return!!((_a6=options2.accessibilityProvider)===null||_a6===void 0?void 0:_a6.isChecked(e.element))}:void 0,getAriaLabel(e){return options2.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return options2.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:options2.accessibilityProvider.getWidgetRole?()=>options2.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:options2.accessibilityProvider.getAriaLevel&&(node=>options2.accessibilityProvider.getAriaLevel(node.element)),getActiveDescendantId:options2.accessibilityProvider.getActiveDescendantId&&(node=>options2.accessibilityProvider.getActiveDescendantId(node.element))}),filter:options2.filter&&{filter(e,parentVisibility){return options2.filter.filter(e.element,parentVisibility)}},keyboardNavigationLabelProvider:options2.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},options2.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(e){return options2.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof options2.expandOnlyOnTwistieClick==="undefined"?void 0:typeof options2.expandOnlyOnTwistieClick!=="function"?options2.expandOnlyOnTwistieClick:e=>options2.expandOnlyOnTwistieClick(e.element),defaultFindVisibility:e=>{if(e.hasChildren&&e.stale){return 1}else if(typeof options2.defaultFindVisibility==="number"){return options2.defaultFindVisibility}else if(typeof options2.defaultFindVisibility==="undefined"){return 2}else{return options2.defaultFindVisibility(e.element)}}})}function dfs2(node,fn){fn(node);node.children.forEach((child=>dfs2(child,fn)))}function asCompressibleObjectTreeOptions(options2){const objectTreeOptions=options2&&asObjectTreeOptions2(options2);return objectTreeOptions&&Object.assign(Object.assign({},objectTreeOptions),{keyboardNavigationLabelProvider:objectTreeOptions.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},objectTreeOptions.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(els){return options2.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(els.map((e=>e.element)))}})})}function getVisibility(filterResult){if(typeof filterResult==="boolean"){return filterResult?1:0}else if(isFilterResult(filterResult)){return getVisibleState(filterResult.visibility)}else{return getVisibleState(filterResult)}}var __awaiter23,AsyncDataTreeNodeWrapper,AsyncDataTreeRenderer,AsyncDataTreeElementsDragAndDropData,AsyncDataTreeNodeListDragAndDrop,AsyncDataTree,CompressibleAsyncDataTreeNodeWrapper,CompressibleAsyncDataTreeRenderer,CompressibleAsyncDataTree;var init_asyncDataTree=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/tree/asyncDataTree.js"(){init_listView();init_abstractTree();init_indexTreeModel();init_objectTree();init_tree();init_async();init_codicons();init_themables();init_errors();init_event();init_iterator();init_lifecycle();init_types();__awaiter23=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};AsyncDataTreeNodeWrapper=class{get element(){return this.node.element.element}get children(){return this.node.children.map((node=>new AsyncDataTreeNodeWrapper(node)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(node){this.node=node}};AsyncDataTreeRenderer=class{constructor(renderer,nodeMapper,onDidChangeTwistieState){this.renderer=renderer;this.nodeMapper=nodeMapper;this.onDidChangeTwistieState=onDidChangeTwistieState;this.renderedNodes=new Map;this.templateId=renderer.templateId}renderTemplate(container){const templateData=this.renderer.renderTemplate(container);return{templateData:templateData}}renderElement(node,index,templateData,height){this.renderer.renderElement(this.nodeMapper.map(node),index,templateData.templateData,height)}renderTwistie(element,twistieElement){if(element.slow){twistieElement.classList.add(...ThemeIcon.asClassNameArray(Codicon.treeItemLoading));return true}else{twistieElement.classList.remove(...ThemeIcon.asClassNameArray(Codicon.treeItemLoading));return false}}disposeElement(node,index,templateData,height){var _a6,_b3;(_b3=(_a6=this.renderer).disposeElement)===null||_b3===void 0?void 0:_b3.call(_a6,this.nodeMapper.map(node),index,templateData.templateData,height)}disposeTemplate(templateData){this.renderer.disposeTemplate(templateData.templateData)}dispose(){this.renderedNodes.clear()}};AsyncDataTreeElementsDragAndDropData=class extends ElementsDragAndDropData{constructor(data){super(data.elements.map((node=>node.element)));this.data=data}};AsyncDataTreeNodeListDragAndDrop=class{constructor(dnd){this.dnd=dnd}getDragURI(node){return this.dnd.getDragURI(node.element)}getDragLabel(nodes,originalEvent){if(this.dnd.getDragLabel){return this.dnd.getDragLabel(nodes.map((node=>node.element)),originalEvent)}return void 0}onDragStart(data,originalEvent){var _a6,_b3;(_b3=(_a6=this.dnd).onDragStart)===null||_b3===void 0?void 0:_b3.call(_a6,asAsyncDataTreeDragAndDropData(data),originalEvent)}onDragOver(data,targetNode,targetIndex,originalEvent,raw=true){return this.dnd.onDragOver(asAsyncDataTreeDragAndDropData(data),targetNode&&targetNode.element,targetIndex,originalEvent)}drop(data,targetNode,targetIndex,originalEvent){this.dnd.drop(asAsyncDataTreeDragAndDropData(data),targetNode&&targetNode.element,targetIndex,originalEvent)}onDragEnd(originalEvent){var _a6,_b3;(_b3=(_a6=this.dnd).onDragEnd)===null||_b3===void 0?void 0:_b3.call(_a6,originalEvent)}};AsyncDataTree=class{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return Event.map(this.tree.onDidChangeFocus,asTreeEvent)}get onDidChangeSelection(){return Event.map(this.tree.onDidChangeSelection,asTreeEvent)}get onMouseDblClick(){return Event.map(this.tree.onMouseDblClick,asTreeMouseEvent2)}get onPointer(){return Event.map(this.tree.onPointer,asTreeMouseEvent2)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}constructor(user,container,delegate,renderers,dataSource,options2={}){this.user=user;this.dataSource=dataSource;this.nodes=new Map;this.subTreeRefreshPromises=new Map;this.refreshPromises=new Map;this._onDidRender=new Emitter;this._onDidChangeNodeSlowState=new Emitter;this.nodeMapper=new WeakMapper((node=>new AsyncDataTreeNodeWrapper(node)));this.disposables=new DisposableStore;this.identityProvider=options2.identityProvider;this.autoExpandSingleChildren=typeof options2.autoExpandSingleChildren==="undefined"?false:options2.autoExpandSingleChildren;this.sorter=options2.sorter;this.collapseByDefault=options2.collapseByDefault;this.tree=this.createTree(user,container,delegate,renderers,options2);this.onDidChangeFindMode=this.tree.onDidChangeFindMode;this.root=createAsyncDataTreeNode({element:void 0,parent:null,hasChildren:true});if(this.identityProvider){this.root=Object.assign(Object.assign({},this.root),{id:null})}this.nodes.set(null,this.root);this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}createTree(user,container,delegate,renderers,options2){const objectTreeDelegate=new ComposedTreeDelegate(delegate);const objectTreeRenderers=renderers.map((r=>new AsyncDataTreeRenderer(r,this.nodeMapper,this._onDidChangeNodeSlowState.event)));const objectTreeOptions=asObjectTreeOptions2(options2)||{};return new ObjectTree(user,container,objectTreeDelegate,objectTreeRenderers,objectTreeOptions)}updateOptions(options2={}){this.tree.updateOptions(options2)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(scrollTop){this.tree.scrollTop=scrollTop}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(height,width){this.tree.layout(height,width)}style(styles){this.tree.style(styles)}getInput(){return this.root.element}setInput(input,viewState){return __awaiter23(this,void 0,void 0,(function*(){this.refreshPromises.forEach((promise=>promise.cancel()));this.refreshPromises.clear();this.root.element=input;const viewStateContext=viewState&&{viewState:viewState,focus:[],selection:[]};yield this._updateChildren(input,true,false,viewStateContext);if(viewStateContext){this.tree.setFocus(viewStateContext.focus);this.tree.setSelection(viewStateContext.selection)}if(viewState&&typeof viewState.scrollTop==="number"){this.scrollTop=viewState.scrollTop}}))}_updateChildren(element=this.root.element,recursive=true,rerender=false,viewStateContext,options2){return __awaiter23(this,void 0,void 0,(function*(){if(typeof this.root.element==="undefined"){throw new TreeError(this.user,"Tree input not set")}if(this.root.refreshPromise){yield this.root.refreshPromise;yield Event.toPromise(this._onDidRender.event)}const node=this.getDataNode(element);yield this.refreshAndRenderNode(node,recursive,viewStateContext,options2);if(rerender){try{this.tree.rerender(node)}catch(_a6){}}}))}rerender(element){if(element===void 0||element===this.root.element){this.tree.rerender();return}const node=this.getDataNode(element);this.tree.rerender(node)}getNode(element=this.root.element){const dataNode=this.getDataNode(element);const node=this.tree.getNode(dataNode===this.root?null:dataNode);return this.nodeMapper.map(node)}collapse(element,recursive=false){const node=this.getDataNode(element);return this.tree.collapse(node===this.root?null:node,recursive)}expand(element,recursive=false){return __awaiter23(this,void 0,void 0,(function*(){if(typeof this.root.element==="undefined"){throw new TreeError(this.user,"Tree input not set")}if(this.root.refreshPromise){yield this.root.refreshPromise;yield Event.toPromise(this._onDidRender.event)}const node=this.getDataNode(element);if(this.tree.hasElement(node)&&!this.tree.isCollapsible(node)){return false}if(node.refreshPromise){yield this.root.refreshPromise;yield Event.toPromise(this._onDidRender.event)}if(node!==this.root&&!node.refreshPromise&&!this.tree.isCollapsed(node)){return false}const result=this.tree.expand(node===this.root?null:node,recursive);if(node.refreshPromise){yield this.root.refreshPromise;yield Event.toPromise(this._onDidRender.event)}return result}))}setSelection(elements,browserEvent){const nodes=elements.map((e=>this.getDataNode(e)));this.tree.setSelection(nodes,browserEvent)}getSelection(){const nodes=this.tree.getSelection();return nodes.map((n=>n.element))}setFocus(elements,browserEvent){const nodes=elements.map((e=>this.getDataNode(e)));this.tree.setFocus(nodes,browserEvent)}getFocus(){const nodes=this.tree.getFocus();return nodes.map((n=>n.element))}reveal(element,relativeTop){this.tree.reveal(this.getDataNode(element),relativeTop)}getParentElement(element){const node=this.tree.getParentElement(this.getDataNode(element));return node&&node.element}getFirstElementChild(element=this.root.element){const dataNode=this.getDataNode(element);const node=this.tree.getFirstElementChild(dataNode===this.root?null:dataNode);return node&&node.element}getDataNode(element){const node=this.nodes.get(element===this.root.element?null:element);if(!node){throw new TreeError(this.user,`Data tree node not found: ${element}`)}return node}refreshAndRenderNode(node,recursive,viewStateContext,options2){return __awaiter23(this,void 0,void 0,(function*(){yield this.refreshNode(node,recursive,viewStateContext);this.render(node,viewStateContext,options2)}))}refreshNode(node,recursive,viewStateContext){return __awaiter23(this,void 0,void 0,(function*(){let result;this.subTreeRefreshPromises.forEach(((refreshPromise,refreshNode)=>{if(!result&&intersects(refreshNode,node)){result=refreshPromise.then((()=>this.refreshNode(node,recursive,viewStateContext)))}}));if(result){return result}if(node!==this.root){const treeNode=this.tree.getNode(node);if(treeNode.collapsed){node.hasChildren=!!this.dataSource.hasChildren(node.element);node.stale=true;return}}return this.doRefreshSubTree(node,recursive,viewStateContext)}))}doRefreshSubTree(node,recursive,viewStateContext){return __awaiter23(this,void 0,void 0,(function*(){let done;node.refreshPromise=new Promise((c=>done=c));this.subTreeRefreshPromises.set(node,node.refreshPromise);node.refreshPromise.finally((()=>{node.refreshPromise=void 0;this.subTreeRefreshPromises.delete(node)}));try{const childrenToRefresh=yield this.doRefreshNode(node,recursive,viewStateContext);node.stale=false;yield Promises.settled(childrenToRefresh.map((child=>this.doRefreshSubTree(child,recursive,viewStateContext))))}finally{done()}}))}doRefreshNode(node,recursive,viewStateContext){return __awaiter23(this,void 0,void 0,(function*(){node.hasChildren=!!this.dataSource.hasChildren(node.element);let childrenPromise;if(!node.hasChildren){childrenPromise=Promise.resolve(Iterable.empty())}else{const children=this.doGetChildren(node);if(isIterable(children)){childrenPromise=Promise.resolve(children)}else{const slowTimeout=timeout(800);slowTimeout.then((()=>{node.slow=true;this._onDidChangeNodeSlowState.fire(node)}),(_=>null));childrenPromise=children.finally((()=>slowTimeout.cancel()))}}try{const children=yield childrenPromise;return this.setChildren(node,children,recursive,viewStateContext)}catch(err){if(node!==this.root&&this.tree.hasElement(node)){this.tree.collapse(node)}if(isCancellationError(err)){return[]}throw err}finally{if(node.slow){node.slow=false;this._onDidChangeNodeSlowState.fire(node)}}}))}doGetChildren(node){let result=this.refreshPromises.get(node);if(result){return result}const children=this.dataSource.getChildren(node.element);if(isIterable(children)){return this.processChildren(children)}else{result=createCancelablePromise((()=>__awaiter23(this,void 0,void 0,(function*(){return this.processChildren(yield children)}))));this.refreshPromises.set(node,result);return result.finally((()=>{this.refreshPromises.delete(node)}))}}_onDidChangeCollapseState({node:node,deep:deep}){if(node.element===null){return}if(!node.collapsed&&node.element.stale){if(deep){this.collapse(node.element.element)}else{this.refreshAndRenderNode(node.element,false).catch(onUnexpectedError)}}}setChildren(node,childrenElementsIterable,recursive,viewStateContext){const childrenElements=[...childrenElementsIterable];if(node.children.length===0&&childrenElements.length===0){return[]}const nodesToForget=new Map;const childrenTreeNodesById=new Map;for(const child of node.children){nodesToForget.set(child.element,child);if(this.identityProvider){const collapsed=this.tree.isCollapsed(child);childrenTreeNodesById.set(child.id,{node:child,collapsed:collapsed})}}const childrenToRefresh=[];const children=childrenElements.map((element=>{const hasChildren=!!this.dataSource.hasChildren(element);if(!this.identityProvider){const asyncDataTreeNode=createAsyncDataTreeNode({element:element,parent:node,hasChildren:hasChildren});if(hasChildren&&this.collapseByDefault&&!this.collapseByDefault(element)){asyncDataTreeNode.collapsedByDefault=false;childrenToRefresh.push(asyncDataTreeNode)}return asyncDataTreeNode}const id=this.identityProvider.getId(element).toString();const result=childrenTreeNodesById.get(id);if(result){const asyncDataTreeNode=result.node;nodesToForget.delete(asyncDataTreeNode.element);this.nodes.delete(asyncDataTreeNode.element);this.nodes.set(element,asyncDataTreeNode);asyncDataTreeNode.element=element;asyncDataTreeNode.hasChildren=hasChildren;if(recursive){if(result.collapsed){asyncDataTreeNode.children.forEach((node2=>dfs2(node2,(node3=>this.nodes.delete(node3.element)))));asyncDataTreeNode.children.splice(0,asyncDataTreeNode.children.length);asyncDataTreeNode.stale=true}else{childrenToRefresh.push(asyncDataTreeNode)}}else if(hasChildren&&this.collapseByDefault&&!this.collapseByDefault(element)){asyncDataTreeNode.collapsedByDefault=false;childrenToRefresh.push(asyncDataTreeNode)}return asyncDataTreeNode}const childAsyncDataTreeNode=createAsyncDataTreeNode({element:element,parent:node,id:id,hasChildren:hasChildren});if(viewStateContext&&viewStateContext.viewState.focus&&viewStateContext.viewState.focus.indexOf(id)>-1){viewStateContext.focus.push(childAsyncDataTreeNode)}if(viewStateContext&&viewStateContext.viewState.selection&&viewStateContext.viewState.selection.indexOf(id)>-1){viewStateContext.selection.push(childAsyncDataTreeNode)}if(viewStateContext&&viewStateContext.viewState.expanded&&viewStateContext.viewState.expanded.indexOf(id)>-1){childrenToRefresh.push(childAsyncDataTreeNode)}else if(hasChildren&&this.collapseByDefault&&!this.collapseByDefault(element)){childAsyncDataTreeNode.collapsedByDefault=false;childrenToRefresh.push(childAsyncDataTreeNode)}return childAsyncDataTreeNode}));for(const node2 of nodesToForget.values()){dfs2(node2,(node3=>this.nodes.delete(node3.element)))}for(const child of children){this.nodes.set(child.element,child)}node.children.splice(0,node.children.length,...children);if(node!==this.root&&this.autoExpandSingleChildren&&children.length===1&&childrenToRefresh.length===0){children[0].collapsedByDefault=false;childrenToRefresh.push(children[0])}return childrenToRefresh}render(node,viewStateContext,options2){const children=node.children.map((node2=>this.asTreeElement(node2,viewStateContext)));const objectTreeOptions=options2&&Object.assign(Object.assign({},options2),{diffIdentityProvider:options2.diffIdentityProvider&&{getId(node2){return options2.diffIdentityProvider.getId(node2.element)}}});this.tree.setChildren(node===this.root?null:node,children,objectTreeOptions);if(node!==this.root){this.tree.setCollapsible(node,node.hasChildren)}this._onDidRender.fire()}asTreeElement(node,viewStateContext){if(node.stale){return{element:node,collapsible:node.hasChildren,collapsed:true}}let collapsed;if(viewStateContext&&viewStateContext.viewState.expanded&&node.id&&viewStateContext.viewState.expanded.indexOf(node.id)>-1){collapsed=false}else{collapsed=node.collapsedByDefault}node.collapsedByDefault=void 0;return{element:node,children:node.hasChildren?Iterable.map(node.children,(child=>this.asTreeElement(child,viewStateContext))):[],collapsible:node.hasChildren,collapsed:collapsed}}processChildren(children){if(this.sorter){children=[...children].sort(this.sorter.compare.bind(this.sorter))}return children}dispose(){this.disposables.dispose()}};CompressibleAsyncDataTreeNodeWrapper=class{get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((node=>new CompressibleAsyncDataTreeNodeWrapper(node)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(node){this.node=node}};CompressibleAsyncDataTreeRenderer=class{constructor(renderer,nodeMapper,compressibleNodeMapperProvider,onDidChangeTwistieState){this.renderer=renderer;this.nodeMapper=nodeMapper;this.compressibleNodeMapperProvider=compressibleNodeMapperProvider;this.onDidChangeTwistieState=onDidChangeTwistieState;this.renderedNodes=new Map;this.disposables=[];this.templateId=renderer.templateId}renderTemplate(container){const templateData=this.renderer.renderTemplate(container);return{templateData:templateData}}renderElement(node,index,templateData,height){this.renderer.renderElement(this.nodeMapper.map(node),index,templateData.templateData,height)}renderCompressedElements(node,index,templateData,height){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(node),index,templateData.templateData,height)}renderTwistie(element,twistieElement){if(element.slow){twistieElement.classList.add(...ThemeIcon.asClassNameArray(Codicon.treeItemLoading));return true}else{twistieElement.classList.remove(...ThemeIcon.asClassNameArray(Codicon.treeItemLoading));return false}}disposeElement(node,index,templateData,height){var _a6,_b3;(_b3=(_a6=this.renderer).disposeElement)===null||_b3===void 0?void 0:_b3.call(_a6,this.nodeMapper.map(node),index,templateData.templateData,height)}disposeCompressedElements(node,index,templateData,height){var _a6,_b3;(_b3=(_a6=this.renderer).disposeCompressedElements)===null||_b3===void 0?void 0:_b3.call(_a6,this.compressibleNodeMapperProvider().map(node),index,templateData.templateData,height)}disposeTemplate(templateData){this.renderer.disposeTemplate(templateData.templateData)}dispose(){this.renderedNodes.clear();this.disposables=dispose(this.disposables)}};CompressibleAsyncDataTree=class extends AsyncDataTree{constructor(user,container,virtualDelegate,compressionDelegate,renderers,dataSource,options2={}){super(user,container,virtualDelegate,renderers,dataSource,options2);this.compressionDelegate=compressionDelegate;this.compressibleNodeMapper=new WeakMapper((node=>new CompressibleAsyncDataTreeNodeWrapper(node)));this.filter=options2.filter}createTree(user,container,delegate,renderers,options2){const objectTreeDelegate=new ComposedTreeDelegate(delegate);const objectTreeRenderers=renderers.map((r=>new CompressibleAsyncDataTreeRenderer(r,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event)));const objectTreeOptions=asCompressibleObjectTreeOptions(options2)||{};return new CompressibleObjectTree(user,container,objectTreeDelegate,objectTreeRenderers,objectTreeOptions)}asTreeElement(node,viewStateContext){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(node.element)},super.asTreeElement(node,viewStateContext))}updateOptions(options2={}){this.tree.updateOptions(options2)}render(node,viewStateContext){if(!this.identityProvider){return super.render(node,viewStateContext)}const getId=element=>this.identityProvider.getId(element).toString();const getUncompressedIds=nodes=>{const result=new Set;for(const node2 of nodes){const compressedNode=this.tree.getCompressedTreeNode(node2===this.root?null:node2);if(!compressedNode.element){continue}for(const node3 of compressedNode.element.elements){result.add(getId(node3.element))}}return result};const oldSelection=getUncompressedIds(this.tree.getSelection());const oldFocus=getUncompressedIds(this.tree.getFocus());super.render(node,viewStateContext);const selection=this.getSelection();let didChangeSelection=false;const focus=this.getFocus();let didChangeFocus=false;const visit=node2=>{const compressedNode=node2.element;if(compressedNode){for(let i=0;i{const result=this.filter.filter(e,1);const visibility=getVisibility(result);if(visibility===2){throw new Error("Recursive tree visibility not supported in async data compressed trees")}return visibility===1}))}return super.processChildren(children)}}}});var DataTree;var init_dataTree=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/tree/dataTree.js"(){init_abstractTree();init_objectTreeModel();DataTree=class extends AbstractTree{constructor(user,container,delegate,renderers,dataSource,options2={}){super(user,container,delegate,renderers,options2);this.user=user;this.dataSource=dataSource;this.identityProvider=options2.identityProvider}createModel(user,view,options2){return new ObjectTreeModel(user,view,options2)}}}});var IsMacContext,IsLinuxContext,IsWindowsContext,IsWebContext,IsMacNativeContext,IsIOSContext,IsMobileContext,IsDevelopmentContext,ProductQualityContext,InputFocusedContextKey,InputFocusedContext;var init_contextkeys=__esm({"node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js"(){init_platform();init_nls();init_contextkey();IsMacContext=new RawContextKey("isMac",isMacintosh,localize("isMac","Whether the operating system is macOS"));IsLinuxContext=new RawContextKey("isLinux",isLinux,localize("isLinux","Whether the operating system is Linux"));IsWindowsContext=new RawContextKey("isWindows",isWindows,localize("isWindows","Whether the operating system is Windows"));IsWebContext=new RawContextKey("isWeb",isWeb,localize("isWeb","Whether the platform is a web browser"));IsMacNativeContext=new RawContextKey("isMacNative",isMacintosh&&!isWeb,localize("isMacNative","Whether the operating system is macOS on a non-browser platform"));IsIOSContext=new RawContextKey("isIOS",isIOS,localize("isIOS","Whether the operating system is iOS"));IsMobileContext=new RawContextKey("isMobile",isMobile,localize("isMobile","Whether the platform is a mobile web browser"));IsDevelopmentContext=new RawContextKey("isDevelopment",false,true);ProductQualityContext=new RawContextKey("productQualityType","",localize("productQualityType","Quality type of VS Code"));InputFocusedContextKey="inputFocus";InputFocusedContext=new RawContextKey(InputFocusedContextKey,false,localize("inputFocus","Whether keyboard focus is inside an input box"))}});function createScopedContextKeyService(contextKeyService,widget){const result=contextKeyService.createScoped(widget.getHTMLElement());RawWorkbenchListFocusContextKey.bindTo(result);return result}function createScrollObserver(contextKeyService,widget){const listScrollAt=RawWorkbenchListScrollAtBoundaryContextKey.bindTo(contextKeyService);const update=()=>{const atTop=widget.scrollTop===0;const atBottom=widget.scrollHeight-widget.renderHeight-widget.scrollTop<1;if(atTop&&atBottom){listScrollAt.set("both")}else if(atTop){listScrollAt.set("top")}else if(atBottom){listScrollAt.set("bottom")}else{listScrollAt.set("none")}};update();return widget.onDidScroll(update)}function useAltAsMultipleSelectionModifier(configurationService){return configurationService.getValue(multiSelectModifierSettingKey)==="alt"}function toWorkbenchListOptions(accessor,options2){var _a6;const configurationService=accessor.get(IConfigurationService);const keybindingService=accessor.get(IKeybindingService);const disposables=new DisposableStore;const result=Object.assign(Object.assign({},options2),{keyboardNavigationDelegate:{mightProducePrintableCharacter(e){return keybindingService.mightProducePrintableCharacter(e)}},smoothScrolling:Boolean(configurationService.getValue(listSmoothScrolling)),mouseWheelScrollSensitivity:configurationService.getValue(mouseWheelScrollSensitivityKey),fastScrollSensitivity:configurationService.getValue(fastScrollSensitivityKey),multipleSelectionController:(_a6=options2.multipleSelectionController)!==null&&_a6!==void 0?_a6:disposables.add(new MultipleSelectionController(configurationService)),keyboardNavigationEventFilter:createKeyboardNavigationEventFilter(keybindingService),scrollByPage:Boolean(configurationService.getValue(scrollByPageKey))});return[result,disposables]}function createKeyboardNavigationEventFilter(keybindingService){let inMultiChord=false;return event=>{if(event.toKeyCodeChord().isModifierKey()){return false}if(inMultiChord){inMultiChord=false;return false}const result=keybindingService.softDispatch(event,event.target);if(result.kind===1){inMultiChord=true;return false}inMultiChord=false;return result.kind===0}}function getDefaultTreeFindMode(configurationService){const value=configurationService.getValue(defaultFindModeSettingKey);if(value==="highlight"){return TreeFindMode.Highlight}else if(value==="filter"){return TreeFindMode.Filter}const deprecatedValue=configurationService.getValue(keyboardNavigationSettingKey);if(deprecatedValue==="simple"||deprecatedValue==="highlight"){return TreeFindMode.Highlight}else if(deprecatedValue==="filter"){return TreeFindMode.Filter}return void 0}function getDefaultTreeFindMatchType(configurationService){const value=configurationService.getValue(defaultFindMatchTypeSettingKey);if(value==="fuzzy"){return TreeFindMatchType.Fuzzy}else if(value==="contiguous"){return TreeFindMatchType.Contiguous}return void 0}function workbenchTreeDataPreamble(accessor,options2){var _a6;const configurationService=accessor.get(IConfigurationService);const contextViewService=accessor.get(IContextViewService);const contextKeyService=accessor.get(IContextKeyService);const instantiationService=accessor.get(IInstantiationService);const getTypeNavigationMode=()=>{const modeString=contextKeyService.getContextKeyValue(WorkbenchListTypeNavigationModeKey);if(modeString==="automatic"){return TypeNavigationMode.Automatic}else if(modeString==="trigger"){return TypeNavigationMode.Trigger}const modeBoolean=contextKeyService.getContextKeyValue(WorkbenchListAutomaticKeyboardNavigationLegacyKey);if(modeBoolean===false){return TypeNavigationMode.Trigger}const configString=configurationService.getValue(typeNavigationModeSettingKey);if(configString==="automatic"){return TypeNavigationMode.Automatic}else if(configString==="trigger"){return TypeNavigationMode.Trigger}return void 0};const horizontalScrolling=options2.horizontalScrolling!==void 0?options2.horizontalScrolling:Boolean(configurationService.getValue(horizontalScrollingKey));const[workbenchListOptions,disposable]=instantiationService.invokeFunction(toWorkbenchListOptions,options2);const paddingBottom=options2.paddingBottom;const renderIndentGuides=options2.renderIndentGuides!==void 0?options2.renderIndentGuides:configurationService.getValue(treeRenderIndentGuidesKey);return{getTypeNavigationMode:getTypeNavigationMode,disposable:disposable,options:Object.assign(Object.assign({keyboardSupport:false},workbenchListOptions),{indent:typeof configurationService.getValue(treeIndentKey)==="number"?configurationService.getValue(treeIndentKey):void 0,renderIndentGuides:renderIndentGuides,smoothScrolling:Boolean(configurationService.getValue(listSmoothScrolling)),defaultFindMode:getDefaultTreeFindMode(configurationService),defaultFindMatchType:getDefaultTreeFindMatchType(configurationService),horizontalScrolling:horizontalScrolling,scrollByPage:Boolean(configurationService.getValue(scrollByPageKey)),paddingBottom:paddingBottom,hideTwistiesOfChildlessElements:options2.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(_a6=options2.expandOnlyOnTwistieClick)!==null&&_a6!==void 0?_a6:configurationService.getValue(treeExpandMode)==="doubleClick",contextViewProvider:contextViewService,findWidgetStyles:defaultFindWidgetStyles})}}var __decorate34,__param29,IListService,ListService,RawWorkbenchListScrollAtBoundaryContextKey,WorkbenchListScrollAtTopContextKey,WorkbenchListScrollAtBottomContextKey,RawWorkbenchListFocusContextKey,WorkbenchListSupportsMultiSelectContextKey,WorkbenchListFocusContextKey,WorkbenchListHasSelectionOrFocus,WorkbenchListDoubleSelection,WorkbenchListMultiSelection,WorkbenchListSelectionNavigation,WorkbenchListSupportsFind,WorkbenchTreeElementCanCollapse,WorkbenchTreeElementHasParent,WorkbenchTreeElementCanExpand,WorkbenchTreeElementHasChild,WorkbenchTreeFindOpen,WorkbenchListTypeNavigationModeKey,WorkbenchListAutomaticKeyboardNavigationLegacyKey,multiSelectModifierSettingKey,openModeSettingKey,horizontalScrollingKey,defaultFindModeSettingKey,typeNavigationModeSettingKey,keyboardNavigationSettingKey,scrollByPageKey,defaultFindMatchTypeSettingKey,treeIndentKey,treeRenderIndentGuidesKey,listSmoothScrolling,mouseWheelScrollSensitivityKey,fastScrollSensitivityKey,treeExpandMode,MultipleSelectionController,WorkbenchList,WorkbenchPagedList,WorkbenchTable,ResourceNavigator,ListResourceNavigator,TableResourceNavigator,TreeResourceNavigator,WorkbenchObjectTree,WorkbenchCompressibleObjectTree,WorkbenchDataTree,WorkbenchAsyncDataTree,WorkbenchCompressibleAsyncDataTree,WorkbenchTreeInternals,configurationRegistry3;var init_listService=__esm({"node_modules/monaco-editor/esm/vs/platform/list/browser/listService.js"(){init_dom();init_listPaging();init_listWidget();init_tableWidget();init_abstractTree();init_asyncDataTree();init_dataTree();init_objectTree();init_event();init_lifecycle();init_nls();init_configuration();init_configurationRegistry();init_contextkey();init_contextkeys();init_contextView();init_instantiation();init_keybinding();init_platform2();init_defaultStyles();__decorate34=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param29=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};IListService=createDecorator("listService");ListService=class{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new DisposableStore;this.lists=[];this._lastFocusedWidget=void 0;this._hasCreatedStyleController=false}setLastFocusedList(widget){var _a6,_b3;if(widget===this._lastFocusedWidget){return}(_a6=this._lastFocusedWidget)===null||_a6===void 0?void 0:_a6.getHTMLElement().classList.remove("last-focused");this._lastFocusedWidget=widget;(_b3=this._lastFocusedWidget)===null||_b3===void 0?void 0:_b3.getHTMLElement().classList.add("last-focused")}register(widget,extraContextKeys){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=true;const styleController=new DefaultStyleController(createStyleSheet(),"");styleController.style(defaultListStyles)}if(this.lists.some((l=>l.widget===widget))){throw new Error("Cannot register the same widget multiple times")}const registeredList={widget:widget,extraContextKeys:extraContextKeys};this.lists.push(registeredList);if(widget.getHTMLElement()===document.activeElement){this.setLastFocusedList(widget)}return combinedDisposable(widget.onDidFocus((()=>this.setLastFocusedList(widget))),toDisposable((()=>this.lists.splice(this.lists.indexOf(registeredList),1))),widget.onDidDispose((()=>{this.lists=this.lists.filter((l=>l!==registeredList));if(this._lastFocusedWidget===widget){this.setLastFocusedList(void 0)}})))}dispose(){this.disposables.dispose()}};RawWorkbenchListScrollAtBoundaryContextKey=new RawContextKey("listScrollAtBoundary","none");WorkbenchListScrollAtTopContextKey=ContextKeyExpr.or(RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("top"),RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("both"));WorkbenchListScrollAtBottomContextKey=ContextKeyExpr.or(RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("bottom"),RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("both"));RawWorkbenchListFocusContextKey=new RawContextKey("listFocus",true);WorkbenchListSupportsMultiSelectContextKey=new RawContextKey("listSupportsMultiselect",true);WorkbenchListFocusContextKey=ContextKeyExpr.and(RawWorkbenchListFocusContextKey,ContextKeyExpr.not(InputFocusedContextKey));WorkbenchListHasSelectionOrFocus=new RawContextKey("listHasSelectionOrFocus",false);WorkbenchListDoubleSelection=new RawContextKey("listDoubleSelection",false);WorkbenchListMultiSelection=new RawContextKey("listMultiSelection",false);WorkbenchListSelectionNavigation=new RawContextKey("listSelectionNavigation",false);WorkbenchListSupportsFind=new RawContextKey("listSupportsFind",true);WorkbenchTreeElementCanCollapse=new RawContextKey("treeElementCanCollapse",false);WorkbenchTreeElementHasParent=new RawContextKey("treeElementHasParent",false);WorkbenchTreeElementCanExpand=new RawContextKey("treeElementCanExpand",false);WorkbenchTreeElementHasChild=new RawContextKey("treeElementHasChild",false);WorkbenchTreeFindOpen=new RawContextKey("treeFindOpen",false);WorkbenchListTypeNavigationModeKey="listTypeNavigationMode";WorkbenchListAutomaticKeyboardNavigationLegacyKey="listAutomaticKeyboardNavigation";multiSelectModifierSettingKey="workbench.list.multiSelectModifier";openModeSettingKey="workbench.list.openMode";horizontalScrollingKey="workbench.list.horizontalScrolling";defaultFindModeSettingKey="workbench.list.defaultFindMode";typeNavigationModeSettingKey="workbench.list.typeNavigationMode";keyboardNavigationSettingKey="workbench.list.keyboardNavigation";scrollByPageKey="workbench.list.scrollByPage";defaultFindMatchTypeSettingKey="workbench.list.defaultFindMatchType";treeIndentKey="workbench.tree.indent";treeRenderIndentGuidesKey="workbench.tree.renderIndentGuides";listSmoothScrolling="workbench.list.smoothScrolling";mouseWheelScrollSensitivityKey="workbench.list.mouseWheelScrollSensitivity";fastScrollSensitivityKey="workbench.list.fastScrollSensitivity";treeExpandMode="workbench.tree.expandMode";MultipleSelectionController=class extends Disposable{constructor(configurationService){super();this.configurationService=configurationService;this.useAltAsMultipleSelectionModifier=useAltAsMultipleSelectionModifier(configurationService);this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{if(e.affectsConfiguration(multiSelectModifierSettingKey)){this.useAltAsMultipleSelectionModifier=useAltAsMultipleSelectionModifier(this.configurationService)}})))}isSelectionSingleChangeEvent(event){if(this.useAltAsMultipleSelectionModifier){return event.browserEvent.altKey}return isSelectionSingleChangeEvent(event)}isSelectionRangeChangeEvent(event){return isSelectionRangeChangeEvent(event)}};WorkbenchList=class WorkbenchList2 extends List{constructor(user,container,delegate,renderers,options2,contextKeyService,listService,configurationService,instantiationService){const horizontalScrolling=typeof options2.horizontalScrolling!=="undefined"?options2.horizontalScrolling:Boolean(configurationService.getValue(horizontalScrollingKey));const[workbenchListOptions,workbenchListOptionsDisposable]=instantiationService.invokeFunction(toWorkbenchListOptions,options2);super(user,container,delegate,renderers,Object.assign(Object.assign({keyboardSupport:false},workbenchListOptions),{horizontalScrolling:horizontalScrolling}));this.disposables.add(workbenchListOptionsDisposable);this.contextKeyService=createScopedContextKeyService(contextKeyService,this);this.disposables.add(createScrollObserver(this.contextKeyService,this));this.listSupportsMultiSelect=WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService);this.listSupportsMultiSelect.set(options2.multipleSelectionSupport!==false);const listSelectionNavigation=WorkbenchListSelectionNavigation.bindTo(this.contextKeyService);listSelectionNavigation.set(Boolean(options2.selectionNavigation));this.listHasSelectionOrFocus=WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService);this.listDoubleSelection=WorkbenchListDoubleSelection.bindTo(this.contextKeyService);this.listMultiSelection=WorkbenchListMultiSelection.bindTo(this.contextKeyService);this.horizontalScrolling=options2.horizontalScrolling;this._useAltAsMultipleSelectionModifier=useAltAsMultipleSelectionModifier(configurationService);this.disposables.add(this.contextKeyService);this.disposables.add(listService.register(this));this.updateStyles(options2.overrideStyles);this.disposables.add(this.onDidChangeSelection((()=>{const selection=this.getSelection();const focus=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(selection.length>0||focus.length>0);this.listMultiSelection.set(selection.length>1);this.listDoubleSelection.set(selection.length===2)}))})));this.disposables.add(this.onDidChangeFocus((()=>{const selection=this.getSelection();const focus=this.getFocus();this.listHasSelectionOrFocus.set(selection.length>0||focus.length>0)})));this.disposables.add(configurationService.onDidChangeConfiguration((e=>{if(e.affectsConfiguration(multiSelectModifierSettingKey)){this._useAltAsMultipleSelectionModifier=useAltAsMultipleSelectionModifier(configurationService)}let options3={};if(e.affectsConfiguration(horizontalScrollingKey)&&this.horizontalScrolling===void 0){const horizontalScrolling2=Boolean(configurationService.getValue(horizontalScrollingKey));options3=Object.assign(Object.assign({},options3),{horizontalScrolling:horizontalScrolling2})}if(e.affectsConfiguration(scrollByPageKey)){const scrollByPage=Boolean(configurationService.getValue(scrollByPageKey));options3=Object.assign(Object.assign({},options3),{scrollByPage:scrollByPage})}if(e.affectsConfiguration(listSmoothScrolling)){const smoothScrolling=Boolean(configurationService.getValue(listSmoothScrolling));options3=Object.assign(Object.assign({},options3),{smoothScrolling:smoothScrolling})}if(e.affectsConfiguration(mouseWheelScrollSensitivityKey)){const mouseWheelScrollSensitivity=configurationService.getValue(mouseWheelScrollSensitivityKey);options3=Object.assign(Object.assign({},options3),{mouseWheelScrollSensitivity:mouseWheelScrollSensitivity})}if(e.affectsConfiguration(fastScrollSensitivityKey)){const fastScrollSensitivity=configurationService.getValue(fastScrollSensitivityKey);options3=Object.assign(Object.assign({},options3),{fastScrollSensitivity:fastScrollSensitivity})}if(Object.keys(options3).length>0){this.updateOptions(options3)}})));this.navigator=new ListResourceNavigator(this,Object.assign({configurationService:configurationService},options2));this.disposables.add(this.navigator)}updateOptions(options2){super.updateOptions(options2);if(options2.overrideStyles!==void 0){this.updateStyles(options2.overrideStyles)}if(options2.multipleSelectionSupport!==void 0){this.listSupportsMultiSelect.set(!!options2.multipleSelectionSupport)}}updateStyles(styles){this.style(styles?getListStyles(styles):defaultListStyles)}};WorkbenchList=__decorate34([__param29(5,IContextKeyService),__param29(6,IListService),__param29(7,IConfigurationService),__param29(8,IInstantiationService)],WorkbenchList);WorkbenchPagedList=class WorkbenchPagedList2 extends PagedList{constructor(user,container,delegate,renderers,options2,contextKeyService,listService,configurationService,instantiationService){const horizontalScrolling=typeof options2.horizontalScrolling!=="undefined"?options2.horizontalScrolling:Boolean(configurationService.getValue(horizontalScrollingKey));const[workbenchListOptions,workbenchListOptionsDisposable]=instantiationService.invokeFunction(toWorkbenchListOptions,options2);super(user,container,delegate,renderers,Object.assign(Object.assign({keyboardSupport:false},workbenchListOptions),{horizontalScrolling:horizontalScrolling}));this.disposables=new DisposableStore;this.disposables.add(workbenchListOptionsDisposable);this.contextKeyService=createScopedContextKeyService(contextKeyService,this);this.disposables.add(createScrollObserver(this.contextKeyService,this.widget));this.horizontalScrolling=options2.horizontalScrolling;this.listSupportsMultiSelect=WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService);this.listSupportsMultiSelect.set(options2.multipleSelectionSupport!==false);const listSelectionNavigation=WorkbenchListSelectionNavigation.bindTo(this.contextKeyService);listSelectionNavigation.set(Boolean(options2.selectionNavigation));this._useAltAsMultipleSelectionModifier=useAltAsMultipleSelectionModifier(configurationService);this.disposables.add(this.contextKeyService);this.disposables.add(listService.register(this));this.updateStyles(options2.overrideStyles);this.disposables.add(configurationService.onDidChangeConfiguration((e=>{if(e.affectsConfiguration(multiSelectModifierSettingKey)){this._useAltAsMultipleSelectionModifier=useAltAsMultipleSelectionModifier(configurationService)}let options3={};if(e.affectsConfiguration(horizontalScrollingKey)&&this.horizontalScrolling===void 0){const horizontalScrolling2=Boolean(configurationService.getValue(horizontalScrollingKey));options3=Object.assign(Object.assign({},options3),{horizontalScrolling:horizontalScrolling2})}if(e.affectsConfiguration(scrollByPageKey)){const scrollByPage=Boolean(configurationService.getValue(scrollByPageKey));options3=Object.assign(Object.assign({},options3),{scrollByPage:scrollByPage})}if(e.affectsConfiguration(listSmoothScrolling)){const smoothScrolling=Boolean(configurationService.getValue(listSmoothScrolling));options3=Object.assign(Object.assign({},options3),{smoothScrolling:smoothScrolling})}if(e.affectsConfiguration(mouseWheelScrollSensitivityKey)){const mouseWheelScrollSensitivity=configurationService.getValue(mouseWheelScrollSensitivityKey);options3=Object.assign(Object.assign({},options3),{mouseWheelScrollSensitivity:mouseWheelScrollSensitivity})}if(e.affectsConfiguration(fastScrollSensitivityKey)){const fastScrollSensitivity=configurationService.getValue(fastScrollSensitivityKey);options3=Object.assign(Object.assign({},options3),{fastScrollSensitivity:fastScrollSensitivity})}if(Object.keys(options3).length>0){this.updateOptions(options3)}})));this.navigator=new ListResourceNavigator(this,Object.assign({configurationService:configurationService},options2));this.disposables.add(this.navigator)}updateOptions(options2){super.updateOptions(options2);if(options2.overrideStyles!==void 0){this.updateStyles(options2.overrideStyles)}if(options2.multipleSelectionSupport!==void 0){this.listSupportsMultiSelect.set(!!options2.multipleSelectionSupport)}}updateStyles(styles){this.style(styles?getListStyles(styles):defaultListStyles)}dispose(){this.disposables.dispose();super.dispose()}};WorkbenchPagedList=__decorate34([__param29(5,IContextKeyService),__param29(6,IListService),__param29(7,IConfigurationService),__param29(8,IInstantiationService)],WorkbenchPagedList);WorkbenchTable=class WorkbenchTable2 extends Table{constructor(user,container,delegate,columns,renderers,options2,contextKeyService,listService,configurationService,instantiationService){const horizontalScrolling=typeof options2.horizontalScrolling!=="undefined"?options2.horizontalScrolling:Boolean(configurationService.getValue(horizontalScrollingKey));const[workbenchListOptions,workbenchListOptionsDisposable]=instantiationService.invokeFunction(toWorkbenchListOptions,options2);super(user,container,delegate,columns,renderers,Object.assign(Object.assign({keyboardSupport:false},workbenchListOptions),{horizontalScrolling:horizontalScrolling}));this.disposables.add(workbenchListOptionsDisposable);this.contextKeyService=createScopedContextKeyService(contextKeyService,this);this.disposables.add(createScrollObserver(this.contextKeyService,this));this.listSupportsMultiSelect=WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService);this.listSupportsMultiSelect.set(options2.multipleSelectionSupport!==false);const listSelectionNavigation=WorkbenchListSelectionNavigation.bindTo(this.contextKeyService);listSelectionNavigation.set(Boolean(options2.selectionNavigation));this.listHasSelectionOrFocus=WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService);this.listDoubleSelection=WorkbenchListDoubleSelection.bindTo(this.contextKeyService);this.listMultiSelection=WorkbenchListMultiSelection.bindTo(this.contextKeyService);this.horizontalScrolling=options2.horizontalScrolling;this._useAltAsMultipleSelectionModifier=useAltAsMultipleSelectionModifier(configurationService);this.disposables.add(this.contextKeyService);this.disposables.add(listService.register(this));this.updateStyles(options2.overrideStyles);this.disposables.add(this.onDidChangeSelection((()=>{const selection=this.getSelection();const focus=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(selection.length>0||focus.length>0);this.listMultiSelection.set(selection.length>1);this.listDoubleSelection.set(selection.length===2)}))})));this.disposables.add(this.onDidChangeFocus((()=>{const selection=this.getSelection();const focus=this.getFocus();this.listHasSelectionOrFocus.set(selection.length>0||focus.length>0)})));this.disposables.add(configurationService.onDidChangeConfiguration((e=>{if(e.affectsConfiguration(multiSelectModifierSettingKey)){this._useAltAsMultipleSelectionModifier=useAltAsMultipleSelectionModifier(configurationService)}let options3={};if(e.affectsConfiguration(horizontalScrollingKey)&&this.horizontalScrolling===void 0){const horizontalScrolling2=Boolean(configurationService.getValue(horizontalScrollingKey));options3=Object.assign(Object.assign({},options3),{horizontalScrolling:horizontalScrolling2})}if(e.affectsConfiguration(scrollByPageKey)){const scrollByPage=Boolean(configurationService.getValue(scrollByPageKey));options3=Object.assign(Object.assign({},options3),{scrollByPage:scrollByPage})}if(e.affectsConfiguration(listSmoothScrolling)){const smoothScrolling=Boolean(configurationService.getValue(listSmoothScrolling));options3=Object.assign(Object.assign({},options3),{smoothScrolling:smoothScrolling})}if(e.affectsConfiguration(mouseWheelScrollSensitivityKey)){const mouseWheelScrollSensitivity=configurationService.getValue(mouseWheelScrollSensitivityKey);options3=Object.assign(Object.assign({},options3),{mouseWheelScrollSensitivity:mouseWheelScrollSensitivity})}if(e.affectsConfiguration(fastScrollSensitivityKey)){const fastScrollSensitivity=configurationService.getValue(fastScrollSensitivityKey);options3=Object.assign(Object.assign({},options3),{fastScrollSensitivity:fastScrollSensitivity})}if(Object.keys(options3).length>0){this.updateOptions(options3)}})));this.navigator=new TableResourceNavigator(this,Object.assign({configurationService:configurationService},options2));this.disposables.add(this.navigator)}updateOptions(options2){super.updateOptions(options2);if(options2.overrideStyles!==void 0){this.updateStyles(options2.overrideStyles)}if(options2.multipleSelectionSupport!==void 0){this.listSupportsMultiSelect.set(!!options2.multipleSelectionSupport)}}updateStyles(styles){this.style(styles?getListStyles(styles):defaultListStyles)}dispose(){this.disposables.dispose();super.dispose()}};WorkbenchTable=__decorate34([__param29(6,IContextKeyService),__param29(7,IListService),__param29(8,IConfigurationService),__param29(9,IInstantiationService)],WorkbenchTable);ResourceNavigator=class extends Disposable{constructor(widget,options2){var _a6;super();this.widget=widget;this._onDidOpen=this._register(new Emitter);this.onDidOpen=this._onDidOpen.event;this._register(Event.filter(this.widget.onDidChangeSelection,(e=>e.browserEvent instanceof KeyboardEvent))((e=>this.onSelectionFromKeyboard(e))));this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent))));this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent))));if(typeof(options2===null||options2===void 0?void 0:options2.openOnSingleClick)!=="boolean"&&(options2===null||options2===void 0?void 0:options2.configurationService)){this.openOnSingleClick=(options2===null||options2===void 0?void 0:options2.configurationService.getValue(openModeSettingKey))!=="doubleClick";this._register(options2===null||options2===void 0?void 0:options2.configurationService.onDidChangeConfiguration((e=>{if(e.affectsConfiguration(openModeSettingKey)){this.openOnSingleClick=(options2===null||options2===void 0?void 0:options2.configurationService.getValue(openModeSettingKey))!=="doubleClick"}})))}else{this.openOnSingleClick=(_a6=options2===null||options2===void 0?void 0:options2.openOnSingleClick)!==null&&_a6!==void 0?_a6:true}}onSelectionFromKeyboard(event){if(event.elements.length!==1){return}const selectionKeyboardEvent=event.browserEvent;const preserveFocus=typeof selectionKeyboardEvent.preserveFocus==="boolean"?selectionKeyboardEvent.preserveFocus:true;const pinned=typeof selectionKeyboardEvent.pinned==="boolean"?selectionKeyboardEvent.pinned:!preserveFocus;const sideBySide=false;this._open(this.getSelectedElement(),preserveFocus,pinned,sideBySide,event.browserEvent)}onPointer(element,browserEvent){if(!this.openOnSingleClick){return}const isDoubleClick=browserEvent.detail===2;if(isDoubleClick){return}const isMiddleClick=browserEvent.button===1;const preserveFocus=true;const pinned=isMiddleClick;const sideBySide=browserEvent.ctrlKey||browserEvent.metaKey||browserEvent.altKey;this._open(element,preserveFocus,pinned,sideBySide,browserEvent)}onMouseDblClick(element,browserEvent){if(!browserEvent){return}const target=browserEvent.target;const onTwistie=target.classList.contains("monaco-tl-twistie")||target.classList.contains("monaco-icon-label")&&target.classList.contains("folder-icon")&&browserEvent.offsetX<16;if(onTwistie){return}const preserveFocus=false;const pinned=true;const sideBySide=browserEvent.ctrlKey||browserEvent.metaKey||browserEvent.altKey;this._open(element,preserveFocus,pinned,sideBySide,browserEvent)}_open(element,preserveFocus,pinned,sideBySide,browserEvent){if(!element){return}this._onDidOpen.fire({editorOptions:{preserveFocus:preserveFocus,pinned:pinned,revealIfVisible:true},sideBySide:sideBySide,element:element,browserEvent:browserEvent})}};ListResourceNavigator=class extends ResourceNavigator{constructor(widget,options2){super(widget,options2);this.widget=widget}getSelectedElement(){return this.widget.getSelectedElements()[0]}};TableResourceNavigator=class extends ResourceNavigator{constructor(widget,options2){super(widget,options2)}getSelectedElement(){return this.widget.getSelectedElements()[0]}};TreeResourceNavigator=class extends ResourceNavigator{constructor(widget,options2){super(widget,options2)}getSelectedElement(){var _a6;return(_a6=this.widget.getSelection()[0])!==null&&_a6!==void 0?_a6:void 0}};WorkbenchObjectTree=class WorkbenchObjectTree2 extends ObjectTree{constructor(user,container,delegate,renderers,options2,instantiationService,contextKeyService,listService,configurationService){const{options:treeOptions,getTypeNavigationMode:getTypeNavigationMode,disposable:disposable}=instantiationService.invokeFunction(workbenchTreeDataPreamble,options2);super(user,container,delegate,renderers,treeOptions);this.disposables.add(disposable);this.internals=new WorkbenchTreeInternals(this,options2,getTypeNavigationMode,options2.overrideStyles,contextKeyService,listService,configurationService);this.disposables.add(this.internals)}updateOptions(options2){super.updateOptions(options2);this.internals.updateOptions(options2)}};WorkbenchObjectTree=__decorate34([__param29(5,IInstantiationService),__param29(6,IContextKeyService),__param29(7,IListService),__param29(8,IConfigurationService)],WorkbenchObjectTree);WorkbenchCompressibleObjectTree=class WorkbenchCompressibleObjectTree2 extends CompressibleObjectTree{constructor(user,container,delegate,renderers,options2,instantiationService,contextKeyService,listService,configurationService){const{options:treeOptions,getTypeNavigationMode:getTypeNavigationMode,disposable:disposable}=instantiationService.invokeFunction(workbenchTreeDataPreamble,options2);super(user,container,delegate,renderers,treeOptions);this.disposables.add(disposable);this.internals=new WorkbenchTreeInternals(this,options2,getTypeNavigationMode,options2.overrideStyles,contextKeyService,listService,configurationService);this.disposables.add(this.internals)}updateOptions(options2={}){super.updateOptions(options2);if(options2.overrideStyles){this.internals.updateStyleOverrides(options2.overrideStyles)}this.internals.updateOptions(options2)}};WorkbenchCompressibleObjectTree=__decorate34([__param29(5,IInstantiationService),__param29(6,IContextKeyService),__param29(7,IListService),__param29(8,IConfigurationService)],WorkbenchCompressibleObjectTree);WorkbenchDataTree=class WorkbenchDataTree2 extends DataTree{constructor(user,container,delegate,renderers,dataSource,options2,instantiationService,contextKeyService,listService,configurationService){const{options:treeOptions,getTypeNavigationMode:getTypeNavigationMode,disposable:disposable}=instantiationService.invokeFunction(workbenchTreeDataPreamble,options2);super(user,container,delegate,renderers,dataSource,treeOptions);this.disposables.add(disposable);this.internals=new WorkbenchTreeInternals(this,options2,getTypeNavigationMode,options2.overrideStyles,contextKeyService,listService,configurationService);this.disposables.add(this.internals)}updateOptions(options2={}){super.updateOptions(options2);if(options2.overrideStyles!==void 0){this.internals.updateStyleOverrides(options2.overrideStyles)}this.internals.updateOptions(options2)}};WorkbenchDataTree=__decorate34([__param29(6,IInstantiationService),__param29(7,IContextKeyService),__param29(8,IListService),__param29(9,IConfigurationService)],WorkbenchDataTree);WorkbenchAsyncDataTree=class WorkbenchAsyncDataTree2 extends AsyncDataTree{get onDidOpen(){return this.internals.onDidOpen}constructor(user,container,delegate,renderers,dataSource,options2,instantiationService,contextKeyService,listService,configurationService){const{options:treeOptions,getTypeNavigationMode:getTypeNavigationMode,disposable:disposable}=instantiationService.invokeFunction(workbenchTreeDataPreamble,options2);super(user,container,delegate,renderers,dataSource,treeOptions);this.disposables.add(disposable);this.internals=new WorkbenchTreeInternals(this,options2,getTypeNavigationMode,options2.overrideStyles,contextKeyService,listService,configurationService);this.disposables.add(this.internals)}updateOptions(options2={}){super.updateOptions(options2);if(options2.overrideStyles){this.internals.updateStyleOverrides(options2.overrideStyles)}this.internals.updateOptions(options2)}};WorkbenchAsyncDataTree=__decorate34([__param29(6,IInstantiationService),__param29(7,IContextKeyService),__param29(8,IListService),__param29(9,IConfigurationService)],WorkbenchAsyncDataTree);WorkbenchCompressibleAsyncDataTree=class WorkbenchCompressibleAsyncDataTree2 extends CompressibleAsyncDataTree{constructor(user,container,virtualDelegate,compressionDelegate,renderers,dataSource,options2,instantiationService,contextKeyService,listService,configurationService){const{options:treeOptions,getTypeNavigationMode:getTypeNavigationMode,disposable:disposable}=instantiationService.invokeFunction(workbenchTreeDataPreamble,options2);super(user,container,virtualDelegate,compressionDelegate,renderers,dataSource,treeOptions);this.disposables.add(disposable);this.internals=new WorkbenchTreeInternals(this,options2,getTypeNavigationMode,options2.overrideStyles,contextKeyService,listService,configurationService);this.disposables.add(this.internals)}updateOptions(options2){super.updateOptions(options2);this.internals.updateOptions(options2)}};WorkbenchCompressibleAsyncDataTree=__decorate34([__param29(7,IInstantiationService),__param29(8,IContextKeyService),__param29(9,IListService),__param29(10,IConfigurationService)],WorkbenchCompressibleAsyncDataTree);WorkbenchTreeInternals=class WorkbenchTreeInternals2{get onDidOpen(){return this.navigator.onDidOpen}constructor(tree,options2,getTypeNavigationMode,overrideStyles2,contextKeyService,listService,configurationService){var _a6;this.tree=tree;this.disposables=[];this.contextKeyService=createScopedContextKeyService(contextKeyService,tree);this.disposables.push(createScrollObserver(this.contextKeyService,tree));this.listSupportsMultiSelect=WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService);this.listSupportsMultiSelect.set(options2.multipleSelectionSupport!==false);const listSelectionNavigation=WorkbenchListSelectionNavigation.bindTo(this.contextKeyService);listSelectionNavigation.set(Boolean(options2.selectionNavigation));this.listSupportFindWidget=WorkbenchListSupportsFind.bindTo(this.contextKeyService);this.listSupportFindWidget.set((_a6=options2.findWidgetEnabled)!==null&&_a6!==void 0?_a6:true);this.hasSelectionOrFocus=WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService);this.hasDoubleSelection=WorkbenchListDoubleSelection.bindTo(this.contextKeyService);this.hasMultiSelection=WorkbenchListMultiSelection.bindTo(this.contextKeyService);this.treeElementCanCollapse=WorkbenchTreeElementCanCollapse.bindTo(this.contextKeyService);this.treeElementHasParent=WorkbenchTreeElementHasParent.bindTo(this.contextKeyService);this.treeElementCanExpand=WorkbenchTreeElementCanExpand.bindTo(this.contextKeyService);this.treeElementHasChild=WorkbenchTreeElementHasChild.bindTo(this.contextKeyService);this.treeFindOpen=WorkbenchTreeFindOpen.bindTo(this.contextKeyService);this._useAltAsMultipleSelectionModifier=useAltAsMultipleSelectionModifier(configurationService);this.updateStyleOverrides(overrideStyles2);const updateCollapseContextKeys=()=>{const focus=tree.getFocus()[0];if(!focus){return}const node=tree.getNode(focus);this.treeElementCanCollapse.set(node.collapsible&&!node.collapsed);this.treeElementHasParent.set(!!tree.getParentElement(focus));this.treeElementCanExpand.set(node.collapsible&&node.collapsed);this.treeElementHasChild.set(!!tree.getFirstElementChild(focus))};const interestingContextKeys=new Set;interestingContextKeys.add(WorkbenchListTypeNavigationModeKey);interestingContextKeys.add(WorkbenchListAutomaticKeyboardNavigationLegacyKey);this.disposables.push(this.contextKeyService,listService.register(tree),tree.onDidChangeSelection((()=>{const selection=tree.getSelection();const focus=tree.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(selection.length>0||focus.length>0);this.hasMultiSelection.set(selection.length>1);this.hasDoubleSelection.set(selection.length===2)}))})),tree.onDidChangeFocus((()=>{const selection=tree.getSelection();const focus=tree.getFocus();this.hasSelectionOrFocus.set(selection.length>0||focus.length>0);updateCollapseContextKeys()})),tree.onDidChangeCollapseState(updateCollapseContextKeys),tree.onDidChangeModel(updateCollapseContextKeys),tree.onDidChangeFindOpenState((enabled=>this.treeFindOpen.set(enabled))),configurationService.onDidChangeConfiguration((e=>{let newOptions={};if(e.affectsConfiguration(multiSelectModifierSettingKey)){this._useAltAsMultipleSelectionModifier=useAltAsMultipleSelectionModifier(configurationService)}if(e.affectsConfiguration(treeIndentKey)){const indent=configurationService.getValue(treeIndentKey);newOptions=Object.assign(Object.assign({},newOptions),{indent:indent})}if(e.affectsConfiguration(treeRenderIndentGuidesKey)&&options2.renderIndentGuides===void 0){const renderIndentGuides=configurationService.getValue(treeRenderIndentGuidesKey);newOptions=Object.assign(Object.assign({},newOptions),{renderIndentGuides:renderIndentGuides})}if(e.affectsConfiguration(listSmoothScrolling)){const smoothScrolling=Boolean(configurationService.getValue(listSmoothScrolling));newOptions=Object.assign(Object.assign({},newOptions),{smoothScrolling:smoothScrolling})}if(e.affectsConfiguration(defaultFindModeSettingKey)||e.affectsConfiguration(keyboardNavigationSettingKey)){const defaultFindMode=getDefaultTreeFindMode(configurationService);newOptions=Object.assign(Object.assign({},newOptions),{defaultFindMode:defaultFindMode})}if(e.affectsConfiguration(typeNavigationModeSettingKey)||e.affectsConfiguration(keyboardNavigationSettingKey)){const typeNavigationMode=getTypeNavigationMode();newOptions=Object.assign(Object.assign({},newOptions),{typeNavigationMode:typeNavigationMode})}if(e.affectsConfiguration(defaultFindMatchTypeSettingKey)){const defaultFindMatchType=getDefaultTreeFindMatchType(configurationService);newOptions=Object.assign(Object.assign({},newOptions),{defaultFindMatchType:defaultFindMatchType})}if(e.affectsConfiguration(horizontalScrollingKey)&&options2.horizontalScrolling===void 0){const horizontalScrolling=Boolean(configurationService.getValue(horizontalScrollingKey));newOptions=Object.assign(Object.assign({},newOptions),{horizontalScrolling:horizontalScrolling})}if(e.affectsConfiguration(scrollByPageKey)){const scrollByPage=Boolean(configurationService.getValue(scrollByPageKey));newOptions=Object.assign(Object.assign({},newOptions),{scrollByPage:scrollByPage})}if(e.affectsConfiguration(treeExpandMode)&&options2.expandOnlyOnTwistieClick===void 0){newOptions=Object.assign(Object.assign({},newOptions),{expandOnlyOnTwistieClick:configurationService.getValue(treeExpandMode)==="doubleClick"})}if(e.affectsConfiguration(mouseWheelScrollSensitivityKey)){const mouseWheelScrollSensitivity=configurationService.getValue(mouseWheelScrollSensitivityKey);newOptions=Object.assign(Object.assign({},newOptions),{mouseWheelScrollSensitivity:mouseWheelScrollSensitivity})}if(e.affectsConfiguration(fastScrollSensitivityKey)){const fastScrollSensitivity=configurationService.getValue(fastScrollSensitivityKey);newOptions=Object.assign(Object.assign({},newOptions),{fastScrollSensitivity:fastScrollSensitivity})}if(Object.keys(newOptions).length>0){tree.updateOptions(newOptions)}})),this.contextKeyService.onDidChangeContext((e=>{if(e.affectsSome(interestingContextKeys)){tree.updateOptions({typeNavigationMode:getTypeNavigationMode()})}})));this.navigator=new TreeResourceNavigator(tree,Object.assign({configurationService:configurationService},options2));this.disposables.push(this.navigator)}updateOptions(options2){if(options2.multipleSelectionSupport!==void 0){this.listSupportsMultiSelect.set(!!options2.multipleSelectionSupport)}}updateStyleOverrides(overrideStyles2){this.tree.style(overrideStyles2?getListStyles(overrideStyles2):defaultListStyles)}dispose(){this.disposables=dispose(this.disposables)}};WorkbenchTreeInternals=__decorate34([__param29(4,IContextKeyService),__param29(5,IListService),__param29(6,IConfigurationService)],WorkbenchTreeInternals);configurationRegistry3=Registry.as(Extensions2.Configuration);configurationRegistry3.registerConfiguration({id:"workbench",order:7,title:localize("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[multiSelectModifierSettingKey]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[localize("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),localize("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:localize({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"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.")},[openModeSettingKey]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:localize({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"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.")},[horizontalScrollingKey]:{type:"boolean",default:false,description:localize("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[scrollByPageKey]:{type:"boolean",default:false,description:localize("list.scrollByPage","Controls whether clicks in the scrollbar scroll page by page.")},[treeIndentKey]:{type:"number",default:8,minimum:4,maximum:40,description:localize("tree indent setting","Controls tree indentation in pixels.")},[treeRenderIndentGuidesKey]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:localize("render tree indent guides","Controls whether the tree should render indent guides.")},[listSmoothScrolling]:{type:"boolean",default:false,description:localize("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[mouseWheelScrollSensitivityKey]:{type:"number",default:1,markdownDescription:localize("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[fastScrollSensitivityKey]:{type:"number",default:5,markdownDescription:localize("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[defaultFindModeSettingKey]:{type:"string",enum:["highlight","filter"],enumDescriptions:[localize("defaultFindModeSettingKey.highlight","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements."),localize("defaultFindModeSettingKey.filter","Filter elements when searching.")],default:"highlight",description:localize("defaultFindModeSettingKey","Controls the default find mode for lists and trees in the workbench.")},[keyboardNavigationSettingKey]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[localize("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),localize("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),localize("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:localize("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter."),deprecated:true,deprecationMessage:localize("keyboardNavigationSettingKeyDeprecated","Please use 'workbench.list.defaultFindMode' and\t'workbench.list.typeNavigationMode' instead.")},[defaultFindMatchTypeSettingKey]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[localize("defaultFindMatchTypeSettingKey.fuzzy","Use fuzzy matching when searching."),localize("defaultFindMatchTypeSettingKey.contiguous","Use contiguous matching when searching.")],default:"fuzzy",description:localize("defaultFindMatchTypeSettingKey","Controls the type of matching used when searching lists and trees in the workbench.")},[treeExpandMode]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description: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.")},[typeNavigationModeSettingKey]:{type:"string",enum:["automatic","trigger"],default:"automatic",description:localize("typeNavigationMode","Controls the how type navigation works in lists and trees in the workbench. When set to 'trigger', type navigation begins once the 'list.triggerTypeNavigation' command is run.")}}})}});var DefaultQuickAccessFilterValue,Extensions9,QuickAccessRegistry;var init_quickAccess=__esm({"node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickAccess.js"(){init_arrays();init_lifecycle();init_platform2();(function(DefaultQuickAccessFilterValue2){DefaultQuickAccessFilterValue2[DefaultQuickAccessFilterValue2["PRESERVE"]=0]="PRESERVE";DefaultQuickAccessFilterValue2[DefaultQuickAccessFilterValue2["LAST"]=1]="LAST"})(DefaultQuickAccessFilterValue||(DefaultQuickAccessFilterValue={}));Extensions9={Quickaccess:"workbench.contributions.quickaccess"};QuickAccessRegistry=class{constructor(){this.providers=[];this.defaultProvider=void 0}registerQuickAccessProvider(provider){if(provider.prefix.length===0){this.defaultProvider=provider}else{this.providers.push(provider)}this.providers.sort(((providerA,providerB)=>providerB.prefix.length-providerA.prefix.length));return toDisposable((()=>{this.providers.splice(this.providers.indexOf(provider),1);if(this.defaultProvider===provider){this.defaultProvider=void 0}}))}getQuickAccessProviders(){return coalesce([this.defaultProvider,...this.providers])}getQuickAccessProvider(prefix){const result=prefix?this.providers.find((provider=>prefix.startsWith(provider.prefix)))||void 0:void 0;return result||this.defaultProvider}};Registry.add(Extensions9.Quickaccess,new QuickAccessRegistry)}});var NO_KEY_MODS,QuickInputHideReason,ItemActivation,QuickPickItemScorerAccessor,quickPickItemScorerAccessor,IQuickInputService;var init_quickInput=__esm({"node_modules/monaco-editor/esm/vs/platform/quickinput/common/quickInput.js"(){init_instantiation();NO_KEY_MODS={ctrlCmd:false,alt:false};(function(QuickInputHideReason2){QuickInputHideReason2[QuickInputHideReason2["Blur"]=1]="Blur";QuickInputHideReason2[QuickInputHideReason2["Gesture"]=2]="Gesture";QuickInputHideReason2[QuickInputHideReason2["Other"]=3]="Other"})(QuickInputHideReason||(QuickInputHideReason={}));(function(ItemActivation2){ItemActivation2[ItemActivation2["NONE"]=0]="NONE";ItemActivation2[ItemActivation2["FIRST"]=1]="FIRST";ItemActivation2[ItemActivation2["SECOND"]=2]="SECOND";ItemActivation2[ItemActivation2["LAST"]=3]="LAST"})(ItemActivation||(ItemActivation={}));QuickPickItemScorerAccessor=class{constructor(options2){this.options=options2}};quickPickItemScorerAccessor=new QuickPickItemScorerAccessor;IQuickInputService=createDecorator("quickInputService")}});var __decorate35,__param30,QuickAccessController;var init_quickAccess2=__esm({"node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickAccess.js"(){init_async();init_cancellation();init_functional();init_lifecycle();init_instantiation();init_quickAccess();init_quickInput();init_platform2();__decorate35=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param30=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};QuickAccessController=class QuickAccessController2 extends Disposable{constructor(quickInputService,instantiationService){super();this.quickInputService=quickInputService;this.instantiationService=instantiationService;this.registry=Registry.as(Extensions9.Quickaccess);this.mapProviderToDescriptor=new Map;this.lastAcceptedPickerValues=new Map;this.visibleQuickAccess=void 0}show(value="",options2){this.doShowOrPick(value,false,options2)}doShowOrPick(value,pick,options2){var _a6;const[provider,descriptor]=this.getOrInstantiateProvider(value);const visibleQuickAccess=this.visibleQuickAccess;const visibleDescriptor=visibleQuickAccess===null||visibleQuickAccess===void 0?void 0:visibleQuickAccess.descriptor;if(visibleQuickAccess&&descriptor&&visibleDescriptor===descriptor){if(value!==descriptor.prefix&&!(options2===null||options2===void 0?void 0:options2.preserveValue)){visibleQuickAccess.picker.value=value}this.adjustValueSelection(visibleQuickAccess.picker,descriptor,options2);return}if(descriptor&&!(options2===null||options2===void 0?void 0:options2.preserveValue)){let newValue=void 0;if(visibleQuickAccess&&visibleDescriptor&&visibleDescriptor!==descriptor){const newValueCandidateWithoutPrefix=visibleQuickAccess.value.substr(visibleDescriptor.prefix.length);if(newValueCandidateWithoutPrefix){newValue=`${descriptor.prefix}${newValueCandidateWithoutPrefix}`}}if(!newValue){const defaultFilterValue=provider===null||provider===void 0?void 0:provider.defaultFilterValue;if(defaultFilterValue===DefaultQuickAccessFilterValue.LAST){newValue=this.lastAcceptedPickerValues.get(descriptor)}else if(typeof defaultFilterValue==="string"){newValue=`${descriptor.prefix}${defaultFilterValue}`}}if(typeof newValue==="string"){value=newValue}}const disposables=new DisposableStore;const picker=disposables.add(this.quickInputService.createQuickPick());picker.value=value;this.adjustValueSelection(picker,descriptor,options2);picker.placeholder=descriptor===null||descriptor===void 0?void 0:descriptor.placeholder;picker.quickNavigate=options2===null||options2===void 0?void 0:options2.quickNavigateConfiguration;picker.hideInput=!!picker.quickNavigate&&!visibleQuickAccess;if(typeof(options2===null||options2===void 0?void 0:options2.itemActivation)==="number"||(options2===null||options2===void 0?void 0:options2.quickNavigateConfiguration)){picker.itemActivation=(_a6=options2===null||options2===void 0?void 0:options2.itemActivation)!==null&&_a6!==void 0?_a6:ItemActivation.SECOND}picker.contextKey=descriptor===null||descriptor===void 0?void 0:descriptor.contextKey;picker.filterValue=value2=>value2.substring(descriptor?descriptor.prefix.length:0);let pickPromise=void 0;if(pick){pickPromise=new DeferredPromise;disposables.add(once(picker.onWillAccept)((e=>{e.veto();picker.hide()})))}disposables.add(this.registerPickerListeners(picker,provider,descriptor,value,options2===null||options2===void 0?void 0:options2.providerOptions));const cts=disposables.add(new CancellationTokenSource);if(provider){disposables.add(provider.provide(picker,cts.token,options2===null||options2===void 0?void 0:options2.providerOptions))}once(picker.onDidHide)((()=>{if(picker.selectedItems.length===0){cts.cancel()}disposables.dispose();pickPromise===null||pickPromise===void 0?void 0:pickPromise.complete(picker.selectedItems.slice(0))}));picker.show();if(pick){return pickPromise===null||pickPromise===void 0?void 0:pickPromise.p}}adjustValueSelection(picker,descriptor,options2){var _a6;let valueSelection;if(options2===null||options2===void 0?void 0:options2.preserveValue){valueSelection=[picker.value.length,picker.value.length]}else{valueSelection=[(_a6=descriptor===null||descriptor===void 0?void 0:descriptor.prefix.length)!==null&&_a6!==void 0?_a6:0,picker.value.length]}picker.valueSelection=valueSelection}registerPickerListeners(picker,provider,descriptor,value,providerOptions){const disposables=new DisposableStore;const visibleQuickAccess=this.visibleQuickAccess={picker:picker,descriptor:descriptor,value:value};disposables.add(toDisposable((()=>{if(visibleQuickAccess===this.visibleQuickAccess){this.visibleQuickAccess=void 0}})));disposables.add(picker.onDidChangeValue((value2=>{const[providerForValue]=this.getOrInstantiateProvider(value2);if(providerForValue!==provider){this.show(value2,{preserveValue:true,providerOptions:providerOptions})}else{visibleQuickAccess.value=value2}})));if(descriptor){disposables.add(picker.onDidAccept((()=>{this.lastAcceptedPickerValues.set(descriptor,picker.value)})))}return disposables}getOrInstantiateProvider(value){const providerDescriptor=this.registry.getQuickAccessProvider(value);if(!providerDescriptor){return[void 0,void 0]}let provider=this.mapProviderToDescriptor.get(providerDescriptor);if(!provider){provider=this.instantiationService.createInstance(providerDescriptor.ctor);this.mapProviderToDescriptor.set(providerDescriptor,provider)}return[provider,providerDescriptor]}};QuickAccessController=__decorate35([__param30(0,IQuickInputService),__param30(1,IInstantiationService)],QuickAccessController)}});var init_41=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.css"(){}});var unthemedButtonStyles,Button;var init_button=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/button/button.js"(){init_dom();init_dompurify();init_keyboardEvent();init_markdownRenderer();init_touch();init_iconLabels2();init_color();init_event();init_htmlContent();init_lifecycle();init_41();unthemedButtonStyles={buttonBackground:"#0E639C",buttonHoverBackground:"#006BB3",buttonSeparator:Color.white.toString(),buttonForeground:Color.white.toString(),buttonBorder:void 0,buttonSecondaryBackground:void 0,buttonSecondaryForeground:void 0,buttonSecondaryHoverBackground:void 0};Button=class extends Disposable{get onDidClick(){return this._onDidClick.event}constructor(container,options2){super();this._label="";this._onDidClick=this._register(new Emitter);this.options=options2;this._element=document.createElement("a");this._element.classList.add("monaco-button");this._element.tabIndex=0;this._element.setAttribute("role","button");this._element.classList.toggle("secondary",!!options2.secondary);const background=options2.secondary?options2.buttonSecondaryBackground:options2.buttonBackground;const foreground2=options2.secondary?options2.buttonSecondaryForeground:options2.buttonForeground;this._element.style.color=foreground2||"";this._element.style.backgroundColor=background||"";if(options2.supportShortLabel){this._labelShortElement=document.createElement("div");this._labelShortElement.classList.add("monaco-button-label-short");this._element.appendChild(this._labelShortElement);this._labelElement=document.createElement("div");this._labelElement.classList.add("monaco-button-label");this._element.appendChild(this._labelElement);this._element.classList.add("monaco-text-button-with-short-label")}container.appendChild(this._element);this._register(Gesture.addTarget(this._element));[EventType.CLICK,EventType2.Tap].forEach((eventType=>{this._register(addDisposableListener(this._element,eventType,(e=>{if(!this.enabled){EventHelper.stop(e);return}this._onDidClick.fire(e)})))}));this._register(addDisposableListener(this._element,EventType.KEY_DOWN,(e=>{const event=new StandardKeyboardEvent(e);let eventHandled=false;if(this.enabled&&(event.equals(3)||event.equals(10))){this._onDidClick.fire(e);eventHandled=true}else if(event.equals(9)){this._element.blur();eventHandled=true}if(eventHandled){EventHelper.stop(event,true)}})));this._register(addDisposableListener(this._element,EventType.MOUSE_OVER,(e=>{if(!this._element.classList.contains("disabled")){this.updateBackground(true)}})));this._register(addDisposableListener(this._element,EventType.MOUSE_OUT,(e=>{this.updateBackground(false)})));this.focusTracker=this._register(trackFocus(this._element));this._register(this.focusTracker.onDidFocus((()=>{if(this.enabled){this.updateBackground(true)}})));this._register(this.focusTracker.onDidBlur((()=>{if(this.enabled){this.updateBackground(false)}})))}dispose(){super.dispose();this._element.remove()}getContentElements(content){const elements=[];for(let segment of renderLabelWithIcons(content)){if(typeof segment==="string"){segment=segment.trim();if(segment===""){continue}const node=document.createElement("span");node.textContent=segment;elements.push(node)}else{elements.push(segment)}}return elements}updateBackground(hover){let background;if(this.options.secondary){background=hover?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground}else{background=hover?this.options.buttonHoverBackground:this.options.buttonBackground}if(background){this._element.style.backgroundColor=background}}get element(){return this._element}set label(value){var _a6;if(this._label===value){return}if(isMarkdownString(this._label)&&isMarkdownString(value)&&markdownStringEqual(this._label,value)){return}this._element.classList.add("monaco-text-button");const labelElement=this.options.supportShortLabel?this._labelElement:this._element;if(isMarkdownString(value)){const rendered=renderMarkdown(value,{inline:true});rendered.dispose();const root=(_a6=rendered.element.querySelector("p"))===null||_a6===void 0?void 0:_a6.innerHTML;if(root){const sanitized=sanitize2(root,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:true});labelElement.innerHTML=sanitized}else{reset(labelElement)}}else{if(this.options.supportIcons){reset(labelElement,...this.getContentElements(value))}else{labelElement.textContent=value}}if(typeof this.options.title==="string"){this._element.title=this.options.title}else if(this.options.title){this._element.title=renderStringAsPlaintext(value)}this._label=value}get label(){return this._label}set enabled(value){if(value){this._element.classList.remove("disabled");this._element.setAttribute("aria-disabled",String(false));this._element.tabIndex=0}else{this._element.classList.add("disabled");this._element.setAttribute("aria-disabled",String(true))}}get enabled(){return!this._element.classList.contains("disabled")}}}});var init_42=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css"(){}});var CountBadge;var init_countBadge=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.js"(){init_dom();init_strings();init_42();CountBadge=class{constructor(container,options2,styles){this.options=options2;this.styles=styles;this.count=0;this.element=append(container,$(".monaco-count-badge"));this.countFormat=this.options.countFormat||"{0}";this.titleFormat=this.options.titleFormat||"";this.setCount(this.options.count||0)}setCount(count){this.count=count;this.render()}setTitleFormat(titleFormat){this.titleFormat=titleFormat;this.render()}render(){var _a6,_b3;this.element.textContent=format(this.countFormat,this.count);this.element.title=format(this.titleFormat,this.count);this.element.style.backgroundColor=(_a6=this.styles.badgeBackground)!==null&&_a6!==void 0?_a6:"";this.element.style.color=(_b3=this.styles.badgeForeground)!==null&&_b3!==void 0?_b3:"";if(this.styles.badgeBorder){this.element.style.border=`1px solid ${this.styles.badgeBorder}`}}}}});var init_43=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css"(){}});var CSS_DONE,CSS_ACTIVE,CSS_INFINITE,CSS_INFINITE_LONG_RUNNING,CSS_DISCRETE,ProgressBar;var init_progressbar=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.js"(){init_dom();init_async();init_lifecycle();init_43();CSS_DONE="done";CSS_ACTIVE="active";CSS_INFINITE="infinite";CSS_INFINITE_LONG_RUNNING="infinite-long-running";CSS_DISCRETE="discrete";ProgressBar=class extends Disposable{constructor(container,options2){super();this.workedVal=0;this.showDelayedScheduler=this._register(new RunOnceScheduler((()=>show(this.element)),0));this.longRunningScheduler=this._register(new RunOnceScheduler((()=>this.infiniteLongRunning()),ProgressBar.LONG_RUNNING_INFINITE_THRESHOLD));this.create(container,options2)}create(container,options2){this.element=document.createElement("div");this.element.classList.add("monaco-progress-container");this.element.setAttribute("role","progressbar");this.element.setAttribute("aria-valuemin","0");container.appendChild(this.element);this.bit=document.createElement("div");this.bit.classList.add("progress-bit");this.bit.style.backgroundColor=(options2===null||options2===void 0?void 0:options2.progressBarBackground)||"#0E70C0";this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit";this.bit.style.opacity="1";this.element.classList.remove(CSS_ACTIVE,CSS_INFINITE,CSS_INFINITE_LONG_RUNNING,CSS_DISCRETE);this.workedVal=0;this.totalWork=void 0;this.longRunningScheduler.cancel()}stop(){return this.doDone(false)}doDone(delayed){this.element.classList.add(CSS_DONE);if(!this.element.classList.contains(CSS_INFINITE)){this.bit.style.width="inherit";if(delayed){setTimeout((()=>this.off()),200)}else{this.off()}}else{this.bit.style.opacity="0";if(delayed){setTimeout((()=>this.off()),200)}else{this.off()}}return this}infinite(){this.bit.style.width="2%";this.bit.style.opacity="1";this.element.classList.remove(CSS_DISCRETE,CSS_DONE,CSS_INFINITE_LONG_RUNNING);this.element.classList.add(CSS_ACTIVE,CSS_INFINITE);this.longRunningScheduler.schedule();return this}infiniteLongRunning(){this.element.classList.add(CSS_INFINITE_LONG_RUNNING)}getContainer(){return this.element}};ProgressBar.LONG_RUNNING_INFINITE_THRESHOLD=1e4}});var init_44=__esm({"node_modules/monaco-editor/esm/vs/platform/quickinput/browser/media/quickInput.css"(){}});var $4,QuickInputBox;var init_quickInputBox=__esm({"node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInputBox.js"(){init_dom();init_keyboardEvent();init_mouseEvent();init_findInput();init_lifecycle();init_severity();init_44();$4=$;QuickInputBox=class extends Disposable{constructor(parent,inputBoxStyles,toggleStyles){super();this.parent=parent;this.onKeyDown=handler=>addDisposableListener(this.findInput.inputBox.inputElement,EventType.KEY_DOWN,(e=>{handler(new StandardKeyboardEvent(e))}));this.onMouseDown=handler=>addDisposableListener(this.findInput.inputBox.inputElement,EventType.MOUSE_DOWN,(e=>{handler(new StandardMouseEvent(e))}));this.onDidChange=handler=>this.findInput.onDidChange(handler);this.container=append(this.parent,$4(".quick-input-box"));this.findInput=this._register(new FindInput(this.container,void 0,{label:"",inputBoxStyles:inputBoxStyles,toggleStyles:toggleStyles}));const input=this.findInput.inputBox.inputElement;input.role="combobox";input.ariaHasPopup="menu";input.ariaAutoComplete="list";input.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(value){this.findInput.setValue(value)}select(range2=null){this.findInput.inputBox.select(range2)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(placeholder){this.findInput.inputBox.setPlaceHolder(placeholder)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(password){this.findInput.inputBox.inputElement.type=password?"password":"text"}set enabled(enabled){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!enabled)}set toggles(toggles){this.findInput.setAdditionalToggles(toggles)}setAttribute(name,value){this.findInput.inputBox.inputElement.setAttribute(name,value)}showDecoration(decoration2){if(decoration2===severity_default.Ignore){this.findInput.clearMessage()}else{this.findInput.showMessage({type:decoration2===severity_default.Info?1:decoration2===severity_default.Warning?2:3,content:""})}}stylesForType(decoration2){return this.findInput.inputBox.stylesForType(decoration2===severity_default.Info?1:decoration2===severity_default.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}}});var init_45=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconlabel.css"(){}});var HighlightedLabel;var init_highlightedLabel=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/highlightedlabel/highlightedLabel.js"(){init_dom();init_iconLabels2();init_objects();HighlightedLabel=class{constructor(container,options2){var _a6;this.text="";this.title="";this.highlights=[];this.didEverRender=false;this.supportIcons=(_a6=options2===null||options2===void 0?void 0:options2.supportIcons)!==null&&_a6!==void 0?_a6:false;this.domNode=append(container,$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(text2,highlights=[],title="",escapeNewLines){if(!text2){text2=""}if(escapeNewLines){text2=HighlightedLabel.escapeNewLines(text2,highlights)}if(this.didEverRender&&this.text===text2&&this.title===title&&equals2(this.highlights,highlights)){return}this.text=text2;this.title=title;this.highlights=highlights;this.render()}render(){const children=[];let pos=0;for(const highlight of this.highlights){if(highlight.end===highlight.start){continue}if(pos{extra=match2==="\r\n"?-1:0;offset+=total;for(const highlight of highlights){if(highlight.end<=offset){continue}if(highlight.start>=offset){highlight.start+=extra}if(highlight.end>=offset){highlight.end+=extra}}total+=extra;return"⏎"}))}}}});function splitMatches(labels,separator,matches){if(!matches){return void 0}let labelStart=0;return labels.map((label=>{const labelRange={start:labelStart,end:labelStart+label.length};const result=matches.map((match2=>Range2.intersect(labelRange,match2))).filter((range2=>!Range2.isEmpty(range2))).map((({start:start,end:end})=>({start:start-labelStart,end:end-labelStart})));labelStart=labelRange.end+separator.length;return result}))}var FastLabelNode,IconLabel,Label,LabelWithHighlights;var init_iconLabel=__esm({"node_modules/monaco-editor/esm/vs/base/browser/ui/iconLabel/iconLabel.js"(){init_45();init_dom();init_highlightedLabel();init_iconLabelHover();init_lifecycle();init_objects();init_range2();FastLabelNode=class{constructor(_element){this._element=_element}get element(){return this._element}set textContent(content){if(this.disposed||content===this._textContent){return}this._textContent=content;this._element.textContent=content}set className(className){if(this.disposed||className===this._className){return}this._className=className;this._element.className=className}set empty(empty2){if(this.disposed||empty2===this._empty){return}this._empty=empty2;this._element.style.marginLeft=empty2?"0":""}dispose(){this.disposed=true}};IconLabel=class extends Disposable{constructor(container,options2){super();this.customHovers=new Map;this.creationOptions=options2;this.domNode=this._register(new FastLabelNode(append(container,$(".monaco-icon-label"))));this.labelContainer=append(this.domNode.element,$(".monaco-icon-label-container"));const nameContainer=append(this.labelContainer,$("span.monaco-icon-name-container"));if((options2===null||options2===void 0?void 0:options2.supportHighlights)||(options2===null||options2===void 0?void 0:options2.supportIcons)){this.nameNode=new LabelWithHighlights(nameContainer,!!options2.supportIcons)}else{this.nameNode=new Label(nameContainer)}this.hoverDelegate=options2===null||options2===void 0?void 0:options2.hoverDelegate}get element(){return this.domNode.element}setLabel(label,description,options2){const labelClasses=["monaco-icon-label"];const containerClasses=["monaco-icon-label-container"];let ariaLabel="";if(options2){if(options2.extraClasses){labelClasses.push(...options2.extraClasses)}if(options2.italic){labelClasses.push("italic")}if(options2.strikethrough){labelClasses.push("strikethrough")}if(options2.disabledCommand){containerClasses.push("disabled")}if(options2.title){ariaLabel+=options2.title}}this.domNode.className=labelClasses.join(" ");this.domNode.element.setAttribute("aria-label",ariaLabel);this.labelContainer.className=containerClasses.join(" ");this.setupHover((options2===null||options2===void 0?void 0:options2.descriptionTitle)?this.labelContainer:this.element,options2===null||options2===void 0?void 0:options2.title);this.nameNode.setLabel(label,options2);if(description||this.descriptionNode){const descriptionNode=this.getOrCreateDescriptionNode();if(descriptionNode instanceof HighlightedLabel){descriptionNode.set(description||"",options2?options2.descriptionMatches:void 0,void 0,options2===null||options2===void 0?void 0:options2.labelEscapeNewLines);this.setupHover(descriptionNode.element,options2===null||options2===void 0?void 0:options2.descriptionTitle)}else{descriptionNode.textContent=description&&(options2===null||options2===void 0?void 0:options2.labelEscapeNewLines)?HighlightedLabel.escapeNewLines(description,[]):description||"";this.setupHover(descriptionNode.element,(options2===null||options2===void 0?void 0:options2.descriptionTitle)||"");descriptionNode.empty=!description}}}setupHover(htmlElement,tooltip){const previousCustomHover=this.customHovers.get(htmlElement);if(previousCustomHover){previousCustomHover.dispose();this.customHovers.delete(htmlElement)}if(!tooltip){htmlElement.removeAttribute("title");return}if(!this.hoverDelegate){setupNativeHover(htmlElement,tooltip)}else{const hoverDisposable=setupCustomHover(this.hoverDelegate,htmlElement,tooltip);if(hoverDisposable){this.customHovers.set(htmlElement,hoverDisposable)}}}dispose(){super.dispose();for(const disposable of this.customHovers.values()){disposable.dispose()}this.customHovers.clear()}getOrCreateDescriptionNode(){var _a6;if(!this.descriptionNode){const descriptionContainer=this._register(new FastLabelNode(append(this.labelContainer,$("span.monaco-icon-description-container"))));if((_a6=this.creationOptions)===null||_a6===void 0?void 0:_a6.supportDescriptionHighlights){this.descriptionNode=new HighlightedLabel(append(descriptionContainer.element,$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons})}else{this.descriptionNode=this._register(new FastLabelNode(append(descriptionContainer.element,$("span.label-description"))))}}return this.descriptionNode}};Label=class{constructor(container){this.container=container;this.label=void 0;this.singleLabel=void 0}setLabel(label,options2){if(this.label===label&&equals2(this.options,options2)){return}this.label=label;this.options=options2;if(typeof label==="string"){if(!this.singleLabel){this.container.innerText="";this.container.classList.remove("multiple");this.singleLabel=append(this.container,$("a.label-name",{id:options2===null||options2===void 0?void 0:options2.domId}))}this.singleLabel.textContent=label}else{this.container.innerText="";this.container.classList.add("multiple");this.singleLabel=void 0;for(let i=0;ielementBName.length){return 1}}return 0}var intlFileNameCollatorBaseNumeric,intlFileNameCollatorNumeric,intlFileNameCollatorNumericCaseInsensitive;var init_comparers=__esm({"node_modules/monaco-editor/esm/vs/base/common/comparers.js"(){init_lazy();intlFileNameCollatorBaseNumeric=new Lazy((()=>{const collator=new Intl.Collator(void 0,{numeric:true,sensitivity:"base"});return{collator:collator,collatorIsNumeric:collator.resolvedOptions().numeric}}));intlFileNameCollatorNumeric=new Lazy((()=>{const collator=new Intl.Collator(void 0,{numeric:true});return{collator:collator}}));intlFileNameCollatorNumericCaseInsensitive=new Lazy((()=>{const collator=new Intl.Collator(void 0,{numeric:true,sensitivity:"accent"});return{collator:collator}}))}});function parseLinkedText(text2){const result=[];let index=0;let match2;while(match2=LINK_REGEX.exec(text2)){if(match2.index-index>0){result.push(text2.substring(index,match2.index))}const[,label,href,,title]=match2;if(title){result.push({label:label,href:href,title:title})}else{result.push({label:label,href:href})}index=match2.index+match2[0].length}if(index=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r};LinkedText=class{constructor(nodes){this.nodes=nodes}toString(){return this.nodes.map((node=>typeof node==="string"?node:node.label)).join("")}};__decorate36([memoize],LinkedText.prototype,"toString",null);LINK_REGEX=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi}});function getIconClass(iconPath){if(!iconPath){return void 0}let iconClass;const key=iconPath.dark.toString();if(iconPathToClass[key]){iconClass=iconPathToClass[key]}else{iconClass=iconClassGenerator.nextId();createCSSRule(`.${iconClass}, .hc-light .${iconClass}`,`background-image: ${asCSSUrl(iconPath.light||iconPath.dark)}`);createCSSRule(`.vs-dark .${iconClass}, .hc-black .${iconClass}`,`background-image: ${asCSSUrl(iconPath.dark)}`);iconPathToClass[key]=iconClass}return iconClass}function renderQuickInputDescription(description,container,actionHandler){reset(container);const parsed=parseLinkedText(description);let tabIndex=0;for(const node of parsed.nodes){if(typeof node==="string"){container.append(...renderLabelWithIcons(node))}else{let title=node.title;if(!title&&node.href.startsWith("command:")){title=localize("executeCommand","Click to execute command '{0}'",node.href.substring("command:".length))}else if(!title){title=node.href}const anchor=$("a",{href:node.href,title:title,tabIndex:tabIndex++},node.label);anchor.style.textDecoration="underline";const handleOpen=e=>{if(isEventLike(e)){EventHelper.stop(e,true)}actionHandler.callback(node.href)};const onClick=actionHandler.disposables.add(new DomEmitter(anchor,EventType.CLICK)).event;const onKeydown=actionHandler.disposables.add(new DomEmitter(anchor,EventType.KEY_DOWN)).event;const onSpaceOrEnter=actionHandler.disposables.add(Event.chain(onKeydown)).filter((e=>{const event=new StandardKeyboardEvent(e);return event.equals(10)||event.equals(3)})).event;actionHandler.disposables.add(Gesture.addTarget(anchor));const onTap=actionHandler.disposables.add(new DomEmitter(anchor,EventType2.Tap)).event;Event.any(onClick,onTap,onSpaceOrEnter)(handleOpen,null,actionHandler.disposables);container.appendChild(anchor)}}}var iconPathToClass,iconClassGenerator;var init_quickInputUtils=__esm({"node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInputUtils.js"(){init_dom();init_event2();init_event();init_keyboardEvent();init_touch();init_iconLabels2();init_idGenerator();init_linkedText();init_44();init_nls();iconPathToClass={};iconClassGenerator=new IdGenerator("quick-input-button-icon-")}});function matchesContiguousIconAware(query,target){const{text:text2,iconOffsets:iconOffsets}=target;if(!iconOffsets||iconOffsets.length===0){return matchesContiguous(query,text2)}const wordToMatchAgainstWithoutIconsTrimmed=ltrim(text2," ");const leadingWhitespaceOffset=text2.length-wordToMatchAgainstWithoutIconsTrimmed.length;const matches=matchesContiguous(query,wordToMatchAgainstWithoutIconsTrimmed);if(matches){for(const match2 of matches){const iconOffset=iconOffsets[match2.start+leadingWhitespaceOffset]+leadingWhitespaceOffset;match2.start+=iconOffset;match2.end+=iconOffset}}return matches}function matchesContiguous(word,wordToMatchAgainst){const matchIndex=wordToMatchAgainst.toLowerCase().indexOf(word.toLowerCase());if(matchIndex!==-1){return[{start:matchIndex,end:matchIndex+word.length}]}return null}function compareEntries(elementA,elementB,lookFor){const labelHighlightsA=elementA.labelHighlights||[];const labelHighlightsB=elementB.labelHighlights||[];if(labelHighlightsA.length&&!labelHighlightsB.length){return-1}if(!labelHighlightsA.length&&labelHighlightsB.length){return 1}if(labelHighlightsA.length===0&&labelHighlightsB.length===0){return 0}return compareAnything(elementA.saneSortLabel,elementB.saneSortLabel,lookFor)}var __decorate37,__awaiter24,$6,ListElement,ListElementRenderer,ListElementDelegate,QuickInputListFocus,QuickInputList,QuickInputAccessibilityProvider;var init_quickInputList=__esm({"node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInputList.js"(){init_dom();init_keyboardEvent();init_actionbar();init_iconLabel();init_keybindingLabel();init_arrays();init_async();init_comparers();init_decorators();init_errors();init_event();init_iconLabels();init_lifecycle();init_platform();init_strings();init_44();init_nls();init_quickInputUtils();init_lazy();init_uri();init_theme();__decorate37=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__awaiter24=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};$6=$;ListElement=class{constructor(mainItem,previous,index,hasCheckbox,fireButtonTriggered,fireSeparatorButtonTriggered,onCheckedEmitter){var _a6,_b3,_c2;this._checked=false;this._hidden=false;this.hasCheckbox=hasCheckbox;this.index=index;this.fireButtonTriggered=fireButtonTriggered;this.fireSeparatorButtonTriggered=fireSeparatorButtonTriggered;this._onChecked=onCheckedEmitter;this.onChecked=hasCheckbox?Event.map(Event.filter(this._onChecked.event,(e=>e.listElement===this)),(e=>e.checked)):Event.None;if(mainItem.type==="separator"){this._separator=mainItem}else{this.item=mainItem;if(previous&&previous.type==="separator"&&!previous.buttons){this._separator=previous}this.saneDescription=this.item.description;this.saneDetail=this.item.detail;this._labelHighlights=(_a6=this.item.highlights)===null||_a6===void 0?void 0:_a6.label;this._descriptionHighlights=(_b3=this.item.highlights)===null||_b3===void 0?void 0:_b3.description;this._detailHighlights=(_c2=this.item.highlights)===null||_c2===void 0?void 0:_c2.detail;this.saneTooltip=this.item.tooltip}this._init=new Lazy((()=>{var _a7;const saneLabel=(_a7=mainItem.label)!==null&&_a7!==void 0?_a7:"";const saneSortLabel=parseLabelWithIcons(saneLabel).text.trim();const saneAriaLabel=mainItem.ariaLabel||[saneLabel,this.saneDescription,this.saneDetail].map((s=>getCodiconAriaLabel(s))).filter((s=>!!s)).join(", ");return{saneLabel:saneLabel,saneSortLabel:saneSortLabel,saneAriaLabel:saneAriaLabel}}))}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(value){this._element=value}get hidden(){return this._hidden}set hidden(value){this._hidden=value}get checked(){return this._checked}set checked(value){if(value!==this._checked){this._checked=value;this._onChecked.fire({listElement:this,checked:value})}}get separator(){return this._separator}set separator(value){this._separator=value}get labelHighlights(){return this._labelHighlights}set labelHighlights(value){this._labelHighlights=value}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(value){this._descriptionHighlights=value}get detailHighlights(){return this._detailHighlights}set detailHighlights(value){this._detailHighlights=value}};ListElementRenderer=class{constructor(themeService){this.themeService=themeService}get templateId(){return ListElementRenderer.ID}renderTemplate(container){const data=Object.create(null);data.toDisposeElement=[];data.toDisposeTemplate=[];data.entry=append(container,$6(".quick-input-list-entry"));const label=append(data.entry,$6("label.quick-input-list-label"));data.toDisposeTemplate.push(addStandardDisposableListener(label,EventType.CLICK,(e=>{if(!data.checkbox.offsetParent){e.preventDefault()}})));data.checkbox=append(label,$6("input.quick-input-list-checkbox"));data.checkbox.type="checkbox";data.toDisposeTemplate.push(addStandardDisposableListener(data.checkbox,EventType.CHANGE,(e=>{data.element.checked=data.checkbox.checked})));const rows=append(label,$6(".quick-input-list-rows"));const row1=append(rows,$6(".quick-input-list-row"));const row2=append(rows,$6(".quick-input-list-row"));data.label=new IconLabel(row1,{supportHighlights:true,supportDescriptionHighlights:true,supportIcons:true});data.icon=prepend(data.label.element,$6(".quick-input-list-icon"));const keybindingContainer=append(row1,$6(".quick-input-list-entry-keybinding"));data.keybinding=new KeybindingLabel(keybindingContainer,OS);const detailContainer=append(row2,$6(".quick-input-list-label-meta"));data.detail=new IconLabel(detailContainer,{supportHighlights:true,supportIcons:true});data.separator=append(data.entry,$6(".quick-input-list-separator"));data.actionBar=new ActionBar(data.entry);data.actionBar.domNode.classList.add("quick-input-list-entry-action-bar");data.toDisposeTemplate.push(data.actionBar);return data}renderElement(element,index,data){var _a6,_b3,_c2,_d2;data.element=element;element.element=(_a6=data.entry)!==null&&_a6!==void 0?_a6:void 0;const mainItem=element.item?element.item:element.separator;data.checkbox.checked=element.checked;data.toDisposeElement.push(element.onChecked((checked=>data.checkbox.checked=checked)));const{labelHighlights:labelHighlights,descriptionHighlights:descriptionHighlights,detailHighlights:detailHighlights}=element;if((_b3=element.item)===null||_b3===void 0?void 0:_b3.iconPath){const icon=isDark(this.themeService.getColorTheme().type)?element.item.iconPath.dark:(_c2=element.item.iconPath.light)!==null&&_c2!==void 0?_c2:element.item.iconPath.dark;const iconUrl=URI.revive(icon);data.icon.className="quick-input-list-icon";data.icon.style.backgroundImage=asCSSUrl(iconUrl)}else{data.icon.style.backgroundImage="";data.icon.className=((_d2=element.item)===null||_d2===void 0?void 0:_d2.iconClass)?`quick-input-list-icon ${element.item.iconClass}`:""}const options2={matches:labelHighlights||[],descriptionTitle:element.saneDescription,descriptionMatches:descriptionHighlights||[],labelEscapeNewLines:true};if(mainItem.type!=="separator"){options2.extraClasses=mainItem.iconClasses;options2.italic=mainItem.italic;options2.strikethrough=mainItem.strikethrough;data.entry.classList.remove("quick-input-list-separator-as-item")}else{data.entry.classList.add("quick-input-list-separator-as-item")}data.label.setLabel(element.saneLabel,element.saneDescription,options2);data.keybinding.set(mainItem.type==="separator"?void 0:mainItem.keybinding);if(element.saneDetail){data.detail.element.style.display="";data.detail.setLabel(element.saneDetail,void 0,{matches:detailHighlights,title:element.saneDetail,labelEscapeNewLines:true})}else{data.detail.element.style.display="none"}if(element.item&&element.separator&&element.separator.label){data.separator.textContent=element.separator.label;data.separator.style.display=""}else{data.separator.style.display="none"}data.entry.classList.toggle("quick-input-list-separator-border",!!element.separator);const buttons=mainItem.buttons;if(buttons&&buttons.length){data.actionBar.push(buttons.map(((button,index2)=>{let cssClasses=button.iconClass||(button.iconPath?getIconClass(button.iconPath):void 0);if(button.alwaysVisible){cssClasses=cssClasses?`${cssClasses} always-visible`:"always-visible"}return{id:`id-${index2}`,class:cssClasses,enabled:true,label:"",tooltip:button.tooltip||"",run:()=>{mainItem.type!=="separator"?element.fireButtonTriggered({button:button,item:mainItem}):element.fireSeparatorButtonTriggered({button:button,separator:mainItem})}}})),{icon:true,label:false});data.entry.classList.add("has-actions")}else{data.entry.classList.remove("has-actions")}}disposeElement(element,index,data){data.toDisposeElement=dispose(data.toDisposeElement);data.actionBar.clear()}disposeTemplate(data){data.toDisposeElement=dispose(data.toDisposeElement);data.toDisposeTemplate=dispose(data.toDisposeTemplate)}};ListElementRenderer.ID="listelement";ListElementDelegate=class{getHeight(element){if(!element.item){return 24}return element.saneDetail?44:22}getTemplateId(element){return ListElementRenderer.ID}};(function(QuickInputListFocus2){QuickInputListFocus2[QuickInputListFocus2["First"]=1]="First";QuickInputListFocus2[QuickInputListFocus2["Second"]=2]="Second";QuickInputListFocus2[QuickInputListFocus2["Last"]=3]="Last";QuickInputListFocus2[QuickInputListFocus2["Next"]=4]="Next";QuickInputListFocus2[QuickInputListFocus2["Previous"]=5]="Previous";QuickInputListFocus2[QuickInputListFocus2["NextPage"]=6]="NextPage";QuickInputListFocus2[QuickInputListFocus2["PreviousPage"]=7]="PreviousPage"})(QuickInputListFocus||(QuickInputListFocus={}));QuickInputList=class{constructor(parent,id,options2,themeService){this.parent=parent;this.options=options2;this.inputElements=[];this.elements=[];this.elementsToIndexes=new Map;this.matchOnDescription=false;this.matchOnDetail=false;this.matchOnLabel=true;this.matchOnLabelMode="fuzzy";this.sortByLabel=true;this._onChangedAllVisibleChecked=new Emitter;this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event;this._onChangedCheckedCount=new Emitter;this.onChangedCheckedCount=this._onChangedCheckedCount.event;this._onChangedVisibleCount=new Emitter;this.onChangedVisibleCount=this._onChangedVisibleCount.event;this._onChangedCheckedElements=new Emitter;this.onChangedCheckedElements=this._onChangedCheckedElements.event;this._onButtonTriggered=new Emitter;this.onButtonTriggered=this._onButtonTriggered.event;this._onSeparatorButtonTriggered=new Emitter;this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event;this._onKeyDown=new Emitter;this.onKeyDown=this._onKeyDown.event;this._onLeave=new Emitter;this.onLeave=this._onLeave.event;this._listElementChecked=new Emitter;this._fireCheckedEvents=true;this.elementDisposables=[];this.disposables=[];this.id=id;this.container=append(this.parent,$6(".quick-input-list"));const delegate=new ListElementDelegate;const accessibilityProvider=new QuickInputAccessibilityProvider;this.list=options2.createList("QuickInput",this.container,delegate,[new ListElementRenderer(themeService)],{identityProvider:{getId:element=>{var _a6,_b3,_c2,_d2,_e2,_f2,_g2,_h2;return(_h2=(_f2=(_d2=(_b3=(_a6=element.item)===null||_a6===void 0?void 0:_a6.id)!==null&&_b3!==void 0?_b3:(_c2=element.item)===null||_c2===void 0?void 0:_c2.label)!==null&&_d2!==void 0?_d2:(_e2=element.separator)===null||_e2===void 0?void 0:_e2.id)!==null&&_f2!==void 0?_f2:(_g2=element.separator)===null||_g2===void 0?void 0:_g2.label)!==null&&_h2!==void 0?_h2:""}},setRowLineHeight:false,multipleSelectionSupport:false,horizontalScrolling:false,accessibilityProvider:accessibilityProvider});this.list.getHTMLElement().id=id;this.disposables.push(this.list);this.disposables.push(this.list.onKeyDown((e=>{const event=new StandardKeyboardEvent(e);switch(event.keyCode){case 10:this.toggleCheckbox();break;case 31:if(isMacintosh?e.metaKey:e.ctrlKey){this.list.setFocus(range(this.list.length))}break;case 16:{const focus1=this.list.getFocus();if(focus1.length===1&&focus1[0]===0){this._onLeave.fire()}break}case 18:{const focus2=this.list.getFocus();if(focus2.length===1&&focus2[0]===this.list.length-1){this._onLeave.fire()}break}}this._onKeyDown.fire(event)})));this.disposables.push(this.list.onMouseDown((e=>{if(e.browserEvent.button!==2){e.browserEvent.preventDefault()}})));this.disposables.push(addDisposableListener(this.container,EventType.CLICK,(e=>{if(e.x||e.y){this._onLeave.fire()}})));this.disposables.push(this.list.onMouseMiddleClick((e=>{this._onLeave.fire()})));this.disposables.push(this.list.onContextMenu((e=>{if(typeof e.index==="number"){e.browserEvent.preventDefault();this.list.setSelection([e.index])}})));if(options2.hoverDelegate){const delayer3=new ThrottledDelayer(options2.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver((e=>__awaiter24(this,void 0,void 0,(function*(){var _a6;if(e.browserEvent.target instanceof HTMLAnchorElement){delayer3.cancel();return}if(!(e.browserEvent.relatedTarget instanceof HTMLAnchorElement)&&isAncestor(e.browserEvent.relatedTarget,(_a6=e.element)===null||_a6===void 0?void 0:_a6.element)){return}try{yield delayer3.trigger((()=>__awaiter24(this,void 0,void 0,(function*(){if(e.element){this.showHover(e.element)}}))))}catch(e2){if(!isCancellationError(e2)){throw e2}}})))));this.disposables.push(this.list.onMouseOut((e=>{var _a6;if(isAncestor(e.browserEvent.relatedTarget,(_a6=e.element)===null||_a6===void 0?void 0:_a6.element)){return}delayer3.cancel()})));this.disposables.push(delayer3)}this.disposables.push(this._listElementChecked.event((_=>this.fireCheckedEvents())));this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return Event.map(this.list.onDidChangeFocus,(e=>e.elements.map((e2=>e2.item))))}get onDidChangeSelection(){return Event.map(this.list.onDidChangeSelection,(e=>({items:e.elements.map((e2=>e2.item)),event:e.browserEvent})))}get scrollTop(){return this.list.scrollTop}set scrollTop(scrollTop){this.list.scrollTop=scrollTop}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(label){this.list.getHTMLElement().ariaLabel=label}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,false)}allVisibleChecked(elements,whenNoneVisible=true){for(let i=0,n=elements.length;i{if(!element.hidden){element.checked=checked}}))}finally{this._fireCheckedEvents=true;this.fireCheckedEvents()}}setElements(inputElements){this.elementDisposables=dispose(this.elementDisposables);const fireButtonTriggered=event=>this.fireButtonTriggered(event);const fireSeparatorButtonTriggered=event=>this.fireSeparatorButtonTriggered(event);this.inputElements=inputElements;const elementsToIndexes=new Map;const hasCheckbox=this.parent.classList.contains("show-checkboxes");this.elements=inputElements.reduce(((result,item,index)=>{var _a6;const previous=index>0?inputElements[index-1]:void 0;if(item.type==="separator"){if(!item.buttons){return result}}const element=new ListElement(item,previous,index,hasCheckbox,fireButtonTriggered,fireSeparatorButtonTriggered,this._listElementChecked);const resultIndex=result.length;result.push(element);elementsToIndexes.set((_a6=element.item)!==null&&_a6!==void 0?_a6:element.separator,resultIndex);return result}),[]);this.elementsToIndexes=elementsToIndexes;this.list.splice(0,this.list.length);this.list.splice(0,this.list.length,this.elements);this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map((e=>e.item))}setFocusedElements(items){this.list.setFocus(items.filter((item=>this.elementsToIndexes.has(item))).map((item=>this.elementsToIndexes.get(item))));if(items.length>0){const focused=this.list.getFocus()[0];if(typeof focused==="number"){this.list.reveal(focused)}}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(items){this.list.setSelection(items.filter((item=>this.elementsToIndexes.has(item))).map((item=>this.elementsToIndexes.get(item))))}getCheckedElements(){return this.elements.filter((e=>e.checked)).map((e=>e.item)).filter((e=>!!e))}setCheckedElements(items){try{this._fireCheckedEvents=false;const checked=new Set;for(const item of items){checked.add(item)}for(const element of this.elements){element.checked=checked.has(element.item)}}finally{this._fireCheckedEvents=true;this.fireCheckedEvents()}}set enabled(value){this.list.getHTMLElement().style.pointerEvents=value?"":"none"}focus(what){if(!this.list.length){return}if(what===QuickInputListFocus.Second&&this.list.length<2){what=QuickInputListFocus.First}switch(what){case QuickInputListFocus.First:this.list.scrollTop=0;this.list.focusFirst(void 0,(e=>!!e.item));break;case QuickInputListFocus.Second:this.list.scrollTop=0;this.list.focusNth(1,void 0,(e=>!!e.item));break;case QuickInputListFocus.Last:this.list.scrollTop=this.list.scrollHeight;this.list.focusLast(void 0,(e=>!!e.item));break;case QuickInputListFocus.Next:{this.list.focusNext(void 0,true,void 0,(e=>!!e.item));const index=this.list.getFocus()[0];if(index!==0&&!this.elements[index-1].item&&this.list.firstVisibleIndex>index-1){this.list.reveal(index-1)}break}case QuickInputListFocus.Previous:{this.list.focusPrevious(void 0,true,void 0,(e=>!!e.item));const index=this.list.getFocus()[0];if(index!==0&&!this.elements[index-1].item&&this.list.firstVisibleIndex>index-1){this.list.reveal(index-1)}break}case QuickInputListFocus.NextPage:this.list.focusNextPage(void 0,(e=>!!e.item));break;case QuickInputListFocus.PreviousPage:this.list.focusPreviousPage(void 0,(e=>!!e.item));break}const focused=this.list.getFocus()[0];if(typeof focused==="number"){this.list.reveal(focused)}}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(element){var _a6,_b3,_c2;if(this.options.hoverDelegate===void 0){return}if(this._lastHover&&!this._lastHover.isDisposed){(_b3=(_a6=this.options.hoverDelegate).onDidHideHover)===null||_b3===void 0?void 0:_b3.call(_a6);(_c2=this._lastHover)===null||_c2===void 0?void 0:_c2.dispose()}if(!element.element||!element.saneTooltip){return}this._lastHover=this.options.hoverDelegate.showHover({content:element.saneTooltip,target:element.element,linkHandler:url=>{this.options.linkOpenerDelegate(url)},showPointer:true,container:this.container,hoverPosition:1},false)}layout(maxHeight){this.list.getHTMLElement().style.maxHeight=maxHeight?`${Math.floor(maxHeight/44)*44+6}px`:"";this.list.layout()}filter(query){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){this.list.layout();return false}const queryWithWhitespace=query;query=query.trim();if(!query||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){this.elements.forEach((element=>{element.labelHighlights=void 0;element.descriptionHighlights=void 0;element.detailHighlights=void 0;element.hidden=false;const previous=element.index&&this.inputElements[element.index-1];if(element.item){element.separator=previous&&previous.type==="separator"&&!previous.buttons?previous:void 0}}))}else{let currentSeparator;this.elements.forEach((element=>{var _a6,_b3,_c2,_d2;let labelHighlights;if(this.matchOnLabelMode==="fuzzy"){labelHighlights=this.matchOnLabel?(_a6=matchesFuzzyIconAware(query,parseLabelWithIcons(element.saneLabel)))!==null&&_a6!==void 0?_a6:void 0:void 0}else{labelHighlights=this.matchOnLabel?(_b3=matchesContiguousIconAware(queryWithWhitespace,parseLabelWithIcons(element.saneLabel)))!==null&&_b3!==void 0?_b3:void 0:void 0}const descriptionHighlights=this.matchOnDescription?(_c2=matchesFuzzyIconAware(query,parseLabelWithIcons(element.saneDescription||"")))!==null&&_c2!==void 0?_c2:void 0:void 0;const detailHighlights=this.matchOnDetail?(_d2=matchesFuzzyIconAware(query,parseLabelWithIcons(element.saneDetail||"")))!==null&&_d2!==void 0?_d2:void 0:void 0;if(labelHighlights||descriptionHighlights||detailHighlights){element.labelHighlights=labelHighlights;element.descriptionHighlights=descriptionHighlights;element.detailHighlights=detailHighlights;element.hidden=false}else{element.labelHighlights=void 0;element.descriptionHighlights=void 0;element.detailHighlights=void 0;element.hidden=element.item?!element.item.alwaysShow:true}if(element.item){element.separator=void 0}else if(element.separator){element.hidden=true}if(!this.sortByLabel){const previous=element.index&&this.inputElements[element.index-1];currentSeparator=previous&&previous.type==="separator"?previous:currentSeparator;if(currentSeparator&&!element.hidden){element.separator=currentSeparator;currentSeparator=void 0}}}))}const shownElements=this.elements.filter((element=>!element.hidden));if(this.sortByLabel&&query){const normalizedSearchValue=query.toLowerCase();shownElements.sort(((a,b)=>compareEntries(a,b,normalizedSearchValue)))}this.elementsToIndexes=shownElements.reduce(((map,element,index)=>{var _a6;map.set((_a6=element.item)!==null&&_a6!==void 0?_a6:element.separator,index);return map}),new Map);this.list.splice(0,this.list.length,shownElements);this.list.setFocus([]);this.list.layout();this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked());this._onChangedVisibleCount.fire(shownElements.length);return true}toggleCheckbox(){try{this._fireCheckedEvents=false;const elements=this.list.getFocusedElements();const allChecked=this.allVisibleChecked(elements);for(const element of elements){element.checked=!allChecked}}finally{this._fireCheckedEvents=true;this.fireCheckedEvents()}}display(display){this.container.style.display=display?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=dispose(this.elementDisposables);this.disposables=dispose(this.disposables)}fireCheckedEvents(){if(this._fireCheckedEvents){this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked());this._onChangedCheckedCount.fire(this.getCheckedCount());this._onChangedCheckedElements.fire(this.getCheckedElements())}}fireButtonTriggered(event){this._onButtonTriggered.fire(event)}fireSeparatorButtonTriggered(event){this._onSeparatorButtonTriggered.fire(event)}style(styles){this.list.style(styles)}toggleHover(){const element=this.list.getFocusedElements()[0];if(!(element===null||element===void 0?void 0:element.saneTooltip)){return}if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}const focused=this.list.getFocusedElements()[0];if(!focused){return}this.showHover(focused);const store=new DisposableStore;store.add(this.list.onDidChangeFocus((e=>{if(e.indexes.length){this.showHover(e.elements[0])}})));if(this._lastHover){store.add(this._lastHover)}this._toggleHover=store;this.elementDisposables.push(this._toggleHover)}};__decorate37([memoize],QuickInputList.prototype,"onDidChangeFocus",null);__decorate37([memoize],QuickInputList.prototype,"onDidChangeSelection",null);QuickInputAccessibilityProvider=class{getWidgetAriaLabel(){return localize("quickInput","Quick Input")}getAriaLabel(element){var _a6;return((_a6=element.separator)===null||_a6===void 0?void 0:_a6.label)?`${element.saneAriaLabel}, ${element.separator.label}`:element.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(element){return element.hasCheckbox?"checkbox":"option"}isChecked(element){if(!element.hasCheckbox){return void 0}return{value:element.checked,onDidChange:element.onChecked}}}}});var __awaiter25,backButton,QuickInput,QuickPick,InputBox2;var init_quickInput2=__esm({"node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInput.js"(){init_dom();init_keyboardEvent();init_toggle();init_actions();init_arrays();init_async();init_codicons();init_event();init_lifecycle();init_platform();init_severity();init_themables();init_44();init_nls();init_quickInput();init_quickInputList();init_quickInputUtils();__awaiter25=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};backButton={iconClass:ThemeIcon.asClassName(Codicon.quickInputBack),tooltip:localize("quickInput.back","Back"),handle:-1};QuickInput=class extends Disposable{constructor(ui){super();this.ui=ui;this._widgetUpdated=false;this.visible=false;this._enabled=true;this._busy=false;this._ignoreFocusOut=false;this._buttons=[];this.buttonsUpdated=false;this._toggles=[];this.togglesUpdated=false;this.noValidationMessage=QuickInput.noPromptMessage;this._severity=severity_default.Ignore;this.onDidTriggerButtonEmitter=this._register(new Emitter);this.onDidHideEmitter=this._register(new Emitter);this.onDisposeEmitter=this._register(new Emitter);this.visibleDisposables=this._register(new DisposableStore);this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(title){this._title=title;this.update()}get description(){return this._description}set description(description){this._description=description;this.update()}get step(){return this._steps}set step(step){this._steps=step;this.update()}get totalSteps(){return this._totalSteps}set totalSteps(totalSteps){this._totalSteps=totalSteps;this.update()}get enabled(){return this._enabled}set enabled(enabled){this._enabled=enabled;this.update()}get contextKey(){return this._contextKey}set contextKey(contextKey){this._contextKey=contextKey;this.update()}get busy(){return this._busy}set busy(busy){this._busy=busy;this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(ignoreFocusOut){const shouldUpdate=this._ignoreFocusOut!==ignoreFocusOut&&!isIOS;this._ignoreFocusOut=ignoreFocusOut&&!isIOS;if(shouldUpdate){this.update()}}get buttons(){return this._buttons}set buttons(buttons){this._buttons=buttons;this.buttonsUpdated=true;this.update()}get toggles(){return this._toggles}set toggles(toggles){this._toggles=toggles!==null&&toggles!==void 0?toggles:[];this.togglesUpdated=true;this.update()}get validationMessage(){return this._validationMessage}set validationMessage(validationMessage){this._validationMessage=validationMessage;this.update()}get severity(){return this._severity}set severity(severity){this._severity=severity;this.update()}show(){if(this.visible){return}this.visibleDisposables.add(this.ui.onDidTriggerButton((button=>{if(this.buttons.indexOf(button)!==-1){this.onDidTriggerButtonEmitter.fire(button)}})));this.ui.show(this);this.visible=true;this._lastValidationMessage=void 0;this._lastSeverity=void 0;if(this.buttons.length){this.buttonsUpdated=true}if(this.toggles.length){this.togglesUpdated=true}this.update()}hide(){if(!this.visible){return}this.ui.hide()}didHide(reason=QuickInputHideReason.Other){this.visible=false;this.visibleDisposables.clear();this.onDidHideEmitter.fire({reason:reason})}update(){var _a6,_b3;if(!this.visible){return}const title=this.getTitle();if(title&&this.ui.title.textContent!==title){this.ui.title.textContent=title}else if(!title&&this.ui.title.innerHTML!==" "){this.ui.title.innerText=" "}const description=this.getDescription();if(this.ui.description1.textContent!==description){this.ui.description1.textContent=description}if(this.ui.description2.textContent!==description){this.ui.description2.textContent=description}if(this._widgetUpdated){this._widgetUpdated=false;if(this._widget){reset(this.ui.widget,this._widget)}else{reset(this.ui.widget)}}if(this.busy&&!this.busyDelay){this.busyDelay=new TimeoutTimer;this.busyDelay.setIfNotSet((()=>{if(this.visible){this.ui.progressBar.infinite()}}),800)}if(!this.busy&&this.busyDelay){this.ui.progressBar.stop();this.busyDelay.cancel();this.busyDelay=void 0}if(this.buttonsUpdated){this.buttonsUpdated=false;this.ui.leftActionBar.clear();const leftButtons=this.buttons.filter((button=>button===backButton));this.ui.leftActionBar.push(leftButtons.map(((button,index)=>{const action=new Action(`id-${index}`,"",button.iconClass||getIconClass(button.iconPath),true,(()=>__awaiter25(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(button)}))));action.tooltip=button.tooltip||"";return action})),{icon:true,label:false});this.ui.rightActionBar.clear();const rightButtons=this.buttons.filter((button=>button!==backButton));this.ui.rightActionBar.push(rightButtons.map(((button,index)=>{const action=new Action(`id-${index}`,"",button.iconClass||getIconClass(button.iconPath),true,(()=>__awaiter25(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(button)}))));action.tooltip=button.tooltip||"";return action})),{icon:true,label:false})}if(this.togglesUpdated){this.togglesUpdated=false;const concreteToggles=(_b3=(_a6=this.toggles)===null||_a6===void 0?void 0:_a6.filter((opts=>opts instanceof Toggle)))!==null&&_b3!==void 0?_b3:[];this.ui.inputBox.toggles=concreteToggles}this.ui.ignoreFocusOut=this.ignoreFocusOut;this.ui.setEnabled(this.enabled);this.ui.setContextKey(this.contextKey);const validationMessage=this.validationMessage||this.noValidationMessage;if(this._lastValidationMessage!==validationMessage){this._lastValidationMessage=validationMessage;reset(this.ui.message);renderQuickInputDescription(validationMessage,this.ui.message,{callback:content=>{this.ui.linkOpenerDelegate(content)},disposables:this.visibleDisposables})}if(this._lastSeverity!==this.severity){this._lastSeverity=this.severity;this.showMessageDecoration(this.severity)}}getTitle(){if(this.title&&this.step){return`${this.title} (${this.getSteps()})`}if(this.title){return this.title}if(this.step){return this.getSteps()}return""}getDescription(){return this.description||""}getSteps(){if(this.step&&this.totalSteps){return localize("quickInput.steps","{0}/{1}",this.step,this.totalSteps)}if(this.step){return String(this.step)}return""}showMessageDecoration(severity){this.ui.inputBox.showDecoration(severity);if(severity!==severity_default.Ignore){const styles=this.ui.inputBox.stylesForType(severity);this.ui.message.style.color=styles.foreground?`${styles.foreground}`:"";this.ui.message.style.backgroundColor=styles.background?`${styles.background}`:"";this.ui.message.style.border=styles.border?`1px solid ${styles.border}`:"";this.ui.message.style.marginBottom="-2px"}else{this.ui.message.style.color="";this.ui.message.style.backgroundColor="";this.ui.message.style.border="";this.ui.message.style.marginBottom=""}}dispose(){this.hide();this.onDisposeEmitter.fire();super.dispose()}};QuickInput.noPromptMessage=localize("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");QuickPick=class extends QuickInput{constructor(){super(...arguments);this._value="";this.onDidChangeValueEmitter=this._register(new Emitter);this.onWillAcceptEmitter=this._register(new Emitter);this.onDidAcceptEmitter=this._register(new Emitter);this.onDidCustomEmitter=this._register(new Emitter);this._items=[];this.itemsUpdated=false;this._canSelectMany=false;this._canAcceptInBackground=false;this._matchOnDescription=false;this._matchOnDetail=false;this._matchOnLabel=true;this._matchOnLabelMode="fuzzy";this._sortByLabel=true;this._autoFocusOnList=true;this._keepScrollPosition=false;this._itemActivation=ItemActivation.FIRST;this._activeItems=[];this.activeItemsUpdated=false;this.activeItemsToConfirm=[];this.onDidChangeActiveEmitter=this._register(new Emitter);this._selectedItems=[];this.selectedItemsUpdated=false;this.selectedItemsToConfirm=[];this.onDidChangeSelectionEmitter=this._register(new Emitter);this.onDidTriggerItemButtonEmitter=this._register(new Emitter);this.onDidTriggerSeparatorButtonEmitter=this._register(new Emitter);this.valueSelectionUpdated=true;this._ok="default";this._customButton=false;this.filterValue=value=>value;this.onDidChangeValue=this.onDidChangeValueEmitter.event;this.onWillAccept=this.onWillAcceptEmitter.event;this.onDidAccept=this.onDidAcceptEmitter.event;this.onDidChangeActive=this.onDidChangeActiveEmitter.event;this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event;this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event;this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(quickNavigate){this._quickNavigate=quickNavigate;this.update()}get value(){return this._value}set value(value){this.doSetValue(value)}doSetValue(value,skipUpdate){if(this._value!==value){this._value=value;if(!skipUpdate){this.update()}if(this.visible){const didFilter=this.ui.list.filter(this.filterValue(this._value));if(didFilter){this.trySelectFirst()}}this.onDidChangeValueEmitter.fire(this._value)}}set ariaLabel(ariaLabel){this._ariaLabel=ariaLabel;this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(placeholder){this._placeholder=placeholder;this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(scrollTop){this.ui.list.scrollTop=scrollTop}set items(items){this._items=items;this.itemsUpdated=true;this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(canSelectMany){this._canSelectMany=canSelectMany;this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(canAcceptInBackground){this._canAcceptInBackground=canAcceptInBackground}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(matchOnDescription){this._matchOnDescription=matchOnDescription;this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(matchOnDetail){this._matchOnDetail=matchOnDetail;this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(matchOnLabel){this._matchOnLabel=matchOnLabel;this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(matchOnLabelMode){this._matchOnLabelMode=matchOnLabelMode;this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(sortByLabel){this._sortByLabel=sortByLabel;this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(autoFocusOnList){this._autoFocusOnList=autoFocusOnList;this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(keepScrollPosition){this._keepScrollPosition=keepScrollPosition}get itemActivation(){return this._itemActivation}set itemActivation(itemActivation){this._itemActivation=itemActivation}get activeItems(){return this._activeItems}set activeItems(activeItems){this._activeItems=activeItems;this.activeItemsUpdated=true;this.update()}get selectedItems(){return this._selectedItems}set selectedItems(selectedItems){this._selectedItems=selectedItems;this.selectedItemsUpdated=true;this.update()}get keyMods(){if(this._quickNavigate){return NO_KEY_MODS}return this.ui.keyMods}set valueSelection(valueSelection){this._valueSelection=valueSelection;this.valueSelectionUpdated=true;this.update()}get customButton(){return this._customButton}set customButton(showCustomButton){this._customButton=showCustomButton;this.update()}get customLabel(){return this._customButtonLabel}set customLabel(label){this._customButtonLabel=label;this.update()}get customHover(){return this._customButtonHover}set customHover(hover){this._customButtonHover=hover;this.update()}get ok(){return this._ok}set ok(showOkButton){this._ok=showOkButton;this.update()}get hideInput(){return!!this._hideInput}set hideInput(hideInput){this._hideInput=hideInput;this.update()}trySelectFirst(){if(this.autoFocusOnList){if(!this.canSelectMany){this.ui.list.focus(QuickInputListFocus.First)}}}show(){if(!this.visible){this.visibleDisposables.add(this.ui.inputBox.onDidChange((value=>{this.doSetValue(value,true)})));this.visibleDisposables.add(this.ui.inputBox.onMouseDown((event=>{if(!this.autoFocusOnList){this.ui.list.clearFocus()}})));this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown((event=>{switch(event.keyCode){case 18:this.ui.list.focus(QuickInputListFocus.Next);if(this.canSelectMany){this.ui.list.domFocus()}EventHelper.stop(event,true);break;case 16:if(this.ui.list.getFocusedElements().length){this.ui.list.focus(QuickInputListFocus.Previous)}else{this.ui.list.focus(QuickInputListFocus.Last)}if(this.canSelectMany){this.ui.list.domFocus()}EventHelper.stop(event,true);break;case 12:this.ui.list.focus(QuickInputListFocus.NextPage);if(this.canSelectMany){this.ui.list.domFocus()}EventHelper.stop(event,true);break;case 11:this.ui.list.focus(QuickInputListFocus.PreviousPage);if(this.canSelectMany){this.ui.list.domFocus()}EventHelper.stop(event,true);break;case 17:if(!this._canAcceptInBackground){return}if(!this.ui.inputBox.isSelectionAtEnd()){return}if(this.activeItems[0]){this._selectedItems=[this.activeItems[0]];this.onDidChangeSelectionEmitter.fire(this.selectedItems);this.handleAccept(true)}break;case 14:if((event.ctrlKey||event.metaKey)&&!event.shiftKey&&!event.altKey){this.ui.list.focus(QuickInputListFocus.First);EventHelper.stop(event,true)}break;case 13:if((event.ctrlKey||event.metaKey)&&!event.shiftKey&&!event.altKey){this.ui.list.focus(QuickInputListFocus.Last);EventHelper.stop(event,true)}break}})));this.visibleDisposables.add(this.ui.onDidAccept((()=>{if(this.canSelectMany){if(!this.ui.list.getCheckedElements().length){this._selectedItems=[];this.onDidChangeSelectionEmitter.fire(this.selectedItems)}}else if(this.activeItems[0]){this._selectedItems=[this.activeItems[0]];this.onDidChangeSelectionEmitter.fire(this.selectedItems)}this.handleAccept(false)})));this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()})));this.visibleDisposables.add(this.ui.list.onDidChangeFocus((focusedItems=>{if(this.activeItemsUpdated){return}if(this.activeItemsToConfirm!==this._activeItems&&equals(focusedItems,this._activeItems,((a,b)=>a===b))){return}this._activeItems=focusedItems;this.onDidChangeActiveEmitter.fire(focusedItems)})));this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:selectedItems,event:event})=>{if(this.canSelectMany){if(selectedItems.length){this.ui.list.setSelectedElements([])}return}if(this.selectedItemsToConfirm!==this._selectedItems&&equals(selectedItems,this._selectedItems,((a,b)=>a===b))){return}this._selectedItems=selectedItems;this.onDidChangeSelectionEmitter.fire(selectedItems);if(selectedItems.length){this.handleAccept(event instanceof MouseEvent&&event.button===1)}})));this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((checkedItems=>{if(!this.canSelectMany){return}if(this.selectedItemsToConfirm!==this._selectedItems&&equals(checkedItems,this._selectedItems,((a,b)=>a===b))){return}this._selectedItems=checkedItems;this.onDidChangeSelectionEmitter.fire(checkedItems)})));this.visibleDisposables.add(this.ui.list.onButtonTriggered((event=>this.onDidTriggerItemButtonEmitter.fire(event))));this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered((event=>this.onDidTriggerSeparatorButtonEmitter.fire(event))));this.visibleDisposables.add(this.registerQuickNavigation());this.valueSelectionUpdated=true}super.show()}handleAccept(inBackground){let veto=false;this.onWillAcceptEmitter.fire({veto:()=>veto=true});if(!veto){this.onDidAcceptEmitter.fire({inBackground:inBackground})}}registerQuickNavigation(){return addDisposableListener(this.ui.container,EventType.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate){return}const keyboardEvent=new StandardKeyboardEvent(e);const keyCode=keyboardEvent.keyCode;const quickNavKeys=this._quickNavigate.keybindings;const wasTriggerKeyPressed=quickNavKeys.some((k=>{const chords=k.getChords();if(chords.length>1){return false}if(chords[0].shiftKey&&keyCode===4){if(keyboardEvent.ctrlKey||keyboardEvent.altKey||keyboardEvent.metaKey){return false}return true}if(chords[0].altKey&&keyCode===6){return true}if(chords[0].ctrlKey&&keyCode===5){return true}if(chords[0].metaKey&&keyCode===57){return true}return false}));if(wasTriggerKeyPressed){if(this.activeItems[0]){this._selectedItems=[this.activeItems[0]];this.onDidChangeSelectionEmitter.fire(this.selectedItems);this.handleAccept(false)}this._quickNavigate=void 0}}))}update(){if(!this.visible){return}const scrollTopBefore=this.keepScrollPosition?this.scrollTop:0;const hasDescription=!!this.description;const visibilities={title:!!this.title||!!this.step||!!this.buttons.length,description:hasDescription,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||hasDescription,visibleCount:true,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:true,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(visibilities);super.update();if(this.ui.inputBox.value!==this.value){this.ui.inputBox.value=this.value}if(this.valueSelectionUpdated){this.valueSelectionUpdated=false;this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})}if(this.ui.inputBox.placeholder!==(this.placeholder||"")){this.ui.inputBox.placeholder=this.placeholder||""}let ariaLabel=this.ariaLabel;if(!ariaLabel&&visibilities.inputBox){ariaLabel=this.placeholder||QuickPick.DEFAULT_ARIA_LABEL;if(this.title){ariaLabel+=` - ${this.title}`}}if(this.ui.list.ariaLabel!==ariaLabel){this.ui.list.ariaLabel=ariaLabel!==null&&ariaLabel!==void 0?ariaLabel:null}this.ui.list.matchOnDescription=this.matchOnDescription;this.ui.list.matchOnDetail=this.matchOnDetail;this.ui.list.matchOnLabel=this.matchOnLabel;this.ui.list.matchOnLabelMode=this.matchOnLabelMode;this.ui.list.sortByLabel=this.sortByLabel;if(this.itemsUpdated){this.itemsUpdated=false;this.ui.list.setElements(this.items);this.ui.list.filter(this.filterValue(this.ui.inputBox.value));this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked();this.ui.visibleCount.setCount(this.ui.list.getVisibleCount());this.ui.count.setCount(this.ui.list.getCheckedCount());switch(this._itemActivation){case ItemActivation.NONE:this._itemActivation=ItemActivation.FIRST;break;case ItemActivation.SECOND:this.ui.list.focus(QuickInputListFocus.Second);this._itemActivation=ItemActivation.FIRST;break;case ItemActivation.LAST:this.ui.list.focus(QuickInputListFocus.Last);this._itemActivation=ItemActivation.FIRST;break;default:this.trySelectFirst();break}}if(this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany){if(this.canSelectMany){this.ui.list.clearFocus()}else{this.trySelectFirst()}}if(this.activeItemsUpdated){this.activeItemsUpdated=false;this.activeItemsToConfirm=this._activeItems;this.ui.list.setFocusedElements(this.activeItems);if(this.activeItemsToConfirm===this._activeItems){this.activeItemsToConfirm=null}}if(this.selectedItemsUpdated){this.selectedItemsUpdated=false;this.selectedItemsToConfirm=this._selectedItems;if(this.canSelectMany){this.ui.list.setCheckedElements(this.selectedItems)}else{this.ui.list.setSelectedElements(this.selectedItems)}if(this.selectedItemsToConfirm===this._selectedItems){this.selectedItemsToConfirm=null}}this.ui.customButton.label=this.customLabel||"";this.ui.customButton.element.title=this.customHover||"";if(!visibilities.inputBox){this.ui.list.domFocus();if(this.canSelectMany){this.ui.list.focus(QuickInputListFocus.First)}}if(this.keepScrollPosition){this.scrollTop=scrollTopBefore}}};QuickPick.DEFAULT_ARIA_LABEL=localize("quickInputBox.ariaLabel","Type to narrow down results.");InputBox2=class extends QuickInput{constructor(){super(...arguments);this._value="";this.valueSelectionUpdated=true;this._password=false;this.onDidValueChangeEmitter=this._register(new Emitter);this.onDidAcceptEmitter=this._register(new Emitter);this.onDidChangeValue=this.onDidValueChangeEmitter.event;this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(value){this._value=value||"";this.update()}get placeholder(){return this._placeholder}set placeholder(placeholder){this._placeholder=placeholder;this.update()}get password(){return this._password}set password(password){this._password=password;this.update()}show(){if(!this.visible){this.visibleDisposables.add(this.ui.inputBox.onDidChange((value=>{if(value===this.value){return}this._value=value;this.onDidValueChangeEmitter.fire(value)})));this.visibleDisposables.add(this.ui.onDidAccept((()=>this.onDidAcceptEmitter.fire())));this.valueSelectionUpdated=true}super.show()}update(){if(!this.visible){return}this.ui.container.classList.remove("hidden-input");const visibilities={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:true,message:true,progressBar:true};this.ui.setVisibilities(visibilities);super.update();if(this.ui.inputBox.value!==this.value){this.ui.inputBox.value=this.value}if(this.valueSelectionUpdated){this.valueSelectionUpdated=false;this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})}if(this.ui.inputBox.placeholder!==(this.placeholder||"")){this.ui.inputBox.placeholder=this.placeholder||""}if(this.ui.inputBox.password!==this.password){this.ui.inputBox.password=this.password}}}}});var $7,QuickInputController;var init_quickInputController=__esm({"node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInputController.js"(){init_dom();init_actionbar();init_button();init_countBadge();init_progressbar();init_cancellation();init_event();init_lifecycle();init_severity();init_nls();init_quickInput();init_quickInputBox();init_quickInputList();init_quickInput2();$7=$;QuickInputController=class extends Disposable{constructor(options2,themeService){super();this.options=options2;this.themeService=themeService;this.enabled=true;this.onDidAcceptEmitter=this._register(new Emitter);this.onDidCustomEmitter=this._register(new Emitter);this.onDidTriggerButtonEmitter=this._register(new Emitter);this.keyMods={ctrlCmd:false,alt:false};this.controller=null;this.onShowEmitter=this._register(new Emitter);this.onShow=this.onShowEmitter.event;this.onHideEmitter=this._register(new Emitter);this.onHide=this.onHideEmitter.event;this.idPrefix=options2.idPrefix;this.parentElement=options2.container;this.styles=options2.styles;this.registerKeyModsListeners()}registerKeyModsListeners(){const listener=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey;this.keyMods.alt=e.altKey};this._register(addDisposableListener(window,EventType.KEY_DOWN,listener,true));this._register(addDisposableListener(window,EventType.KEY_UP,listener,true));this._register(addDisposableListener(window,EventType.MOUSE_DOWN,listener,true))}getUI(){if(this.ui){return this.ui}const container=append(this.parentElement,$7(".quick-input-widget.show-file-icons"));container.tabIndex=-1;container.style.display="none";const styleSheet=createStyleSheet(container);const titleBar=append(container,$7(".quick-input-titlebar"));const actionBarOption=this.options.hoverDelegate?{hoverDelegate:this.options.hoverDelegate}:void 0;const leftActionBar=this._register(new ActionBar(titleBar,actionBarOption));leftActionBar.domNode.classList.add("quick-input-left-action-bar");const title=append(titleBar,$7(".quick-input-title"));const rightActionBar=this._register(new ActionBar(titleBar,actionBarOption));rightActionBar.domNode.classList.add("quick-input-right-action-bar");const headerContainer=append(container,$7(".quick-input-header"));const checkAll=append(headerContainer,$7("input.quick-input-check-all"));checkAll.type="checkbox";checkAll.setAttribute("aria-label",localize("quickInput.checkAll","Toggle all checkboxes"));this._register(addStandardDisposableListener(checkAll,EventType.CHANGE,(e=>{const checked=checkAll.checked;list.setAllVisibleChecked(checked)})));this._register(addDisposableListener(checkAll,EventType.CLICK,(e=>{if(e.x||e.y){inputBox.setFocus()}})));const description2=append(headerContainer,$7(".quick-input-description"));const inputContainer=append(headerContainer,$7(".quick-input-and-message"));const filterContainer=append(inputContainer,$7(".quick-input-filter"));const inputBox=this._register(new QuickInputBox(filterContainer,this.styles.inputBox,this.styles.toggle));inputBox.setAttribute("aria-describedby",`${this.idPrefix}message`);const visibleCountContainer=append(filterContainer,$7(".quick-input-visible-count"));visibleCountContainer.setAttribute("aria-live","polite");visibleCountContainer.setAttribute("aria-atomic","true");const visibleCount=new CountBadge(visibleCountContainer,{countFormat: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")},this.styles.countBadge);const countContainer=append(filterContainer,$7(".quick-input-count"));countContainer.setAttribute("aria-live","polite");const count=new CountBadge(countContainer,{countFormat: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")},this.styles.countBadge);const okContainer=append(headerContainer,$7(".quick-input-action"));const ok2=new Button(okContainer,this.styles.button);ok2.label=localize("ok","OK");this._register(ok2.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const customButtonContainer=append(headerContainer,$7(".quick-input-action"));const customButton=new Button(customButtonContainer,this.styles.button);customButton.label=localize("custom","Custom");this._register(customButton.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const message=append(inputContainer,$7(`#${this.idPrefix}message.quick-input-message`));const progressBar=new ProgressBar(container,this.styles.progressBar);progressBar.getContainer().classList.add("quick-input-progress");const widget=append(container,$7(".quick-input-html-widget"));widget.tabIndex=-1;const description1=append(container,$7(".quick-input-description"));const listId=this.idPrefix+"list";const list=this._register(new QuickInputList(container,listId,this.options,this.themeService));inputBox.setAttribute("aria-controls",listId);this._register(list.onDidChangeFocus((()=>{var _a6;inputBox.setAttribute("aria-activedescendant",(_a6=list.getActiveDescendant())!==null&&_a6!==void 0?_a6:"")})));this._register(list.onChangedAllVisibleChecked((checked=>{checkAll.checked=checked})));this._register(list.onChangedVisibleCount((c=>{visibleCount.setCount(c)})));this._register(list.onChangedCheckedCount((c=>{count.setCount(c)})));this._register(list.onLeave((()=>{setTimeout((()=>{inputBox.setFocus();if(this.controller instanceof QuickPick&&this.controller.canSelectMany){list.clearFocus()}}),0)})));const focusTracker=trackFocus(container);this._register(focusTracker);this._register(addDisposableListener(container,EventType.FOCUS,(e=>{if(isAncestor(e.relatedTarget,container)){return}this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0}),true));this._register(focusTracker.onDidBlur((()=>{if(!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()){this.hide(QuickInputHideReason.Blur)}this.previousFocusElement=void 0})));this._register(addDisposableListener(container,EventType.FOCUS,(e=>{inputBox.setFocus()})));this._register(addStandardDisposableListener(container,EventType.KEY_DOWN,(event=>{if(isAncestor(event.target,widget)){return}switch(event.keyCode){case 3:EventHelper.stop(event,true);if(this.enabled){this.onDidAcceptEmitter.fire()}break;case 9:EventHelper.stop(event,true);this.hide(QuickInputHideReason.Gesture);break;case 2:if(!event.altKey&&!event.ctrlKey&&!event.metaKey){const selectors=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(container.classList.contains("show-checkboxes")){selectors.push("input")}else{selectors.push("input[type=text]")}if(this.getUI().list.isDisplayed()){selectors.push(".monaco-list")}if(this.getUI().message){selectors.push(".quick-input-message a")}if(this.getUI().widget){if(isAncestor(event.target,this.getUI().widget)){break}selectors.push(".quick-input-html-widget")}const stops=container.querySelectorAll(selectors.join(", "));if(event.shiftKey&&event.target===stops[0]){EventHelper.stop(event,true);list.clearFocus()}else if(!event.shiftKey&&isAncestor(event.target,stops[stops.length-1])){EventHelper.stop(event,true);stops[0].focus()}}break;case 10:if(event.ctrlKey){EventHelper.stop(event,true);this.getUI().list.toggleHover()}break}})));this.ui={container:container,styleSheet:styleSheet,leftActionBar:leftActionBar,titleBar:titleBar,title:title,description1:description1,description2:description2,widget:widget,rightActionBar:rightActionBar,checkAll:checkAll,inputContainer:inputContainer,filterContainer:filterContainer,inputBox:inputBox,visibleCountContainer:visibleCountContainer,visibleCount:visibleCount,countContainer:countContainer,count:count,okContainer:okContainer,ok:ok2,message:message,customButtonContainer:customButtonContainer,customButton:customButton,list:list,progressBar:progressBar,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:false,keyMods:this.keyMods,show:controller=>this.show(controller),hide:()=>this.hide(),setVisibilities:visibilities=>this.setVisibilities(visibilities),setEnabled:enabled=>this.setEnabled(enabled),setContextKey:contextKey=>this.options.setContextKey(contextKey),linkOpenerDelegate:content=>this.options.linkOpenerDelegate(content)};this.updateStyles();return this.ui}pick(picks,options2={},token=CancellationToken.None){return new Promise(((doResolve,reject)=>{let resolve2=result=>{var _a6;resolve2=doResolve;(_a6=options2.onKeyMods)===null||_a6===void 0?void 0:_a6.call(options2,input.keyMods);doResolve(result)};if(token.isCancellationRequested){resolve2(void 0);return}const input=this.createQuickPick();let activeItem;const disposables=[input,input.onDidAccept((()=>{if(input.canSelectMany){resolve2(input.selectedItems.slice());input.hide()}else{const result=input.activeItems[0];if(result){resolve2(result);input.hide()}}})),input.onDidChangeActive((items=>{const focused=items[0];if(focused&&options2.onDidFocus){options2.onDidFocus(focused)}})),input.onDidChangeSelection((items=>{if(!input.canSelectMany){const result=items[0];if(result){resolve2(result);input.hide()}}})),input.onDidTriggerItemButton((event=>options2.onDidTriggerItemButton&&options2.onDidTriggerItemButton(Object.assign(Object.assign({},event),{removeItem:()=>{const index=input.items.indexOf(event.item);if(index!==-1){const items=input.items.slice();const removed=items.splice(index,1);const activeItems=input.activeItems.filter((activeItem2=>activeItem2!==removed[0]));const keepScrollPositionBefore=input.keepScrollPosition;input.keepScrollPosition=true;input.items=items;if(activeItems){input.activeItems=activeItems}input.keepScrollPosition=keepScrollPositionBefore}}})))),input.onDidTriggerSeparatorButton((event=>{var _a6;return(_a6=options2.onDidTriggerSeparatorButton)===null||_a6===void 0?void 0:_a6.call(options2,event)})),input.onDidChangeValue((value=>{if(activeItem&&!value&&(input.activeItems.length!==1||input.activeItems[0]!==activeItem)){input.activeItems=[activeItem]}})),token.onCancellationRequested((()=>{input.hide()})),input.onDidHide((()=>{dispose(disposables);resolve2(void 0)}))];input.title=options2.title;input.canSelectMany=!!options2.canPickMany;input.placeholder=options2.placeHolder;input.ignoreFocusOut=!!options2.ignoreFocusLost;input.matchOnDescription=!!options2.matchOnDescription;input.matchOnDetail=!!options2.matchOnDetail;input.matchOnLabel=options2.matchOnLabel===void 0||options2.matchOnLabel;input.autoFocusOnList=options2.autoFocusOnList===void 0||options2.autoFocusOnList;input.quickNavigate=options2.quickNavigate;input.hideInput=!!options2.hideInput;input.contextKey=options2.contextKey;input.busy=true;Promise.all([picks,options2.activeItem]).then((([items,_activeItem])=>{activeItem=_activeItem;input.busy=false;input.items=items;if(input.canSelectMany){input.selectedItems=items.filter((item=>item.type!=="separator"&&item.picked))}if(activeItem){input.activeItems=[activeItem]}}));input.show();Promise.resolve(picks).then(void 0,(err=>{reject(err);input.hide()}))}))}createQuickPick(){const ui=this.getUI();return new QuickPick(ui)}createInputBox(){const ui=this.getUI();return new InputBox2(ui)}show(controller){const ui=this.getUI();this.onShowEmitter.fire();const oldController=this.controller;this.controller=controller;oldController===null||oldController===void 0?void 0:oldController.didHide();this.setEnabled(true);ui.leftActionBar.clear();ui.title.textContent="";ui.description1.textContent="";ui.description2.textContent="";reset(ui.widget);ui.rightActionBar.clear();ui.checkAll.checked=false;ui.inputBox.placeholder="";ui.inputBox.password=false;ui.inputBox.showDecoration(severity_default.Ignore);ui.visibleCount.setCount(0);ui.count.setCount(0);reset(ui.message);ui.progressBar.stop();ui.list.setElements([]);ui.list.matchOnDescription=false;ui.list.matchOnDetail=false;ui.list.matchOnLabel=true;ui.list.sortByLabel=true;ui.ignoreFocusOut=false;ui.inputBox.toggles=void 0;const backKeybindingLabel=this.options.backKeybindingLabel();backButton.tooltip=backKeybindingLabel?localize("quickInput.backWithKeybinding","Back ({0})",backKeybindingLabel):localize("quickInput.back","Back");ui.container.style.display="";this.updateLayout();ui.inputBox.setFocus()}setVisibilities(visibilities){const ui=this.getUI();ui.title.style.display=visibilities.title?"":"none";ui.description1.style.display=visibilities.description&&(visibilities.inputBox||visibilities.checkAll)?"":"none";ui.description2.style.display=visibilities.description&&!(visibilities.inputBox||visibilities.checkAll)?"":"none";ui.checkAll.style.display=visibilities.checkAll?"":"none";ui.inputContainer.style.display=visibilities.inputBox?"":"none";ui.filterContainer.style.display=visibilities.inputBox?"":"none";ui.visibleCountContainer.style.display=visibilities.visibleCount?"":"none";ui.countContainer.style.display=visibilities.count?"":"none";ui.okContainer.style.display=visibilities.ok?"":"none";ui.customButtonContainer.style.display=visibilities.customButton?"":"none";ui.message.style.display=visibilities.message?"":"none";ui.progressBar.getContainer().style.display=visibilities.progressBar?"":"none";ui.list.display(!!visibilities.list);ui.container.classList.toggle("show-checkboxes",!!visibilities.checkBox);ui.container.classList.toggle("hidden-input",!visibilities.inputBox&&!visibilities.description);this.updateLayout()}setEnabled(enabled){if(enabled!==this.enabled){this.enabled=enabled;for(const item of this.getUI().leftActionBar.viewItems){item.action.enabled=enabled}for(const item of this.getUI().rightActionBar.viewItems){item.action.enabled=enabled}this.getUI().checkAll.disabled=!enabled;this.getUI().inputBox.enabled=enabled;this.getUI().ok.enabled=enabled;this.getUI().list.enabled=enabled}}hide(reason){var _a6,_b3,_c2;const controller=this.controller;if(!controller){return}const focusChanged=!isAncestor(document.activeElement,(_b3=(_a6=this.ui)===null||_a6===void 0?void 0:_a6.container)!==null&&_b3!==void 0?_b3:null);this.controller=null;this.onHideEmitter.fire();this.getUI().container.style.display="none";if(!focusChanged){let currentElement=this.previousFocusElement;while(currentElement&&!currentElement.offsetParent){currentElement=(_c2=currentElement.parentElement)!==null&&_c2!==void 0?_c2:void 0}if(currentElement===null||currentElement===void 0?void 0:currentElement.offsetParent){currentElement.focus();this.previousFocusElement=void 0}else{this.options.returnFocus()}}controller.didHide(reason)}layout(dimension,titleBarOffset){this.dimension=dimension;this.titleBarOffset=titleBarOffset;this.updateLayout()}updateLayout(){if(this.ui&&this.isDisplayed()){this.ui.container.style.top=`${this.titleBarOffset}px`;const style=this.ui.container.style;const width=Math.min(this.dimension.width*.62,QuickInputController.MAX_WIDTH);style.width=width+"px";style.marginLeft="-"+width/2+"px";this.ui.inputBox.layout();this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(styles){this.styles=styles;this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:quickInputTitleBackground2,quickInputBackground:quickInputBackground2,quickInputForeground:quickInputForeground2,widgetBorder:widgetBorder2,widgetShadow:widgetShadow2}=this.styles.widget;this.ui.titleBar.style.backgroundColor=quickInputTitleBackground2!==null&&quickInputTitleBackground2!==void 0?quickInputTitleBackground2:"";this.ui.container.style.backgroundColor=quickInputBackground2!==null&&quickInputBackground2!==void 0?quickInputBackground2:"";this.ui.container.style.color=quickInputForeground2!==null&&quickInputForeground2!==void 0?quickInputForeground2:"";this.ui.container.style.border=widgetBorder2?`1px solid ${widgetBorder2}`:"";this.ui.container.style.boxShadow=widgetShadow2?`0 0 8px 2px ${widgetShadow2}`:"";this.ui.list.style(this.styles.list);const content=[];if(this.styles.pickerGroup.pickerGroupBorder){content.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`)}if(this.styles.pickerGroup.pickerGroupForeground){content.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`)}if(this.styles.pickerGroup.pickerGroupForeground){content.push(`.quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }`)}if(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground){content.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {");if(this.styles.keybindingLabel.keybindingLabelBackground){content.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`)}if(this.styles.keybindingLabel.keybindingLabelBorder){content.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`)}if(this.styles.keybindingLabel.keybindingLabelBottomBorder){content.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`)}if(this.styles.keybindingLabel.keybindingLabelShadow){content.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`)}if(this.styles.keybindingLabel.keybindingLabelForeground){content.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`)}content.push("}")}const newStyles=content.join("\n");if(newStyles!==this.ui.styleSheet.textContent){this.ui.styleSheet.textContent=newStyles}}}isDisplayed(){return this.ui&&this.ui.container.style.display!=="none"}};QuickInputController.MAX_WIDTH=600}});var __decorate38,__param31,QuickInputService;var init_quickInputService=__esm({"node_modules/monaco-editor/esm/vs/platform/quickinput/browser/quickInputService.js"(){init_cancellation();init_event();init_contextkey();init_instantiation();init_layoutService();init_listService();init_opener();init_quickAccess2();init_defaultStyles();init_colorRegistry();init_themeService();init_quickInputController();__decorate38=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param31=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};QuickInputService=class QuickInputService2 extends Themable{get controller(){if(!this._controller){this._controller=this._register(this.createController())}return this._controller}get hasController(){return!!this._controller}get quickAccess(){if(!this._quickAccess){this._quickAccess=this._register(this.instantiationService.createInstance(QuickAccessController))}return this._quickAccess}constructor(instantiationService,contextKeyService,themeService,layoutService){super(themeService);this.instantiationService=instantiationService;this.contextKeyService=contextKeyService;this.layoutService=layoutService;this._onShow=this._register(new Emitter);this._onHide=this._register(new Emitter);this.contexts=new Map}createController(host=this.layoutService,options2){const defaultOptions4={idPrefix:"quickInput_",container:host.container,ignoreFocusOut:()=>false,backKeybindingLabel:()=>void 0,setContextKey:id=>this.setContextKey(id),linkOpenerDelegate:content=>{this.instantiationService.invokeFunction((accessor=>{const openerService=accessor.get(IOpenerService);openerService.open(content,{allowCommands:true,fromUserGesture:true})}))},returnFocus:()=>host.focus(),createList:(user,container,delegate,renderers,options3)=>this.instantiationService.createInstance(WorkbenchList,user,container,delegate,renderers,options3),styles:this.computeStyles()};const controller=this._register(new QuickInputController(Object.assign(Object.assign({},defaultOptions4),options2),this.themeService));controller.layout(host.dimension,host.offset.quickPickTop);this._register(host.onDidLayout((dimension=>controller.layout(dimension,host.offset.quickPickTop))));this._register(controller.onShow((()=>{this.resetContextKeys();this._onShow.fire()})));this._register(controller.onHide((()=>{this.resetContextKeys();this._onHide.fire()})));return controller}setContextKey(id){let key;if(id){key=this.contexts.get(id);if(!key){key=new RawContextKey(id,false).bindTo(this.contextKeyService);this.contexts.set(id,key)}}if(key&&key.get()){return}this.resetContextKeys();key===null||key===void 0?void 0:key.set(true)}resetContextKeys(){this.contexts.forEach((context=>{if(context.get()){context.reset()}}))}pick(picks,options2={},token=CancellationToken.None){return this.controller.pick(picks,options2,token)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){if(this.hasController){this.controller.applyStyles(this.computeStyles())}}computeStyles(){return{widget:{quickInputBackground:asCssVariable(quickInputBackground),quickInputForeground:asCssVariable(quickInputForeground),quickInputTitleBackground:asCssVariable(quickInputTitleBackground),widgetBorder:asCssVariable(widgetBorder),widgetShadow:asCssVariable(widgetShadow)},inputBox:defaultInputBoxStyles,toggle:defaultToggleStyles,countBadge:defaultCountBadgeStyles,button:defaultButtonStyles,progressBar:defaultProgressBarStyles,keybindingLabel:defaultKeybindingLabelStyles,list:getListStyles({listBackground:quickInputBackground,listFocusBackground:quickInputListFocusBackground,listFocusForeground:quickInputListFocusForeground,listInactiveFocusForeground:quickInputListFocusForeground,listInactiveSelectionIconForeground:quickInputListFocusIconForeground,listInactiveFocusBackground:quickInputListFocusBackground,listFocusOutline:activeContrastBorder,listInactiveFocusOutline:activeContrastBorder}),pickerGroup:{pickerGroupBorder:asCssVariable(pickerGroupBorder),pickerGroupForeground:asCssVariable(pickerGroupForeground)}}}};QuickInputService=__decorate38([__param31(0,IInstantiationService),__param31(1,IContextKeyService),__param31(2,IThemeService),__param31(3,ILayoutService)],QuickInputService)}});var __decorate39,__param32,EditorScopedQuickInputService,StandaloneQuickInputService,QuickInputEditorContribution,QuickInputEditorWidget;var init_standaloneQuickInputService=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js"(){init_34();init_editorExtensions();init_themeService();init_cancellation();init_instantiation();init_contextkey();init_standaloneLayoutService();init_codeEditorService();init_quickInputService();init_functional();__decorate39=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param32=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};EditorScopedQuickInputService=class EditorScopedQuickInputService2 extends QuickInputService{constructor(editor2,instantiationService,contextKeyService,themeService,codeEditorService){super(instantiationService,contextKeyService,themeService,new EditorScopedLayoutService(editor2.getContainerDomNode(),codeEditorService));this.host=void 0;const contribution=QuickInputEditorContribution.get(editor2);if(contribution){const widget=contribution.widget;this.host={_serviceBrand:void 0,get hasContainer(){return true},get container(){return widget.getDomNode()},get dimension(){return editor2.getLayoutInfo()},get onDidLayout(){return editor2.onDidLayoutChange},focus:()=>editor2.focus(),offset:{top:0,quickPickTop:0}}}else{this.host=void 0}}createController(){return super.createController(this.host)}};EditorScopedQuickInputService=__decorate39([__param32(1,IInstantiationService),__param32(2,IContextKeyService),__param32(3,IThemeService),__param32(4,ICodeEditorService)],EditorScopedQuickInputService);StandaloneQuickInputService=class StandaloneQuickInputService2{get activeService(){const editor2=this.codeEditorService.getFocusedCodeEditor();if(!editor2){throw new Error("Quick input service needs a focused editor to work.")}let quickInputService=this.mapEditorToService.get(editor2);if(!quickInputService){const newQuickInputService=quickInputService=this.instantiationService.createInstance(EditorScopedQuickInputService,editor2);this.mapEditorToService.set(editor2,quickInputService);once(editor2.onDidDispose)((()=>{newQuickInputService.dispose();this.mapEditorToService.delete(editor2)}))}return quickInputService}get quickAccess(){return this.activeService.quickAccess}constructor(instantiationService,codeEditorService){this.instantiationService=instantiationService;this.codeEditorService=codeEditorService;this.mapEditorToService=new Map}pick(picks,options2={},token=CancellationToken.None){return this.activeService.pick(picks,options2,token)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};StandaloneQuickInputService=__decorate39([__param32(0,IInstantiationService),__param32(1,ICodeEditorService)],StandaloneQuickInputService);QuickInputEditorContribution=class{static get(editor2){return editor2.getContribution(QuickInputEditorContribution.ID)}constructor(editor2){this.editor=editor2;this.widget=new QuickInputEditorWidget(this.editor)}dispose(){this.widget.dispose()}};QuickInputEditorContribution.ID="editor.controller.quickInput";QuickInputEditorWidget=class{constructor(codeEditor){this.codeEditor=codeEditor;this.domNode=document.createElement("div");this.codeEditor.addOverlayWidget(this)}getId(){return QuickInputEditorWidget.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}};QuickInputEditorWidget.ID="editor.contrib.quickInputWidget";registerEditorContribution(QuickInputEditorContribution.ID,QuickInputEditorContribution,4)}});function parseTokenTheme(source){if(!source||!Array.isArray(source)){return[]}const result=[];let resultLen=0;for(let i=0,len=source.length;i{const r=strcmp(a.token,b.token);if(r!==0){return r}return a.index-b.index}));let defaultFontStyle=0;let defaultForeground="000000";let defaultBackground="ffffff";while(parsedThemeRules.length>=1&&parsedThemeRules[0].token===""){const incomingDefaults=parsedThemeRules.shift();if(incomingDefaults.fontStyle!==-1){defaultFontStyle=incomingDefaults.fontStyle}if(incomingDefaults.foreground!==null){defaultForeground=incomingDefaults.foreground}if(incomingDefaults.background!==null){defaultBackground=incomingDefaults.background}}const colorMap=new ColorMap;for(const color of customTokenColors){colorMap.getId(color)}const foregroundColorId=colorMap.getId(defaultForeground);const backgroundColorId=colorMap.getId(defaultBackground);const defaults=new ThemeTrieElementRule(defaultFontStyle,foregroundColorId,backgroundColorId);const root=new ThemeTrieElement(defaults);for(let i=0,len=parsedThemeRules.length;ib){return 1}return 0}function generateTokensCSSForColorMap(colorMap){const rules=[];for(let i=1,len=colorMap.length;i>>0;this._cache.set(token,result)}return(result|languageId<<0)>>>0}};STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|regexp)\b/;ThemeTrieElementRule=class{constructor(fontStyle,foreground2,background){this._themeTrieElementRuleBrand=void 0;this._fontStyle=fontStyle;this._foreground=foreground2;this._background=background;this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new ThemeTrieElementRule(this._fontStyle,this._foreground,this._background)}acceptOverwrite(fontStyle,foreground2,background){if(fontStyle!==-1){this._fontStyle=fontStyle}if(foreground2!==0){this._foreground=foreground2}if(background!==0){this._background=background}this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}};ThemeTrieElement=class{constructor(mainRule){this._themeTrieElementBrand=void 0;this._mainRule=mainRule;this._children=new Map}match(token){if(token===""){return this._mainRule}const dotIndex=token.indexOf(".");let head;let tail3;if(dotIndex===-1){head=token;tail3=""}else{head=token.substring(0,dotIndex);tail3=token.substring(dotIndex+1)}const child=this._children.get(head);if(typeof child!=="undefined"){return child.match(tail3)}return this._mainRule}insert(token,fontStyle,foreground2,background){if(token===""){this._mainRule.acceptOverwrite(fontStyle,foreground2,background);return}const dotIndex=token.indexOf(".");let head;let tail3;if(dotIndex===-1){head=token;tail3=""}else{head=token.substring(0,dotIndex);tail3=token.substring(dotIndex+1)}let child=this._children.get(head);if(typeof child==="undefined"){child=new ThemeTrieElement(this._mainRule.clone());this._children.set(head,child)}child.insert(tail3,fontStyle,foreground2,background)}}}});var vs,vs_dark,hc_black,hc_light;var init_themes=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/common/themes.js"(){init_editorColorRegistry();init_colorRegistry();vs={base:"vs",inherit:false,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[editorBackground]:"#FFFFFE",[editorForeground]:"#000000",[editorInactiveSelection]:"#E5EBF1",[editorIndentGuide1]:"#D3D3D3",[editorActiveIndentGuide1]:"#939393",[editorSelectionHighlight]:"#ADD6FF4D"}};vs_dark={base:"vs-dark",inherit:false,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[editorBackground]:"#1E1E1E",[editorForeground]:"#D4D4D4",[editorInactiveSelection]:"#3A3D41",[editorIndentGuide1]:"#404040",[editorActiveIndentGuide1]:"#707070",[editorSelectionHighlight]:"#ADD6FF26"}};hc_black={base:"hc-black",inherit:false,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[editorBackground]:"#000000",[editorForeground]:"#FFFFFF",[editorIndentGuide1]:"#FFFFFF",[editorActiveIndentGuide1]:"#FFFFFF"}};hc_light={base:"hc-light",inherit:false,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"B5200D"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[editorBackground]:"#FFFFFF",[editorForeground]:"#292929",[editorIndentGuide1]:"#292929",[editorActiveIndentGuide1]:"#292929"}}}});function getIconsStyleSheet(themeService){const onDidChangeEmmiter=new Emitter;const iconRegistry2=getIconRegistry();iconRegistry2.onDidChange((()=>onDidChangeEmmiter.fire()));themeService===null||themeService===void 0?void 0:themeService.onDidProductIconThemeChange((()=>onDidChangeEmmiter.fire()));return{onDidChange:onDidChangeEmmiter.event,getCSS(){const productIconTheme=themeService?themeService.getProductIconTheme():new UnthemedProductIconTheme;const usedFontIds={};const formatIconRule=contribution=>{const definition=productIconTheme.getIcon(contribution);if(!definition){return void 0}const fontContribution=definition.font;if(fontContribution){usedFontIds[fontContribution.id]=fontContribution.definition;return`.codicon-${contribution.id}:before { content: '${definition.fontCharacter}'; font-family: ${asCSSPropertyValue(fontContribution.id)}; }`}return`.codicon-${contribution.id}:before { content: '${definition.fontCharacter}'; }`};const rules=[];for(const contribution of iconRegistry2.getIcons()){const rule=formatIconRule(contribution);if(rule){rules.push(rule)}}for(const id in usedFontIds){const definition=usedFontIds[id];const fontWeight=definition.weight?`font-weight: ${definition.weight};`:"";const fontStyle=definition.style?`font-style: ${definition.style};`:"";const src=definition.src.map((l=>`${asCSSUrl(l.location)} format('${l.format}')`)).join(", ");rules.push(`@font-face { src: ${src}; font-family: ${asCSSPropertyValue(id)};${fontWeight}${fontStyle} font-display: block; }`)}return rules.join("\n")}}}var UnthemedProductIconTheme;var init_iconsStyleSheet=__esm({"node_modules/monaco-editor/esm/vs/platform/theme/browser/iconsStyleSheet.js"(){init_dom();init_event();init_themables();init_iconRegistry();UnthemedProductIconTheme=class{getIcon(contribution){const iconRegistry2=getIconRegistry();let definition=contribution.defaults;while(ThemeIcon.isThemeIcon(definition)){const c=iconRegistry2.getIcon(definition.id);if(!c){return void 0}definition=c.defaults}return definition}}}});function isBuiltinTheme(themeName){return themeName===VS_LIGHT_THEME_NAME||themeName===VS_DARK_THEME_NAME||themeName===HC_BLACK_THEME_NAME||themeName===HC_LIGHT_THEME_NAME}function getBuiltinRules(builtinTheme){switch(builtinTheme){case VS_LIGHT_THEME_NAME:return vs;case VS_DARK_THEME_NAME:return vs_dark;case HC_BLACK_THEME_NAME:return hc_black;case HC_LIGHT_THEME_NAME:return hc_light}}function newBuiltInTheme(builtinTheme){const themeData=getBuiltinRules(builtinTheme);return new StandaloneTheme(builtinTheme,themeData)}var VS_LIGHT_THEME_NAME,VS_DARK_THEME_NAME,HC_BLACK_THEME_NAME,HC_LIGHT_THEME_NAME,colorRegistry2,themingRegistry2,StandaloneTheme,StandaloneThemeService;var init_standaloneThemeService=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneThemeService.js"(){init_dom();init_browser();init_color();init_event();init_languages();init_encodedTokenAttributes();init_tokenization();init_themes();init_platform2();init_colorRegistry();init_themeService();init_lifecycle();init_theme();init_iconsStyleSheet();VS_LIGHT_THEME_NAME="vs";VS_DARK_THEME_NAME="vs-dark";HC_BLACK_THEME_NAME="hc-black";HC_LIGHT_THEME_NAME="hc-light";colorRegistry2=Registry.as(Extensions6.ColorContribution);themingRegistry2=Registry.as(Extensions7.ThemingContribution);StandaloneTheme=class{constructor(name,standaloneThemeData){this.semanticHighlighting=false;this.themeData=standaloneThemeData;const base=standaloneThemeData.base;if(name.length>0){if(isBuiltinTheme(name)){this.id=name}else{this.id=base+" "+name}this.themeName=name}else{this.id=base;this.themeName=base}this.colors=null;this.defaultColors=Object.create(null);this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){if(this.themeData.inherit){this.colors=null;this._tokenTheme=null}}getColors(){if(!this.colors){const colors=new Map;for(const id in this.themeData.colors){colors.set(id,Color.fromHex(this.themeData.colors[id]))}if(this.themeData.inherit){const baseData=getBuiltinRules(this.themeData.base);for(const id in baseData.colors){if(!colors.has(id)){colors.set(id,Color.fromHex(baseData.colors[id]))}}}this.colors=colors}return this.colors}getColor(colorId,useDefault){const color=this.getColors().get(colorId);if(color){return color}if(useDefault!==false){return this.getDefault(colorId)}return void 0}getDefault(colorId){let color=this.defaultColors[colorId];if(color){return color}color=colorRegistry2.resolveDefaultColor(colorId,this);this.defaultColors[colorId]=color;return color}defines(colorId){return this.getColors().has(colorId)}get type(){switch(this.base){case VS_LIGHT_THEME_NAME:return ColorScheme.LIGHT;case HC_BLACK_THEME_NAME:return ColorScheme.HIGH_CONTRAST_DARK;case HC_LIGHT_THEME_NAME:return ColorScheme.HIGH_CONTRAST_LIGHT;default:return ColorScheme.DARK}}get tokenTheme(){if(!this._tokenTheme){let rules=[];let encodedTokensColors=[];if(this.themeData.inherit){const baseData=getBuiltinRules(this.themeData.base);rules=baseData.rules;if(baseData.encodedTokensColors){encodedTokensColors=baseData.encodedTokensColors}}const editorForeground2=this.themeData.colors["editor.foreground"];const editorBackground2=this.themeData.colors["editor.background"];if(editorForeground2||editorBackground2){const rule={token:""};if(editorForeground2){rule.foreground=editorForeground2}if(editorBackground2){rule.background=editorBackground2}rules.push(rule)}rules=rules.concat(this.themeData.rules);if(this.themeData.encodedTokensColors){encodedTokensColors=this.themeData.encodedTokensColors}this._tokenTheme=TokenTheme.createFromRawTokenTheme(rules,encodedTokensColors)}return this._tokenTheme}getTokenStyleMetadata(type,modifiers,modelLanguage){const style=this.tokenTheme._match([type].concat(modifiers).join("."));const metadata=style.metadata;const foreground2=TokenMetadata.getForeground(metadata);const fontStyle=TokenMetadata.getFontStyle(metadata);return{foreground:foreground2,italic:Boolean(fontStyle&1),bold:Boolean(fontStyle&2),underline:Boolean(fontStyle&4),strikethrough:Boolean(fontStyle&8)}}};StandaloneThemeService=class extends Disposable{constructor(){super();this._onColorThemeChange=this._register(new Emitter);this.onDidColorThemeChange=this._onColorThemeChange.event;this._onProductIconThemeChange=this._register(new Emitter);this.onDidProductIconThemeChange=this._onProductIconThemeChange.event;this._environment=Object.create(null);this._builtInProductIconTheme=new UnthemedProductIconTheme;this._autoDetectHighContrast=true;this._knownThemes=new Map;this._knownThemes.set(VS_LIGHT_THEME_NAME,newBuiltInTheme(VS_LIGHT_THEME_NAME));this._knownThemes.set(VS_DARK_THEME_NAME,newBuiltInTheme(VS_DARK_THEME_NAME));this._knownThemes.set(HC_BLACK_THEME_NAME,newBuiltInTheme(HC_BLACK_THEME_NAME));this._knownThemes.set(HC_LIGHT_THEME_NAME,newBuiltInTheme(HC_LIGHT_THEME_NAME));const iconsStyleSheet=getIconsStyleSheet(this);this._codiconCSS=iconsStyleSheet.getCSS();this._themeCSS="";this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`;this._globalStyleElement=null;this._styleElements=[];this._colorMapOverride=null;this.setTheme(VS_LIGHT_THEME_NAME);this._onOSSchemeChanged();iconsStyleSheet.onDidChange((()=>{this._codiconCSS=iconsStyleSheet.getCSS();this._updateCSS()}));addMatchMediaChangeListener("(forced-colors: active)",(()=>{this._onOSSchemeChanged()}))}registerEditorContainer(domNode){if(isInShadowDOM(domNode)){return this._registerShadowDomContainer(domNode)}return this._registerRegularEditorContainer()}_registerRegularEditorContainer(){if(!this._globalStyleElement){this._globalStyleElement=createStyleSheet(void 0,(style=>{style.className="monaco-colors";style.textContent=this._allCSS}));this._styleElements.push(this._globalStyleElement)}return Disposable.None}_registerShadowDomContainer(domNode){const styleElement=createStyleSheet(domNode,(style=>{style.className="monaco-colors";style.textContent=this._allCSS}));this._styleElements.push(styleElement);return{dispose:()=>{for(let i=0;i{if(theme.base===themeName){theme.notifyBaseUpdated()}}))}if(this._theme.themeName===themeName){this.setTheme(themeName)}}getColorTheme(){return this._theme}setColorMapOverride(colorMapOverride){this._colorMapOverride=colorMapOverride;this._updateThemeOrColorMap()}setTheme(themeName){let theme;if(this._knownThemes.has(themeName)){theme=this._knownThemes.get(themeName)}else{theme=this._knownThemes.get(VS_LIGHT_THEME_NAME)}this._updateActualTheme(theme)}_updateActualTheme(desiredTheme){if(!desiredTheme||this._theme===desiredTheme){return}this._theme=desiredTheme;this._updateThemeOrColorMap()}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const wantsHighContrast=window.matchMedia(`(forced-colors: active)`).matches;if(wantsHighContrast!==isHighContrast(this._theme.type)){let newThemeName;if(isDark(this._theme.type)){newThemeName=wantsHighContrast?HC_BLACK_THEME_NAME:VS_DARK_THEME_NAME}else{newThemeName=wantsHighContrast?HC_LIGHT_THEME_NAME:VS_LIGHT_THEME_NAME}this._updateActualTheme(this._knownThemes.get(newThemeName))}}}setAutoDetectHighContrast(autoDetectHighContrast){this._autoDetectHighContrast=autoDetectHighContrast;this._onOSSchemeChanged()}_updateThemeOrColorMap(){const cssRules=[];const hasRule={};const ruleCollector={addRule:rule=>{if(!hasRule[rule]){cssRules.push(rule);hasRule[rule]=true}}};themingRegistry2.getThemingParticipants().forEach((p=>p(this._theme,ruleCollector,this._environment)));const colorVariables=[];for(const item of colorRegistry2.getColors()){const color=this._theme.getColor(item.id,true);if(color){colorVariables.push(`${asCssVariableName(item.id)}: ${color.toString()};`)}}ruleCollector.addRule(`.monaco-editor, .monaco-diff-editor { ${colorVariables.join("\n")} }`);const colorMap=this._colorMapOverride||this._theme.tokenTheme.getColorMap();ruleCollector.addRule(generateTokensCSSForColorMap(colorMap));this._themeCSS=cssRules.join("\n");this._updateCSS();TokenizationRegistry2.setColorMap(colorMap);this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`;this._styleElements.forEach((styleElement=>styleElement.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:false,hasFolderIcons:false,hidesExplorerArrows:false}}getProductIconTheme(){return this._builtInProductIconTheme}}}});var IStandaloneThemeService;var init_standaloneTheme=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js"(){init_instantiation();IStandaloneThemeService=createDecorator("themeService")}});var __decorate40,__param33,AccessibilityService;var init_accessibilityService=__esm({"node_modules/monaco-editor/esm/vs/platform/accessibility/browser/accessibilityService.js"(){init_dom();init_event();init_lifecycle();init_accessibility();init_configuration();init_contextkey();init_layoutService();__decorate40=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param33=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};AccessibilityService=class AccessibilityService2 extends Disposable{constructor(_contextKeyService,_layoutService,_configurationService){super();this._contextKeyService=_contextKeyService;this._layoutService=_layoutService;this._configurationService=_configurationService;this._accessibilitySupport=0;this._onDidChangeScreenReaderOptimized=new Emitter;this._onDidChangeReducedMotion=new Emitter;this._accessibilityModeEnabledContext=CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const updateContextKey=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{if(e.affectsConfiguration("editor.accessibilitySupport")){updateContextKey();this._onDidChangeScreenReaderOptimized.fire()}if(e.affectsConfiguration("workbench.reduceMotion")){this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion");this._onDidChangeReducedMotion.fire()}})));updateContextKey();this._register(this.onDidChangeScreenReaderOptimized((()=>updateContextKey())));const reduceMotionMatcher=window.matchMedia(`(prefers-reduced-motion: reduce)`);this._systemMotionReduced=reduceMotionMatcher.matches;this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion");this.initReducedMotionListeners(reduceMotionMatcher)}initReducedMotionListeners(reduceMotionMatcher){if(!this._layoutService.hasContainer){return}this._register(addDisposableListener(reduceMotionMatcher,"change",(()=>{this._systemMotionReduced=reduceMotionMatcher.matches;if(this._configMotionReduced==="auto"){this._onDidChangeReducedMotion.fire()}})));const updateRootClasses=()=>{const reduce=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",reduce);this._layoutService.container.classList.toggle("enable-motion",!reduce)};updateRootClasses();this._register(this.onDidChangeReducedMotion((()=>updateRootClasses())))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const config=this._configurationService.getValue("editor.accessibilitySupport");return config==="on"||config==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const config=this._configMotionReduced;return config==="on"||config==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};AccessibilityService=__decorate40([__param33(0,IContextKeyService),__param33(1,ILayoutService),__param33(2,IConfigurationService)],AccessibilityService)}});function createMenuHide(menu,command,states){const id=isISubmenuItem(command)?command.submenu.id:command.id;const title=typeof command.title==="string"?command.title:command.title.value;const hide2=toAction({id:`hide/${menu.id}/${id}`,label:localize("hide.label","Hide '{0}'",title),run(){states.updateHidden(menu,id,true)}});const toggle=toAction({id:`toggle/${menu.id}/${id}`,label:title,get checked(){return!states.isHidden(menu,id)},run(){states.updateHidden(menu,id,!!this.checked)}});return{hide:hide2,toggle:toggle,get isHidden(){return!toggle.checked}}}var __decorate41,__param34,PersistedMenuHideState_1,MenuInfo_1,MenuService,PersistedMenuHideState,MenuInfo,MenuImpl;var init_menuService=__esm({"node_modules/monaco-editor/esm/vs/platform/actions/common/menuService.js"(){init_async();init_event();init_lifecycle();init_actions2();init_commands();init_contextkey();init_actions();init_storage2();init_arrays();init_nls();__decorate41=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param34=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};MenuService=class MenuService2{constructor(_commandService,storageService){this._commandService=_commandService;this._hiddenStates=new PersistedMenuHideState(storageService)}createMenu(id,contextKeyService,options2){return new MenuImpl(id,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:false,eventDebounceDelay:50},options2),this._commandService,contextKeyService)}resetHiddenStates(ids){this._hiddenStates.reset(ids)}};MenuService=__decorate41([__param34(0,ICommandService),__param34(1,IStorageService)],MenuService);PersistedMenuHideState=PersistedMenuHideState_1=class PersistedMenuHideState2{constructor(_storageService){this._storageService=_storageService;this._disposables=new DisposableStore;this._onDidChange=new Emitter;this.onDidChange=this._onDidChange.event;this._ignoreChangeEvent=false;this._hiddenByDefaultCache=new Map;try{const raw=_storageService.get(PersistedMenuHideState_1._key,0,"{}");this._data=JSON.parse(raw)}catch(err){this._data=Object.create(null)}this._disposables.add(_storageService.onDidChangeValue(0,PersistedMenuHideState_1._key,this._disposables)((()=>{if(!this._ignoreChangeEvent){try{const raw=_storageService.get(PersistedMenuHideState_1._key,0,"{}");this._data=JSON.parse(raw)}catch(err){console.log("FAILED to read storage after UPDATE",err)}}this._onDidChange.fire()})))}dispose(){this._onDidChange.dispose();this._disposables.dispose()}_isHiddenByDefault(menu,commandId){var _a6;return(_a6=this._hiddenByDefaultCache.get(`${menu.id}/${commandId}`))!==null&&_a6!==void 0?_a6:false}setDefaultState(menu,commandId,hidden){this._hiddenByDefaultCache.set(`${menu.id}/${commandId}`,hidden)}isHidden(menu,commandId){var _a6,_b3;const hiddenByDefault=this._isHiddenByDefault(menu,commandId);const state=(_b3=(_a6=this._data[menu.id])===null||_a6===void 0?void 0:_a6.includes(commandId))!==null&&_b3!==void 0?_b3:false;return hiddenByDefault?!state:state}updateHidden(menu,commandId,hidden){const hiddenByDefault=this._isHiddenByDefault(menu,commandId);if(hiddenByDefault){hidden=!hidden}const entries2=this._data[menu.id];if(!hidden){if(entries2){const idx=entries2.indexOf(commandId);if(idx>=0){removeFastWithoutKeepingOrder(entries2,idx)}if(entries2.length===0){delete this._data[menu.id]}}}else{if(!entries2){this._data[menu.id]=[commandId]}else{const idx=entries2.indexOf(commandId);if(idx<0){entries2.push(commandId)}}}this._persist()}reset(menus){if(menus===void 0){this._data=Object.create(null);this._persist()}else{for(const{id:id}of menus){if(this._data[id]){delete this._data[id]}}this._persist()}}_persist(){try{this._ignoreChangeEvent=true;const raw=JSON.stringify(this._data);this._storageService.store(PersistedMenuHideState_1._key,raw,0,0)}finally{this._ignoreChangeEvent=false}}};PersistedMenuHideState._key="menu.hiddenCommands";PersistedMenuHideState=PersistedMenuHideState_1=__decorate41([__param34(0,IStorageService)],PersistedMenuHideState);MenuInfo=MenuInfo_1=class MenuInfo2{constructor(_id,_hiddenStates,_collectContextKeysForSubmenus,_commandService,_contextKeyService){this._id=_id;this._hiddenStates=_hiddenStates;this._collectContextKeysForSubmenus=_collectContextKeysForSubmenus;this._commandService=_commandService;this._contextKeyService=_contextKeyService;this._menuGroups=[];this._structureContextKeys=new Set;this._preconditionContextKeys=new Set;this._toggledContextKeys=new Set;this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0;this._structureContextKeys.clear();this._preconditionContextKeys.clear();this._toggledContextKeys.clear();const menuItems=MenuRegistry.getMenuItems(this._id);let group3;menuItems.sort(MenuInfo_1._compareMenuItems);for(const item of menuItems){const groupName=item.group||"";if(!group3||group3[0]!==groupName){group3=[groupName,[]];this._menuGroups.push(group3)}group3[1].push(item);this._collectContextKeys(item)}}_collectContextKeys(item){MenuInfo_1._fillInKbExprKeys(item.when,this._structureContextKeys);if(isIMenuItem(item)){if(item.command.precondition){MenuInfo_1._fillInKbExprKeys(item.command.precondition,this._preconditionContextKeys)}if(item.command.toggled){const toggledExpression=item.command.toggled.condition||item.command.toggled;MenuInfo_1._fillInKbExprKeys(toggledExpression,this._toggledContextKeys)}}else if(this._collectContextKeysForSubmenus){MenuRegistry.getMenuItems(item.submenu).forEach(this._collectContextKeys,this)}}createActionGroups(options2){const result=[];for(const group3 of this._menuGroups){const[id,items]=group3;const activeActions=[];for(const item of items){if(this._contextKeyService.contextMatchesRules(item.when)){const isMenuItem=isIMenuItem(item);if(isMenuItem){this._hiddenStates.setDefaultState(this._id,item.command.id,!!item.isHiddenByDefault)}const menuHide=createMenuHide(this._id,isMenuItem?item.command:item,this._hiddenStates);if(isMenuItem){activeActions.push(new MenuItemAction(item.command,item.alt,options2,menuHide,this._contextKeyService,this._commandService))}else{const groups=new MenuInfo_1(item.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(options2);const submenuActions=Separator.join(...groups.map((g=>g[1])));if(submenuActions.length>0){activeActions.push(new SubmenuItemAction(item,menuHide,submenuActions))}}}}if(activeActions.length>0){result.push([id,activeActions])}}return result}static _fillInKbExprKeys(exp,set){if(exp){for(const key of exp.keys()){set.add(key)}}}static _compareMenuItems(a,b){const aGroup=a.group;const bGroup=b.group;if(aGroup!==bGroup){if(!aGroup){return 1}else if(!bGroup){return-1}if(aGroup==="navigation"){return-1}else if(bGroup==="navigation"){return 1}const value=aGroup.localeCompare(bGroup);if(value!==0){return value}}const aPrio=a.order||0;const bPrio=b.order||0;if(aPriobPrio){return 1}return MenuInfo_1._compareTitles(isIMenuItem(a)?a.command.title:a.title,isIMenuItem(b)?b.command.title:b.title)}static _compareTitles(a,b){const aStr=typeof a==="string"?a:a.original;const bStr=typeof b==="string"?b:b.original;return aStr.localeCompare(bStr)}};MenuInfo=MenuInfo_1=__decorate41([__param34(3,ICommandService),__param34(4,IContextKeyService)],MenuInfo);MenuImpl=class MenuImpl2{constructor(id,hiddenStates,options2,commandService,contextKeyService){this._disposables=new DisposableStore;this._menuInfo=new MenuInfo(id,hiddenStates,options2.emitEventsForSubmenuChanges,commandService,contextKeyService);const rebuildMenuSoon=new RunOnceScheduler((()=>{this._menuInfo.refresh();this._onDidChange.fire({menu:this,isStructuralChange:true,isEnablementChange:true,isToggleChange:true})}),options2.eventDebounceDelay);this._disposables.add(rebuildMenuSoon);this._disposables.add(MenuRegistry.onDidChangeMenu((e=>{if(e.has(id)){rebuildMenuSoon.schedule()}})));const lazyListener=this._disposables.add(new DisposableStore);const merge=events=>{let isStructuralChange=false;let isEnablementChange=false;let isToggleChange=false;for(const item of events){isStructuralChange=isStructuralChange||item.isStructuralChange;isEnablementChange=isEnablementChange||item.isEnablementChange;isToggleChange=isToggleChange||item.isToggleChange;if(isStructuralChange&&isEnablementChange&&isToggleChange){break}}return{menu:this,isStructuralChange:isStructuralChange,isEnablementChange:isEnablementChange,isToggleChange:isToggleChange}};const startLazyListener=()=>{lazyListener.add(contextKeyService.onDidChangeContext((e=>{const isStructuralChange=e.affectsSome(this._menuInfo.structureContextKeys);const isEnablementChange=e.affectsSome(this._menuInfo.preconditionContextKeys);const isToggleChange=e.affectsSome(this._menuInfo.toggledContextKeys);if(isStructuralChange||isEnablementChange||isToggleChange){this._onDidChange.fire({menu:this,isStructuralChange:isStructuralChange,isEnablementChange:isEnablementChange,isToggleChange:isToggleChange})}})));lazyListener.add(hiddenStates.onDidChange((e=>{this._onDidChange.fire({menu:this,isStructuralChange:true,isEnablementChange:false,isToggleChange:false})})))};this._onDidChange=new DebounceEmitter({onWillAddFirstListener:startLazyListener,onDidRemoveLastListener:lazyListener.clear.bind(lazyListener),delay:options2.eventDebounceDelay,merge:merge});this.onDidChange=this._onDidChange.event}getActions(options2){return this._menuInfo.createActionGroups(options2)}dispose(){this._disposables.dispose();this._onDidChange.dispose()}};MenuImpl=__decorate41([__param34(3,ICommandService),__param34(4,IContextKeyService)],MenuImpl)}});var __decorate42,__param35,__awaiter26,BrowserClipboardService;var init_clipboardService2=__esm({"node_modules/monaco-editor/esm/vs/platform/clipboard/browser/clipboardService.js"(){init_browser();init_dom();init_async();init_lifecycle();init_layoutService();init_log();__decorate42=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param35=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter26=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};BrowserClipboardService=class BrowserClipboardService2 extends Disposable{constructor(layoutService,logService){super();this.layoutService=layoutService;this.logService=logService;this.mapTextToType=new Map;this.findText="";this.resources=[];if(isSafari2||isWebkitWebView){this.installWebKitWriteTextWorkaround()}}installWebKitWriteTextWorkaround(){const handler=()=>{const currentWritePromise=new DeferredPromise;if(this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled){this.webKitPendingClipboardWritePromise.cancel()}this.webKitPendingClipboardWritePromise=currentWritePromise;navigator.clipboard.write([new ClipboardItem({"text/plain":currentWritePromise.p})]).catch((err=>__awaiter26(this,void 0,void 0,(function*(){if(!(err instanceof Error)||err.name!=="NotAllowedError"||!currentWritePromise.isRejected){this.logService.error(err)}}))))};if(this.layoutService.hasContainer){this._register(addDisposableListener(this.layoutService.container,"click",handler));this._register(addDisposableListener(this.layoutService.container,"keydown",handler))}}writeText(text2,type){return __awaiter26(this,void 0,void 0,(function*(){if(type){this.mapTextToType.set(type,text2);return}if(this.webKitPendingClipboardWritePromise){return this.webKitPendingClipboardWritePromise.complete(text2)}try{return yield navigator.clipboard.writeText(text2)}catch(error){console.error(error)}const activeElement=document.activeElement;const textArea=document.body.appendChild($("textarea",{"aria-hidden":true}));textArea.style.height="1px";textArea.style.width="1px";textArea.style.position="absolute";textArea.value=text2;textArea.focus();textArea.select();document.execCommand("copy");if(activeElement instanceof HTMLElement){activeElement.focus()}document.body.removeChild(textArea);return}))}readText(type){return __awaiter26(this,void 0,void 0,(function*(){if(type){return this.mapTextToType.get(type)||""}try{return yield navigator.clipboard.readText()}catch(error){console.error(error);return""}}))}readFindText(){return __awaiter26(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(text2){return __awaiter26(this,void 0,void 0,(function*(){this.findText=text2}))}writeResources(resources){return __awaiter26(this,void 0,void 0,(function*(){this.resources=resources}))}readResources(){return __awaiter26(this,void 0,void 0,(function*(){return this.resources}))}};BrowserClipboardService=__decorate42([__param35(0,ILayoutService),__param35(1,ILogService)],BrowserClipboardService)}});function allEventKeysInContext(event,context){return event.allKeysContainedIn(new Set(Object.keys(context)))}function findContextAttr(domNode){while(domNode){if(domNode.hasAttribute(KEYBINDING_CONTEXT_ATTR)){const attr=domNode.getAttribute(KEYBINDING_CONTEXT_ATTR);if(attr){return parseInt(attr,10)}return NaN}domNode=domNode.parentElement}return 0}function setContext(accessor,contextKey,contextValue){const contextKeyService=accessor.get(IContextKeyService);contextKeyService.createKey(String(contextKey),stringifyURIs(contextValue))}function stringifyURIs(contextValue){return cloneAndChange(contextValue,(obj=>{if(typeof obj==="object"&&obj.$mid===1){return URI.revive(obj).toString()}if(obj instanceof URI){return obj.toString()}return void 0}))}var __decorate43,__param36,KEYBINDING_CONTEXT_ATTR,Context,NullContext,ConfigAwareContextValuesContainer,ContextKey,SimpleContextKeyChangeEvent,ArrayContextKeyChangeEvent,CompositeContextKeyChangeEvent,AbstractContextKeyService,ContextKeyService,ScopedContextKeyService;var init_contextKeyService=__esm({"node_modules/monaco-editor/esm/vs/platform/contextkey/browser/contextKeyService.js"(){init_event();init_iterator();init_lifecycle();init_objects();init_ternarySearchTree();init_uri();init_nls();init_commands();init_configuration();init_contextkey();__decorate43=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param36=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};KEYBINDING_CONTEXT_ATTR="data-keybinding-context";Context=class{constructor(id,parent){this._id=id;this._parent=parent;this._value=Object.create(null);this._value["_contextId"]=id}get value(){return Object.assign({},this._value)}setValue(key,value){if(this._value[key]!==value){this._value[key]=value;return true}return false}removeValue(key){if(key in this._value){delete this._value[key];return true}return false}getValue(key){const ret=this._value[key];if(typeof ret==="undefined"&&this._parent){return this._parent.getValue(key)}return ret}};NullContext=class extends Context{constructor(){super(-1,null)}setValue(key,value){return false}removeValue(key){return false}getValue(key){return void 0}};NullContext.INSTANCE=new NullContext;ConfigAwareContextValuesContainer=class extends Context{constructor(id,_configurationService,emitter){super(id,null);this._configurationService=_configurationService;this._values=TernarySearchTree.forConfigKeys();this._listener=this._configurationService.onDidChangeConfiguration((event=>{if(event.source===7){const allKeys=Array.from(this._values,(([k])=>k));this._values.clear();emitter.fire(new ArrayContextKeyChangeEvent(allKeys))}else{const changedKeys=[];for(const configKey of event.affectedKeys){const contextKey=`config.${configKey}`;const cachedItems=this._values.findSuperstr(contextKey);if(cachedItems!==void 0){changedKeys.push(...Iterable.map(cachedItems,(([key])=>key)));this._values.deleteSuperstr(contextKey)}if(this._values.has(contextKey)){changedKeys.push(contextKey);this._values.delete(contextKey)}}emitter.fire(new ArrayContextKeyChangeEvent(changedKeys))}}))}dispose(){this._listener.dispose()}getValue(key){if(key.indexOf(ConfigAwareContextValuesContainer._keyPrefix)!==0){return super.getValue(key)}if(this._values.has(key)){return this._values.get(key)}const configKey=key.substr(ConfigAwareContextValuesContainer._keyPrefix.length);const configValue=this._configurationService.getValue(configKey);let value=void 0;switch(typeof configValue){case"number":case"boolean":case"string":value=configValue;break;default:if(Array.isArray(configValue)){value=JSON.stringify(configValue)}else{value=configValue}}this._values.set(key,value);return value}setValue(key,value){return super.setValue(key,value)}removeValue(key){return super.removeValue(key)}};ConfigAwareContextValuesContainer._keyPrefix="config.";ContextKey=class{constructor(service,key,defaultValue){this._service=service;this._key=key;this._defaultValue=defaultValue;this.reset()}set(value){this._service.setContext(this._key,value)}reset(){if(typeof this._defaultValue==="undefined"){this._service.removeContext(this._key)}else{this._service.setContext(this._key,this._defaultValue)}}get(){return this._service.getContextKeyValue(this._key)}};SimpleContextKeyChangeEvent=class{constructor(key){this.key=key}affectsSome(keys){return keys.has(this.key)}allKeysContainedIn(keys){return this.affectsSome(keys)}};ArrayContextKeyChangeEvent=class{constructor(keys){this.keys=keys}affectsSome(keys){for(const key of this.keys){if(keys.has(key)){return true}}return false}allKeysContainedIn(keys){return this.keys.every((key=>keys.has(key)))}};CompositeContextKeyChangeEvent=class{constructor(events){this.events=events}affectsSome(keys){for(const e of this.events){if(e.affectsSome(keys)){return true}}return false}allKeysContainedIn(keys){return this.events.every((evt=>evt.allKeysContainedIn(keys)))}};AbstractContextKeyService=class{constructor(myContextId){this._onDidChangeContext=new PauseableEmitter({merge:input=>new CompositeContextKeyChangeEvent(input)});this.onDidChangeContext=this._onDidChangeContext.event;this._isDisposed=false;this._myContextId=myContextId}createKey(key,defaultValue){if(this._isDisposed){throw new Error(`AbstractContextKeyService has been disposed`)}return new ContextKey(this,key,defaultValue)}bufferChangeEvents(callback){this._onDidChangeContext.pause();try{callback()}finally{this._onDidChangeContext.resume()}}createScoped(domNode){if(this._isDisposed){throw new Error(`AbstractContextKeyService has been disposed`)}return new ScopedContextKeyService(this,domNode)}contextMatchesRules(rules){if(this._isDisposed){throw new Error(`AbstractContextKeyService has been disposed`)}const context=this.getContextValuesContainer(this._myContextId);const result=rules?rules.evaluate(context):true;return result}getContextKeyValue(key){if(this._isDisposed){return void 0}return this.getContextValuesContainer(this._myContextId).getValue(key)}setContext(key,value){if(this._isDisposed){return}const myContext=this.getContextValuesContainer(this._myContextId);if(!myContext){return}if(myContext.setValue(key,value)){this._onDidChangeContext.fire(new SimpleContextKeyChangeEvent(key))}}removeContext(key){if(this._isDisposed){return}if(this.getContextValuesContainer(this._myContextId).removeValue(key)){this._onDidChangeContext.fire(new SimpleContextKeyChangeEvent(key))}}getContext(target){if(this._isDisposed){return NullContext.INSTANCE}return this.getContextValuesContainer(findContextAttr(target))}};ContextKeyService=class ContextKeyService2 extends AbstractContextKeyService{constructor(configurationService){super(0);this._contexts=new Map;this._toDispose=new DisposableStore;this._lastContextId=0;const myContext=new ConfigAwareContextValuesContainer(this._myContextId,configurationService,this._onDidChangeContext);this._contexts.set(this._myContextId,myContext);this._toDispose.add(myContext)}dispose(){this._onDidChangeContext.dispose();this._isDisposed=true;this._toDispose.dispose()}getContextValuesContainer(contextId){if(this._isDisposed){return NullContext.INSTANCE}return this._contexts.get(contextId)||NullContext.INSTANCE}createChildContext(parentContextId=this._myContextId){if(this._isDisposed){throw new Error(`ContextKeyService has been disposed`)}const id=++this._lastContextId;this._contexts.set(id,new Context(id,this.getContextValuesContainer(parentContextId)));return id}disposeContext(contextId){if(!this._isDisposed){this._contexts.delete(contextId)}}};ContextKeyService=__decorate43([__param36(0,IConfigurationService)],ContextKeyService);ScopedContextKeyService=class extends AbstractContextKeyService{constructor(parent,domNode){super(parent.createChildContext());this._parentChangeListener=new MutableDisposable;this._parent=parent;this._updateParentChangeListener();this._domNode=domNode;if(this._domNode.hasAttribute(KEYBINDING_CONTEXT_ATTR)){let extraInfo="";if(this._domNode.classList){extraInfo=Array.from(this._domNode.classList.values()).join(", ")}console.error(`Element already has context attribute${extraInfo?": "+extraInfo:""}`)}this._domNode.setAttribute(KEYBINDING_CONTEXT_ATTR,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext((e=>{const thisContainer=this._parent.getContextValuesContainer(this._myContextId);const thisContextValues=thisContainer.value;if(!allEventKeysInContext(e,thisContextValues)){this._onDidChangeContext.fire(e)}}))}dispose(){if(this._isDisposed){return}this._onDidChangeContext.dispose();this._parent.disposeContext(this._myContextId);this._parentChangeListener.dispose();this._domNode.removeAttribute(KEYBINDING_CONTEXT_ATTR);this._isDisposed=true}getContextValuesContainer(contextId){if(this._isDisposed){return NullContext.INSTANCE}return this._parent.getContextValuesContainer(contextId)}createChildContext(parentContextId=this._myContextId){if(this._isDisposed){throw new Error(`ScopedContextKeyService has been disposed`)}return this._parent.createChildContext(parentContextId)}disposeContext(contextId){if(this._isDisposed){return}this._parent.disposeContext(contextId)}};CommandsRegistry.registerCommand("_setContext",setContext);CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...RawContextKey.all()].sort(((a,b)=>a.key.localeCompare(b.key)))},description:{description:localize("getContextKeyInfo","A command that returns information about context keys"),args:[]}});CommandsRegistry.registerCommand("_generateContextKeyInfo",(function(){const result=[];const seen=new Set;for(const info of RawContextKey.all()){if(!seen.has(info.key)){seen.add(info.key);result.push(info)}}result.sort(((a,b)=>a.key.localeCompare(b.key)));console.log(JSON.stringify(result,void 0,2))}))}});var Node3,Graph;var init_graph=__esm({"node_modules/monaco-editor/esm/vs/platform/instantiation/common/graph.js"(){Node3=class{constructor(key,data){this.key=key;this.data=data;this.incoming=new Map;this.outgoing=new Map}};Graph=class{constructor(_hashFn){this._hashFn=_hashFn;this._nodes=new Map}roots(){const ret=[];for(const node of this._nodes.values()){if(node.outgoing.size===0){ret.push(node)}}return ret}insertEdge(from,to){const fromNode=this.lookupOrInsertNode(from);const toNode=this.lookupOrInsertNode(to);fromNode.outgoing.set(toNode.key,toNode);toNode.incoming.set(fromNode.key,fromNode)}removeNode(data){const key=this._hashFn(data);this._nodes.delete(key);for(const node of this._nodes.values()){node.outgoing.delete(key);node.incoming.delete(key)}}lookupOrInsertNode(data){const key=this._hashFn(data);let node=this._nodes.get(key);if(!node){node=new Node3(key,data);this._nodes.set(key,node)}return node}isEmpty(){return this._nodes.size===0}toString(){const data=[];for(const[key,value]of this._nodes){data.push(`${key}\n\t(-> incoming)[${[...value.incoming.keys()].join(", ")}]\n\t(outgoing ->)[${[...value.outgoing.keys()].join(",")}]\n`)}return data.join("\n")}findCycleSlow(){for(const[id,node]of this._nodes){const seen=new Set([id]);const res=this._findCycle(node,seen);if(res){return res}}return void 0}_findCycle(node,seen){for(const[id,outgoing]of node.outgoing){if(seen.has(id)){return[...seen,id].join(" -> ")}seen.add(id);const value=this._findCycle(outgoing,seen);if(value){return value}seen.delete(id)}return void 0}}}});var _enableAllTracing,CyclicDependencyError,InstantiationService,Trace;var init_instantiationService=__esm({"node_modules/monaco-editor/esm/vs/platform/instantiation/common/instantiationService.js"(){init_async();init_errors();init_lifecycle();init_descriptors();init_graph();init_instantiation();init_serviceCollection();init_linkedList();_enableAllTracing=false;CyclicDependencyError=class extends Error{constructor(graph){var _a6;super("cyclic dependency between services");this.message=(_a6=graph.findCycleSlow())!==null&&_a6!==void 0?_a6:`UNABLE to detect cycle, dumping graph: \n${graph.toString()}`}};InstantiationService=class{constructor(_services=new ServiceCollection,_strict=false,_parent,_enableTracing=_enableAllTracing){var _a6;this._services=_services;this._strict=_strict;this._parent=_parent;this._enableTracing=_enableTracing;this._activeInstantiations=new Set;this._services.set(IInstantiationService,this);this._globalGraph=_enableTracing?(_a6=_parent===null||_parent===void 0?void 0:_parent._globalGraph)!==null&&_a6!==void 0?_a6:new Graph((e=>e)):void 0}createChild(services){return new InstantiationService(services,this._strict,this,this._enableTracing)}invokeFunction(fn,...args){const _trace=Trace.traceInvocation(this._enableTracing,fn);let _done=false;try{const accessor={get:id=>{if(_done){throw illegalState("service accessor is only valid during the invocation of its target method")}const result=this._getOrCreateServiceInstance(id,_trace);if(!result){throw new Error(`[invokeFunction] unknown service '${id}'`)}return result}};return fn(accessor,...args)}finally{_done=true;_trace.stop()}}createInstance(ctorOrDescriptor,...rest){let _trace;let result;if(ctorOrDescriptor instanceof SyncDescriptor){_trace=Trace.traceCreation(this._enableTracing,ctorOrDescriptor.ctor);result=this._createInstance(ctorOrDescriptor.ctor,ctorOrDescriptor.staticArguments.concat(rest),_trace)}else{_trace=Trace.traceCreation(this._enableTracing,ctorOrDescriptor);result=this._createInstance(ctorOrDescriptor,rest,_trace)}_trace.stop();return result}_createInstance(ctor,args=[],_trace){const serviceDependencies=_util.getServiceDependencies(ctor).sort(((a,b)=>a.index-b.index));const serviceArgs=[];for(const dependency of serviceDependencies){const service=this._getOrCreateServiceInstance(dependency.id,_trace);if(!service){this._throwIfStrict(`[createInstance] ${ctor.name} depends on UNKNOWN service ${dependency.id}.`,false)}serviceArgs.push(service)}const firstServiceArgPos=serviceDependencies.length>0?serviceDependencies[0].index:args.length;if(args.length!==firstServiceArgPos){console.trace(`[createInstance] First service dependency of ${ctor.name} at position ${firstServiceArgPos+1} conflicts with ${args.length} static arguments`);const delta=firstServiceArgPos-args.length;if(delta>0){args=args.concat(new Array(delta))}else{args=args.slice(0,firstServiceArgPos)}}return Reflect.construct(ctor,args.concat(serviceArgs))}_setServiceInstance(id,instance){if(this._services.get(id)instanceof SyncDescriptor){this._services.set(id,instance)}else if(this._parent){this._parent._setServiceInstance(id,instance)}else{throw new Error("illegalState - setting UNKNOWN service instance")}}_getServiceInstanceOrDescriptor(id){const instanceOrDesc=this._services.get(id);if(!instanceOrDesc&&this._parent){return this._parent._getServiceInstanceOrDescriptor(id)}else{return instanceOrDesc}}_getOrCreateServiceInstance(id,_trace){if(this._globalGraph&&this._globalGraphImplicitDependency){this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(id))}const thing=this._getServiceInstanceOrDescriptor(id);if(thing instanceof SyncDescriptor){return this._safeCreateAndCacheServiceInstance(id,thing,_trace.branch(id,true))}else{_trace.branch(id,false);return thing}}_safeCreateAndCacheServiceInstance(id,desc,_trace){if(this._activeInstantiations.has(id)){throw new Error(`illegal state - RECURSIVELY instantiating service '${id}'`)}this._activeInstantiations.add(id);try{return this._createAndCacheServiceInstance(id,desc,_trace)}finally{this._activeInstantiations.delete(id)}}_createAndCacheServiceInstance(id,desc,_trace){var _a6;const graph=new Graph((data=>data.id.toString()));let cycleCount=0;const stack=[{id:id,desc:desc,_trace:_trace}];while(stack.length){const item=stack.pop();graph.lookupOrInsertNode(item);if(cycleCount++>1e3){throw new CyclicDependencyError(graph)}for(const dependency of _util.getServiceDependencies(item.desc.ctor)){const instanceOrDesc=this._getServiceInstanceOrDescriptor(dependency.id);if(!instanceOrDesc){this._throwIfStrict(`[createInstance] ${id} depends on ${dependency.id} which is NOT registered.`,true)}(_a6=this._globalGraph)===null||_a6===void 0?void 0:_a6.insertEdge(String(item.id),String(dependency.id));if(instanceOrDesc instanceof SyncDescriptor){const d={id:dependency.id,desc:instanceOrDesc,_trace:item._trace.branch(dependency.id,true)};graph.insertEdge(item,d);stack.push(d)}}}while(true){const roots=graph.roots();if(roots.length===0){if(!graph.isEmpty()){throw new CyclicDependencyError(graph)}break}for(const{data:data}of roots){const instanceOrDesc=this._getServiceInstanceOrDescriptor(data.id);if(instanceOrDesc instanceof SyncDescriptor){const instance=this._createServiceInstanceWithOwner(data.id,data.desc.ctor,data.desc.staticArguments,data.desc.supportsDelayedInstantiation,data._trace);this._setServiceInstance(data.id,instance)}graph.removeNode(data)}}return this._getServiceInstanceOrDescriptor(id)}_createServiceInstanceWithOwner(id,ctor,args=[],supportsDelayedInstantiation,_trace){if(this._services.get(id)instanceof SyncDescriptor){return this._createServiceInstance(id,ctor,args,supportsDelayedInstantiation,_trace)}else if(this._parent){return this._parent._createServiceInstanceWithOwner(id,ctor,args,supportsDelayedInstantiation,_trace)}else{throw new Error(`illegalState - creating UNKNOWN service instance ${ctor.name}`)}}_createServiceInstance(id,ctor,args=[],supportsDelayedInstantiation,_trace){if(!supportsDelayedInstantiation){return this._createInstance(ctor,args,_trace)}else{const child=new InstantiationService(void 0,this._strict,this,this._enableTracing);child._globalGraphImplicitDependency=String(id);const earlyListeners=new Map;const idle=new IdleValue((()=>{const result=child._createInstance(ctor,args,_trace);for(const[key,values]of earlyListeners){const candidate=result[key];if(typeof candidate==="function"){for(const listener of values){candidate.apply(result,listener)}}}earlyListeners.clear();return result}));return new Proxy(Object.create(null),{get(target,key){if(!idle.isInitialized){if(typeof key==="string"&&(key.startsWith("onDid")||key.startsWith("onWill"))){let list=earlyListeners.get(key);if(!list){list=new LinkedList;earlyListeners.set(key,list)}const event=(callback,thisArg,disposables)=>{const rm=list.push([callback,thisArg,disposables]);return toDisposable(rm)};return event}}if(key in target){return target[key]}const obj=idle.value;let prop=obj[key];if(typeof prop!=="function"){return prop}prop=prop.bind(obj);target[key]=prop;return prop},set(_target,p,value){idle.value[p]=value;return true},getPrototypeOf(_target){return ctor.prototype}})}}_throwIfStrict(msg,printWarning){if(printWarning){console.warn(msg)}if(this._strict){throw new Error(msg)}}};Trace=class{static traceInvocation(_enableTracing,ctor){return!_enableTracing?Trace._None:new Trace(2,ctor.name||(new Error).stack.split("\n").slice(3,4).join("\n"))}static traceCreation(_enableTracing,ctor){return!_enableTracing?Trace._None:new Trace(1,ctor.name)}constructor(type,name){this.type=type;this.name=name;this._start=Date.now();this._dep=[]}branch(id,first2){const child=new Trace(3,id.toString());this._dep.push([id,first2,child]);return child}stop(){const dur=Date.now()-this._start;Trace._totals+=dur;let causedCreation=false;function printChild(n,trace){const res=[];const prefix=new Array(n+1).join("\t");for(const[id,first2,child]of trace._dep){if(first2&&child){causedCreation=true;res.push(`${prefix}CREATES -> ${id}`);const nested=printChild(n+1,child);if(nested){res.push(nested)}}else{res.push(`${prefix}uses -> ${id}`)}}return res.join("\n")}const lines=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${printChild(1,this)}`,`DONE, took ${dur.toFixed(2)}ms (grand total ${Trace._totals.toFixed(2)}ms)`];if(dur>2||causedCreation){Trace.all.add(lines.join("\n"))}}};Trace.all=new Set;Trace._None=new class extends Trace{constructor(){super(0,null)}stop(){}branch(){return this}};Trace._totals=0}});var unsupportedSchemas,DoubleResourceMap,MarkerStats,MarkerService;var init_markerService=__esm({"node_modules/monaco-editor/esm/vs/platform/markers/common/markerService.js"(){init_arrays();init_event();init_iterator();init_map();init_network();init_uri();init_markers();unsupportedSchemas=new Set([Schemas.inMemory,Schemas.vscodeSourceControl,Schemas.walkThrough,Schemas.walkThroughSnippet]);DoubleResourceMap=class{constructor(){this._byResource=new ResourceMap;this._byOwner=new Map}set(resource,owner,value){let ownerMap=this._byResource.get(resource);if(!ownerMap){ownerMap=new Map;this._byResource.set(resource,ownerMap)}ownerMap.set(owner,value);let resourceMap=this._byOwner.get(owner);if(!resourceMap){resourceMap=new ResourceMap;this._byOwner.set(owner,resourceMap)}resourceMap.set(resource,value)}get(resource,owner){const ownerMap=this._byResource.get(resource);return ownerMap===null||ownerMap===void 0?void 0:ownerMap.get(owner)}delete(resource,owner){let removedA=false;let removedB=false;const ownerMap=this._byResource.get(resource);if(ownerMap){removedA=ownerMap.delete(owner)}const resourceMap=this._byOwner.get(owner);if(resourceMap){removedB=resourceMap.delete(resource)}if(removedA!==removedB){throw new Error("illegal state")}return removedA&&removedB}values(key){var _a6,_b3,_c2,_d2;if(typeof key==="string"){return(_b3=(_a6=this._byOwner.get(key))===null||_a6===void 0?void 0:_a6.values())!==null&&_b3!==void 0?_b3:Iterable.empty()}if(URI.isUri(key)){return(_d2=(_c2=this._byResource.get(key))===null||_c2===void 0?void 0:_c2.values())!==null&&_d2!==void 0?_d2:Iterable.empty()}return Iterable.map(Iterable.concat(...this._byOwner.values()),(map=>map[1]))}};MarkerStats=class{constructor(service){this.errors=0;this.infos=0;this.warnings=0;this.unknowns=0;this._data=new ResourceMap;this._service=service;this._subscription=service.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(resources){for(const resource of resources){const oldStats=this._data.get(resource);if(oldStats){this._substract(oldStats)}const newStats=this._resourceStats(resource);this._add(newStats);this._data.set(resource,newStats)}}_resourceStats(resource){const result={errors:0,warnings:0,infos:0,unknowns:0};if(unsupportedSchemas.has(resource.scheme)){return result}for(const{severity:severity}of this._service.read({resource:resource})){if(severity===MarkerSeverity2.Error){result.errors+=1}else if(severity===MarkerSeverity2.Warning){result.warnings+=1}else if(severity===MarkerSeverity2.Info){result.infos+=1}else{result.unknowns+=1}}return result}_substract(op){this.errors-=op.errors;this.warnings-=op.warnings;this.infos-=op.infos;this.unknowns-=op.unknowns}_add(op){this.errors+=op.errors;this.warnings+=op.warnings;this.infos+=op.infos;this.unknowns+=op.unknowns}};MarkerService=class{constructor(){this._onMarkerChanged=new DebounceEmitter({delay:0,merge:MarkerService._merge});this.onMarkerChanged=this._onMarkerChanged.event;this._data=new DoubleResourceMap;this._stats=new MarkerStats(this)}dispose(){this._stats.dispose();this._onMarkerChanged.dispose()}remove(owner,resources){for(const resource of resources||[]){this.changeOne(owner,resource,[])}}changeOne(owner,resource,markerData){if(isFalsyOrEmpty(markerData)){const removed=this._data.delete(resource,owner);if(removed){this._onMarkerChanged.fire([resource])}}else{const markers=[];for(const data of markerData){const marker=MarkerService._toMarker(owner,resource,data);if(marker){markers.push(marker)}}this._data.set(resource,owner,markers);this._onMarkerChanged.fire([resource])}}static _toMarker(owner,resource,data){let{code:code,severity:severity,message:message,source:source,startLineNumber:startLineNumber,startColumn:startColumn,endLineNumber:endLineNumber,endColumn:endColumn,relatedInformation:relatedInformation,tags:tags}=data;if(!message){return void 0}startLineNumber=startLineNumber>0?startLineNumber:1;startColumn=startColumn>0?startColumn:1;endLineNumber=endLineNumber>=startLineNumber?endLineNumber:startLineNumber;endColumn=endColumn>0?endColumn:startColumn;return{resource:resource,owner:owner,code:code,severity:severity,message:message,source:source,startLineNumber:startLineNumber,startColumn:startColumn,endLineNumber:endLineNumber,endColumn:endColumn,relatedInformation:relatedInformation,tags:tags}}changeAll(owner,data){const changes=[];const existing=this._data.values(owner);if(existing){for(const data2 of existing){const first2=Iterable.first(data2);if(first2){changes.push(first2.resource);this._data.delete(first2.resource,owner)}}}if(isNonEmptyArray(data)){const groups=new ResourceMap;for(const{resource:resource,marker:markerData}of data){const marker=MarkerService._toMarker(owner,resource,markerData);if(!marker){continue}const array2=groups.get(resource);if(!array2){groups.set(resource,[marker]);changes.push(resource)}else{array2.push(marker)}}for(const[resource,value]of groups){this._data.set(resource,owner,value)}}if(changes.length>0){this._onMarkerChanged.fire(changes)}}read(filter=Object.create(null)){let{owner:owner,resource:resource,severities:severities,take:take}=filter;if(!take||take<0){take=-1}if(owner&&resource){const data=this._data.get(resource,owner);if(!data){return[]}else{const result=[];for(const marker of data){if(MarkerService._accept(marker,severities)){const newLen=result.push(marker);if(take>0&&newLen===take){break}}}return result}}else if(!owner&&!resource){const result=[];for(const markers of this._data.values()){for(const data of markers){if(MarkerService._accept(data,severities)){const newLen=result.push(data);if(take>0&&newLen===take){return result}}}}return result}else{const iterable=this._data.values(resource!==null&&resource!==void 0?resource:owner);const result=[];for(const markers of iterable){for(const data of markers){if(MarkerService._accept(data,severities)){const newLen=result.push(data);if(take>0&&newLen===take){return result}}}}return result}}static _accept(marker,severities){return severities===void 0||(severities&marker.severity)===marker.severity}static _merge(all){const set=new ResourceMap;for(const array2 of all){for(const item of array2){set.set(item,true)}}return Array.from(set.keys())}}}});var DefaultConfiguration;var init_configurations=__esm({"node_modules/monaco-editor/esm/vs/platform/configuration/common/configurations.js"(){init_lifecycle();init_configurationModels();init_configurationRegistry();init_platform2();DefaultConfiguration=class extends Disposable{constructor(){super(...arguments);this._configurationModel=new ConfigurationModel}get configurationModel(){return this._configurationModel}reload(){this.resetConfigurationModel();return this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new ConfigurationModel;const properties=Registry.as(Extensions2.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(properties),properties)}updateConfigurationModel(properties,configurationProperties){const configurationDefaultsOverrides=this.getConfigurationDefaultOverrides();for(const key of properties){const defaultOverrideValue=configurationDefaultsOverrides[key];const propertySchema=configurationProperties[key];if(defaultOverrideValue!==void 0){this._configurationModel.addValue(key,defaultOverrideValue)}else if(propertySchema){this._configurationModel.addValue(key,propertySchema.default)}else{this._configurationModel.removeValue(key)}}}}}});var LogService;var init_logService=__esm({"node_modules/monaco-editor/esm/vs/platform/log/common/logService.js"(){init_lifecycle();init_log();LogService=class extends Disposable{constructor(primaryLogger,otherLoggers=[]){super();this.logger=new MultiplexLogger([primaryLogger,...otherLoggers]);this._register(primaryLogger.onDidChangeLogLevel((level=>this.setLevel(level))))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(level){this.logger.setLevel(level)}getLevel(){return this.logger.getLevel()}trace(message,...args){this.logger.trace(message,...args)}debug(message,...args){this.logger.debug(message,...args)}info(message,...args){this.logger.info(message,...args)}warn(message,...args){this.logger.warn(message,...args)}error(message,...args){this.logger.error(message,...args)}}}});function registerEditorFeature(ctor){editorFeatures.push(ctor)}function getEditorFeatures(){return editorFeatures.slice(0)}var editorFeatures;var init_editorFeatures=__esm({"node_modules/monaco-editor/esm/vs/editor/common/editorFeatures.js"(){editorFeatures=[]}});function isConfigurationOverrides(thing){return thing&&typeof thing==="object"&&(!thing.overrideIdentifier||typeof thing.overrideIdentifier==="string")&&(!thing.resource||thing.resource instanceof URI)}function updateConfigurationService(configurationService,source,isDiffEditor2){if(!source){return}if(!(configurationService instanceof StandaloneConfigurationService)){return}const toUpdate=[];Object.keys(source).forEach((key=>{if(isEditorConfigurationKey(key)){toUpdate.push([`editor.${key}`,source[key]])}if(isDiffEditor2&&isDiffEditorConfigurationKey(key)){toUpdate.push([`diffEditor.${key}`,source[key]])}}));if(toUpdate.length>0){configurationService.updateValues(toUpdate)}}var __decorate44,__param37,__awaiter27,SimpleModel,StandaloneTextModelService,StandaloneEditorProgressService,StandaloneProgressService,StandaloneEnvironmentService,StandaloneDialogService,StandaloneNotificationService,StandaloneCommandService,StandaloneKeybindingService,DomNodeListeners,StandaloneConfigurationService,StandaloneResourceConfigurationService,StandaloneResourcePropertiesService,StandaloneTelemetryService,StandaloneWorkspaceContextService,StandaloneBulkEditService,StandaloneUriLabelService,StandaloneContextViewService,StandaloneWorkspaceTrustManagementService,StandaloneLanguageService,StandaloneLogService,StandaloneContextMenuService,StandaloneAudioService,StandaloneServices;var init_standaloneServices=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js"(){init_languageConfigurationRegistry();init_standaloneCodeEditorService();init_standaloneLayoutService();init_undoRedoService();init_languageFeatureDebounce();init_semanticTokensStylingService();init_languageFeaturesService();init_strings();init_dom();init_keyboardEvent();init_event();init_keybindings();init_lifecycle();init_platform();init_severity();init_uri();init_bulkEditService();init_editorConfigurationSchema();init_editOperation();init_position();init_range();init_model2();init_resolverService();init_textResourceConfiguration();init_commands();init_configuration();init_configurationModels();init_contextkey();init_dialogs();init_instantiation();init_abstractKeybindingService();init_keybinding();init_keybindingResolver();init_keybindingsRegistry();init_resolvedKeybindingItem();init_usLayoutResolvedKeybinding();init_label();init_notification();init_progress();init_telemetry();init_workspace();init_layoutService();init_standaloneStrings();init_resources();init_codeEditorService();init_log();init_workspaceTrust();init_contextView();init_contextViewService();init_languageService();init_contextMenuService();init_extensions();init_openerService();init_editorWorker();init_editorWorkerService();init_language();init_markerDecorationsService();init_markerDecorations();init_modelService();init_standaloneQuickInputService();init_standaloneThemeService();init_standaloneTheme();init_accessibilityService();init_accessibility();init_actions2();init_menuService();init_clipboardService2();init_clipboardService();init_contextKeyService();init_descriptors();init_instantiationService();init_serviceCollection();init_listService();init_markers();init_markerService();init_opener();init_quickInput();init_storage2();init_configurations();init_audioCueService();init_logService();init_editorFeatures();init_errors();init_environment();__decorate44=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param37=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter27=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};SimpleModel=class{constructor(model){this.disposed=false;this.model=model;this._onWillDispose=new Emitter}get textEditorModel(){return this.model}dispose(){this.disposed=true;this._onWillDispose.fire()}};StandaloneTextModelService=class StandaloneTextModelService2{constructor(modelService){this.modelService=modelService}createModelReference(resource){const model=this.modelService.getModel(resource);if(!model){return Promise.reject(new Error(`Model not found`))}return Promise.resolve(new ImmortalReference(new SimpleModel(model)))}};StandaloneTextModelService=__decorate44([__param37(0,IModelService)],StandaloneTextModelService);StandaloneEditorProgressService=class{show(){return StandaloneEditorProgressService.NULL_PROGRESS_RUNNER}showWhile(promise,delay){return __awaiter27(this,void 0,void 0,(function*(){yield promise}))}};StandaloneEditorProgressService.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};StandaloneProgressService=class{withProgress(_options,task,onDidCancel){return task({report:()=>{}})}};StandaloneEnvironmentService=class{constructor(){this.isExtensionDevelopment=false;this.isBuilt=false}};StandaloneDialogService=class{confirm(confirmation){return __awaiter27(this,void 0,void 0,(function*(){const confirmed=this.doConfirm(confirmation.message,confirmation.detail);return{confirmed:confirmed,checkboxChecked:false}}))}doConfirm(message,detail){let messageText=message;if(detail){messageText=messageText+"\n\n"+detail}return window.confirm(messageText)}prompt(prompt){var _a6,_b3;return __awaiter27(this,void 0,void 0,(function*(){let result=void 0;const confirmed=this.doConfirm(prompt.message,prompt.detail);if(confirmed){const promptButtons=[...(_a6=prompt.buttons)!==null&&_a6!==void 0?_a6:[]];if(prompt.cancelButton&&typeof prompt.cancelButton!=="string"&&typeof prompt.cancelButton!=="boolean"){promptButtons.push(prompt.cancelButton)}result=yield(_b3=promptButtons[0])===null||_b3===void 0?void 0:_b3.run({checkboxChecked:false})}return{result:result}}))}error(message,detail){return __awaiter27(this,void 0,void 0,(function*(){yield this.prompt({type:severity_default.Error,message:message,detail:detail})}))}};StandaloneNotificationService=class{info(message){return this.notify({severity:severity_default.Info,message:message})}warn(message){return this.notify({severity:severity_default.Warning,message:message})}error(error){return this.notify({severity:severity_default.Error,message:error})}notify(notification){switch(notification.severity){case severity_default.Error:console.error(notification.message);break;case severity_default.Warning:console.warn(notification.message);break;default:console.log(notification.message);break}return StandaloneNotificationService.NO_OP}prompt(severity,message,choices,options2){return StandaloneNotificationService.NO_OP}status(message,options2){return Disposable.None}};StandaloneNotificationService.NO_OP=new NoOpNotification;StandaloneCommandService=class StandaloneCommandService2{constructor(instantiationService){this._onWillExecuteCommand=new Emitter;this._onDidExecuteCommand=new Emitter;this.onDidExecuteCommand=this._onDidExecuteCommand.event;this._instantiationService=instantiationService}executeCommand(id,...args){const command=CommandsRegistry.getCommand(id);if(!command){return Promise.reject(new Error(`command '${id}' not found`))}try{this._onWillExecuteCommand.fire({commandId:id,args:args});const result=this._instantiationService.invokeFunction.apply(this._instantiationService,[command.handler,...args]);this._onDidExecuteCommand.fire({commandId:id,args:args});return Promise.resolve(result)}catch(err){return Promise.reject(err)}}};StandaloneCommandService=__decorate44([__param37(0,IInstantiationService)],StandaloneCommandService);StandaloneKeybindingService=class StandaloneKeybindingService2 extends AbstractKeybindingService{constructor(contextKeyService,commandService,telemetryService,notificationService,logService,codeEditorService){super(contextKeyService,commandService,telemetryService,notificationService,logService);this._cachedResolver=null;this._dynamicKeybindings=[];this._domNodeListeners=[];const addContainer=domNode=>{const disposables=new DisposableStore;disposables.add(addDisposableListener(domNode,EventType.KEY_DOWN,(e=>{const keyEvent=new StandardKeyboardEvent(e);const shouldPreventDefault=this._dispatch(keyEvent,keyEvent.target);if(shouldPreventDefault){keyEvent.preventDefault();keyEvent.stopPropagation()}})));disposables.add(addDisposableListener(domNode,EventType.KEY_UP,(e=>{const keyEvent=new StandardKeyboardEvent(e);const shouldPreventDefault=this._singleModifierDispatch(keyEvent,keyEvent.target);if(shouldPreventDefault){keyEvent.preventDefault()}})));this._domNodeListeners.push(new DomNodeListeners(domNode,disposables))};const removeContainer=domNode=>{for(let i=0;i{if(codeEditor.getOption(60)){return}addContainer(codeEditor.getContainerDomNode())};const removeCodeEditor=codeEditor=>{if(codeEditor.getOption(60)){return}removeContainer(codeEditor.getContainerDomNode())};this._register(codeEditorService.onCodeEditorAdd(addCodeEditor));this._register(codeEditorService.onCodeEditorRemove(removeCodeEditor));codeEditorService.listCodeEditors().forEach(addCodeEditor);const addDiffEditor=diffEditor=>{addContainer(diffEditor.getContainerDomNode())};const removeDiffEditor=diffEditor=>{removeContainer(diffEditor.getContainerDomNode())};this._register(codeEditorService.onDiffEditorAdd(addDiffEditor));this._register(codeEditorService.onDiffEditorRemove(removeDiffEditor));codeEditorService.listDiffEditors().forEach(addDiffEditor)}addDynamicKeybinding(command,keybinding,handler,when){return combinedDisposable(CommandsRegistry.registerCommand(command,handler),this.addDynamicKeybindings([{keybinding:keybinding,command:command,when:when}]))}addDynamicKeybindings(rules){const entries2=rules.map((rule=>{var _a6;const keybinding=decodeKeybinding(rule.keybinding,OS);return{keybinding:keybinding,command:(_a6=rule.command)!==null&&_a6!==void 0?_a6:null,commandArgs:rule.commandArgs,when:rule.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:false}}));this._dynamicKeybindings=this._dynamicKeybindings.concat(entries2);this.updateResolver();return toDisposable((()=>{for(let i=0;ithis._log(str)))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(items,isDefault){const result=[];let resultLen=0;for(const item of items){const when=item.when||void 0;const keybinding=item.keybinding;if(!keybinding){result[resultLen++]=new ResolvedKeybindingItem(void 0,item.command,item.commandArgs,when,isDefault,null,false)}else{const resolvedKeybindings=USLayoutResolvedKeybinding.resolveKeybinding(keybinding,OS);for(const resolvedKeybinding of resolvedKeybindings){result[resultLen++]=new ResolvedKeybindingItem(resolvedKeybinding,item.command,item.commandArgs,when,isDefault,null,false)}}}return result}resolveKeyboardEvent(keyboardEvent){const chord=new KeyCodeChord(keyboardEvent.ctrlKey,keyboardEvent.shiftKey,keyboardEvent.altKey,keyboardEvent.metaKey,keyboardEvent.keyCode);return new USLayoutResolvedKeybinding([chord],OS)}};StandaloneKeybindingService=__decorate44([__param37(0,IContextKeyService),__param37(1,ICommandService),__param37(2,ITelemetryService),__param37(3,INotificationService),__param37(4,ILogService),__param37(5,ICodeEditorService)],StandaloneKeybindingService);DomNodeListeners=class extends Disposable{constructor(domNode,disposables){super();this.domNode=domNode;this._register(disposables)}};StandaloneConfigurationService=class{constructor(){this._onDidChangeConfiguration=new Emitter;this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const defaultConfiguration=new DefaultConfiguration;this._configuration=new Configuration(defaultConfiguration.reload(),new ConfigurationModel,new ConfigurationModel,new ConfigurationModel);defaultConfiguration.dispose()}getValue(arg1,arg2){const section=typeof arg1==="string"?arg1:void 0;const overrides=isConfigurationOverrides(arg1)?arg1:isConfigurationOverrides(arg2)?arg2:{};return this._configuration.getValue(section,overrides,void 0)}updateValues(values){const previous={data:this._configuration.toData()};const changedKeys=[];for(const entry of values){const[key,value]=entry;if(this.getValue(key)===value){continue}this._configuration.updateValue(key,value);changedKeys.push(key)}if(changedKeys.length>0){const configurationChangeEvent=new ConfigurationChangeEvent({keys:changedKeys,overrides:[]},previous,this._configuration);configurationChangeEvent.source=8;configurationChangeEvent.sourceConfig=null;this._onDidChangeConfiguration.fire(configurationChangeEvent)}return Promise.resolve()}updateValue(key,value,arg3,arg4){return this.updateValues([[key,value]])}inspect(key,options2={}){return this._configuration.inspect(key,options2,void 0)}};StandaloneResourceConfigurationService=class StandaloneResourceConfigurationService2{constructor(configurationService,modelService,languageService){this.configurationService=configurationService;this.modelService=modelService;this.languageService=languageService;this._onDidChangeConfiguration=new Emitter;this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(resource,configuration)=>e.affectsConfiguration(configuration)})}))}getValue(resource,arg2,arg3){const position=Position.isIPosition(arg2)?arg2:null;const section=position?typeof arg3==="string"?arg3:void 0:typeof arg2==="string"?arg2:void 0;const language81=resource?this.getLanguage(resource,position):void 0;if(typeof section==="undefined"){return this.configurationService.getValue({resource:resource,overrideIdentifier:language81})}return this.configurationService.getValue(section,{resource:resource,overrideIdentifier:language81})}getLanguage(resource,position){const model=this.modelService.getModel(resource);if(model){return position?model.getLanguageIdAtPosition(position.lineNumber,position.column):model.getLanguageId()}return this.languageService.guessLanguageIdByFilepathOrFirstLine(resource)}};StandaloneResourceConfigurationService=__decorate44([__param37(0,IConfigurationService),__param37(1,IModelService),__param37(2,ILanguageService)],StandaloneResourceConfigurationService);StandaloneResourcePropertiesService=class StandaloneResourcePropertiesService2{constructor(configurationService){this.configurationService=configurationService}getEOL(resource,language81){const eol=this.configurationService.getValue("files.eol",{overrideIdentifier:language81,resource:resource});if(eol&&typeof eol==="string"&&eol!=="auto"){return eol}return isLinux||isMacintosh?"\n":"\r\n"}};StandaloneResourcePropertiesService=__decorate44([__param37(0,IConfigurationService)],StandaloneResourcePropertiesService);StandaloneTelemetryService=class{publicLog2(){}};StandaloneWorkspaceContextService=class{constructor(){const resource=URI.from({scheme:StandaloneWorkspaceContextService.SCHEME,authority:"model",path:"/"});this.workspace={id:STANDALONE_EDITOR_WORKSPACE_ID,folders:[new WorkspaceFolder({uri:resource,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(resource){return resource&&resource.scheme===StandaloneWorkspaceContextService.SCHEME?this.workspace.folders[0]:null}};StandaloneWorkspaceContextService.SCHEME="inmemory";StandaloneBulkEditService=class StandaloneBulkEditService2{constructor(_modelService){this._modelService=_modelService}hasPreviewHandler(){return false}apply(editsIn,_options){return __awaiter27(this,void 0,void 0,(function*(){const edits=Array.isArray(editsIn)?editsIn:ResourceEdit.convert(editsIn);const textEdits=new Map;for(const edit of edits){if(!(edit instanceof ResourceTextEdit)){throw new Error("bad edit - only text edits are supported")}const model=this._modelService.getModel(edit.resource);if(!model){throw new Error("bad edit - model not found")}if(typeof edit.versionId==="number"&&model.getVersionId()!==edit.versionId){throw new Error("bad state - model changed in the meantime")}let array2=textEdits.get(model);if(!array2){array2=[];textEdits.set(model,array2)}array2.push(EditOperation.replaceMove(Range.lift(edit.textEdit.range),edit.textEdit.text))}let totalEdits=0;let totalFiles=0;for(const[model,edits2]of textEdits){model.pushStackElement();model.pushEditOperations([],edits2,(()=>[]));model.pushStackElement();totalFiles+=1;totalEdits+=edits2.length}return{ariaSummary:format(StandaloneServicesNLS.bulkEditServiceSummary,totalEdits,totalFiles),isApplied:totalEdits>0}}))}};StandaloneBulkEditService=__decorate44([__param37(0,IModelService)],StandaloneBulkEditService);StandaloneUriLabelService=class{getUriLabel(resource,options2){if(resource.scheme==="file"){return resource.fsPath}return resource.path}getUriBasenameLabel(resource){return basename2(resource)}};StandaloneContextViewService=class StandaloneContextViewService2 extends ContextViewService{constructor(layoutService,_codeEditorService){super(layoutService);this._codeEditorService=_codeEditorService}showContextView(delegate,container,shadowRoot){if(!container){const codeEditor=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();if(codeEditor){container=codeEditor.getContainerDomNode()}}return super.showContextView(delegate,container,shadowRoot)}};StandaloneContextViewService=__decorate44([__param37(0,ILayoutService),__param37(1,ICodeEditorService)],StandaloneContextViewService);StandaloneWorkspaceTrustManagementService=class{constructor(){this._neverEmitter=new Emitter;this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return true}};StandaloneLanguageService=class extends LanguageService{constructor(){super()}};StandaloneLogService=class extends LogService{constructor(){super(new ConsoleLogger)}};StandaloneContextMenuService=class StandaloneContextMenuService2 extends ContextMenuService{constructor(telemetryService,notificationService,contextViewService,keybindingService,menuService,contextKeyService){super(telemetryService,notificationService,contextViewService,keybindingService,menuService,contextKeyService);this.configure({blockMouse:false})}};StandaloneContextMenuService=__decorate44([__param37(0,ITelemetryService),__param37(1,INotificationService),__param37(2,IContextViewService),__param37(3,IKeybindingService),__param37(4,IMenuService),__param37(5,IContextKeyService)],StandaloneContextMenuService);StandaloneAudioService=class{playAudioCue(cue,options2){return __awaiter27(this,void 0,void 0,(function*(){}))}};registerSingleton(IConfigurationService,StandaloneConfigurationService,0);registerSingleton(ITextResourceConfigurationService,StandaloneResourceConfigurationService,0);registerSingleton(ITextResourcePropertiesService,StandaloneResourcePropertiesService,0);registerSingleton(IWorkspaceContextService,StandaloneWorkspaceContextService,0);registerSingleton(ILabelService,StandaloneUriLabelService,0);registerSingleton(ITelemetryService,StandaloneTelemetryService,0);registerSingleton(IDialogService,StandaloneDialogService,0);registerSingleton(IEnvironmentService,StandaloneEnvironmentService,0);registerSingleton(INotificationService,StandaloneNotificationService,0);registerSingleton(IMarkerService,MarkerService,0);registerSingleton(ILanguageService,StandaloneLanguageService,0);registerSingleton(IStandaloneThemeService,StandaloneThemeService,0);registerSingleton(ILogService,StandaloneLogService,0);registerSingleton(IModelService,ModelService,0);registerSingleton(IMarkerDecorationsService,MarkerDecorationsService,0);registerSingleton(IContextKeyService,ContextKeyService,0);registerSingleton(IProgressService,StandaloneProgressService,0);registerSingleton(IEditorProgressService,StandaloneEditorProgressService,0);registerSingleton(IStorageService,InMemoryStorageService,0);registerSingleton(IEditorWorkerService,EditorWorkerService,0);registerSingleton(IBulkEditService,StandaloneBulkEditService,0);registerSingleton(IWorkspaceTrustManagementService,StandaloneWorkspaceTrustManagementService,0);registerSingleton(ITextModelService,StandaloneTextModelService,0);registerSingleton(IAccessibilityService,AccessibilityService,0);registerSingleton(IListService,ListService,0);registerSingleton(ICommandService,StandaloneCommandService,0);registerSingleton(IKeybindingService,StandaloneKeybindingService,0);registerSingleton(IQuickInputService,StandaloneQuickInputService,0);registerSingleton(IContextViewService,StandaloneContextViewService,0);registerSingleton(IOpenerService,OpenerService,0);registerSingleton(IClipboardService,BrowserClipboardService,0);registerSingleton(IContextMenuService,StandaloneContextMenuService,0);registerSingleton(IMenuService,MenuService,0);registerSingleton(IAudioCueService,StandaloneAudioService,0);(function(StandaloneServices2){const serviceCollection=new ServiceCollection;for(const[id,descriptor]of getSingletonServiceDescriptors()){serviceCollection.set(id,descriptor)}const instantiationService=new InstantiationService(serviceCollection,true);serviceCollection.set(IInstantiationService,instantiationService);function get(serviceId){if(!initialized){initialize2({})}const r=serviceCollection.get(serviceId);if(!r){throw new Error("Missing service "+serviceId)}if(r instanceof SyncDescriptor){return instantiationService.invokeFunction((accessor=>accessor.get(serviceId)))}else{return r}}StandaloneServices2.get=get;let initialized=false;const onDidInitialize=new Emitter;function initialize2(overrides){if(initialized){return instantiationService}initialized=true;for(const[id,descriptor]of getSingletonServiceDescriptors()){if(!serviceCollection.get(id)){serviceCollection.set(id,descriptor)}}for(const serviceId in overrides){if(overrides.hasOwnProperty(serviceId)){const serviceIdentifier=createDecorator(serviceId);const r=serviceCollection.get(serviceIdentifier);if(r instanceof SyncDescriptor){serviceCollection.set(serviceIdentifier,overrides[serviceId])}}}const editorFeatures2=getEditorFeatures();for(const feature of editorFeatures2){try{instantiationService.createInstance(feature)}catch(err){onUnexpectedError(err)}}onDidInitialize.fire();return instantiationService}StandaloneServices2.initialize=initialize2;function withServices(callback){if(initialized){return callback()}const disposable=new DisposableStore;const listener=disposable.add(onDidInitialize.event((()=>{listener.dispose();disposable.add(callback())})));return disposable}StandaloneServices2.withServices=withServices})(StandaloneServices||(StandaloneServices={}))}});function setLogger(logger){globalObservableLogger=logger}function getLogger(){return globalObservableLogger}function consoleTextToArgs(text2){const styles=new Array;const data=[];let firstArg="";function process2(t2){if("length"in t2){for(const item of t2){if(item){process2(item)}}}else if("text"in t2){firstArg+=`%c${t2.text}`;styles.push(t2.style);if(t2.data){data.push(...t2.data)}}else if("data"in t2){data.push(...t2.data)}}process2(text2);const result=[firstArg,...styles];result.push(...data);return result}function normalText(text2){return styled(text2,{color:"black"})}function formatKind(kind){return styled(padStr(`${kind}: `,10),{color:"black",bold:true})}function styled(text2,options2={color:"black"}){function objToCss(styleObj){return Object.entries(styleObj).reduce(((styleString,[propName,propValue])=>`${styleString}${propName}:${propValue};`),"")}const style={color:options2.color};if(options2.strikeThrough){style["text-decoration"]="line-through"}if(options2.bold){style["font-weight"]="bold"}return{text:text2,style:objToCss(style)}}function formatValue(value,availableLen){switch(typeof value){case"number":return""+value;case"string":if(value.length+2<=availableLen){return`"${value}"`}return`"${value.substr(0,availableLen-7)}"+...`;case"boolean":return value?"true":"false";case"undefined":return"undefined";case"object":if(value===null){return"null"}if(Array.isArray(value)){return formatArray(value,availableLen)}return formatObject(value,availableLen);case"symbol":return value.toString();case"function":return`[[Function${value.name?" "+value.name:""}]]`;default:return""+value}}function formatArray(value,availableLen){let result="[ ";let first2=true;for(const val of value){if(!first2){result+=", "}if(result.length-5>availableLen){result+="...";break}first2=false;result+=`${formatValue(val,availableLen-result.length)}`}result+=" ]";return result}function formatObject(value,availableLen){let result="{ ";let first2=true;for(const[key,val]of Object.entries(value)){if(!first2){result+=", "}if(result.length-5>availableLen){result+="...";break}first2=false;result+=`${key}: ${formatValue(val,availableLen-result.length)}`}result+=" }";return result}function repeat(str,count){let result="";for(let i=1;i<=count;i++){result+=str}return result}function padStr(str,length2){while(str.lengtho.debugName)).join(", ")+")",{color:"gray"})}handleDerivedCreated(derived2){const existingHandleChange=derived2.handleChange;this.changedObservablesSets.set(derived2,new Set);derived2.handleChange=(observable,change)=>{this.changedObservablesSets.get(derived2).add(observable);return existingHandleChange.apply(derived2,[observable,change])}}handleDerivedRecomputed(derived2,info){const changedObservables=this.changedObservablesSets.get(derived2);console.log(...this.textToConsoleArgs([formatKind("derived recomputed"),styled(derived2.debugName,{color:"BlueViolet"}),...this.formatInfo(info),this.formatChanges(changedObservables),{data:[{fn:derived2._computeFn}]}]));changedObservables.clear()}handleFromEventObservableTriggered(observable,info){console.log(...this.textToConsoleArgs([formatKind("observable from event triggered"),styled(observable.debugName,{color:"BlueViolet"}),...this.formatInfo(info),{data:[{fn:observable._getValue}]}]))}handleAutorunCreated(autorun2){const existingHandleChange=autorun2.handleChange;this.changedObservablesSets.set(autorun2,new Set);autorun2.handleChange=(observable,change)=>{this.changedObservablesSets.get(autorun2).add(observable);return existingHandleChange.apply(autorun2,[observable,change])}}handleAutorunTriggered(autorun2){const changedObservables=this.changedObservablesSets.get(autorun2);console.log(...this.textToConsoleArgs([formatKind("autorun"),styled(autorun2.debugName,{color:"BlueViolet"}),this.formatChanges(changedObservables),{data:[{fn:autorun2._runFn}]}]));changedObservables.clear();this.indentation++}handleAutorunFinished(autorun2){this.indentation--}handleBeginTransaction(transaction2){let transactionName=transaction2.getDebugName();if(transactionName===void 0){transactionName=""}console.log(...this.textToConsoleArgs([formatKind("transaction"),styled(transactionName,{color:"BlueViolet"}),{data:[{fn:transaction2._fn}]}]));this.indentation++}handleEndTransaction(){this.indentation--}}}});function _setDerived(derived2){_derived=derived2}function transaction(fn,getDebugName){const tx=new TransactionImpl(fn,getDebugName);try{fn(tx)}finally{tx.finish()}}function subtransaction(tx,fn,getDebugName){if(!tx){transaction(fn,getDebugName)}else{fn(tx)}}function getFunctionName(fn){const fnSrc=fn.toString();const regexp=/\/\*\*\s*@description\s*([^*]*)\*\//;const match2=regexp.exec(fnSrc);const result=match2?match2[1]:void 0;return result===null||result===void 0?void 0:result.trim()}function observableValue(name,initialValue){return new ObservableValue(name,initialValue)}function disposableObservableValue(name,initialValue){return new DisposableObservableValue(name,initialValue)}var _derived,ConvenientObservable,BaseObservable,TransactionImpl,ObservableValue,DisposableObservableValue;var init_base=__esm({"node_modules/monaco-editor/esm/vs/base/common/observableInternal/base.js"(){init_logging();ConvenientObservable=class{get TChange(){return null}reportChanges(){this.get()}read(reader){if(reader){return reader.readObservable(this)}else{return this.get()}}map(fn){return _derived((reader=>fn(this.read(reader),reader)),(()=>{const name=getFunctionName(fn);if(name!==void 0){return name}const regexp=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/;const match2=regexp.exec(fn.toString());if(match2){return`${this.debugName}.${match2[2]}`}return`${this.debugName} (mapped)`}))}};BaseObservable=class extends ConvenientObservable{constructor(){super(...arguments);this.observers=new Set}addObserver(observer){const len=this.observers.size;this.observers.add(observer);if(len===0){this.onFirstObserverAdded()}}removeObserver(observer){const deleted=this.observers.delete(observer);if(deleted&&this.observers.size===0){this.onLastObserverRemoved()}}onFirstObserverAdded(){}onLastObserverRemoved(){}};TransactionImpl=class{constructor(_fn,_getDebugName){var _a6;this._fn=_fn;this._getDebugName=_getDebugName;this.updatingObservers=[];(_a6=getLogger())===null||_a6===void 0?void 0:_a6.handleBeginTransaction(this)}getDebugName(){if(this._getDebugName){return this._getDebugName()}return getFunctionName(this._fn)}updateObserver(observer,observable){this.updatingObservers.push({observer:observer,observable:observable});observer.beginUpdate(observable)}finish(){var _a6;const updatingObservers=this.updatingObservers;this.updatingObservers=null;for(const{observer:observer,observable:observable}of updatingObservers){observer.endUpdate(observable)}(_a6=getLogger())===null||_a6===void 0?void 0:_a6.handleEndTransaction()}};ObservableValue=class extends BaseObservable{constructor(debugName,initialValue){super();this.debugName=debugName;this._value=initialValue}get(){return this._value}set(value,tx,change){var _a6;if(this._value===value){return}let _tx;if(!tx){tx=_tx=new TransactionImpl((()=>{}),(()=>`Setting ${this.debugName}`))}try{const oldValue=this._value;this._setValue(value);(_a6=getLogger())===null||_a6===void 0?void 0:_a6.handleObservableChanged(this,{oldValue:oldValue,newValue:value,change:change,didChange:true,hadValue:true});for(const observer of this.observers){tx.updateObserver(observer,this);observer.handleChange(this,change)}}finally{if(_tx){_tx.finish()}}}toString(){return`${this.debugName}: ${this._value}`}_setValue(newValue){this._value=newValue}};DisposableObservableValue=class extends ObservableValue{_setValue(newValue){if(this._value===newValue){return}if(this._value){this._value.dispose()}this._value=newValue}dispose(){var _a6;(_a6=this._value)===null||_a6===void 0?void 0:_a6.dispose()}}}});function derived(computeFn,debugName){return new Derived(debugName,computeFn,void 0,void 0,void 0,defaultEqualityComparer)}function derivedOpts(options2,computeFn){var _a6;return new Derived(options2.debugName,computeFn,void 0,void 0,void 0,(_a6=options2.equalityComparer)!==null&&_a6!==void 0?_a6:defaultEqualityComparer)}function derivedHandleChanges(debugName,options2,computeFn){return new Derived(debugName,computeFn,options2.createEmptyChangeSummary,options2.handleChange,void 0,defaultEqualityComparer)}function derivedWithStore(name,computeFn){const store=new DisposableStore;return new Derived(name,(r=>{store.clear();return computeFn(r,store)}),void 0,void 0,(()=>store.dispose()),defaultEqualityComparer)}var defaultEqualityComparer,Derived;var init_derived=__esm({"node_modules/monaco-editor/esm/vs/base/common/observableInternal/derived.js"(){init_errors();init_lifecycle();init_base();init_logging();defaultEqualityComparer=(a,b)=>a===b;_setDerived(derived);Derived=class extends BaseObservable{get debugName(){if(!this._debugName){return getFunctionName(this._computeFn)||"(anonymous)"}return typeof this._debugName==="function"?this._debugName():this._debugName}constructor(_debugName,_computeFn,createChangeSummary,_handleChange,_handleLastObserverRemoved=void 0,_equalityComparator){var _a6,_b3;super();this._debugName=_debugName;this._computeFn=_computeFn;this.createChangeSummary=createChangeSummary;this._handleChange=_handleChange;this._handleLastObserverRemoved=_handleLastObserverRemoved;this._equalityComparator=_equalityComparator;this.state=0;this.value=void 0;this.updateCount=0;this.dependencies=new Set;this.dependenciesToBeRemoved=new Set;this.changeSummary=void 0;this.changeSummary=(_a6=this.createChangeSummary)===null||_a6===void 0?void 0:_a6.call(this);(_b3=getLogger())===null||_b3===void 0?void 0:_b3.handleDerivedCreated(this)}onLastObserverRemoved(){var _a6;this.state=0;this.value=void 0;for(const d of this.dependencies){d.removeObserver(this)}this.dependencies.clear();(_a6=this._handleLastObserverRemoved)===null||_a6===void 0?void 0:_a6.call(this)}get(){var _a6;if(this.observers.size===0){const result=this._computeFn(this,(_a6=this.createChangeSummary)===null||_a6===void 0?void 0:_a6.call(this));this.onLastObserverRemoved();return result}else{do{if(this.state===1){for(const d of this.dependencies){d.reportChanges();if(this.state===2){break}}}if(this.state===1){this.state=3}this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var _a6,_b3;if(this.state===3){return}const emptySet=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies;this.dependencies=emptySet;const hadValue=this.state!==0;const oldValue=this.value;this.state=3;const changeSummary=this.changeSummary;this.changeSummary=(_a6=this.createChangeSummary)===null||_a6===void 0?void 0:_a6.call(this);try{this.value=this._computeFn(this,changeSummary)}finally{for(const o of this.dependenciesToBeRemoved){o.removeObserver(this)}this.dependenciesToBeRemoved.clear()}const didChange=hadValue&&!this._equalityComparator(oldValue,this.value);(_b3=getLogger())===null||_b3===void 0?void 0:_b3.handleDerivedRecomputed(this,{oldValue:oldValue,newValue:this.value,change:void 0,didChange:didChange,hadValue:hadValue});if(didChange){for(const r of this.observers){r.handleChange(this,void 0)}}}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(_observable){this.updateCount++;const propagateBeginUpdate=this.updateCount===1;if(this.state===3){this.state=1;if(!propagateBeginUpdate){for(const r of this.observers){r.handlePossibleChange(this)}}}if(propagateBeginUpdate){for(const r of this.observers){r.beginUpdate(this)}}}endUpdate(_observable){this.updateCount--;if(this.updateCount===0){const observers=[...this.observers];for(const r of observers){r.endUpdate(this)}}if(this.updateCount<0){throw new BugIndicatingError}}handlePossibleChange(observable){if(this.state===3&&this.dependencies.has(observable)&&!this.dependenciesToBeRemoved.has(observable)){this.state=1;for(const r of this.observers){r.handlePossibleChange(this)}}}handleChange(observable,change){if(this.dependencies.has(observable)&&!this.dependenciesToBeRemoved.has(observable)){const shouldReact=this._handleChange?this._handleChange({changedObservable:observable,change:change,didChange:o=>o===observable},this.changeSummary):true;const wasUpToDate=this.state===3;if(shouldReact&&(this.state===1||wasUpToDate)){this.state=2;if(wasUpToDate){for(const r of this.observers){r.handlePossibleChange(this)}}}}}readObservable(observable){observable.addObserver(this);const value=observable.get();this.dependencies.add(observable);this.dependenciesToBeRemoved.delete(observable);return value}addObserver(observer){const shouldCallBeginUpdate=!this.observers.has(observer)&&this.updateCount>0;super.addObserver(observer);if(shouldCallBeginUpdate){observer.beginUpdate(this)}}removeObserver(observer){const shouldCallEndUpdate=this.observers.has(observer)&&this.updateCount>0;super.removeObserver(observer);if(shouldCallEndUpdate){observer.endUpdate(this)}}}}});function autorunOpts(options2,fn){return new AutorunObserver(options2.debugName,fn,void 0,void 0)}function autorun(fn){return new AutorunObserver(void 0,fn,void 0,void 0)}function autorunHandleChanges(options2,fn){return new AutorunObserver(options2.debugName,fn,options2.createEmptyChangeSummary,options2.handleChange)}function autorunWithStore(fn){const store=new DisposableStore;const disposable=autorunOpts({debugName:()=>getFunctionName(fn)||"(anonymous)"},(reader=>{store.clear();fn(reader,store)}));return toDisposable((()=>{disposable.dispose();store.dispose()}))}var AutorunObserver;var init_autorun=__esm({"node_modules/monaco-editor/esm/vs/base/common/observableInternal/autorun.js"(){init_assert();init_lifecycle();init_base();init_logging();AutorunObserver=class{get debugName(){if(typeof this._debugName==="string"){return this._debugName}if(typeof this._debugName==="function"){const name2=this._debugName();if(name2!==void 0){return name2}}const name=getFunctionName(this._runFn);if(name!==void 0){return name}return"(anonymous)"}constructor(_debugName,_runFn,createChangeSummary,_handleChange){var _a6,_b3;this._debugName=_debugName;this._runFn=_runFn;this.createChangeSummary=createChangeSummary;this._handleChange=_handleChange;this.state=2;this.updateCount=0;this.disposed=false;this.dependencies=new Set;this.dependenciesToBeRemoved=new Set;this.changeSummary=(_a6=this.createChangeSummary)===null||_a6===void 0?void 0:_a6.call(this);(_b3=getLogger())===null||_b3===void 0?void 0:_b3.handleAutorunCreated(this);this._runIfNeeded()}dispose(){this.disposed=true;for(const o of this.dependencies){o.removeObserver(this)}this.dependencies.clear()}_runIfNeeded(){var _a6,_b3,_c2;if(this.state===3){return}const emptySet=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies;this.dependencies=emptySet;this.state=3;try{if(!this.disposed){(_a6=getLogger())===null||_a6===void 0?void 0:_a6.handleAutorunTriggered(this);const changeSummary=this.changeSummary;this.changeSummary=(_b3=this.createChangeSummary)===null||_b3===void 0?void 0:_b3.call(this);this._runFn(this,changeSummary)}}finally{(_c2=getLogger())===null||_c2===void 0?void 0:_c2.handleAutorunFinished(this);for(const o of this.dependenciesToBeRemoved){o.removeObserver(this)}this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){if(this.state===3){this.state=1}this.updateCount++}endUpdate(){if(this.updateCount===1){do{if(this.state===1){this.state=3;for(const d of this.dependencies){d.reportChanges();if(this.state===2){break}}}this._runIfNeeded()}while(this.state!==3)}this.updateCount--;assertFn((()=>this.updateCount>=0))}handlePossibleChange(observable){if(this.state===3&&this.dependencies.has(observable)&&!this.dependenciesToBeRemoved.has(observable)){this.state=1}}handleChange(observable,change){if(this.dependencies.has(observable)&&!this.dependenciesToBeRemoved.has(observable)){const shouldReact=this._handleChange?this._handleChange({changedObservable:observable,change:change,didChange:o=>o===observable},this.changeSummary):true;if(shouldReact){this.state=2}}}readObservable(observable){if(this.disposed){return observable.get()}observable.addObserver(this);const value=observable.get();this.dependencies.add(observable);this.dependenciesToBeRemoved.delete(observable);return value}};(function(autorun2){autorun2.Observer=AutorunObserver})(autorun||(autorun={}))}});function constObservable(value){return new ConstObservable(value)}function waitForState(observable,predicate){return new Promise((resolve2=>{let didRun=false;let shouldDispose=false;const d=autorun((reader=>{const currentState=observable.read(reader);if(predicate(currentState)){if(!didRun){shouldDispose=true}else{d.dispose()}resolve2(currentState)}}));didRun=true;if(shouldDispose){d.dispose()}}))}function observableFromEvent(event,getValue){return new FromEventObservable(event,getValue)}function observableSignalFromEvent(debugName,event){return new FromEventObservableSignal(debugName,event)}function observableSignal(debugName){return new ObservableSignal(debugName)}function keepAlive(observable,forceRecompute){const o=new KeepAliveObserver(forceRecompute!==null&&forceRecompute!==void 0?forceRecompute:false);observable.addObserver(o);if(forceRecompute){observable.reportChanges()}return toDisposable((()=>{observable.removeObserver(o)}))}var ConstObservable,FromEventObservable,FromEventObservableSignal,ObservableSignal,KeepAliveObserver;var init_utils3=__esm({"node_modules/monaco-editor/esm/vs/base/common/observableInternal/utils.js"(){init_lifecycle();init_autorun();init_base();init_logging();ConstObservable=class extends ConvenientObservable{constructor(value){super();this.value=value}get debugName(){return this.toString()}get(){return this.value}addObserver(observer){}removeObserver(observer){}toString(){return`Const: ${this.value}`}};FromEventObservable=class extends BaseObservable{constructor(event,_getValue){super();this.event=event;this._getValue=_getValue;this.hasValue=false;this.handleEvent=args=>{var _a6;const newValue=this._getValue(args);const didChange=!this.hasValue||this.value!==newValue;(_a6=getLogger())===null||_a6===void 0?void 0:_a6.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:newValue,change:void 0,didChange:didChange,hadValue:this.hasValue});if(didChange){this.value=newValue;if(this.hasValue){transaction((tx=>{for(const o of this.observers){tx.updateObserver(o,this);o.handleChange(this,void 0)}}),(()=>{const name=this.getDebugName();return"Event fired"+(name?`: ${name}`:"")}))}this.hasValue=true}}}getDebugName(){return getFunctionName(this._getValue)}get debugName(){const name=this.getDebugName();return"From Event"+(name?`: ${name}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose();this.subscription=void 0;this.hasValue=false;this.value=void 0}get(){if(this.subscription){if(!this.hasValue){this.handleEvent(void 0)}return this.value}else{return this._getValue(void 0)}}};(function(observableFromEvent2){observableFromEvent2.Observer=FromEventObservable})(observableFromEvent||(observableFromEvent={}));FromEventObservableSignal=class extends BaseObservable{constructor(debugName,event){super();this.debugName=debugName;this.event=event;this.handleEvent=()=>{transaction((tx=>{for(const o of this.observers){tx.updateObserver(o,this);o.handleChange(this,void 0)}}),(()=>this.debugName))}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose();this.subscription=void 0}get(){}};ObservableSignal=class extends BaseObservable{constructor(debugName){super();this.debugName=debugName}trigger(tx,change){if(!tx){transaction((tx2=>{this.trigger(tx2,change)}),(()=>`Trigger signal ${this.debugName}`));return}for(const o of this.observers){tx.updateObserver(o,this);o.handleChange(this,change)}}get(){}};KeepAliveObserver=class{constructor(forceRecompute){this.forceRecompute=forceRecompute;this.counter=0}beginUpdate(observable){this.counter++}endUpdate(observable){this.counter--;if(this.counter===0&&this.forceRecompute){observable.reportChanges()}}handlePossibleChange(observable){}handleChange(observable,change){}}}});var enableLogging;var init_observable=__esm({"node_modules/monaco-editor/esm/vs/base/common/observable.js"(){init_base();init_derived();init_autorun();init_utils3();init_logging();enableLogging=false;if(enableLogging){setLogger(new ConsoleObservableLogger)}}});var init_47=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/style.css"(){}});function joinCombine(arr1,arr2,keySelector,combine){if(arr1.length===0){return arr2}if(arr2.length===0){return arr1}const result=[];let i=0;let j=0;while(ikey2){result.push(val2);j++}else{result.push(combine(val1,val2));i++;j++}}while(i{const d2=decorations.read(reader);decorationsCollection.set(d2)})));d.add({dispose:()=>{decorationsCollection.clear()}});return d}function appendRemoveOnDispose(parent,child){parent.appendChild(child);return toDisposable((()=>{parent.removeChild(child)}))}function animatedObservable(base,store){let targetVal=base.get();let startVal=targetVal;let curVal=targetVal;const result=observableValue("animatedValue",targetVal);let animationStartMs=-1;const durationMs=300;let animationFrame=void 0;store.add(autorunHandleChanges({createEmptyChangeSummary:()=>({animate:false}),handleChange:(ctx,s)=>{if(ctx.didChange(base)){s.animate=s.animate||ctx.change}return true}},((reader,s)=>{if(animationFrame!==void 0){cancelAnimationFrame(animationFrame);animationFrame=void 0}startVal=curVal;targetVal=base.read(reader);animationStartMs=Date.now()-(s.animate?0:durationMs);update()})));function update(){const passedMs=Date.now()-animationStartMs;curVal=Math.floor(easeOutExpo(passedMs,startVal,targetVal-startVal,durationMs));if(passedMs{for(let[key,val]of Object.entries(style)){if(val&&typeof val==="object"&&"read"in val){val=val.read(reader)}if(typeof val==="number"){val=`${val}px`}key=key.replace(/[A-Z]/g,(m=>"-"+m.toLowerCase()));domNode.style[key]=val}}))}function readHotReloadableExport(value,reader){observeHotReloadableExports([value],reader);return value}function observeHotReloadableExports(values,reader){const hotReload_deprecateExports=globalThis.$hotReload_deprecateExports;if(!hotReload_deprecateExports){return}const o=observableSignalFromEvent("reload",(e=>{function handleExports(oldExports,_newExports){if([...Object.values(oldExports)].some((v=>values.includes(v)))){e(void 0);return true}return false}hotReload_deprecateExports.add(handleExports);return{dispose(){hotReload_deprecateExports.delete(handleExports)}}}));o.read(reader)}function applyViewZones(editor2,viewZones,setIsUpdating){const store=new DisposableStore;const lastViewZoneIds=[];store.add(autorun((reader=>{const curViewZones=viewZones.read(reader);const viewZonIdsPerViewZone=new Map;const viewZoneIdPerOnChangeObservable=new Map;if(setIsUpdating){setIsUpdating(true)}editor2.changeViewZones((a=>{for(const id of lastViewZoneIds){a.removeZone(id)}lastViewZoneIds.length=0;for(const z of curViewZones){const id=a.addZone(z);lastViewZoneIds.push(id);viewZonIdsPerViewZone.set(z,id)}}));if(setIsUpdating){setIsUpdating(false)}store.add(autorunHandleChanges({createEmptyChangeSummary(){return[]},handleChange(context,changeSummary){const id=viewZoneIdPerOnChangeObservable.get(context.changedObservable);if(id!==void 0){changeSummary.push(id)}return true}},((reader2,changeSummary)=>{for(const vz of curViewZones){if(vz.onChange){viewZoneIdPerOnChangeObservable.set(vz.onChange,viewZonIdsPerViewZone.get(vz));vz.onChange.read(reader2)}}if(setIsUpdating){setIsUpdating(true)}editor2.changeViewZones((a=>{for(const id of changeSummary){a.layoutZone(id)}}));if(setIsUpdating){setIsUpdating(false)}})))})));store.add({dispose(){if(setIsUpdating){setIsUpdating(true)}editor2.changeViewZones((a=>{for(const id of lastViewZoneIds){a.removeZone(id)}}));if(setIsUpdating){setIsUpdating(false)}}});return store}var ObservableElementSizeObserver,ViewZoneOverlayWidget,PlaceholderViewZone,ManagedOverlayWidget;var init_utils4=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/utils.js"(){init_lifecycle();init_observable();init_elementSizeObserver();ObservableElementSizeObserver=class extends Disposable{get width(){return this._width}get height(){return this._height}constructor(element,dimension){super();this.elementSizeObserver=this._register(new ElementSizeObserver(element,dimension));this._width=observableValue("width",this.elementSizeObserver.getWidth());this._height=observableValue("height",this.elementSizeObserver.getHeight());this._register(this.elementSizeObserver.onDidChange((e=>transaction((tx=>{this._width.set(this.elementSizeObserver.getWidth(),tx);this._height.set(this.elementSizeObserver.getHeight(),tx)})))))}observe(dimension){this.elementSizeObserver.observe(dimension)}setAutomaticLayout(automaticLayout){if(automaticLayout){this.elementSizeObserver.startObserving()}else{this.elementSizeObserver.stopObserving()}}};ViewZoneOverlayWidget=class extends Disposable{constructor(editor2,viewZone,htmlElement){super();this._register(new ManagedOverlayWidget(editor2,htmlElement));this._register(applyStyle(htmlElement,{height:viewZone.actualHeight,top:viewZone.actualTop}))}};PlaceholderViewZone=class{get afterLineNumber(){return this._afterLineNumber.get()}constructor(_afterLineNumber,heightInPx){this._afterLineNumber=_afterLineNumber;this.heightInPx=heightInPx;this.domNode=document.createElement("div");this._actualTop=observableValue("actualTop",void 0);this._actualHeight=observableValue("actualHeight",void 0);this.actualTop=this._actualTop;this.actualHeight=this._actualHeight;this.showInHiddenAreas=true;this.onChange=this._afterLineNumber;this.onDomNodeTop=top=>{this._actualTop.set(top,void 0)};this.onComputedHeight=height=>{this._actualHeight.set(height,void 0)}}};ManagedOverlayWidget=class{constructor(_editor,_domElement){this._editor=_editor;this._domElement=_domElement;this._overlayWidgetId=`managedOverlayWidget-${ManagedOverlayWidget._counter++}`;this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null};this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}};ManagedOverlayWidget._counter=0}});function computeViewElementGroups(diffs,originalLineCount,modifiedLineCount){const result=[];for(const g of group2(diffs,((a,b)=>b.modifiedRange.startLineNumber-a.modifiedRange.endLineNumberExclusive<2*viewElementGroupLineMargin))){const viewElements=[];viewElements.push(new HeaderViewElement);const origFullRange=new LineRange(Math.max(1,g[0].originalRange.startLineNumber-viewElementGroupLineMargin),Math.min(g[g.length-1].originalRange.endLineNumberExclusive+viewElementGroupLineMargin,originalLineCount+1));const modifiedFullRange=new LineRange(Math.max(1,g[0].modifiedRange.startLineNumber-viewElementGroupLineMargin),Math.min(g[g.length-1].modifiedRange.endLineNumberExclusive+viewElementGroupLineMargin,modifiedLineCount+1));forEachAdjacentItems(g,((a,b)=>{const origRange=new LineRange(a?a.originalRange.endLineNumberExclusive:origFullRange.startLineNumber,b?b.originalRange.startLineNumber:origFullRange.endLineNumberExclusive);const modifiedRange2=new LineRange(a?a.modifiedRange.endLineNumberExclusive:modifiedFullRange.startLineNumber,b?b.modifiedRange.startLineNumber:modifiedFullRange.endLineNumberExclusive);origRange.forEach((origLineNumber=>{viewElements.push(new UnchangedLineViewElement(origLineNumber,modifiedRange2.startLineNumber+(origLineNumber-origRange.startLineNumber)))}));if(b){b.originalRange.forEach((origLineNumber=>{viewElements.push(new DeletedLineViewElement(b,origLineNumber))}));b.modifiedRange.forEach((modifiedLineNumber=>{viewElements.push(new AddedLineViewElement(b,modifiedLineNumber))}))}}));const modifiedRange=g[0].modifiedRange.join(g[g.length-1].modifiedRange);const originalRange=g[0].originalRange.join(g[g.length-1].originalRange);result.push(new ViewElementGroup(new SimpleLineRangeMapping(modifiedRange,originalRange),viewElements))}return result}function forEachAdjacentItems(items,callback){let last;for(const item of items){callback(last,item);last=item}callback(last,void 0)}function*group2(items,shouldBeGrouped){let currentGroup;let last;for(const item of items){if(last!==void 0&&shouldBeGrouped(last,item)){currentGroup.push(item)}else{if(currentGroup){yield currentGroup}currentGroup=[item]}last=item}if(currentGroup){yield currentGroup}}var __decorate45,__param38,__awaiter28,accessibleDiffViewerInsertIcon,accessibleDiffViewerRemoveIcon,accessibleDiffViewerCloseIcon,AccessibleDiffViewer,ViewModel2,viewElementGroupLineMargin,LineType,ViewElementGroup,HeaderViewElement,DeletedLineViewElement,AddedLineViewElement,UnchangedLineViewElement,View3;var init_accessibleDiffViewer=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/accessibleDiffViewer.js"(){init_dom();init_actionbar();init_scrollableElement();init_actions();init_codicons();init_lifecycle();init_observable();init_themables();init_domFontInfo();init_utils4();init_diffReview();init_editorOptions();init_lineRange();init_offsetRange();init_position();init_range();init_linesDiffComputer();init_language();init_lineTokens();init_viewLineRenderer();init_viewModel();init_nls();init_audioCueService();init_instantiation();init_iconRegistry();__decorate45=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param38=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter28=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};accessibleDiffViewerInsertIcon=registerIcon("diff-review-insert",Codicon.add,localize("accessibleDiffViewerInsertIcon","Icon for 'Insert' in accessible diff viewer."));accessibleDiffViewerRemoveIcon=registerIcon("diff-review-remove",Codicon.remove,localize("accessibleDiffViewerRemoveIcon","Icon for 'Remove' in accessible diff viewer."));accessibleDiffViewerCloseIcon=registerIcon("diff-review-close",Codicon.close,localize("accessibleDiffViewerCloseIcon","Icon for 'Close' in accessible diff viewer."));AccessibleDiffViewer=class AccessibleDiffViewer2 extends Disposable{constructor(_parentNode,_visible,_setVisible,_canClose,_width,_height,_diffs,_editors,_instantiationService){super();this._parentNode=_parentNode;this._visible=_visible;this._setVisible=_setVisible;this._canClose=_canClose;this._width=_width;this._height=_height;this._diffs=_diffs;this._editors=_editors;this._instantiationService=_instantiationService;this.model=derivedWithStore("model",((reader,store)=>{const visible=this._visible.read(reader);this._parentNode.style.visibility=visible?"visible":"hidden";if(!visible){return null}const model=store.add(this._instantiationService.createInstance(ViewModel2,this._diffs,this._editors,this._setVisible,this._canClose));const view=store.add(this._instantiationService.createInstance(View3,this._parentNode,model,this._width,this._height,this._editors));return{model:model,view:view}}));this._register(keepAlive(this.model,true))}next(){transaction((tx=>{const isVisible=this._visible.get();this._setVisible(true,tx);if(isVisible){this.model.get().model.nextGroup(tx)}}))}prev(){transaction((tx=>{this._setVisible(true,tx);this.model.get().model.previousGroup(tx)}))}close(){transaction((tx=>{this._setVisible(false,tx)}))}};AccessibleDiffViewer=__decorate45([__param38(8,IInstantiationService)],AccessibleDiffViewer);ViewModel2=class ViewModel3 extends Disposable{constructor(_diffs,_editors,_setVisible,canClose,_audioCueService){super();this._diffs=_diffs;this._editors=_editors;this._setVisible=_setVisible;this.canClose=canClose;this._audioCueService=_audioCueService;this._groups=observableValue("groups",[]);this._currentGroupIdx=observableValue("currentGroupIdx",0);this._currentElementIdx=observableValue("currentElementIdx",0);this.groups=this._groups;this.currentGroup=this._currentGroupIdx.map(((idx,r)=>this._groups.read(r)[idx]));this.currentGroupIndex=this._currentGroupIdx;this.currentElement=this._currentElementIdx.map(((idx,r)=>{var _a6;return(_a6=this.currentGroup.read(r))===null||_a6===void 0?void 0:_a6.lines[idx]}));this._register(autorun((reader=>{const diffs=this._diffs.read(reader);if(!diffs){this._groups.set([],void 0);return}const groups=computeViewElementGroups(diffs,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());transaction((tx=>{const p=this._editors.modified.getPosition();if(p){const nextGroup=groups.findIndex((g=>(p===null||p===void 0?void 0:p.lineNumber){const currentViewItem=this.currentElement.read(reader);if((currentViewItem===null||currentViewItem===void 0?void 0:currentViewItem.type)===LineType.Deleted){this._audioCueService.playAudioCue(AudioCue.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"})}else if((currentViewItem===null||currentViewItem===void 0?void 0:currentViewItem.type)===LineType.Added){this._audioCueService.playAudioCue(AudioCue.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})}})));this._register(autorun((reader=>{var _a6;const currentViewItem=this.currentElement.read(reader);if(currentViewItem&¤tViewItem.type!==LineType.Header){const lineNumber=(_a6=currentViewItem.modifiedLineNumber)!==null&&_a6!==void 0?_a6:currentViewItem.diff.modifiedRange.startLineNumber;this._editors.modified.setSelection(Range.fromPositions(new Position(lineNumber,1)))}})))}_goToGroupDelta(delta,tx){const groups=this.groups.get();if(!groups||groups.length<=1){return}subtransaction(tx,(tx2=>{this._currentGroupIdx.set(OffsetRange.ofLength(groups.length).clipCyclic(this._currentGroupIdx.get()+delta),tx2);this._currentElementIdx.set(0,tx2)}))}nextGroup(tx){this._goToGroupDelta(1,tx)}previousGroup(tx){this._goToGroupDelta(-1,tx)}_goToLineDelta(delta){const group3=this.currentGroup.get();if(!group3||group3.lines.length<=1){return}transaction((tx=>{this._currentElementIdx.set(OffsetRange.ofLength(group3.lines.length).clip(this._currentElementIdx.get()+delta),tx)}))}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(line){const group3=this.currentGroup.get();if(!group3){return}const idx=group3.lines.indexOf(line);if(idx===-1){return}transaction((tx=>{this._currentElementIdx.set(idx,tx)}))}revealCurrentElementInEditor(){this._setVisible(false,void 0);const curElem=this.currentElement.get();if(curElem){if(curElem.type===LineType.Deleted){this._editors.original.setSelection(Range.fromPositions(new Position(curElem.originalLineNumber,1)));this._editors.original.revealLine(curElem.originalLineNumber);this._editors.original.focus()}else{if(curElem.type!==LineType.Header){this._editors.modified.setSelection(Range.fromPositions(new Position(curElem.modifiedLineNumber,1)));this._editors.modified.revealLine(curElem.modifiedLineNumber)}this._editors.modified.focus()}}}close(){this._setVisible(false,void 0);this._editors.modified.focus()}};ViewModel2=__decorate45([__param38(4,IAudioCueService)],ViewModel2);viewElementGroupLineMargin=3;(function(LineType2){LineType2[LineType2["Header"]=0]="Header";LineType2[LineType2["Unchanged"]=1]="Unchanged";LineType2[LineType2["Deleted"]=2]="Deleted";LineType2[LineType2["Added"]=3]="Added"})(LineType||(LineType={}));ViewElementGroup=class{constructor(range2,lines){this.range=range2;this.lines=lines}};HeaderViewElement=class{constructor(){this.type=LineType.Header}};DeletedLineViewElement=class{constructor(diff,originalLineNumber){this.diff=diff;this.originalLineNumber=originalLineNumber;this.type=LineType.Deleted;this.modifiedLineNumber=void 0}};AddedLineViewElement=class{constructor(diff,modifiedLineNumber){this.diff=diff;this.modifiedLineNumber=modifiedLineNumber;this.type=LineType.Added;this.originalLineNumber=void 0}};UnchangedLineViewElement=class{constructor(originalLineNumber,modifiedLineNumber){this.originalLineNumber=originalLineNumber;this.modifiedLineNumber=modifiedLineNumber;this.type=LineType.Unchanged}};View3=class View4 extends Disposable{constructor(_element,_model,_width,_height,_editors,_languageService){super();this._element=_element;this._model=_model;this._width=_width;this._height=_height;this._editors=_editors;this._languageService=_languageService;this.domNode=this._element;this.domNode.className="diff-review monaco-editor-background";const actionBarContainer=document.createElement("div");actionBarContainer.className="diff-review-actions";this._actionBar=this._register(new ActionBar(actionBarContainer));this._register(autorun((reader=>{this._actionBar.clear();if(this._model.canClose.read(reader)){this._actionBar.push(new Action("diffreview.close",localize("label.close","Close"),"close-diff-review "+ThemeIcon.asClassName(accessibleDiffViewerCloseIcon),true,(()=>__awaiter28(this,void 0,void 0,(function*(){return _model.close()})))),{label:false,icon:true})}})));this._content=document.createElement("div");this._content.className="diff-review-content";this._content.setAttribute("role","code");this._scrollbar=this._register(new DomScrollableElement(this._content,{}));reset(this.domNode,this._scrollbar.getDomNode(),actionBarContainer);this._register(toDisposable((()=>{reset(this.domNode)})));this._register(applyStyle(this.domNode,{width:this._width,height:this._height}));this._register(applyStyle(this._content,{width:this._width,height:this._height}));this._register(autorunWithStore(((reader,store)=>{this._model.currentGroup.read(reader);this._render(store)})));this._register(addStandardDisposableListener(this.domNode,"keydown",(e=>{if(e.equals(18)||e.equals(2048|18)||e.equals(512|18)){e.preventDefault();this._model.goToNextLine()}if(e.equals(16)||e.equals(2048|16)||e.equals(512|16)){e.preventDefault();this._model.goToPreviousLine()}if(e.equals(9)||e.equals(2048|9)||e.equals(512|9)||e.equals(1024|9)){e.preventDefault();this._model.close()}if(e.equals(10)||e.equals(3)){e.preventDefault();this._model.revealCurrentElementInEditor()}})))}_render(store){const originalOptions=this._editors.original.getOptions();const modifiedOptions=this._editors.modified.getOptions();const container=document.createElement("div");container.className="diff-review-table";container.setAttribute("role","list");container.setAttribute("aria-label",localize("ariaLabel","Accessible Diff Viewer. Use arrow up and down to navigate."));applyFontInfo(container,modifiedOptions.get(49));reset(this._content,container);const originalModel=this._editors.original.getModel();const modifiedModel=this._editors.modified.getModel();if(!originalModel||!modifiedModel){return}const originalModelOpts=originalModel.getOptions();const modifiedModelOpts=modifiedModel.getOptions();const lineHeight=modifiedOptions.get(65);const group3=this._model.currentGroup.get();for(const viewItem of(group3===null||group3===void 0?void 0:group3.lines)||[]){if(!group3){break}let row;if(viewItem.type===LineType.Header){const header=document.createElement("div");header.className="diff-review-row";header.setAttribute("role","listitem");const r=group3.range;const diffIndex=this._model.currentGroupIndex.get();const diffsLength=this._model.groups.get().length;const getAriaLines=lines=>lines===0?localize("no_lines_changed","no lines changed"):lines===1?localize("one_line_changed","1 line changed"):localize("more_lines_changed","{0} lines changed",lines);const originalChangedLinesCntAria=getAriaLines(r.original.length);const modifiedChangedLinesCntAria=getAriaLines(r.modified.length);header.setAttribute("aria-label",localize({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",diffIndex+1,diffsLength,r.original.startLineNumber,originalChangedLinesCntAria,r.modified.startLineNumber,modifiedChangedLinesCntAria));const cell=document.createElement("div");cell.className="diff-review-cell diff-review-summary";cell.appendChild(document.createTextNode(`${diffIndex+1}/${diffsLength}: @@ -${r.original.startLineNumber},${r.original.length} +${r.modified.startLineNumber},${r.modified.length} @@`));header.appendChild(cell);row=header}else{row=this._createRow(viewItem,lineHeight,this._width.get(),originalOptions,originalModel,originalModelOpts,modifiedOptions,modifiedModel,modifiedModelOpts)}container.appendChild(row);const isSelectedObs=derived((reader=>this._model.currentElement.read(reader)===viewItem));store.add(autorun((reader=>{const isSelected=isSelectedObs.read(reader);row.tabIndex=isSelected?0:-1;if(isSelected){row.focus()}})));store.add(addDisposableListener(row,"focus",(()=>{this._model.goToLine(viewItem)})))}this._scrollbar.scanDomNode()}_createRow(item,lineHeight,width,originalOptions,originalModel,originalModelOpts,modifiedOptions,modifiedModel,modifiedModelOpts){const originalLayoutInfo=originalOptions.get(142);const originalLineNumbersWidth=originalLayoutInfo.glyphMarginWidth+originalLayoutInfo.lineNumbersWidth;const modifiedLayoutInfo=modifiedOptions.get(142);const modifiedLineNumbersWidth=10+modifiedLayoutInfo.glyphMarginWidth+modifiedLayoutInfo.lineNumbersWidth;let rowClassName="diff-review-row";let lineNumbersExtraClassName="";const spacerClassName="diff-review-spacer";let spacerIcon=null;switch(item.type){case LineType.Added:rowClassName="diff-review-row line-insert";lineNumbersExtraClassName=" char-insert";spacerIcon=accessibleDiffViewerInsertIcon;break;case LineType.Deleted:rowClassName="diff-review-row line-delete";lineNumbersExtraClassName=" char-delete";spacerIcon=accessibleDiffViewerRemoveIcon;break}const row=document.createElement("div");row.style.minWidth=width+"px";row.className=rowClassName;row.setAttribute("role","listitem");row.ariaLevel="";const cell=document.createElement("div");cell.className="diff-review-cell";cell.style.height=`${lineHeight}px`;row.appendChild(cell);const originalLineNumber=document.createElement("span");originalLineNumber.style.width=originalLineNumbersWidth+"px";originalLineNumber.style.minWidth=originalLineNumbersWidth+"px";originalLineNumber.className="diff-review-line-number"+lineNumbersExtraClassName;if(item.originalLineNumber!==void 0){originalLineNumber.appendChild(document.createTextNode(String(item.originalLineNumber)))}else{originalLineNumber.innerText=" "}cell.appendChild(originalLineNumber);const modifiedLineNumber=document.createElement("span");modifiedLineNumber.style.width=modifiedLineNumbersWidth+"px";modifiedLineNumber.style.minWidth=modifiedLineNumbersWidth+"px";modifiedLineNumber.style.paddingRight="10px";modifiedLineNumber.className="diff-review-line-number"+lineNumbersExtraClassName;if(item.modifiedLineNumber!==void 0){modifiedLineNumber.appendChild(document.createTextNode(String(item.modifiedLineNumber)))}else{modifiedLineNumber.innerText=" "}cell.appendChild(modifiedLineNumber);const spacer=document.createElement("span");spacer.className=spacerClassName;if(spacerIcon){const spacerCodicon=document.createElement("span");spacerCodicon.className=ThemeIcon.asClassName(spacerIcon);spacerCodicon.innerText="  ";spacer.appendChild(spacerCodicon)}else{spacer.innerText="  "}cell.appendChild(spacer);let lineContent;if(item.modifiedLineNumber!==void 0){let html2=this._getLineHtml(modifiedModel,modifiedOptions,modifiedModelOpts.tabSize,item.modifiedLineNumber,this._languageService.languageIdCodec);if(DiffReview._ttPolicy){html2=DiffReview._ttPolicy.createHTML(html2)}cell.insertAdjacentHTML("beforeend",html2);lineContent=modifiedModel.getLineContent(item.modifiedLineNumber)}else{let html2=this._getLineHtml(originalModel,originalOptions,originalModelOpts.tabSize,item.originalLineNumber,this._languageService.languageIdCodec);if(DiffReview._ttPolicy){html2=DiffReview._ttPolicy.createHTML(html2)}cell.insertAdjacentHTML("beforeend",html2);lineContent=originalModel.getLineContent(item.originalLineNumber)}if(lineContent.length===0){lineContent=localize("blankLine","blank")}let ariaLabel="";switch(item.type){case LineType.Unchanged:if(item.originalLineNumber===item.modifiedLineNumber){ariaLabel=localize({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",lineContent,item.originalLineNumber)}else{ariaLabel=localize("equalLine","{0} original line {1} modified line {2}",lineContent,item.originalLineNumber,item.modifiedLineNumber)}break;case LineType.Added:ariaLabel=localize("insertLine","+ {0} modified line {1}",lineContent,item.modifiedLineNumber);break;case LineType.Deleted:ariaLabel=localize("deleteLine","- {0} original line {1}",lineContent,item.originalLineNumber);break}row.setAttribute("aria-label",ariaLabel);return row}_getLineHtml(model,options2,tabSize,lineNumber,languageIdCodec){const lineContent=model.getLineContent(lineNumber);const fontInfo=options2.get(49);const lineTokens=LineTokens.createEmpty(lineContent,languageIdCodec);const isBasicASCII2=ViewLineRenderingData.isBasicASCII(lineContent,model.mightContainNonBasicASCII());const containsRTL2=ViewLineRenderingData.containsRTL(lineContent,isBasicASCII2,model.mightContainRTL());const r=renderViewLine2(new RenderLineInput(fontInfo.isMonospace&&!options2.get(32),fontInfo.canUseHalfwidthRightwardsArrow,lineContent,false,isBasicASCII2,containsRTL2,0,lineTokens,[],tabSize,0,fontInfo.spaceWidth,fontInfo.middotWidth,fontInfo.wsmiddotWidth,options2.get(115),options2.get(97),options2.get(92),options2.get(50)!==EditorFontLigatures.OFF,null));return r.html}};View3=__decorate45([__param38(5,ILanguageService)],View3)}});var diffInsertIcon2,diffRemoveIcon2,diffLineAddDecorationBackgroundWithIndicator,diffLineDeleteDecorationBackgroundWithIndicator,diffLineAddDecorationBackground,diffLineDeleteDecorationBackground,diffAddDecoration,diffWholeLineAddDecoration,diffAddDecorationEmpty,diffDeleteDecoration,diffWholeLineDeleteDecoration,diffDeleteDecorationEmpty,arrowRevertChange;var init_decorations2=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/decorations.js"(){init_codicons();init_htmlContent();init_themables();init_textModel();init_nls();init_iconRegistry();diffInsertIcon2=registerIcon("diff-insert",Codicon.add,localize("diffInsertIcon","Line decoration for inserts in the diff editor."));diffRemoveIcon2=registerIcon("diff-remove",Codicon.remove,localize("diffRemoveIcon","Line decoration for removals in the diff editor."));diffLineAddDecorationBackgroundWithIndicator=ModelDecorationOptions.register({className:"line-insert",description:"line-insert",isWholeLine:true,linesDecorationsClassName:"insert-sign "+ThemeIcon.asClassName(diffInsertIcon2),marginClassName:"gutter-insert"});diffLineDeleteDecorationBackgroundWithIndicator=ModelDecorationOptions.register({className:"line-delete",description:"line-delete",isWholeLine:true,linesDecorationsClassName:"delete-sign "+ThemeIcon.asClassName(diffRemoveIcon2),marginClassName:"gutter-delete"});diffLineAddDecorationBackground=ModelDecorationOptions.register({className:"line-insert",description:"line-insert",isWholeLine:true,marginClassName:"gutter-insert"});diffLineDeleteDecorationBackground=ModelDecorationOptions.register({className:"line-delete",description:"line-delete",isWholeLine:true,marginClassName:"gutter-delete"});diffAddDecoration=ModelDecorationOptions.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:true});diffWholeLineAddDecoration=ModelDecorationOptions.register({className:"char-insert",description:"char-insert",isWholeLine:true});diffAddDecorationEmpty=ModelDecorationOptions.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"});diffDeleteDecoration=ModelDecorationOptions.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:true});diffWholeLineDeleteDecoration=ModelDecorationOptions.register({className:"char-delete",description:"char-delete",isWholeLine:true});diffDeleteDecorationEmpty=ModelDecorationOptions.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"});arrowRevertChange=ModelDecorationOptions.register({description:"diff-editor-arrow-revert-change",glyphMarginHoverMessage:new MarkdownString(void 0,{isTrusted:true,supportThemeIcons:true}).appendMarkdown(localize("revertChangeHoverMessage","Click to revert change")),glyphMarginClassName:"arrow-revert-change "+ThemeIcon.asClassName(Codicon.arrowRight),zIndex:10001})}});var MovedBlocksLinesPart,LinesLayout2,MovedBlockOverlayWidget;var init_movedBlocksLines=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/movedBlocksLines.js"(){init_dom();init_actionbar();init_actions();init_arrays();init_codicons();init_lifecycle();init_observable();init_themables();init_utils4();init_offsetRange();init_nls();MovedBlocksLinesPart=class extends Disposable{constructor(_rootElement,_diffModel,_originalEditorLayoutInfo,_modifiedEditorLayoutInfo,_editors){super();this._rootElement=_rootElement;this._diffModel=_diffModel;this._originalEditorLayoutInfo=_originalEditorLayoutInfo;this._modifiedEditorLayoutInfo=_modifiedEditorLayoutInfo;this._editors=_editors;this._originalScrollTop=observableFromEvent(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop()));this._modifiedScrollTop=observableFromEvent(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop()));this._viewZonesChanged=observableSignalFromEvent("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones);this.width=observableValue("width",0);this._modifiedViewZonesChangedSignal=observableSignalFromEvent("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones);this._originalViewZonesChangedSignal=observableSignalFromEvent("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones);this._state=derivedWithStore("state",((reader,store)=>{var _a6;this._element.replaceChildren();const model=this._diffModel.read(reader);const moves=(_a6=model===null||model===void 0?void 0:model.diff.read(reader))===null||_a6===void 0?void 0:_a6.movedTexts;if(!moves||moves.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(reader);const infoOrig=this._originalEditorLayoutInfo.read(reader);const infoMod=this._modifiedEditorLayoutInfo.read(reader);if(!infoOrig||!infoMod){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(reader);this._originalViewZonesChangedSignal.read(reader);const lines=moves.map((move=>{function computeLineStart(range2,editor2){const t1=editor2.getTopForLineNumber(range2.startLineNumber,true);const t2=editor2.getTopForLineNumber(range2.endLineNumberExclusive,true);return(t1+t2)/2}const start=computeLineStart(move.lineRangeMapping.original,this._editors.original);const startOffset=this._originalScrollTop.read(reader);const end=computeLineStart(move.lineRangeMapping.modified,this._editors.modified);const endOffset=this._modifiedScrollTop.read(reader);const from=start-startOffset;const to=end-endOffset;const top=Math.min(start,end);const bottom=Math.max(start,end);return{range:new OffsetRange(top,bottom),from:from,to:to,fromWithoutScroll:start,toWithoutScroll:end,move:move}}));lines.sort(tieBreakComparators(compareBy((l=>l.fromWithoutScroll>l.toWithoutScroll),booleanComparator),compareBy((l=>l.fromWithoutScroll>l.toWithoutScroll?l.fromWithoutScroll:-l.toWithoutScroll),numberComparator)));const layout2=LinesLayout2.compute(lines.map((l=>l.range)));const padding=10;const lineAreaLeft=infoOrig.verticalScrollbarWidth;const lineAreaWidth=(layout2.getTrackCount()-1)*10+padding*2;const width=lineAreaLeft+lineAreaWidth+(infoMod.contentLeft-MovedBlocksLinesPart.movedCodeBlockPadding);let idx=0;for(const line of lines){const track=layout2.getTrack(idx);const verticalY=lineAreaLeft+padding+track*10;const arrowHeight=15;const arrowWidth=15;const right=width;const rectWidth=infoMod.glyphMarginWidth+infoMod.lineNumbersWidth;const rectHeight=18;const rect=document.createElementNS("http://www.w3.org/2000/svg","rect");rect.classList.add("arrow-rectangle");rect.setAttribute("x",`${right-rectWidth}`);rect.setAttribute("y",`${line.to-rectHeight/2}`);rect.setAttribute("width",`${rectWidth}`);rect.setAttribute("height",`${rectHeight}`);this._element.appendChild(rect);const g=document.createElementNS("http://www.w3.org/2000/svg","g");const path=document.createElementNS("http://www.w3.org/2000/svg","path");path.setAttribute("d",`M ${0} ${line.from} L ${verticalY} ${line.from} L ${verticalY} ${line.to} L ${right-arrowWidth} ${line.to}`);path.setAttribute("fill","none");g.appendChild(path);const arrowRight=document.createElementNS("http://www.w3.org/2000/svg","polygon");arrowRight.classList.add("arrow");store.add(autorun((reader2=>{path.classList.toggle("currentMove",line.move===model.activeMovedText.read(reader2));arrowRight.classList.toggle("currentMove",line.move===model.activeMovedText.read(reader2))})));arrowRight.setAttribute("points",`${right-arrowWidth},${line.to-arrowHeight/2} ${right},${line.to} ${right-arrowWidth},${line.to+arrowHeight/2}`);g.appendChild(arrowRight);this._element.appendChild(g);idx++}this.width.set(lineAreaWidth,void 0)}));this._element=document.createElementNS("http://www.w3.org/2000/svg","svg");this._element.setAttribute("class","moved-blocks-lines");this._rootElement.appendChild(this._element);this._register(toDisposable((()=>this._element.remove())));this._register(autorun((reader=>{const info=this._originalEditorLayoutInfo.read(reader);const info2=this._modifiedEditorLayoutInfo.read(reader);if(!info||!info2){return}this._element.style.left=`${info.width-info.verticalScrollbarWidth}px`;this._element.style.height=`${info.height}px`;this._element.style.width=`${info.verticalScrollbarWidth+info.contentLeft-MovedBlocksLinesPart.movedCodeBlockPadding+this.width.read(reader)}px`})));this._register(keepAlive(this._state,true));const movedBlockViewZones=derived((reader=>{const model=this._diffModel.read(reader);const d=model===null||model===void 0?void 0:model.diff.read(reader);if(!d){return[]}return d.movedTexts.map((move=>({move:move,original:new PlaceholderViewZone(constObservable(move.lineRangeMapping.original.startLineNumber-1),18),modified:new PlaceholderViewZone(constObservable(move.lineRangeMapping.modified.startLineNumber-1),18)})))}));this._register(applyViewZones(this._editors.original,movedBlockViewZones.map((zones=>zones.map((z=>z.original))))));this._register(applyViewZones(this._editors.modified,movedBlockViewZones.map((zones=>zones.map((z=>z.modified))))));this._register(autorunWithStore(((reader,store)=>{const blocks=movedBlockViewZones.read(reader);for(const b of blocks){store.add(new MovedBlockOverlayWidget(this._editors.original,b.original,b.move,"original",this._diffModel.get()));store.add(new MovedBlockOverlayWidget(this._editors.modified,b.modified,b.move,"modified",this._diffModel.get()))}})));const originalCursorPosition=observableFromEvent(this._editors.original.onDidChangeCursorPosition,(()=>this._editors.original.getPosition()));const modifiedCursorPosition=observableFromEvent(this._editors.modified.onDidChangeCursorPosition,(()=>this._editors.modified.getPosition()));const originalHasFocus=observableSignalFromEvent("original.onDidFocusEditorWidget",(e=>this._editors.original.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0)))));const modifiedHasFocus=observableSignalFromEvent("modified.onDidFocusEditorWidget",(e=>this._editors.modified.onDidFocusEditorWidget((()=>setTimeout((()=>e(void 0)),0)))));let lastChangedEditor="modified";this._register(autorunHandleChanges({createEmptyChangeSummary:()=>void 0,handleChange:(ctx,summary)=>{if(ctx.didChange(originalHasFocus)){lastChangedEditor="original"}if(ctx.didChange(modifiedHasFocus)){lastChangedEditor="modified"}return true}},(reader=>{originalHasFocus.read(reader);modifiedHasFocus.read(reader);const m=this._diffModel.read(reader);if(!m){return}const diff=m.diff.read(reader);let movedText=void 0;if(diff&&lastChangedEditor==="original"){const originalPos=originalCursorPosition.read(reader);if(originalPos){movedText=diff.movedTexts.find((m2=>m2.lineRangeMapping.original.contains(originalPos.lineNumber)))}}if(diff&&lastChangedEditor==="modified"){const modifiedPos=modifiedCursorPosition.read(reader);if(modifiedPos){movedText=diff.movedTexts.find((m2=>m2.lineRangeMapping.modified.contains(modifiedPos.lineNumber)))}}if(movedText!==m.movedTextToCompare.get()){m.movedTextToCompare.set(void 0,void 0)}m.setActiveMovedText(movedText)})))}};MovedBlocksLinesPart.movedCodeBlockPadding=4;LinesLayout2=class{static compute(lines){const setsPerTrack=[];const trackPerLineIdx=[];for(const line of lines){let trackIdx=setsPerTrack.findIndex((set=>!set.intersectsStrict(line)));if(trackIdx===-1){const maxTrackCount=6;if(setsPerTrack.length>=maxTrackCount){trackIdx=findMaxIdxBy(setsPerTrack,compareBy((set=>set.intersectWithRangeLength(line)),numberComparator))}else{trackIdx=setsPerTrack.length;setsPerTrack.push(new OffsetRangeSet)}}setsPerTrack[trackIdx].addRange(line);trackPerLineIdx.push(trackIdx)}return new LinesLayout2(setsPerTrack.length,trackPerLineIdx)}constructor(_trackCount,trackPerLineIdx){this._trackCount=_trackCount;this.trackPerLineIdx=trackPerLineIdx}getTrack(lineIdx){return this.trackPerLineIdx[lineIdx]}getTrackCount(){return this._trackCount}};MovedBlockOverlayWidget=class extends ViewZoneOverlayWidget{constructor(_editor,_viewZone,_move,_kind,_diffModel){const root=h("div.diff-hidden-lines-widget");super(_editor,_viewZone,root.root);this._editor=_editor;this._move=_move;this._kind=_kind;this._diffModel=_diffModel;this._nodes=h("div.diff-moved-code-block",{style:{marginRight:"4px"}},[h("div.text-content@textContent"),h("div.action-bar@actionBar")]);root.root.appendChild(this._nodes.root);const editorLayout=observableFromEvent(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));this._register(applyStyle(this._nodes.root,{paddingRight:editorLayout.map((l=>l.verticalScrollbarWidth))}));let text2;if(_move.changes.length>0){text2=this._kind==="original"?localize("codeMovedToWithChanges","Code moved with changes to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive):localize("codeMovedFromWithChanges","Code moved with changes from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive)}else{text2=this._kind==="original"?localize("codeMovedTo","Code moved to line {0}-{1}",this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive):localize("codeMovedFrom","Code moved from line {0}-{1}",this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive)}const actionBar=this._register(new ActionBar(this._nodes.actionBar,{highlightToggledItems:true}));const caption=new Action("",text2,"",false);actionBar.push(caption,{icon:false,label:true});const actionCompare=new Action("","Compare",ThemeIcon.asClassName(Codicon.compareChanges),true,(()=>{this._editor.focus();this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===_move?void 0:this._move,void 0)}));this._register(autorun((reader=>{const isActive=this._diffModel.movedTextToCompare.read(reader)===_move;actionCompare.checked=isActive})));actionBar.push(actionCompare,{icon:false,label:true})}}}});var DiffEditorDecorations;var init_diffEditorDecorations=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorDecorations.js"(){init_lifecycle();init_observable();init_decorations2();init_movedBlocksLines();init_utils4();init_position();init_range();DiffEditorDecorations=class extends Disposable{constructor(_editors,_diffModel,_options){super();this._editors=_editors;this._diffModel=_diffModel;this._options=_options;this._decorations=derived((reader=>{var _a6;const diff=(_a6=this._diffModel.read(reader))===null||_a6===void 0?void 0:_a6.diff.read(reader);if(!diff){return null}const movedTextToCompare=this._diffModel.read(reader).movedTextToCompare.read(reader);const renderIndicators=this._options.renderIndicators.read(reader);const showEmptyDecorations=this._options.showEmptyDecorations.read(reader);const originalDecorations=[];const modifiedDecorations=[];if(!movedTextToCompare){for(const m of diff.mappings){if(!m.lineRangeMapping.originalRange.isEmpty){originalDecorations.push({range:m.lineRangeMapping.originalRange.toInclusiveRange(),options:renderIndicators?diffLineDeleteDecorationBackgroundWithIndicator:diffLineDeleteDecorationBackground})}if(!m.lineRangeMapping.modifiedRange.isEmpty){modifiedDecorations.push({range:m.lineRangeMapping.modifiedRange.toInclusiveRange(),options:renderIndicators?diffLineAddDecorationBackgroundWithIndicator:diffLineAddDecorationBackground})}if(m.lineRangeMapping.modifiedRange.isEmpty||m.lineRangeMapping.originalRange.isEmpty){if(!m.lineRangeMapping.originalRange.isEmpty){originalDecorations.push({range:m.lineRangeMapping.originalRange.toInclusiveRange(),options:diffWholeLineDeleteDecoration})}if(!m.lineRangeMapping.modifiedRange.isEmpty){modifiedDecorations.push({range:m.lineRangeMapping.modifiedRange.toInclusiveRange(),options:diffWholeLineAddDecoration})}}else{for(const i of m.lineRangeMapping.innerChanges||[]){if(m.lineRangeMapping.originalRange.contains(i.originalRange.startLineNumber)){originalDecorations.push({range:i.originalRange,options:i.originalRange.isEmpty()&&showEmptyDecorations?diffDeleteDecorationEmpty:diffDeleteDecoration})}if(m.lineRangeMapping.modifiedRange.contains(i.modifiedRange.startLineNumber)){modifiedDecorations.push({range:i.modifiedRange,options:i.modifiedRange.isEmpty()&&showEmptyDecorations?diffAddDecorationEmpty:diffAddDecoration})}}}if(!m.lineRangeMapping.modifiedRange.isEmpty&&this._options.shouldRenderRevertArrows.read(reader)&&!movedTextToCompare){modifiedDecorations.push({range:Range.fromPositions(new Position(m.lineRangeMapping.modifiedRange.startLineNumber,1)),options:arrowRevertChange})}}}if(movedTextToCompare){for(const m of movedTextToCompare.changes){const fullRangeOriginal=m.originalRange.toInclusiveRange();if(fullRangeOriginal){originalDecorations.push({range:fullRangeOriginal,options:renderIndicators?diffLineDeleteDecorationBackgroundWithIndicator:diffLineDeleteDecorationBackground})}const fullRangeModified=m.modifiedRange.toInclusiveRange();if(fullRangeModified){modifiedDecorations.push({range:fullRangeModified,options:renderIndicators?diffLineAddDecorationBackgroundWithIndicator:diffLineAddDecorationBackground})}for(const i of m.innerChanges||[]){originalDecorations.push({range:i.originalRange,options:diffDeleteDecoration});modifiedDecorations.push({range:i.modifiedRange,options:diffAddDecoration})}}}const activeMovedText=this._diffModel.read(reader).activeMovedText.read(reader);for(const m of diff.movedTexts){originalDecorations.push({range:m.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(m===activeMovedText?" currentMove":""),blockPadding:[MovedBlocksLinesPart.movedCodeBlockPadding,0,MovedBlocksLinesPart.movedCodeBlockPadding,MovedBlocksLinesPart.movedCodeBlockPadding]}});modifiedDecorations.push({range:m.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(m===activeMovedText?" currentMove":""),blockPadding:[4,0,4,4]}})}return{originalDecorations:originalDecorations,modifiedDecorations:modifiedDecorations}}));this._register(applyObservableDecorations(this._editors.original,this._decorations.map((d=>(d===null||d===void 0?void 0:d.originalDecorations)||[]))));this._register(applyObservableDecorations(this._editors.modified,this._decorations.map((d=>(d===null||d===void 0?void 0:d.modifiedDecorations)||[]))))}}}});var DiffEditorSash;var init_diffEditorSash=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorSash.js"(){init_sash();init_lifecycle();init_observable();DiffEditorSash=class extends Disposable{constructor(_options,_domNode,_dimensions){super();this._options=_options;this._domNode=_domNode;this._dimensions=_dimensions;this._sashRatio=observableValue("sashRatio",void 0);this.sashLeft=derived((reader=>{var _a6;const ratio=(_a6=this._sashRatio.read(reader))!==null&&_a6!==void 0?_a6:this._options.splitViewDefaultRatio.read(reader);return this._computeSashLeft(ratio,reader)}));this._sash=this._register(new Sash(this._domNode,{getVerticalSashTop:_sash=>0,getVerticalSashLeft:_sash=>this.sashLeft.get(),getVerticalSashHeight:_sash=>this._dimensions.height.get()},{orientation:0}));this._startSashPosition=void 0;this._register(this._sash.onDidStart((()=>{this._startSashPosition=this.sashLeft.get()})));this._register(this._sash.onDidChange((e=>{const contentWidth=this._dimensions.width.get();const sashPosition=this._computeSashLeft((this._startSashPosition+(e.currentX-e.startX))/contentWidth,void 0);this._sashRatio.set(sashPosition/contentWidth,void 0)})));this._register(this._sash.onDidEnd((()=>this._sash.layout())));this._register(this._sash.onDidReset((()=>this._sashRatio.set(void 0,void 0))));this._register(autorun((reader=>{const enabled=this._options.enableSplitViewResizing.read(reader);this._sash.state=enabled?3:0;this.sashLeft.read(reader);this._sash.layout()})))}setBoundarySashes(sashes){this._sash.orthogonalEndSash=sashes.bottom}_computeSashLeft(desiredRatio,reader){const contentWidth=this._dimensions.width.read(reader);const midPoint=Math.floor(this._options.splitViewDefaultRatio.read(reader)*contentWidth);const sashLeft=this._options.enableSplitViewResizing.read(reader)?Math.floor(desiredRatio*contentWidth):midPoint;const MINIMUM_EDITOR_WIDTH=100;if(contentWidth<=MINIMUM_EDITOR_WIDTH*2){return midPoint}if(sashLeftcontentWidth-MINIMUM_EDITOR_WIDTH){return contentWidth-MINIMUM_EDITOR_WIDTH}return sashLeft}}}});function applyOriginalEdits(diff,textEdits,originalTextModel,modifiedTextModel){return void 0}function applyModifiedEdits(diff,textEdits,originalTextModel,modifiedTextModel){return void 0}var __awaiter29,DiffEditorViewModel,DiffState,DiffMapping,UnchangedRegion;var init_diffEditorViewModel=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorViewModel.js"(){init_async();init_cancellation();init_lifecycle();init_observable();init_utils4();init_lineRange();init_advancedLinesDiffComputer();init_linesDiffComputer();init_beforeEditPositionMapper();init_combineTextEditInfos();__awaiter29=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};DiffEditorViewModel=class extends Disposable{setActiveMovedText(movedText){this._activeMovedText.set(movedText,void 0)}constructor(model,_options,documentDiffProvider){super();this.model=model;this._options=_options;this._isDiffUpToDate=observableValue("isDiffUpToDate",false);this.isDiffUpToDate=this._isDiffUpToDate;this._diff=observableValue("diff",void 0);this.diff=this._diff;this._unchangedRegions=observableValue("unchangedRegion",{regions:[],originalDecorationIds:[],modifiedDecorationIds:[]});this.unchangedRegions=derived((r=>{if(this._options.hideUnchangedRegions.read(r)){return this._unchangedRegions.read(r).regions}else{transaction((tx=>{for(const r2 of this._unchangedRegions.get().regions){r2.collapseAll(tx)}}));return[]}}));this.movedTextToCompare=observableValue("movedTextToCompare",void 0);this._activeMovedText=observableValue("activeMovedText",void 0);this._hoveredMovedText=observableValue("hoveredMovedText",void 0);this.activeMovedText=derived((r=>{var _a6,_b3;return(_b3=(_a6=this.movedTextToCompare.read(r))!==null&&_a6!==void 0?_a6:this._hoveredMovedText.read(r))!==null&&_b3!==void 0?_b3:this._activeMovedText.read(r)}));this._cancellationTokenSource=new CancellationTokenSource;this._register(toDisposable((()=>this._cancellationTokenSource.cancel())));const contentChangedSignal=observableSignal("contentChangedSignal");const debouncer=this._register(new RunOnceScheduler((()=>contentChangedSignal.trigger(void 0)),200));const updateUnchangedRegions=(result,tx,reader)=>{const newUnchangedRegions=UnchangedRegion.fromDiffs(result.changes,model.original.getLineCount(),model.modified.getLineCount(),this._options.hideUnchangedRegionsminimumLineCount.read(reader),this._options.hideUnchangedRegionsContextLineCount.read(reader));const lastUnchangedRegions=this._unchangedRegions.get();const lastUnchangedRegionsOrigRanges=lastUnchangedRegions.originalDecorationIds.map((id=>model.original.getDecorationRange(id))).filter((r=>!!r)).map((r=>LineRange.fromRange(r)));const lastUnchangedRegionsModRanges=lastUnchangedRegions.modifiedDecorationIds.map((id=>model.modified.getDecorationRange(id))).filter((r=>!!r)).map((r=>LineRange.fromRange(r)));const originalDecorationIds=model.original.deltaDecorations(lastUnchangedRegions.originalDecorationIds,newUnchangedRegions.map((r=>({range:r.originalRange.toInclusiveRange(),options:{description:"unchanged"}}))));const modifiedDecorationIds=model.modified.deltaDecorations(lastUnchangedRegions.modifiedDecorationIds,newUnchangedRegions.map((r=>({range:r.modifiedRange.toInclusiveRange(),options:{description:"unchanged"}}))));for(const r of newUnchangedRegions){for(let i=0;i{const diff=this._diff.get();if(diff){const textEdits=TextEditInfo.fromModelContentChanges(e.changes);const result=applyModifiedEdits(this._lastDiff,textEdits,model.original,model.modified);if(result){this._lastDiff=result;transaction((tx=>{this._diff.set(DiffState.fromDiffResult(this._lastDiff),tx);updateUnchangedRegions(result,tx);const currentSyncedMovedText=this.movedTextToCompare.get();this.movedTextToCompare.set(currentSyncedMovedText?this._lastDiff.moves.find((m=>m.lineRangeMapping.modified.intersect(currentSyncedMovedText.lineRangeMapping.modified))):void 0,tx)}))}}debouncer.schedule()})));this._register(model.original.onDidChangeContent((e=>{const diff=this._diff.get();if(diff){const textEdits=TextEditInfo.fromModelContentChanges(e.changes);const result=applyOriginalEdits(this._lastDiff,textEdits,model.original,model.modified);if(result){this._lastDiff=result;transaction((tx=>{this._diff.set(DiffState.fromDiffResult(this._lastDiff),tx);updateUnchangedRegions(result,tx);const currentSyncedMovedText=this.movedTextToCompare.get();this.movedTextToCompare.set(currentSyncedMovedText?this._lastDiff.moves.find((m=>m.lineRangeMapping.modified.intersect(currentSyncedMovedText.lineRangeMapping.modified))):void 0,tx)}))}}debouncer.schedule()})));const documentDiffProviderOptionChanged=observableSignalFromEvent("documentDiffProviderOptionChanged",documentDiffProvider.onDidChange);this._register(autorunWithStore(((reader,store)=>__awaiter29(this,void 0,void 0,(function*(){var _a6,_b3;this._options.hideUnchangedRegionsminimumLineCount.read(reader);this._options.hideUnchangedRegionsContextLineCount.read(reader);debouncer.cancel();contentChangedSignal.read(reader);documentDiffProviderOptionChanged.read(reader);readHotReloadableExport(AdvancedLinesDiffComputer,reader);this._isDiffUpToDate.set(false,void 0);let originalTextEditInfos=[];store.add(model.original.onDidChangeContent((e=>{const edits=TextEditInfo.fromModelContentChanges(e.changes);originalTextEditInfos=combineTextEditInfos(originalTextEditInfos,edits)})));let modifiedTextEditInfos=[];store.add(model.modified.onDidChangeContent((e=>{const edits=TextEditInfo.fromModelContentChanges(e.changes);modifiedTextEditInfos=combineTextEditInfos(modifiedTextEditInfos,edits)})));let result=yield documentDiffProvider.computeDiff(model.original,model.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(reader),maxComputationTimeMs:this._options.maxComputationTimeMs.read(reader),computeMoves:this._options.showMoves.read(reader)},this._cancellationTokenSource.token);if(this._cancellationTokenSource.token.isCancellationRequested){return}result=(_a6=applyOriginalEdits(result,originalTextEditInfos,model.original,model.modified))!==null&&_a6!==void 0?_a6:result;result=(_b3=applyModifiedEdits(result,modifiedTextEditInfos,model.original,model.modified))!==null&&_b3!==void 0?_b3:result;transaction((tx=>{updateUnchangedRegions(result,tx);this._lastDiff=result;const state=DiffState.fromDiffResult(result);this._diff.set(state,tx);this._isDiffUpToDate.set(true,tx);const currentSyncedMovedText=this.movedTextToCompare.get();this.movedTextToCompare.set(currentSyncedMovedText?this._lastDiff.moves.find((m=>m.lineRangeMapping.modified.intersect(currentSyncedMovedText.lineRangeMapping.modified))):void 0,tx)}))})))))}ensureModifiedLineIsVisible(lineNumber,tx){var _a6;if(((_a6=this.diff.get())===null||_a6===void 0?void 0:_a6.mappings.length)===0){return}const unchangedRegions=this._unchangedRegions.get().regions;for(const r of unchangedRegions){if(r.getHiddenModifiedRange(void 0).contains(lineNumber)){r.showModifiedLine(lineNumber,tx);return}}}ensureOriginalLineIsVisible(lineNumber,tx){var _a6;if(((_a6=this.diff.get())===null||_a6===void 0?void 0:_a6.mappings.length)===0){return}const unchangedRegions=this._unchangedRegions.get().regions;for(const r of unchangedRegions){if(r.getHiddenOriginalRange(void 0).contains(lineNumber)){r.showOriginalLine(lineNumber,tx);return}}}waitForDiff(){return __awaiter29(this,void 0,void 0,(function*(){yield waitForState(this.isDiffUpToDate,(s=>s))}))}serializeState(){const regions=this._unchangedRegions.get();return{collapsedRegions:regions.regions.map((r=>({range:r.getHiddenModifiedRange(void 0).serialize()})))}}restoreSerializedState(state){const ranges=state.collapsedRegions.map((r=>LineRange.deserialize(r.range)));const regions=this._unchangedRegions.get();transaction((tx=>{for(const r of regions.regions){for(const range2 of ranges){if(r.modifiedRange.intersect(range2)){r.setHiddenModifiedRange(range2,tx);break}}}}))}};DiffState=class{static fromDiffResult(result){return new DiffState(result.changes.map((c=>new DiffMapping(c))),result.moves||[],result.identical,result.quitEarly)}constructor(mappings,movedTexts,identical,quitEarly){this.mappings=mappings;this.movedTexts=movedTexts;this.identical=identical;this.quitEarly=quitEarly}};DiffMapping=class{constructor(lineRangeMapping){this.lineRangeMapping=lineRangeMapping}};UnchangedRegion=class{static fromDiffs(changes,originalLineCount,modifiedLineCount,minHiddenLineCount,minContext){const inversedMappings=LineRangeMapping.inverse(changes,originalLineCount,modifiedLineCount);const result=[];for(const mapping of inversedMappings){let origStart=mapping.originalRange.startLineNumber;let modStart=mapping.modifiedRange.startLineNumber;let length2=mapping.originalRange.length;const atStart=origStart===1&&modStart===1;const atEnd=origStart+length2===originalLineCount+1&&modStart+length2===modifiedLineCount+1;if((atStart||atEnd)&&length2>=minContext+minHiddenLineCount){if(atStart&&!atEnd){length2-=minContext}if(atEnd&&!atStart){origStart+=minContext;modStart+=minContext;length2-=minContext}result.push(new UnchangedRegion(origStart,modStart,length2,0,0))}else if(length2>=minContext*2+minHiddenLineCount){origStart+=minContext;modStart+=minContext;length2-=minContext*2;result.push(new UnchangedRegion(origStart,modStart,length2,0,0))}}return result}get originalRange(){return LineRange.ofLength(this.originalLineNumber,this.lineCount)}get modifiedRange(){return LineRange.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(originalLineNumber,modifiedLineNumber,lineCount,visibleLineCountTop,visibleLineCountBottom){this.originalLineNumber=originalLineNumber;this.modifiedLineNumber=modifiedLineNumber;this.lineCount=lineCount;this._visibleLineCountTop=observableValue("visibleLineCountTop",0);this.visibleLineCountTop=this._visibleLineCountTop;this._visibleLineCountBottom=observableValue("visibleLineCountBottom",0);this.visibleLineCountBottom=this._visibleLineCountBottom;this._shouldHideControls=derived((reader=>this.visibleLineCountTop.read(reader)+this.visibleLineCountBottom.read(reader)===this.lineCount&&!this.isDragged.read(reader)));this.isDragged=observableValue("isDragged",false);this._visibleLineCountTop.set(visibleLineCountTop,void 0);this._visibleLineCountBottom.set(visibleLineCountBottom,void 0)}shouldHideControls(reader){return this._shouldHideControls.read(reader)}getHiddenOriginalRange(reader){return LineRange.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(reader),this.lineCount-this._visibleLineCountTop.read(reader)-this._visibleLineCountBottom.read(reader))}getHiddenModifiedRange(reader){return LineRange.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(reader),this.lineCount-this._visibleLineCountTop.read(reader)-this._visibleLineCountBottom.read(reader))}setHiddenModifiedRange(range2,tx){const visibleLineCountTop=range2.startLineNumber-this.modifiedLineNumber;const visibleLineCountBottom=this.modifiedLineNumber+this.lineCount-range2.endLineNumberExclusive;this.setState(visibleLineCountTop,visibleLineCountBottom,tx)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(count=10,tx){const maxVisibleLineCountTop=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+count,maxVisibleLineCountTop),tx)}showMoreBelow(count=10,tx){const maxVisibleLineCountBottom=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+count,maxVisibleLineCountBottom),tx)}showAll(tx){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),tx)}showModifiedLine(lineNumber,tx){const top=lineNumber+1-(this.modifiedLineNumber+this._visibleLineCountTop.get());const bottom=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-lineNumber;if(top{var _a6;this._contextMenuService.showContextMenu({domForShadowRoot:useShadowDOM?(_a6=_modifiedEditor.getDomNode())!==null&&_a6!==void 0?_a6:void 0:void 0,getAnchor:()=>({x:x,y:y}),getActions:()=>{const actions=[];const isDeletion=_diff.modifiedRange.isEmpty;actions.push(new Action("diff.clipboard.copyDeletedContent",isDeletion?_diff.originalRange.length>1?localize("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):localize("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):_diff.originalRange.length>1?localize("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):localize("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,true,(()=>__awaiter30(this,void 0,void 0,(function*(){const originalText=this._originalTextModel.getValueInRange(_diff.originalRange.toExclusiveRange());yield this._clipboardService.writeText(originalText)})))));if(_diff.originalRange.length>1){actions.push(new Action("diff.clipboard.copyDeletedLineContent",isDeletion?localize("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",_diff.originalRange.startLineNumber+currentLineNumberOffset):localize("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",_diff.originalRange.startLineNumber+currentLineNumberOffset),void 0,true,(()=>__awaiter30(this,void 0,void 0,(function*(){let lineContent=this._originalTextModel.getLineContent(_diff.originalRange.startLineNumber+currentLineNumberOffset);if(lineContent===""){const eof=this._originalTextModel.getEndOfLineSequence();lineContent=eof===0?"\n":"\r\n"}yield this._clipboardService.writeText(lineContent)})))))}const readOnly=_modifiedEditor.getOption(89);if(!readOnly){actions.push(new Action("diff.inline.revertChange",localize("diff.inline.revertChange.label","Revert this change"),void 0,true,(()=>__awaiter30(this,void 0,void 0,(function*(){this._editor.revert(this._diff)})))))}return actions},autoSelectFirstItem:true})};this._register(addStandardDisposableListener(this._diffActions,"mousedown",(e=>{const{top:top,height:height}=getDomNodePagePosition(this._diffActions);const pad=Math.floor(lineHeight/3);e.preventDefault();showContextMenu(e.posx,top+height+pad)})));this._register(_modifiedEditor.onMouseMove((e=>{if((e.target.type===8||e.target.type===5)&&e.target.detail.viewZoneId===this._getViewZoneId()){currentLineNumberOffset=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,lineHeight);this.visibility=true}else{this.visibility=false}})));this._register(_modifiedEditor.onMouseDown((e=>{if(!e.event.rightButton){return}if(e.target.type===8||e.target.type===5){const viewZoneId=e.target.detail.viewZoneId;if(viewZoneId===this._getViewZoneId()){e.event.preventDefault();currentLineNumberOffset=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,lineHeight);showContextMenu(e.event.posx,e.event.posy+lineHeight)}}})))}_updateLightBulbPosition(marginDomNode,y,lineHeight){const{top:top}=getDomNodePagePosition(marginDomNode);const offset=y-top;const lineNumberOffset=Math.floor(offset/lineHeight);const newTop=lineNumberOffset*lineHeight;this._diffActions.style.top=`${newTop}px`;if(this._viewLineCounts){let acc=0;for(let i=0;i0;const sb=new StringBuilder(1e4);let maxCharsPerLine=0;let renderedLineCount=0;const viewLineCounts=[];for(let lineIndex=0;lineIndex');const lineContent=lineTokens.getLineContent();const isBasicASCII2=ViewLineRenderingData.isBasicASCII(lineContent,mightContainNonBasicASCII);const containsRTL2=ViewLineRenderingData.containsRTL(lineContent,isBasicASCII2,mightContainRTL);const output=renderViewLine(new RenderLineInput(options2.fontInfo.isMonospace&&!options2.disableMonospaceOptimizations,options2.fontInfo.canUseHalfwidthRightwardsArrow,lineContent,false,isBasicASCII2,containsRTL2,0,lineTokens,decorations,options2.tabSize,0,options2.fontInfo.spaceWidth,options2.fontInfo.middotWidth,options2.fontInfo.wsmiddotWidth,options2.stopRenderingLineAfter,options2.renderWhitespace,options2.renderControlCharacters,options2.fontLigatures!==EditorFontLigatures.OFF,null),sb);sb.appendString("");return output.characterMapping.getHorizontalOffset(output.characterMapping.length)}var ttPolicy4,LineSource,RenderOptions;var init_renderLines=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/renderLines.js"(){init_domFontInfo();init_diffEditorWidget();init_editorOptions();init_stringBuilder();init_lineDecorations();init_viewLineRenderer();init_viewModel();ttPolicy4=diffEditorWidgetTtPolicy;LineSource=class{constructor(lineTokens,lineBreakData,mightContainNonBasicASCII,mightContainRTL){this.lineTokens=lineTokens;this.lineBreakData=lineBreakData;this.mightContainNonBasicASCII=mightContainNonBasicASCII;this.mightContainRTL=mightContainRTL}};RenderOptions=class{static fromEditor(editor2){var _a6;const modifiedEditorOptions=editor2.getOptions();const fontInfo=modifiedEditorOptions.get(49);const layoutInfo=modifiedEditorOptions.get(142);return new RenderOptions(((_a6=editor2.getModel())===null||_a6===void 0?void 0:_a6.getOptions().tabSize)||0,fontInfo,modifiedEditorOptions.get(32),fontInfo.typicalHalfwidthCharacterWidth,modifiedEditorOptions.get(102),modifiedEditorOptions.get(65),layoutInfo.decorationsWidth,modifiedEditorOptions.get(115),modifiedEditorOptions.get(97),modifiedEditorOptions.get(92),modifiedEditorOptions.get(50))}constructor(tabSize,fontInfo,disableMonospaceOptimizations,typicalHalfwidthCharacterWidth,scrollBeyondLastColumn,lineHeight,lineDecorationsWidth,stopRenderingLineAfter,renderWhitespace,renderControlCharacters,fontLigatures){this.tabSize=tabSize;this.fontInfo=fontInfo;this.disableMonospaceOptimizations=disableMonospaceOptimizations;this.typicalHalfwidthCharacterWidth=typicalHalfwidthCharacterWidth;this.scrollBeyondLastColumn=scrollBeyondLastColumn;this.lineHeight=lineHeight;this.lineDecorationsWidth=lineDecorationsWidth;this.stopRenderingLineAfter=stopRenderingLineAfter;this.renderWhitespace=renderWhitespace;this.renderControlCharacters=renderControlCharacters;this.fontLigatures=fontLigatures}}}});function computeRangeAlignment(originalEditor,modifiedEditor,diffs,originalEditorAlignmentViewZones,modifiedEditorAlignmentViewZones,innerHunkAlignment){const originalLineHeightOverrides=new ArrayQueue(getAdditionalLineHeights(originalEditor,originalEditorAlignmentViewZones));const modifiedLineHeightOverrides=new ArrayQueue(getAdditionalLineHeights(modifiedEditor,modifiedEditorAlignmentViewZones));const origLineHeight=originalEditor.getOption(65);const modLineHeight=modifiedEditor.getOption(65);const result=[];let lastOriginalLineNumber=0;let lastModifiedLineNumber=0;function handleAlignmentsOutsideOfDiffs(untilOriginalLineNumberExclusive,untilModifiedLineNumberExclusive){while(true){let origNext=originalLineHeightOverrides.peek();let modNext=modifiedLineHeightOverrides.peek();if(origNext&&origNext.lineNumber>=untilOriginalLineNumberExclusive){origNext=void 0}if(modNext&&modNext.lineNumber>=untilModifiedLineNumberExclusive){modNext=void 0}if(!origNext&&!modNext){break}const distOrig=origNext?origNext.lineNumber-lastOriginalLineNumber:Number.MAX_VALUE;const distNext=modNext?modNext.lineNumber-lastModifiedLineNumber:Number.MAX_VALUE;if(distOrigdistNext){modifiedLineHeightOverrides.dequeue();origNext={lineNumber:modNext.lineNumber-lastModifiedLineNumber+lastOriginalLineNumber,heightInPx:0}}else{originalLineHeightOverrides.dequeue();modifiedLineHeightOverrides.dequeue()}result.push({originalRange:LineRange.ofLength(origNext.lineNumber,1),modifiedRange:LineRange.ofLength(modNext.lineNumber,1),originalHeightInPx:origLineHeight+origNext.heightInPx,modifiedHeightInPx:modLineHeight+modNext.heightInPx,diff:void 0})}}for(const m of diffs){let emitAlignment=function(origLineNumberExclusive,modLineNumberExclusive){var _a6,_b3,_c2,_d2;if(origLineNumberExclusivev.lineNumberp+c2.heightInPx),0))!==null&&_b3!==void 0?_b3:0;const modifiedAdditionalHeight=(_d2=(_c2=modifiedLineHeightOverrides.takeWhile((v=>v.lineNumberp+c2.heightInPx),0))!==null&&_d2!==void 0?_d2:0;result.push({originalRange:originalRange,modifiedRange:modifiedRange,originalHeightInPx:originalRange.length*origLineHeight+originalAdditionalHeight,modifiedHeightInPx:modifiedRange.length*modLineHeight+modifiedAdditionalHeight,diff:m.lineRangeMapping});lastOrigLineNumber=origLineNumberExclusive;lastModLineNumber=modLineNumberExclusive};const c=m.lineRangeMapping;handleAlignmentsOutsideOfDiffs(c.originalRange.startLineNumber,c.modifiedRange.startLineNumber);let first2=true;let lastModLineNumber=c.modifiedRange.startLineNumber;let lastOrigLineNumber=c.originalRange.startLineNumber;if(innerHunkAlignment){for(const i of c.innerChanges||[]){if(i.originalRange.startColumn>1&&i.modifiedRange.startColumn>1){emitAlignment(i.originalRange.startLineNumber,i.modifiedRange.startLineNumber)}if(i.originalRange.endColumn1){wrappingZoneHeights.push({lineNumber:i,heightInPx:editorLineHeight*(lineCount-1)})}}}for(const w of editor2.getWhitespaces()){if(viewZonesToIgnore.has(w.id)){continue}const modelLineNumber=w.afterLineNumber===0?0:coordinatesConverter.convertViewPositionToModelPosition(new Position(w.afterLineNumber,1)).lineNumber;viewZoneHeights.push({lineNumber:modelLineNumber,heightInPx:w.height})}const result=joinCombine(viewZoneHeights,wrappingZoneHeights,(v=>v.lineNumber),((v1,v2)=>({lineNumber:v1.lineNumber,heightInPx:v1.heightInPx+v2.heightInPx})));return result}var __decorate46,__param39,ViewZoneManager;var init_lineAlignment=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/lineAlignment.js"(){init_dom();init_arrays();init_async();init_codicons();init_lifecycle();init_observable();init_themables();init_types();init_domFontInfo();init_stableEditorScroll();init_decorations2();init_diffEditorViewModel();init_inlineDiffDeletedCodeMargin();init_renderLines();init_utils4();init_lineRange();init_position();init_viewModel();init_clipboardService();init_contextView();__decorate46=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param39=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};ViewZoneManager=class ViewZoneManager2 extends Disposable{constructor(_editors,_diffModel,_options,_diffEditorWidget,_canIgnoreViewZoneUpdateEvent,_clipboardService,_contextMenuService){super();this._editors=_editors;this._diffModel=_diffModel;this._options=_options;this._diffEditorWidget=_diffEditorWidget;this._canIgnoreViewZoneUpdateEvent=_canIgnoreViewZoneUpdateEvent;this._clipboardService=_clipboardService;this._contextMenuService=_contextMenuService;this._originalTopPadding=observableValue("originalTopPadding",0);this._originalScrollOffset=observableValue("originalScrollOffset",0);this._originalScrollOffsetAnimated=animatedObservable(this._originalScrollOffset,this._store);this._modifiedTopPadding=observableValue("modifiedTopPadding",0);this._modifiedScrollOffset=observableValue("modifiedScrollOffset",0);this._modifiedScrollOffsetAnimated=animatedObservable(this._modifiedScrollOffset,this._store);let isChangingViewZones=false;const state=observableValue("state",0);const updateImmediately=this._register(new RunOnceScheduler((()=>{state.set(state.get()+1,void 0)}),0));this._register(this._editors.original.onDidChangeViewZones((_args=>{if(!isChangingViewZones&&!this._canIgnoreViewZoneUpdateEvent()){updateImmediately.schedule()}})));this._register(this._editors.modified.onDidChangeViewZones((_args=>{if(!isChangingViewZones&&!this._canIgnoreViewZoneUpdateEvent()){updateImmediately.schedule()}})));this._register(this._editors.original.onDidChangeConfiguration((args=>{if(args.hasChanged(143)||args.hasChanged(65)){updateImmediately.schedule()}})));this._register(this._editors.modified.onDidChangeConfiguration((args=>{if(args.hasChanged(143)||args.hasChanged(65)){updateImmediately.schedule()}})));const originalModelTokenizationCompleted=this._diffModel.map((m=>m?observableFromEvent(m.model.original.onDidChangeTokens,(()=>m.model.original.tokenization.backgroundTokenizationState===2)):void 0)).map(((m,reader)=>m===null||m===void 0?void 0:m.read(reader)));const alignmentViewZoneIdsOrig=new Set;const alignmentViewZoneIdsMod=new Set;const alignments=derived((reader=>{const diffModel=this._diffModel.read(reader);const diff=diffModel===null||diffModel===void 0?void 0:diffModel.diff.read(reader);if(!diffModel||!diff){return null}state.read(reader);const renderSideBySide=this._options.renderSideBySide.read(reader);const innerHunkAlignment=renderSideBySide;return computeRangeAlignment(this._editors.original,this._editors.modified,diff.mappings,alignmentViewZoneIdsOrig,alignmentViewZoneIdsMod,innerHunkAlignment)}));const alignmentsSyncedMovedText=derived((reader=>{var _a6;const syncedMovedText=(_a6=this._diffModel.read(reader))===null||_a6===void 0?void 0:_a6.movedTextToCompare.read(reader);if(!syncedMovedText){return null}state.read(reader);const mappings=syncedMovedText.changes.map((c=>new DiffMapping(c)));return computeRangeAlignment(this._editors.original,this._editors.modified,mappings,alignmentViewZoneIdsOrig,alignmentViewZoneIdsMod,true)}));function createFakeLinesDiv2(){const r=document.createElement("div");r.className="diagonal-fill";return r}const alignmentViewZonesDisposables=this._register(new DisposableStore);const alignmentViewZones=derived((reader=>{var _a6,_b3,_c2,_d2,_e2,_f2,_g2,_h2;alignmentViewZonesDisposables.clear();const alignmentsVal=alignments.read(reader)||[];const origViewZones=[];const modViewZones=[];const modifiedTopPaddingVal=this._modifiedTopPadding.read(reader);if(modifiedTopPaddingVal>0){modViewZones.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:modifiedTopPaddingVal,showInHiddenAreas:true})}const originalTopPaddingVal=this._originalTopPadding.read(reader);if(originalTopPaddingVal>0){origViewZones.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:originalTopPaddingVal,showInHiddenAreas:true})}const renderSideBySide=this._options.renderSideBySide.read(reader);const deletedCodeLineBreaksComputer=!renderSideBySide?(_a6=this._editors.modified._getViewModel())===null||_a6===void 0?void 0:_a6.createLineBreaksComputer():void 0;if(deletedCodeLineBreaksComputer){for(const a of alignmentsVal){if(a.diff){for(let i=a.originalRange.startLineNumber;ithis._editors.original.getModel().tokenization.getLineTokens(l))),a.originalRange.mapToLineArray((_=>lineBreakData[lineBreakDataIdx++])),mightContainNonBasicASCII,mightContainRTL);const decorations=[];for(const i of a.diff.innerChanges||[]){decorations.push(new InlineDecoration(i.originalRange.delta(-(a.diff.originalRange.startLineNumber-1)),diffDeleteDecoration.className,0))}const result=renderLines(source,renderOptions,decorations,deletedCodeDomNode);const marginDomNode2=document.createElement("div");marginDomNode2.className="inline-deleted-margin-view-zone";applyFontInfo(marginDomNode2,renderOptions.fontInfo);if(this._options.renderIndicators.read(reader)){for(let i=0;iassertIsDefined(zoneId)),marginDomNode2,this._editors.modified,a.diff,this._diffEditorWidget,result.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let i=0;i1){origViewZones.push({afterLineNumber:a.originalRange.startLineNumber+i,domNode:createFakeLinesDiv2(),heightInPx:(count-1)*modLineHeight,showInHiddenAreas:true})}}modViewZones.push({afterLineNumber:a.modifiedRange.startLineNumber-1,domNode:deletedCodeDomNode,heightInPx:result.heightInLines*modLineHeight,minWidthInPx:result.minWidthInPx,marginDomNode:marginDomNode2,setZoneId(id){zoneId=id},showInHiddenAreas:true})}const marginDomNode=document.createElement("div");marginDomNode.className="gutter-delete";origViewZones.push({afterLineNumber:a.originalRange.endLineNumberExclusive-1,domNode:createFakeLinesDiv2(),heightInPx:a.modifiedHeightInPx,marginDomNode:marginDomNode,showInHiddenAreas:true})}else{const delta=a.modifiedHeightInPx-a.originalHeightInPx;if(delta>0){if(syncedMovedText===null||syncedMovedText===void 0?void 0:syncedMovedText.lineRangeMapping.original.delta(-1).deltaLength(2).contains(a.originalRange.endLineNumberExclusive-1)){continue}origViewZones.push({afterLineNumber:a.originalRange.endLineNumberExclusive-1,domNode:createFakeLinesDiv2(),heightInPx:delta,showInHiddenAreas:true})}else{let createViewZoneMarginArrow2=function(){const arrow=document.createElement("div");arrow.className="arrow-revert-change "+ThemeIcon.asClassName(Codicon.arrowRight);return $("div",{},arrow)};if(syncedMovedText===null||syncedMovedText===void 0?void 0:syncedMovedText.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(a.modifiedRange.endLineNumberExclusive-1)){continue}let marginDomNode=void 0;if(a.diff&&a.diff.modifiedRange.isEmpty&&this._options.shouldRenderRevertArrows.read(reader)){marginDomNode=createViewZoneMarginArrow2()}modViewZones.push({afterLineNumber:a.modifiedRange.endLineNumberExclusive-1,domNode:createFakeLinesDiv2(),heightInPx:-delta,marginDomNode:marginDomNode,showInHiddenAreas:true})}}}for(const a of(_h2=alignmentsSyncedMovedText.read(reader))!==null&&_h2!==void 0?_h2:[]){if(!(syncedMovedText===null||syncedMovedText===void 0?void 0:syncedMovedText.lineRangeMapping.original.intersect(a.originalRange))||!(syncedMovedText===null||syncedMovedText===void 0?void 0:syncedMovedText.lineRangeMapping.modified.intersect(a.modifiedRange))){continue}const delta=a.modifiedHeightInPx-a.originalHeightInPx;if(delta>0){origViewZones.push({afterLineNumber:a.originalRange.endLineNumberExclusive-1,domNode:createFakeLinesDiv2(),heightInPx:delta,showInHiddenAreas:true})}else{modViewZones.push({afterLineNumber:a.modifiedRange.endLineNumberExclusive-1,domNode:createFakeLinesDiv2(),heightInPx:-delta,showInHiddenAreas:true})}}return{orig:origViewZones,mod:modViewZones}}));this._register(autorunWithStore((reader=>{const scrollState=StableEditorScrollState.capture(this._editors.modified);const alignmentViewZones_=alignmentViewZones.read(reader);isChangingViewZones=true;this._editors.original.changeViewZones((aOrig=>{for(const id of alignmentViewZoneIdsOrig){aOrig.removeZone(id)}alignmentViewZoneIdsOrig.clear();for(const z of alignmentViewZones_.orig){const id=aOrig.addZone(z);if(z.setZoneId){z.setZoneId(id)}alignmentViewZoneIdsOrig.add(id)}}));this._editors.modified.changeViewZones((aMod=>{for(const id of alignmentViewZoneIdsMod){aMod.removeZone(id)}alignmentViewZoneIdsMod.clear();for(const z of alignmentViewZones_.mod){const id=aMod.addZone(z);if(z.setZoneId){z.setZoneId(id)}alignmentViewZoneIdsMod.add(id)}}));isChangingViewZones=false;scrollState.restore(this._editors.modified)})));this._register(toDisposable((()=>{this._editors.original.changeViewZones((a=>{for(const id of alignmentViewZoneIdsOrig){a.removeZone(id)}alignmentViewZoneIdsOrig.clear()}));this._editors.modified.changeViewZones((a=>{for(const id of alignmentViewZoneIdsMod){a.removeZone(id)}alignmentViewZoneIdsMod.clear()}))})));let ignoreChange=false;this._register(this._editors.original.onDidScrollChange((e=>{if(e.scrollLeftChanged&&!ignoreChange){ignoreChange=true;this._editors.modified.setScrollLeft(e.scrollLeft);ignoreChange=false}})));this._register(this._editors.modified.onDidScrollChange((e=>{if(e.scrollLeftChanged&&!ignoreChange){ignoreChange=true;this._editors.original.setScrollLeft(e.scrollLeft);ignoreChange=false}})));this._originalScrollTop=observableFromEvent(this._editors.original.onDidScrollChange,(()=>this._editors.original.getScrollTop()));this._modifiedScrollTop=observableFromEvent(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop()));this._register(autorun((reader=>{const newScrollTopModified=this._originalScrollTop.read(reader)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(reader))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(reader));if(newScrollTopModified!==this._editors.modified.getScrollTop()){this._editors.modified.setScrollTop(newScrollTopModified,1)}})));this._register(autorun((reader=>{const newScrollTopOriginal=this._modifiedScrollTop.read(reader)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(reader))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(reader));if(newScrollTopOriginal!==this._editors.original.getScrollTop()){this._editors.original.setScrollTop(newScrollTopOriginal,1)}})));this._register(autorun((reader=>{var _a6;const m=(_a6=this._diffModel.read(reader))===null||_a6===void 0?void 0:_a6.movedTextToCompare.read(reader);let deltaOrigToMod=0;if(m){const trueTopOriginal=this._editors.original.getTopForLineNumber(m.lineRangeMapping.original.startLineNumber,true)-this._originalTopPadding.get();const trueTopModified=this._editors.modified.getTopForLineNumber(m.lineRangeMapping.modified.startLineNumber,true)-this._modifiedTopPadding.get();deltaOrigToMod=trueTopModified-trueTopOriginal}if(deltaOrigToMod>0){this._modifiedTopPadding.set(0,void 0);this._originalTopPadding.set(deltaOrigToMod,void 0)}else if(deltaOrigToMod<0){this._modifiedTopPadding.set(-deltaOrigToMod,void 0);this._originalTopPadding.set(0,void 0)}else{setTimeout((()=>{this._modifiedTopPadding.set(0,void 0);this._originalTopPadding.set(0,void 0)}),400)}if(this._editors.modified.hasTextFocus()){this._originalScrollOffset.set(this._modifiedScrollOffset.get()-deltaOrigToMod,void 0,true)}else{this._modifiedScrollOffset.set(this._originalScrollOffset.get()+deltaOrigToMod,void 0,true)}})))}};ViewZoneManager=__decorate46([__param39(5,IClipboardService),__param39(6,IContextMenuService)],ViewZoneManager)}});var __decorate47,__param40,OverviewRulerPart_1,OverviewRulerPart;var init_overviewRulerPart=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/overviewRulerPart.js"(){init_dom();init_fastDomNode();init_scrollbarState();init_lifecycle();init_observable();init_utils4();init_position();init_overviewZoneManager();init_colorRegistry();init_themeService();__decorate47=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param40=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};OverviewRulerPart=OverviewRulerPart_1=class OverviewRulerPart2 extends Disposable{constructor(_editors,_rootElement,_diffModel,_rootWidth,_rootHeight,_modifiedEditorLayoutInfo,_options,_themeService){super();this._editors=_editors;this._rootElement=_rootElement;this._diffModel=_diffModel;this._rootWidth=_rootWidth;this._rootHeight=_rootHeight;this._modifiedEditorLayoutInfo=_modifiedEditorLayoutInfo;this._options=_options;this._themeService=_themeService;const currentColorTheme=observableFromEvent(this._themeService.onDidColorThemeChange,(()=>this._themeService.getColorTheme()));const currentColors=derived((reader=>{const theme=currentColorTheme.read(reader);const insertColor=theme.getColor(diffOverviewRulerInserted)||(theme.getColor(diffInserted)||defaultInsertColor).transparent(2);const removeColor=theme.getColor(diffOverviewRulerRemoved)||(theme.getColor(diffRemoved)||defaultRemoveColor).transparent(2);return{insertColor:insertColor,removeColor:removeColor}}));const scrollTopObservable=observableFromEvent(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollTop()));const scrollHeightObservable=observableFromEvent(this._editors.modified.onDidScrollChange,(()=>this._editors.modified.getScrollHeight()));this._register(autorunWithStore(((reader,store)=>{if(!this._options.renderOverviewRuler.read(reader)){return}const viewportDomElement=createFastDomNode(document.createElement("div"));viewportDomElement.setClassName("diffViewport");viewportDomElement.setPosition("absolute");const diffOverviewRoot=h("div.diffOverview",{style:{position:"absolute",top:"0px",width:OverviewRulerPart_1.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;store.add(appendRemoveOnDispose(diffOverviewRoot,viewportDomElement.domNode));store.add(addStandardDisposableListener(diffOverviewRoot,EventType.POINTER_DOWN,(e=>{this._editors.modified.delegateVerticalScrollbarPointerDown(e)})));store.add(addDisposableListener(diffOverviewRoot,EventType.MOUSE_WHEEL,(e=>{this._editors.modified.delegateScrollFromMouseWheelEvent(e)}),{passive:false}));store.add(appendRemoveOnDispose(this._rootElement,diffOverviewRoot));store.add(autorunWithStore(((reader2,store2)=>{const m=this._diffModel.read(reader2);const originalOverviewRuler=this._editors.original.createOverviewRuler("original diffOverviewRuler");if(originalOverviewRuler){store2.add(originalOverviewRuler);store2.add(appendRemoveOnDispose(diffOverviewRoot,originalOverviewRuler.getDomNode()))}const modifiedOverviewRuler=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(modifiedOverviewRuler){store2.add(modifiedOverviewRuler);store2.add(appendRemoveOnDispose(diffOverviewRoot,modifiedOverviewRuler.getDomNode()))}if(!originalOverviewRuler||!modifiedOverviewRuler){return}const origViewZonesChanged=observableSignalFromEvent("viewZoneChanged",this._editors.original.onDidChangeViewZones);const modViewZonesChanged=observableSignalFromEvent("viewZoneChanged",this._editors.modified.onDidChangeViewZones);const origHiddenRangesChanged=observableSignalFromEvent("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas);const modHiddenRangesChanged=observableSignalFromEvent("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);store2.add(autorun((reader3=>{var _a6;origViewZonesChanged.read(reader3);modViewZonesChanged.read(reader3);origHiddenRangesChanged.read(reader3);modHiddenRangesChanged.read(reader3);const colors=currentColors.read(reader3);const diff=(_a6=m===null||m===void 0?void 0:m.diff.read(reader3))===null||_a6===void 0?void 0:_a6.mappings;function createZones(ranges,color,editor2){const vm=editor2._getViewModel();if(!vm){return[]}return ranges.filter((d=>d.length>0)).map((r=>{const start=vm.coordinatesConverter.convertModelPositionToViewPosition(new Position(r.startLineNumber,1));const end=vm.coordinatesConverter.convertModelPositionToViewPosition(new Position(r.endLineNumberExclusive,1));const lineCount=end.lineNumber-start.lineNumber;return new OverviewRulerZone(start.lineNumber,end.lineNumber,lineCount,color.toString())}))}const originalZones=createZones((diff||[]).map((d=>d.lineRangeMapping.originalRange)),colors.removeColor,this._editors.original);const modifiedZones=createZones((diff||[]).map((d=>d.lineRangeMapping.modifiedRange)),colors.insertColor,this._editors.modified);originalOverviewRuler===null||originalOverviewRuler===void 0?void 0:originalOverviewRuler.setZones(originalZones);modifiedOverviewRuler===null||modifiedOverviewRuler===void 0?void 0:modifiedOverviewRuler.setZones(modifiedZones)})));store2.add(autorun((reader3=>{const height=this._rootHeight.read(reader3);const width=this._rootWidth.read(reader3);const layoutInfo=this._modifiedEditorLayoutInfo.read(reader3);if(layoutInfo){const freeSpace=OverviewRulerPart_1.ENTIRE_DIFF_OVERVIEW_WIDTH-2*OverviewRulerPart_1.ONE_OVERVIEW_WIDTH;originalOverviewRuler.setLayout({top:0,height:height,right:freeSpace+OverviewRulerPart_1.ONE_OVERVIEW_WIDTH,width:OverviewRulerPart_1.ONE_OVERVIEW_WIDTH});modifiedOverviewRuler.setLayout({top:0,height:height,right:0,width:OverviewRulerPart_1.ONE_OVERVIEW_WIDTH});const scrollTop=scrollTopObservable.read(reader3);const scrollHeight=scrollHeightObservable.read(reader3);const scrollBarOptions=this._editors.modified.getOption(101);const state=new ScrollbarState(scrollBarOptions.verticalHasArrows?scrollBarOptions.arrowSize:0,scrollBarOptions.verticalScrollbarSize,0,layoutInfo.height,scrollHeight,scrollTop);viewportDomElement.setTop(state.getSliderPosition());viewportDomElement.setHeight(state.getSliderSize())}else{viewportDomElement.setTop(0);viewportDomElement.setHeight(0)}diffOverviewRoot.style.height=height+"px";diffOverviewRoot.style.left=width-OverviewRulerPart_1.ENTIRE_DIFF_OVERVIEW_WIDTH+"px";viewportDomElement.setWidth(OverviewRulerPart_1.ENTIRE_DIFF_OVERVIEW_WIDTH)})))})))})))}};OverviewRulerPart.ONE_OVERVIEW_WIDTH=15;OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH=OverviewRulerPart_1.ONE_OVERVIEW_WIDTH*2;OverviewRulerPart=OverviewRulerPart_1=__decorate47([__param40(7,IThemeService)],OverviewRulerPart)}});var TreeElement,OutlineElement,OutlineGroup,OutlineModel;var init_outlineModel=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/outlineModel.js"(){init_arrays();init_cancellation();init_errors();init_iterator();init_position();init_range();TreeElement=class{remove(){var _a6;(_a6=this.parent)===null||_a6===void 0?void 0:_a6.children.delete(this.id)}static findId(candidate,container){let candidateId;if(typeof candidate==="string"){candidateId=`${container.id}/${candidate}`}else{candidateId=`${container.id}/${candidate.name}`;if(container.children.get(candidateId)!==void 0){candidateId=`${container.id}/${candidate.name}_${candidate.range.startLineNumber}_${candidate.range.startColumn}`}}let id=candidateId;for(let i=0;container.children.get(id)!==void 0;i++){id=`${candidateId}_${i}`}return id}static empty(element){return element.children.size===0}};OutlineElement=class extends TreeElement{constructor(id,parent,symbol){super();this.id=id;this.parent=parent;this.symbol=symbol;this.children=new Map}};OutlineGroup=class extends TreeElement{constructor(id,parent,label,order){super();this.id=id;this.parent=parent;this.label=label;this.order=order;this.children=new Map}};OutlineModel=class extends TreeElement{static create(registry,textModel,token){const cts=new CancellationTokenSource(token);const result=new OutlineModel(textModel.uri);const provider=registry.ordered(textModel);const promises=provider.map(((provider2,index)=>{var _a6;const id=TreeElement.findId(`provider_${index}`,result);const group3=new OutlineGroup(id,result,(_a6=provider2.displayName)!==null&&_a6!==void 0?_a6:"Unknown Outline Provider",index);return Promise.resolve(provider2.provideDocumentSymbols(textModel,cts.token)).then((result2=>{for(const info of result2||[]){OutlineModel._makeOutlineElement(info,group3)}return group3}),(err=>{onUnexpectedExternalError(err);return group3})).then((group4=>{if(!TreeElement.empty(group4)){result._groups.set(id,group4)}else{group4.remove()}}))}));const listener=registry.onDidChange((()=>{const newProvider=registry.ordered(textModel);if(!equals(newProvider,provider)){cts.cancel()}}));return Promise.all(promises).then((()=>{if(cts.token.isCancellationRequested&&!token.isCancellationRequested){return OutlineModel.create(registry,textModel,token)}else{return result._compact()}})).finally((()=>{listener.dispose()}))}static _makeOutlineElement(info,container){const id=TreeElement.findId(info,container);const res=new OutlineElement(id,container,info);if(info.children){for(const childInfo of info.children){OutlineModel._makeOutlineElement(childInfo,res)}}container.children.set(res.id,res)}constructor(uri){super();this.uri=uri;this.id="root";this.parent=void 0;this._groups=new Map;this.children=new Map;this.id="root";this.parent=void 0}_compact(){let count=0;for(const[key,group3]of this._groups){if(group3.children.size===0){this._groups.delete(key)}else{count+=1}}if(count!==1){this.children=this._groups}else{const group3=Iterable.first(this._groups.values());for(const[,child]of group3.children){child.parent=this;this.children.set(child.id,child)}}return this}getTopLevelSymbols(){const roots=[];for(const child of this.children.values()){if(child instanceof OutlineElement){roots.push(child.symbol)}else{roots.push(...Iterable.map(child.children.values(),(child2=>child2.symbol)))}}return roots.sort(((a,b)=>Range.compareRangesUsingStarts(a.range,b.range)))}asListOfDocumentSymbols(){const roots=this.getTopLevelSymbols();const bucket=[];OutlineModel._flattenDocumentSymbols(bucket,roots,"");return bucket.sort(((a,b)=>Position.compare(Range.getStartPosition(a.range),Range.getStartPosition(b.range))||Position.compare(Range.getEndPosition(b.range),Range.getEndPosition(a.range))))}static _flattenDocumentSymbols(bucket,entries2,overrideContainerLabel){for(const entry of entries2){bucket.push({kind:entry.kind,tags:entry.tags,name:entry.name,detail:entry.detail,containerName:entry.containerName||overrideContainerLabel,range:entry.range,selectionRange:entry.selectionRange,children:void 0});if(entry.children){OutlineModel._flattenDocumentSymbols(bucket,entry.children,entry.name)}}}}}});var __decorate48,__param41,__awaiter31,UnchangedRangesFeature,DisposableCancellationTokenSource,OutlineSource,CollapsedCodeOverlayWidget;var init_unchangedRanges=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/unchangedRanges.js"(){init_dom();init_iconLabels2();init_arrays();init_cancellation();init_codicons();init_event();init_htmlContent();init_lifecycle();init_observable();init_themables();init_types();init_outlineModel();init_utils4();init_lineRange();init_position();init_range();init_languages();init_languageFeatures();init_nls();__decorate48=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param41=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};__awaiter31=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};UnchangedRangesFeature=class UnchangedRangesFeature2 extends Disposable{get isUpdatingViewZones(){return this._isUpdatingViewZones}constructor(_editors,_diffModel,_options,_languageFeaturesService){super();this._editors=_editors;this._diffModel=_diffModel;this._options=_options;this._languageFeaturesService=_languageFeaturesService;this._isUpdatingViewZones=false;this._modifiedModel=observableFromEvent(this._editors.modified.onDidChangeModel,(()=>this._editors.modified.getModel()));this._modifiedOutlineSource=derivedWithStore("modified outline source",((reader,store)=>{const m=this._modifiedModel.read(reader);if(!m){return void 0}return store.add(new OutlineSource(this._languageFeaturesService,m))}));this._register(this._editors.original.onDidChangeCursorPosition((e=>{if(e.reason===3){const m=this._diffModel.get();transaction((tx=>{for(const s of this._editors.original.getSelections()||[]){m===null||m===void 0?void 0:m.ensureOriginalLineIsVisible(s.getStartPosition().lineNumber,tx);m===null||m===void 0?void 0:m.ensureOriginalLineIsVisible(s.getEndPosition().lineNumber,tx)}}))}})));this._register(this._editors.modified.onDidChangeCursorPosition((e=>{if(e.reason===3){const m=this._diffModel.get();transaction((tx=>{for(const s of this._editors.modified.getSelections()||[]){m===null||m===void 0?void 0:m.ensureModifiedLineIsVisible(s.getStartPosition().lineNumber,tx);m===null||m===void 0?void 0:m.ensureModifiedLineIsVisible(s.getEndPosition().lineNumber,tx)}}))}})));const unchangedRegions=this._diffModel.map(((m,reader)=>{var _a6,_b3;return((_a6=m===null||m===void 0?void 0:m.diff.read(reader))===null||_a6===void 0?void 0:_a6.mappings.length)===0?[]:(_b3=m===null||m===void 0?void 0:m.unchangedRegions.read(reader))!==null&&_b3!==void 0?_b3:[]}));const viewZones=derivedWithStore("view zones",((reader,store)=>{const origViewZones=[];const modViewZones=[];const sideBySide=this._options.renderSideBySide.read(reader);const modifiedOutlineSource=this._modifiedOutlineSource.read(reader);if(!modifiedOutlineSource){return{origViewZones:origViewZones,modViewZones:modViewZones}}const curUnchangedRegions=unchangedRegions.read(reader);for(const r of curUnchangedRegions){if(r.shouldHideControls(reader)){continue}{const d=derived((reader2=>r.getHiddenOriginalRange(reader2).startLineNumber-1));const origVz=new PlaceholderViewZone(d,24);origViewZones.push(origVz);store.add(new CollapsedCodeOverlayWidget(this._editors.original,origVz,r,r.originalRange,!sideBySide,modifiedOutlineSource,(l=>this._diffModel.get().ensureModifiedLineIsVisible(l,void 0)),this._options))}{const d=derived((reader2=>r.getHiddenModifiedRange(reader2).startLineNumber-1));const modViewZone=new PlaceholderViewZone(d,24);modViewZones.push(modViewZone);store.add(new CollapsedCodeOverlayWidget(this._editors.modified,modViewZone,r,r.modifiedRange,false,modifiedOutlineSource,(l=>this._diffModel.get().ensureModifiedLineIsVisible(l,void 0)),this._options))}}return{origViewZones:origViewZones,modViewZones:modViewZones}}));const unchangedLinesDecoration={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:true};const unchangedLinesDecorationShow={description:"Fold Unchanged",glyphMarginHoverMessage:new MarkdownString(void 0,{isTrusted:true,supportThemeIcons:true}).appendMarkdown(localize("foldUnchanged","Fold Unchanged Region")),glyphMarginClassName:"fold-unchanged "+ThemeIcon.asClassName(Codicon.fold),zIndex:10001};this._register(applyObservableDecorations(this._editors.original,derived((reader=>{const curUnchangedRegions=unchangedRegions.read(reader);const result=curUnchangedRegions.map((r=>({range:r.originalRange.toInclusiveRange(),options:unchangedLinesDecoration})));for(const r of curUnchangedRegions){if(r.shouldHideControls(reader)){result.push({range:Range.fromPositions(new Position(r.originalLineNumber,1)),options:unchangedLinesDecorationShow})}}return result}))));this._register(applyObservableDecorations(this._editors.modified,derived((reader=>{const curUnchangedRegions=unchangedRegions.read(reader);const result=curUnchangedRegions.map((r=>({range:r.modifiedRange.toInclusiveRange(),options:unchangedLinesDecoration})));for(const r of curUnchangedRegions){if(r.shouldHideControls(reader)){result.push({range:LineRange.ofLength(r.modifiedLineNumber,1).toInclusiveRange(),options:unchangedLinesDecorationShow})}}return result}))));this._register(applyViewZones(this._editors.original,viewZones.map((v=>v.origViewZones)),(v=>this._isUpdatingViewZones=v)));this._register(applyViewZones(this._editors.modified,viewZones.map((v=>v.modViewZones)),(v=>this._isUpdatingViewZones=v)));this._register(autorun((reader=>{const curUnchangedRegions=unchangedRegions.read(reader);this._editors.original.setHiddenAreas(curUnchangedRegions.map((r=>r.getHiddenOriginalRange(reader).toInclusiveRange())).filter(isDefined));this._editors.modified.setHiddenAreas(curUnchangedRegions.map((r=>r.getHiddenModifiedRange(reader).toInclusiveRange())).filter(isDefined))})));this._register(this._editors.modified.onMouseUp((event=>{var _a6;if(!event.event.rightButton&&event.target.position&&((_a6=event.target.element)===null||_a6===void 0?void 0:_a6.className.includes("fold-unchanged"))){const lineNumber=event.target.position.lineNumber;const model=this._diffModel.get();if(!model){return}const region=model.unchangedRegions.get().find((r=>r.modifiedRange.includes(lineNumber)));if(!region){return}region.collapseAll(void 0);event.event.stopPropagation();event.event.preventDefault()}})));this._register(this._editors.original.onMouseUp((event=>{var _a6;if(!event.event.rightButton&&event.target.position&&((_a6=event.target.element)===null||_a6===void 0?void 0:_a6.className.includes("fold-unchanged"))){const lineNumber=event.target.position.lineNumber;const model=this._diffModel.get();if(!model){return}const region=model.unchangedRegions.get().find((r=>r.originalRange.includes(lineNumber)));if(!region){return}region.collapseAll(void 0);event.event.stopPropagation();event.event.preventDefault()}})))}};UnchangedRangesFeature=__decorate48([__param41(3,ILanguageFeaturesService)],UnchangedRangesFeature);DisposableCancellationTokenSource=class extends CancellationTokenSource{dispose(){super.dispose(true)}};OutlineSource=class OutlineSource2 extends Disposable{constructor(_languageFeaturesService,_textModel){super();this._languageFeaturesService=_languageFeaturesService;this._textModel=_textModel;this._currentModel=observableValue("current model",void 0);const documentSymbolProviderChanged=observableSignalFromEvent("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange);const textModelChanged=observableSignalFromEvent("_textModel.onDidChangeContent",Event.debounce((e=>this._textModel.onDidChangeContent(e)),(()=>void 0),100));this._register(autorunWithStore(((reader,store)=>__awaiter31(this,void 0,void 0,(function*(){documentSymbolProviderChanged.read(reader);textModelChanged.read(reader);const src=store.add(new DisposableCancellationTokenSource);const model=yield OutlineModel.create(this._languageFeaturesService.documentSymbolProvider,this._textModel,src.token);if(store.isDisposed){return}this._currentModel.set(model,void 0)})))))}getBreadcrumbItems(startRange,reader){const m=this._currentModel.read(reader);if(!m){return[]}const symbols=m.asListOfDocumentSymbols().filter((s=>startRange.contains(s.range.startLineNumber)&&!startRange.contains(s.range.endLineNumber)));symbols.sort(reverseOrder(compareBy((s=>s.range.endLineNumber-s.range.startLineNumber),numberComparator)));return symbols.map((s=>({name:s.name,kind:s.kind,startLineNumber:s.range.startLineNumber})))}};OutlineSource=__decorate48([__param41(0,ILanguageFeaturesService)],OutlineSource);CollapsedCodeOverlayWidget=class extends ViewZoneOverlayWidget{constructor(_editor,_viewZone,_unchangedRegion,_unchangedRegionRange,hide2,_modifiedOutlineSource,_revealModifiedHiddenLine,_options){const root=h("div.diff-hidden-lines-widget");super(_editor,_viewZone,root.root);this._editor=_editor;this._unchangedRegion=_unchangedRegion;this._unchangedRegionRange=_unchangedRegionRange;this.hide=hide2;this._modifiedOutlineSource=_modifiedOutlineSource;this._revealModifiedHiddenLine=_revealModifiedHiddenLine;this._options=_options;this._nodes=h("div.diff-hidden-lines",[h("div.top@top",{title:localize("diff.hiddenLines.top","Click or drag to show more above")}),h("div.center@content",{style:{display:"flex"}},[h("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[$("a",{title:localize("showAll","Show all"),role:"button",onclick:()=>{this.showAll()}},...renderLabelWithIcons("$(unfold)"))]),h("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),h("div.bottom@bottom",{title:localize("diff.bottom","Click or drag to show more below"),role:"button"})]);root.root.appendChild(this._nodes.root);const layoutInfo=observableFromEvent(this._editor.onDidLayoutChange,(()=>this._editor.getLayoutInfo()));if(!this.hide){this._register(applyStyle(this._nodes.first,{width:layoutInfo.map((l=>l.contentLeft))}))}else{reset(this._nodes.first)}const editor2=this._editor;this._register(addDisposableListener(this._nodes.top,"mousedown",(e=>{if(e.button!==0){return}this._nodes.top.classList.toggle("dragging",true);this._nodes.root.classList.toggle("dragging",true);e.preventDefault();const startTop=e.clientY;let didMove=false;const cur=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set(true,void 0);const mouseMoveListener=addDisposableListener(window,"mousemove",(e2=>{const currentTop=e2.clientY;const delta=currentTop-startTop;didMove=didMove||Math.abs(delta)>2;const lineDelta=Math.round(delta/editor2.getOption(65));const newVal=Math.max(0,Math.min(cur+lineDelta,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(newVal,void 0)}));const mouseUpListener=addDisposableListener(window,"mouseup",(e2=>{if(!didMove){this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0)}this._nodes.top.classList.toggle("dragging",false);this._nodes.root.classList.toggle("dragging",false);this._unchangedRegion.isDragged.set(false,void 0);mouseMoveListener.dispose();mouseUpListener.dispose()}))})));this._register(addDisposableListener(this._nodes.bottom,"mousedown",(e=>{if(e.button!==0){return}this._nodes.bottom.classList.toggle("dragging",true);this._nodes.root.classList.toggle("dragging",true);e.preventDefault();const startTop=e.clientY;let didMove=false;const cur=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set(true,void 0);const mouseMoveListener=addDisposableListener(window,"mousemove",(e2=>{const currentTop=e2.clientY;const delta=currentTop-startTop;didMove=didMove||Math.abs(delta)>2;const lineDelta=Math.round(delta/editor2.getOption(65));const newVal=Math.max(0,Math.min(cur-lineDelta,this._unchangedRegion.getMaxVisibleLineCountBottom()));const top=editor2.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(newVal,void 0);const top2=editor2.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);editor2.setScrollTop(editor2.getScrollTop()+(top2-top))}));const mouseUpListener=addDisposableListener(window,"mouseup",(e2=>{this._unchangedRegion.isDragged.set(false,void 0);if(!didMove){const top=editor2.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const top2=editor2.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);editor2.setScrollTop(editor2.getScrollTop()+(top2-top))}this._nodes.bottom.classList.toggle("dragging",false);this._nodes.root.classList.toggle("dragging",false);mouseMoveListener.dispose();mouseUpListener.dispose()}))})));this._register(autorun((reader=>{const children=[];if(!this.hide){const lineCount=_unchangedRegion.getHiddenModifiedRange(reader).length;const linesHiddenText=localize("hiddenLines","{0} hidden lines",lineCount);const span=$("span",{title:localize("diff.hiddenLines.expandAll","Double click to unfold")},linesHiddenText);span.addEventListener("dblclick",(e=>{if(e.button!==0){return}e.preventDefault();this.showAll()}));children.push(span);const range2=this._unchangedRegion.getHiddenModifiedRange(reader);const items=this._modifiedOutlineSource.getBreadcrumbItems(range2,reader);if(items.length>0){children.push($("span",void 0,"  |  "));for(let i=0;i{this._revealModifiedHiddenLine(item.startLineNumber)}}}}reset(this._nodes.others,...children)})))}showAll(){this._unchangedRegion.showAll(void 0)}}}});var diffMoveBorder,diffMoveBorderActive;var init_colors=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/colors.js"(){init_nls();init_colorRegistry();diffMoveBorder=registerColor("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},localize("diffEditor.move.border","The border color for text that got moved in the diff editor."));diffMoveBorderActive=registerColor("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},localize("diffEditor.moveActive.border","The active border color for text that got moved in the diff editor."))}});var DelegatingEditor;var init_delegatingEditorImpl=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/delegatingEditorImpl.js"(){init_event();init_lifecycle();DelegatingEditor=class extends Disposable{constructor(){super(...arguments);this._id=++DelegatingEditor.idCounter;this._onDidDispose=this._register(new Emitter);this.onDidDispose=this._onDidDispose.event}getId(){return this.getEditorType()+":v2:"+this._id}getVisibleColumnFromPosition(position){return this._targetEditor.getVisibleColumnFromPosition(position)}getPosition(){return this._targetEditor.getPosition()}setPosition(position,source="api"){this._targetEditor.setPosition(position,source)}revealLine(lineNumber,scrollType=0){this._targetEditor.revealLine(lineNumber,scrollType)}revealLineInCenter(lineNumber,scrollType=0){this._targetEditor.revealLineInCenter(lineNumber,scrollType)}revealLineInCenterIfOutsideViewport(lineNumber,scrollType=0){this._targetEditor.revealLineInCenterIfOutsideViewport(lineNumber,scrollType)}revealLineNearTop(lineNumber,scrollType=0){this._targetEditor.revealLineNearTop(lineNumber,scrollType)}revealPosition(position,scrollType=0){this._targetEditor.revealPosition(position,scrollType)}revealPositionInCenter(position,scrollType=0){this._targetEditor.revealPositionInCenter(position,scrollType)}revealPositionInCenterIfOutsideViewport(position,scrollType=0){this._targetEditor.revealPositionInCenterIfOutsideViewport(position,scrollType)}revealPositionNearTop(position,scrollType=0){this._targetEditor.revealPositionNearTop(position,scrollType)}getSelection(){return this._targetEditor.getSelection()}getSelections(){return this._targetEditor.getSelections()}setSelection(something,source="api"){this._targetEditor.setSelection(something,source)}setSelections(ranges,source="api"){this._targetEditor.setSelections(ranges,source)}revealLines(startLineNumber,endLineNumber,scrollType=0){this._targetEditor.revealLines(startLineNumber,endLineNumber,scrollType)}revealLinesInCenter(startLineNumber,endLineNumber,scrollType=0){this._targetEditor.revealLinesInCenter(startLineNumber,endLineNumber,scrollType)}revealLinesInCenterIfOutsideViewport(startLineNumber,endLineNumber,scrollType=0){this._targetEditor.revealLinesInCenterIfOutsideViewport(startLineNumber,endLineNumber,scrollType)}revealLinesNearTop(startLineNumber,endLineNumber,scrollType=0){this._targetEditor.revealLinesNearTop(startLineNumber,endLineNumber,scrollType)}revealRange(range2,scrollType=0,revealVerticalInCenter=false,revealHorizontal=true){this._targetEditor.revealRange(range2,scrollType,revealVerticalInCenter,revealHorizontal)}revealRangeInCenter(range2,scrollType=0){this._targetEditor.revealRangeInCenter(range2,scrollType)}revealRangeInCenterIfOutsideViewport(range2,scrollType=0){this._targetEditor.revealRangeInCenterIfOutsideViewport(range2,scrollType)}revealRangeNearTop(range2,scrollType=0){this._targetEditor.revealRangeNearTop(range2,scrollType)}revealRangeNearTopIfOutsideViewport(range2,scrollType=0){this._targetEditor.revealRangeNearTopIfOutsideViewport(range2,scrollType)}revealRangeAtTop(range2,scrollType=0){this._targetEditor.revealRangeAtTop(range2,scrollType)}getSupportedActions(){return this._targetEditor.getSupportedActions()}focus(){this._targetEditor.focus()}trigger(source,handlerId,payload){this._targetEditor.trigger(source,handlerId,payload)}createDecorationsCollection(decorations){return this._targetEditor.createDecorationsCollection(decorations)}changeDecorations(callback){return this._targetEditor.changeDecorations(callback)}};DelegatingEditor.idCounter=0}});var __decorate49,__param42,DiffEditorEditors;var init_diffEditorEditors=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors.js"(){init_event();init_lifecycle();init_observable();init_overviewRulerPart();init_editorOptions();init_nls();init_instantiation();init_keybinding();__decorate49=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param42=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};DiffEditorEditors=class DiffEditorEditors2 extends Disposable{constructor(originalEditorElement,modifiedEditorElement,_options,codeEditorWidgetOptions,_createInnerEditor,_instantiationService,_keybindingService){super();this.originalEditorElement=originalEditorElement;this.modifiedEditorElement=modifiedEditorElement;this._options=_options;this._createInnerEditor=_createInnerEditor;this._instantiationService=_instantiationService;this._keybindingService=_keybindingService;this._onDidContentSizeChange=this._register(new Emitter);this.original=this._register(this._createLeftHandSideEditor(_options.editorOptions.get(),codeEditorWidgetOptions.originalEditor||{}));this.modified=this._register(this._createRightHandSideEditor(_options.editorOptions.get(),codeEditorWidgetOptions.modifiedEditor||{}));this._register(autorunHandleChanges({createEmptyChangeSummary:()=>({}),handleChange:(ctx,changeSummary)=>{if(ctx.didChange(_options.editorOptions)){Object.assign(changeSummary,ctx.change.changedOptions)}return true}},((reader,changeSummary)=>{_options.editorOptions.read(reader);this._options.renderSideBySide.read(reader);this.modified.updateOptions(this._adjustOptionsForRightHandSide(reader,changeSummary));this.original.updateOptions(this._adjustOptionsForLeftHandSide(reader,changeSummary))})))}_createLeftHandSideEditor(options2,codeEditorWidgetOptions){const leftHandSideOptions=this._adjustOptionsForLeftHandSide(void 0,options2);const editor2=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,leftHandSideOptions,codeEditorWidgetOptions);editor2.setContextValue("isInDiffLeftEditor",true);return editor2}_createRightHandSideEditor(options2,codeEditorWidgetOptions){const rightHandSideOptions=this._adjustOptionsForRightHandSide(void 0,options2);const editor2=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,rightHandSideOptions,codeEditorWidgetOptions);editor2.setContextValue("isInDiffRightEditor",true);return editor2}_constructInnerEditor(instantiationService,container,options2,editorWidgetOptions){const editor2=this._createInnerEditor(instantiationService,container,options2,editorWidgetOptions);this._register(editor2.onDidContentSizeChange((e=>{const width=this.original.getContentWidth()+this.modified.getContentWidth()+OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH;const height=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:height,contentWidth:width,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})})));return editor2}_adjustOptionsForLeftHandSide(_reader,changedOptions){const result=this._adjustOptionsForSubEditor(changedOptions);if(!this._options.renderSideBySide.get()){result.wordWrapOverride1="off";result.wordWrapOverride2="off";result.stickyScroll={enabled:false};result.unicodeHighlight={nonBasicASCII:false,ambiguousCharacters:false,invisibleCharacters:false}}else{result.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{};result.wordWrapOverride1=this._options.diffWordWrap.get()}if(changedOptions.originalAriaLabel){result.ariaLabel=changedOptions.originalAriaLabel}result.ariaLabel=this._updateAriaLabel(result.ariaLabel);result.readOnly=!this._options.originalEditable.get();result.dropIntoEditor={enabled:!result.readOnly};result.extraEditorClassName="original-in-monaco-diff-editor";return result}_adjustOptionsForRightHandSide(reader,changedOptions){const result=this._adjustOptionsForSubEditor(changedOptions);if(changedOptions.modifiedAriaLabel){result.ariaLabel=changedOptions.modifiedAriaLabel}result.ariaLabel=this._updateAriaLabel(result.ariaLabel);result.wordWrapOverride1=this._options.diffWordWrap.get();result.revealHorizontalRightPadding=EditorOptions.revealHorizontalRightPadding.defaultValue+OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH;result.scrollbar.verticalHasArrows=false;result.extraEditorClassName="modified-in-monaco-diff-editor";return result}_adjustOptionsForSubEditor(options2){const clonedOptions=Object.assign(Object.assign({},options2),{dimension:{height:0,width:0}});clonedOptions.inDiffEditor=true;clonedOptions.automaticLayout=false;clonedOptions.scrollbar=Object.assign({},clonedOptions.scrollbar||{});clonedOptions.scrollbar.vertical="visible";clonedOptions.folding=false;clonedOptions.codeLens=this._options.diffCodeLens.get();clonedOptions.fixedOverflowWidgets=true;clonedOptions.minimap=Object.assign({},clonedOptions.minimap||{});clonedOptions.minimap.enabled=false;if(this._options.hideUnchangedRegions.get()){clonedOptions.stickyScroll={enabled:false}}else{clonedOptions.stickyScroll=this._options.editorOptions.get().stickyScroll}return clonedOptions}_updateAriaLabel(ariaLabel){var _a6;if(!ariaLabel){ariaLabel=""}const ariaNavigationTip2=localize("diff-aria-navigation-tip"," use {0} to open the accessibility help.",(_a6=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))===null||_a6===void 0?void 0:_a6.getAriaLabel());if(this._options.accessibilityVerbose.get()){return ariaLabel+ariaNavigationTip2}else if(ariaLabel){return ariaLabel.replaceAll(ariaNavigationTip2,"")}return""}};DiffEditorEditors=__decorate49([__param42(5,IInstantiationService),__param42(6,IKeybindingService)],DiffEditorEditors)}});function validateDiffEditorOptions2(options2,defaults){var _a6,_b3,_c2,_d2,_e2,_f2,_g2,_h2;return{enableSplitViewResizing:boolean(options2.enableSplitViewResizing,defaults.enableSplitViewResizing),splitViewDefaultRatio:clampedFloat(options2.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:boolean(options2.renderSideBySide,defaults.renderSideBySide),renderMarginRevertIcon:boolean(options2.renderMarginRevertIcon,defaults.renderMarginRevertIcon),maxComputationTime:clampedInt(options2.maxComputationTime,defaults.maxComputationTime,0,1073741824),maxFileSize:clampedInt(options2.maxFileSize,defaults.maxFileSize,0,1073741824),ignoreTrimWhitespace:boolean(options2.ignoreTrimWhitespace,defaults.ignoreTrimWhitespace),renderIndicators:boolean(options2.renderIndicators,defaults.renderIndicators),originalEditable:boolean(options2.originalEditable,defaults.originalEditable),diffCodeLens:boolean(options2.diffCodeLens,defaults.diffCodeLens),renderOverviewRuler:boolean(options2.renderOverviewRuler,defaults.renderOverviewRuler),diffWordWrap:stringSet(options2.diffWordWrap,defaults.diffWordWrap,["off","on","inherit"]),diffAlgorithm:stringSet(options2.diffAlgorithm,defaults.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:boolean(options2.accessibilityVerbose,defaults.accessibilityVerbose),experimental:{showMoves:boolean((_a6=options2.experimental)===null||_a6===void 0?void 0:_a6.showMoves,defaults.experimental.showMoves),showEmptyDecorations:boolean((_b3=options2.experimental)===null||_b3===void 0?void 0:_b3.showEmptyDecorations,defaults.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:boolean((_d2=(_c2=options2.hideUnchangedRegions)===null||_c2===void 0?void 0:_c2.enabled)!==null&&_d2!==void 0?_d2:(_e2=options2.experimental)===null||_e2===void 0?void 0:_e2.collapseUnchangedRegions,defaults.hideUnchangedRegions.enabled),contextLineCount:clampedInt((_f2=options2.hideUnchangedRegions)===null||_f2===void 0?void 0:_f2.contextLineCount,defaults.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:clampedInt((_g2=options2.hideUnchangedRegions)===null||_g2===void 0?void 0:_g2.minimumLineCount,defaults.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:clampedInt((_h2=options2.hideUnchangedRegions)===null||_h2===void 0?void 0:_h2.revealLineCount,defaults.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:boolean(options2.isInEmbeddedEditor,defaults.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:boolean(options2.onlyShowAccessibleDiffViewer,defaults.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:clampedInt(options2.renderSideBySideInlineBreakpoint,defaults.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:boolean(options2.useInlineViewWhenSpaceIsLimited,defaults.useInlineViewWhenSpaceIsLimited)}}var DiffEditorOptions;var init_diffEditorOptions=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorOptions.js"(){init_observable();init_diffEditor();init_editorOptions();DiffEditorOptions=class{get editorOptions(){return this._options}constructor(options2,diffEditorWidth){this.diffEditorWidth=diffEditorWidth;this.couldShowInlineViewBecauseOfSize=derived((reader=>this._options.read(reader).renderSideBySide&&this.diffEditorWidth.read(reader)<=this._options.read(reader).renderSideBySideInlineBreakpoint));this.renderOverviewRuler=derived((reader=>this._options.read(reader).renderOverviewRuler));this.renderSideBySide=derived((reader=>this._options.read(reader).renderSideBySide&&!(this._options.read(reader).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(reader))));this.readOnly=derived((reader=>this._options.read(reader).readOnly));this.shouldRenderRevertArrows=derived((reader=>{if(!this._options.read(reader).renderMarginRevertIcon){return false}if(!this.renderSideBySide.read(reader)){return false}if(this.readOnly.read(reader)){return false}return true}));this.renderIndicators=derived((reader=>this._options.read(reader).renderIndicators));this.enableSplitViewResizing=derived((reader=>this._options.read(reader).enableSplitViewResizing));this.splitViewDefaultRatio=derived((reader=>this._options.read(reader).splitViewDefaultRatio));this.ignoreTrimWhitespace=derived((reader=>this._options.read(reader).ignoreTrimWhitespace));this.maxComputationTimeMs=derived((reader=>this._options.read(reader).maxComputationTime));this.showMoves=derived((reader=>this._options.read(reader).experimental.showMoves&&this.renderSideBySide.read(reader)));this.isInEmbeddedEditor=derived((reader=>this._options.read(reader).isInEmbeddedEditor));this.diffWordWrap=derived((reader=>this._options.read(reader).diffWordWrap));this.originalEditable=derived((reader=>this._options.read(reader).originalEditable));this.diffCodeLens=derived((reader=>this._options.read(reader).diffCodeLens));this.accessibilityVerbose=derived((reader=>this._options.read(reader).accessibilityVerbose));this.diffAlgorithm=derived((reader=>this._options.read(reader).diffAlgorithm));this.showEmptyDecorations=derived((reader=>this._options.read(reader).experimental.showEmptyDecorations));this.onlyShowAccessibleDiffViewer=derived((reader=>this._options.read(reader).onlyShowAccessibleDiffViewer));this.hideUnchangedRegions=derived((reader=>this._options.read(reader).hideUnchangedRegions.enabled));this.hideUnchangedRegionsRevealLineCount=derived((reader=>this._options.read(reader).hideUnchangedRegions.revealLineCount));this.hideUnchangedRegionsContextLineCount=derived((reader=>this._options.read(reader).hideUnchangedRegions.contextLineCount));this.hideUnchangedRegionsminimumLineCount=derived((reader=>this._options.read(reader).hideUnchangedRegions.minimumLineCount));const optionsCopy=Object.assign(Object.assign({},options2),validateDiffEditorOptions2(options2,diffEditorDefaultOptions));this._options=observableValue("options",optionsCopy)}updateOptions(changedOptions){const newDiffEditorOptions=validateDiffEditorOptions2(changedOptions,this._options.get());const newOptions=Object.assign(Object.assign(Object.assign({},this._options.get()),changedOptions),newDiffEditorOptions);this._options.set(newOptions,void 0,{changedOptions:changedOptions})}}}});function toLineChanges(state){return state.mappings.map((x=>{const m=x.lineRangeMapping;let originalStartLineNumber;let originalEndLineNumber;let modifiedStartLineNumber;let modifiedEndLineNumber;let innerChanges=m.innerChanges;if(m.originalRange.isEmpty){originalStartLineNumber=m.originalRange.startLineNumber-1;originalEndLineNumber=0;innerChanges=void 0}else{originalStartLineNumber=m.originalRange.startLineNumber;originalEndLineNumber=m.originalRange.endLineNumberExclusive-1}if(m.modifiedRange.isEmpty){modifiedStartLineNumber=m.modifiedRange.startLineNumber-1;modifiedEndLineNumber=0;innerChanges=void 0}else{modifiedStartLineNumber=m.modifiedRange.startLineNumber;modifiedEndLineNumber=m.modifiedRange.endLineNumberExclusive-1}return{originalStartLineNumber:originalStartLineNumber,originalEndLineNumber:originalEndLineNumber,modifiedStartLineNumber:modifiedStartLineNumber,modifiedEndLineNumber:modifiedEndLineNumber,charChanges:innerChanges===null||innerChanges===void 0?void 0:innerChanges.map((m2=>({originalStartLineNumber:m2.originalRange.startLineNumber,originalStartColumn:m2.originalRange.startColumn,originalEndLineNumber:m2.originalRange.endLineNumber,originalEndColumn:m2.originalRange.endColumn,modifiedStartLineNumber:m2.modifiedRange.startLineNumber,modifiedStartColumn:m2.modifiedRange.startColumn,modifiedEndLineNumber:m2.modifiedRange.endLineNumber,modifiedEndColumn:m2.modifiedRange.endColumn})))}}))}var __decorate50,__param43,DiffEditorWidget22;var init_diffEditorWidget2=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.js"(){init_dom();init_errors();init_event();init_observable();init_47();init_editorExtensions();init_codeEditorService();init_codeEditorWidget();init_accessibleDiffViewer();init_diffEditorDecorations();init_diffEditorSash();init_lineAlignment();init_movedBlocksLines();init_overviewRulerPart();init_unchangedRanges();init_utils4();init_workerBasedDocumentDiffProvider();init_editorCommon();init_editorContextKeys();init_audioCueService();init_contextkey();init_instantiation();init_serviceCollection();init_colors();init_delegatingEditorImpl();init_diffEditorEditors();init_diffEditorOptions();init_diffEditorViewModel();init_lifecycle();init_progress();__decorate50=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param43=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};DiffEditorWidget22=class DiffEditorWidget23 extends DelegatingEditor{constructor(_domElement,options2,codeEditorWidgetOptions,_parentContextKeyService,_parentInstantiationService,codeEditorService,_audioCueService,_editorProgressService){var _a6;super();this._domElement=_domElement;this._parentContextKeyService=_parentContextKeyService;this._parentInstantiationService=_parentInstantiationService;this._audioCueService=_audioCueService;this._editorProgressService=_editorProgressService;this.elements=h("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[h("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[$("span",{},"No Changes")]),h("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),h("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),h("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]);this._diffModel=this._register(disposableObservableValue("diffModel",void 0));this.onDidChangeModel=Event.fromObservableLight(this._diffModel);this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement));this._instantiationService=this._parentInstantiationService.createChild(new ServiceCollection([IContextKeyService,this._contextKeyService]));this._boundarySashes=observableValue("boundarySashes",void 0);this._accessibleDiffViewerShouldBeVisible=observableValue("accessibleDiffViewerShouldBeVisible",false);this._accessibleDiffViewerVisible=derived((reader=>this._options.onlyShowAccessibleDiffViewer.read(reader)?true:this._accessibleDiffViewerShouldBeVisible.read(reader)));this.movedBlocksLinesPart=observableValue("MovedBlocksLinesPart",void 0);this._layoutInfo=derived((reader=>{var _a7,_b3,_c2;const width=this._rootSizeObserver.width.read(reader);const height=this._rootSizeObserver.height.read(reader);const sashLeft=(_a7=this._sash.read(reader))===null||_a7===void 0?void 0:_a7.sashLeft.read(reader);const originalWidth=sashLeft!==null&&sashLeft!==void 0?sashLeft:Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft);const modifiedWidth=width-originalWidth-(this._options.renderOverviewRuler.read(reader)?OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH:0);const movedBlocksLinesWidth=(_c2=(_b3=this.movedBlocksLinesPart.read(reader))===null||_b3===void 0?void 0:_b3.width.read(reader))!==null&&_c2!==void 0?_c2:0;const originalWidthWithoutMovedBlockLines=originalWidth-movedBlocksLinesWidth;this.elements.original.style.width=originalWidthWithoutMovedBlockLines+"px";this.elements.original.style.left="0px";this.elements.modified.style.width=modifiedWidth+"px";this.elements.modified.style.left=originalWidth+"px";this._editors.original.layout({width:originalWidthWithoutMovedBlockLines,height:height});this._editors.modified.layout({width:modifiedWidth,height:height});return{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}));this._diffValue=this._diffModel.map(((m,r)=>m===null||m===void 0?void 0:m.diff.read(r)));this.onDidUpdateDiff=Event.fromObservableLight(this._diffValue);codeEditorService.willCreateDiffEditor();this._contextKeyService.createKey("isInDiffEditor",true);this._contextKeyService.createKey("diffEditorVersion",2);this._domElement.appendChild(this.elements.root);this._register(toDisposable((()=>this._domElement.removeChild(this.elements.root))));this._rootSizeObserver=this._register(new ObservableElementSizeObserver(this.elements.root,options2.dimension));this._rootSizeObserver.setAutomaticLayout((_a6=options2.automaticLayout)!==null&&_a6!==void 0?_a6:false);this._options=new DiffEditorOptions(options2,this._rootSizeObserver.width);this._contextKeyService.createKey(EditorContextKeys.isEmbeddedDiffEditor.key,false);const isEmbeddedDiffEditorKey=EditorContextKeys.isEmbeddedDiffEditor.bindTo(this._contextKeyService);this._register(autorun((reader=>{isEmbeddedDiffEditorKey.set(this._options.isInEmbeddedEditor.read(reader))})));const comparingMovedCodeKey=EditorContextKeys.comparingMovedCode.bindTo(this._contextKeyService);this._register(autorun((reader=>{var _a7;comparingMovedCodeKey.set(!!((_a7=this._diffModel.read(reader))===null||_a7===void 0?void 0:_a7.movedTextToCompare.read(reader)))})));const diffEditorRenderSideBySideInlineBreakpointReachedContextKeyValue=EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached.bindTo(this._contextKeyService);this._register(autorun((reader=>{diffEditorRenderSideBySideInlineBreakpointReachedContextKeyValue.set(this._options.couldShowInlineViewBecauseOfSize.read(reader))})));this._editors=this._register(this._instantiationService.createInstance(DiffEditorEditors,this.elements.original,this.elements.modified,this._options,codeEditorWidgetOptions,((i,c,o,o2)=>this._createInnerEditor(i,c,o,o2))));this._sash=derivedWithStore("sash",((reader,store)=>{const showSash=this._options.renderSideBySide.read(reader);this.elements.root.classList.toggle("side-by-side",showSash);if(!showSash){return void 0}const result=store.add(new DiffEditorSash(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map(((w,reader2)=>w-(this._options.renderOverviewRuler.read(reader2)?OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH:0)))}));store.add(autorun((reader2=>{const boundarySashes=this._boundarySashes.read(reader2);if(boundarySashes){result.setBoundarySashes(boundarySashes)}})));return result}));this._register(keepAlive(this._sash,true));this._register(autorunWithStore(((reader,store)=>{this.unchangedRangesFeature=store.add(this._instantiationService.createInstance(readHotReloadableExport(UnchangedRangesFeature,reader),this._editors,this._diffModel,this._options))})));this._register(autorunWithStore(((reader,store)=>{store.add(new(readHotReloadableExport(DiffEditorDecorations,reader))(this._editors,this._diffModel,this._options))})));this._register(autorunWithStore(((reader,store)=>{store.add(this._instantiationService.createInstance(readHotReloadableExport(ViewZoneManager,reader),this._editors,this._diffModel,this._options,this,(()=>this.unchangedRangesFeature.isUpdatingViewZones)))})));this._register(autorunWithStore(((reader,store)=>{store.add(this._instantiationService.createInstance(readHotReloadableExport(OverviewRulerPart,reader),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map((i=>i.modifiedEditor)),this._options))})));this._register(autorunWithStore(((reader,store)=>{this._accessibleDiffViewer=store.add(this._register(this._instantiationService.createInstance(readHotReloadableExport(AccessibleDiffViewer,reader),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,((visible,tx)=>this._accessibleDiffViewerShouldBeVisible.set(visible,tx)),this._options.onlyShowAccessibleDiffViewer.map((v=>!v)),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map(((m,r)=>{var _a7;return(_a7=m===null||m===void 0?void 0:m.diff.read(r))===null||_a7===void 0?void 0:_a7.mappings.map((m2=>m2.lineRangeMapping))})),this._editors)))})));const visibility=this._accessibleDiffViewerVisible.map((v=>v?"hidden":"visible"));this._register(applyStyle(this.elements.modified,{visibility:visibility}));this._register(applyStyle(this.elements.original,{visibility:visibility}));this._createDiffEditorContributions();codeEditorService.addDiffEditor(this);this._register(keepAlive(this._layoutInfo,true));this._register(autorunWithStore(((reader,store)=>{this.movedBlocksLinesPart.set(store.add(new(readHotReloadableExport(MovedBlocksLinesPart,reader))(this.elements.root,this._diffModel,this._layoutInfo.map((i=>i.originalEditor)),this._layoutInfo.map((i=>i.modifiedEditor)),this._editors)),void 0)})));this._register(applyStyle(this.elements.overlay,{width:this._layoutInfo.map(((i,r)=>i.originalEditor.width+(this._options.renderSideBySide.read(r)?0:i.modifiedEditor.width))),visibility:derived((reader=>{var _a7,_b3;return this._options.hideUnchangedRegions.read(reader)&&((_b3=(_a7=this._diffModel.read(reader))===null||_a7===void 0?void 0:_a7.diff.read(reader))===null||_b3===void 0?void 0:_b3.mappings.length)===0?"visible":"hidden"}))}));this._register(this._editors.modified.onMouseDown((event=>{var _a7,_b3;if(!event.event.rightButton&&event.target.position&&((_a7=event.target.element)===null||_a7===void 0?void 0:_a7.className.includes("arrow-revert-change"))){const lineNumber=event.target.position.lineNumber;const viewZone=event.target;const model=this._diffModel.get();if(!model){return}const diffs=(_b3=model.diff.get())===null||_b3===void 0?void 0:_b3.mappings;if(!diffs){return}const diff=diffs.find((d=>(viewZone===null||viewZone===void 0?void 0:viewZone.detail.afterLineNumber)===d.lineRangeMapping.modifiedRange.startLineNumber-1||d.lineRangeMapping.modifiedRange.startLineNumber===lineNumber));if(!diff){return}this.revert(diff.lineRangeMapping);event.event.stopPropagation()}})));this._register(Event.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,(e=>{var _a7,_b3;if((e===null||e===void 0?void 0:e.reason)===3){const diff=(_b3=(_a7=this._diffModel.get())===null||_a7===void 0?void 0:_a7.diff.get())===null||_b3===void 0?void 0:_b3.mappings.find((m=>m.lineRangeMapping.modifiedRange.contains(e.position.lineNumber)));if(diff===null||diff===void 0?void 0:diff.lineRangeMapping.modifiedRange.isEmpty){this._audioCueService.playAudioCue(AudioCue.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"})}else if(diff===null||diff===void 0?void 0:diff.lineRangeMapping.originalRange.isEmpty){this._audioCueService.playAudioCue(AudioCue.diffLineInserted,{source:"diffEditor.cursorPositionChanged"})}else if(diff){this._audioCueService.playAudioCue(AudioCue.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}})));const isDiffUpToDate=this._diffModel.map(((m,reader)=>m===null||m===void 0?void 0:m.isDiffUpToDate.read(reader)));this._register(autorunWithStore(((reader,store)=>{if(isDiffUpToDate.read(reader)===false){const r=this._editorProgressService.show(true,1e3);store.add(toDisposable((()=>r.done())))}})))}_createInnerEditor(instantiationService,container,options2,editorWidgetOptions){const editor2=instantiationService.createInstance(CodeEditorWidget,container,options2,editorWidgetOptions);return editor2}_createDiffEditorContributions(){const contributions=EditorExtensionsRegistry.getDiffEditorContributions();for(const desc of contributions){try{this._register(this._instantiationService.createInstance(desc.ctor,this))}catch(err){onUnexpectedError(err)}}}get _targetEditor(){return this._editors.modified}getEditorType(){return EditorType.IDiffEditor}layout(dimension){this._rootSizeObserver.observe(dimension)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var _a6;const originalViewState=this._editors.original.saveViewState();const modifiedViewState=this._editors.modified.saveViewState();return{original:originalViewState,modified:modifiedViewState,modelState:(_a6=this._diffModel.get())===null||_a6===void 0?void 0:_a6.serializeState()}}restoreViewState(s){var _a6;if(s&&s.original&&s.modified){const diffEditorState=s;this._editors.original.restoreViewState(diffEditorState.original);this._editors.modified.restoreViewState(diffEditorState.modified);if(diffEditorState.modelState){(_a6=this._diffModel.get())===null||_a6===void 0?void 0:_a6.restoreSerializedState(diffEditorState.modelState)}}}createViewModel(model){return new DiffEditorViewModel(model,this._options,this._instantiationService.createInstance(WorkerBasedDocumentDiffProvider,{diffAlgorithm:this._options.diffAlgorithm.get()}))}getModel(){var _a6,_b3;return(_b3=(_a6=this._diffModel.get())===null||_a6===void 0?void 0:_a6.model)!==null&&_b3!==void 0?_b3:null}setModel(model){if(!model&&this._diffModel.get()){this._accessibleDiffViewer.close()}const vm=model?"model"in model?model:this.createViewModel(model):void 0;this._editors.original.setModel(vm?vm.model.original:null);this._editors.modified.setModel(vm?vm.model.modified:null);transaction((tx=>{this._diffModel.set(vm,tx)}))}updateOptions(changedOptions){this._options.updateOptions(changedOptions)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var _a6;const diffState=(_a6=this._diffModel.get())===null||_a6===void 0?void 0:_a6.diff.get();if(!diffState){return null}return toLineChanges(diffState)}revert(diff){var _a6;const model=(_a6=this._diffModel.get())===null||_a6===void 0?void 0:_a6.model;if(!model){return}const changes=diff.innerChanges?diff.innerChanges.map((c=>({range:c.modifiedRange,text:model.original.getValueInRange(c.originalRange)}))):[{range:diff.modifiedRange.toExclusiveRange(),text:model.original.getValueInRange(diff.originalRange.toExclusiveRange())}];this._editors.modified.executeEdits("diffEditor",changes)}accessibleDiffViewerNext(){this._accessibleDiffViewer.next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.prev()}};DiffEditorWidget22=__decorate50([__param43(3,IContextKeyService),__param43(4,IInstantiationService),__param43(5,ICodeEditorService),__param43(6,IAudioCueService),__param43(7,IEditorProgressService)],DiffEditorWidget22)}});function createAriaDomNode(parent){if(!parent){if(ariaDomNodeCreated){return}ariaDomNodeCreated=true}setARIAContainer(parent||document.body)}function createTextModel(modelService,languageService,value,languageId,uri){value=value||"";if(!languageId){const firstLF=value.indexOf("\n");let firstLine=value;if(firstLF!==-1){firstLine=value.substring(0,firstLF)}return doCreateModel(modelService,value,languageService.createByFilepathOrFirstLine(uri||null,firstLine),uri)}return doCreateModel(modelService,value,languageService.createById(languageId),uri)}function doCreateModel(modelService,value,languageSelection,uri){return modelService.createModel(value,languageSelection,uri)}var __decorate51,__param44,LAST_GENERATED_COMMAND_ID,ariaDomNodeCreated,StandaloneCodeEditor,StandaloneEditor,StandaloneDiffEditor,StandaloneDiffEditor22;var init_standaloneCodeEditor=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js"(){init_aria();init_lifecycle();init_codeEditorService();init_codeEditorWidget();init_diffEditorWidget();init_editorAction();init_standaloneServices();init_standaloneTheme();init_actions2();init_commands();init_configuration();init_contextkey();init_contextView();init_instantiation();init_keybinding();init_notification();init_themeService();init_accessibility();init_standaloneStrings();init_clipboardService();init_progress();init_model2();init_language();init_standaloneCodeEditorService();init_modesRegistry();init_languageConfigurationRegistry();init_languageFeatures();init_diffEditorWidget2();init_audioCueService();__decorate51=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);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;return c>3&&r&&Object.defineProperty(target,key,r),r};__param44=function(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}};LAST_GENERATED_COMMAND_ID=0;ariaDomNodeCreated=false;StandaloneCodeEditor=class StandaloneCodeEditor2 extends CodeEditorWidget{constructor(domElement,_options,instantiationService,codeEditorService,commandService,contextKeyService,keybindingService,themeService,notificationService,accessibilityService,languageConfigurationService,languageFeaturesService){const options2=Object.assign({},_options);options2.ariaLabel=options2.ariaLabel||StandaloneCodeEditorNLS.editorViewAccessibleLabel;options2.ariaLabel=options2.ariaLabel+";"+StandaloneCodeEditorNLS.accessibilityHelpMessage;super(domElement,options2,{},instantiationService,codeEditorService,commandService,contextKeyService,themeService,notificationService,accessibilityService,languageConfigurationService,languageFeaturesService);if(keybindingService instanceof StandaloneKeybindingService){this._standaloneKeybindingService=keybindingService}else{this._standaloneKeybindingService=null}createAriaDomNode(options2.ariaContainerElement)}addCommand(keybinding,handler,context){if(!this._standaloneKeybindingService){console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService");return null}const commandId="DYNAMIC_"+ ++LAST_GENERATED_COMMAND_ID;const whenExpression=ContextKeyExpr.deserialize(context);this._standaloneKeybindingService.addDynamicKeybinding(commandId,keybinding,handler,whenExpression);return commandId}createContextKey(key,defaultValue){return this._contextKeyService.createKey(key,defaultValue)}addAction(_descriptor){if(typeof _descriptor.id!=="string"||typeof _descriptor.label!=="string"||typeof _descriptor.run!=="function"){throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!")}if(!this._standaloneKeybindingService){console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");return Disposable.None}const id=_descriptor.id;const label=_descriptor.label;const precondition=ContextKeyExpr.and(ContextKeyExpr.equals("editorId",this.getId()),ContextKeyExpr.deserialize(_descriptor.precondition));const keybindings=_descriptor.keybindings;const keybindingsWhen=ContextKeyExpr.and(precondition,ContextKeyExpr.deserialize(_descriptor.keybindingContext));const contextMenuGroupId=_descriptor.contextMenuGroupId||null;const contextMenuOrder=_descriptor.contextMenuOrder||0;const run=(_accessor,...args)=>Promise.resolve(_descriptor.run(this,...args));const toDispose=new DisposableStore;const uniqueId=this.getId()+":"+id;toDispose.add(CommandsRegistry.registerCommand(uniqueId,run));if(contextMenuGroupId){const menuItem={command:{id:uniqueId,title:label},when:precondition,group:contextMenuGroupId,order:contextMenuOrder};toDispose.add(MenuRegistry.appendMenuItem(MenuId.EditorContext,menuItem))}if(Array.isArray(keybindings)){for(const kb of keybindings){toDispose.add(this._standaloneKeybindingService.addDynamicKeybinding(uniqueId,kb,run,keybindingsWhen))}}const internalAction=new InternalEditorAction(uniqueId,label,label,precondition,((...args)=>Promise.resolve(_descriptor.run(this,...args))),this._contextKeyService);this._actions.set(id,internalAction);toDispose.add(toDisposable((()=>{this._actions.delete(id)})));return toDispose}_triggerCommand(handlerId,payload){if(this._codeEditorService instanceof StandaloneCodeEditorService){try{this._codeEditorService.setActiveCodeEditor(this);super._triggerCommand(handlerId,payload)}finally{this._codeEditorService.setActiveCodeEditor(null)}}else{super._triggerCommand(handlerId,payload)}}};StandaloneCodeEditor=__decorate51([__param44(2,IInstantiationService),__param44(3,ICodeEditorService),__param44(4,ICommandService),__param44(5,IContextKeyService),__param44(6,IKeybindingService),__param44(7,IThemeService),__param44(8,INotificationService),__param44(9,IAccessibilityService),__param44(10,ILanguageConfigurationService),__param44(11,ILanguageFeaturesService)],StandaloneCodeEditor);StandaloneEditor=class StandaloneEditor2 extends StandaloneCodeEditor{constructor(domElement,_options,instantiationService,codeEditorService,commandService,contextKeyService,keybindingService,themeService,notificationService,configurationService,accessibilityService,modelService,languageService,languageConfigurationService,languageFeaturesService){const options2=Object.assign({},_options);updateConfigurationService(configurationService,options2,false);const themeDomRegistration=themeService.registerEditorContainer(domElement);if(typeof options2.theme==="string"){themeService.setTheme(options2.theme)}if(typeof options2.autoDetectHighContrast!=="undefined"){themeService.setAutoDetectHighContrast(Boolean(options2.autoDetectHighContrast))}const _model=options2.model;delete options2.model;super(domElement,options2,instantiationService,codeEditorService,commandService,contextKeyService,keybindingService,themeService,notificationService,accessibilityService,languageConfigurationService,languageFeaturesService);this._configurationService=configurationService;this._standaloneThemeService=themeService;this._register(themeDomRegistration);let model;if(typeof _model==="undefined"){const languageId=languageService.getLanguageIdByMimeType(options2.language)||options2.language||PLAINTEXT_LANGUAGE_ID;model=createTextModel(modelService,languageService,options2.value||"",languageId,void 0);this._ownsModel=true}else{model=_model;this._ownsModel=false}this._attachModel(model);if(model){const e={oldModelUrl:null,newModelUrl:model.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(newOptions){updateConfigurationService(this._configurationService,newOptions,false);if(typeof newOptions.theme==="string"){this._standaloneThemeService.setTheme(newOptions.theme)}if(typeof newOptions.autoDetectHighContrast!=="undefined"){this._standaloneThemeService.setAutoDetectHighContrast(Boolean(newOptions.autoDetectHighContrast))}super.updateOptions(newOptions)}_postDetachModelCleanup(detachedModel){super._postDetachModelCleanup(detachedModel);if(detachedModel&&this._ownsModel){detachedModel.dispose();this._ownsModel=false}}};StandaloneEditor=__decorate51([__param44(2,IInstantiationService),__param44(3,ICodeEditorService),__param44(4,ICommandService),__param44(5,IContextKeyService),__param44(6,IKeybindingService),__param44(7,IStandaloneThemeService),__param44(8,INotificationService),__param44(9,IConfigurationService),__param44(10,IAccessibilityService),__param44(11,IModelService),__param44(12,ILanguageService),__param44(13,ILanguageConfigurationService),__param44(14,ILanguageFeaturesService)],StandaloneEditor);StandaloneDiffEditor=class StandaloneDiffEditor2 extends DiffEditorWidget{constructor(domElement,_options,instantiationService,contextKeyService,codeEditorService,themeService,notificationService,configurationService,contextMenuService,editorProgressService,clipboardService){const options2=Object.assign({},_options);updateConfigurationService(configurationService,options2,true);const themeDomRegistration=themeService.registerEditorContainer(domElement);if(typeof options2.theme==="string"){themeService.setTheme(options2.theme)}if(typeof options2.autoDetectHighContrast!=="undefined"){themeService.setAutoDetectHighContrast(Boolean(options2.autoDetectHighContrast))}super(domElement,options2,{},clipboardService,contextKeyService,instantiationService,codeEditorService,themeService,notificationService,contextMenuService,editorProgressService);this._configurationService=configurationService;this._standaloneThemeService=themeService;this._register(themeDomRegistration)}dispose(){super.dispose()}updateOptions(newOptions){updateConfigurationService(this._configurationService,newOptions,true);if(typeof newOptions.theme==="string"){this._standaloneThemeService.setTheme(newOptions.theme)}if(typeof newOptions.autoDetectHighContrast!=="undefined"){this._standaloneThemeService.setAutoDetectHighContrast(Boolean(newOptions.autoDetectHighContrast))}super.updateOptions(newOptions)}_createInnerEditor(instantiationService,container,options2){return instantiationService.createInstance(StandaloneCodeEditor,container,options2)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(keybinding,handler,context){return this.getModifiedEditor().addCommand(keybinding,handler,context)}createContextKey(key,defaultValue){return this.getModifiedEditor().createContextKey(key,defaultValue)}addAction(descriptor){return this.getModifiedEditor().addAction(descriptor)}};StandaloneDiffEditor=__decorate51([__param44(2,IInstantiationService),__param44(3,IContextKeyService),__param44(4,ICodeEditorService),__param44(5,IStandaloneThemeService),__param44(6,INotificationService),__param44(7,IConfigurationService),__param44(8,IContextMenuService),__param44(9,IEditorProgressService),__param44(10,IClipboardService)],StandaloneDiffEditor);StandaloneDiffEditor22=class StandaloneDiffEditor23 extends DiffEditorWidget22{constructor(domElement,_options,instantiationService,contextKeyService,codeEditorService,themeService,notificationService,configurationService,contextMenuService,editorProgressService,clipboardService,audioCueService){const options2=Object.assign({},_options);updateConfigurationService(configurationService,options2,true);const themeDomRegistration=themeService.registerEditorContainer(domElement);if(typeof options2.theme==="string"){themeService.setTheme(options2.theme)}if(typeof options2.autoDetectHighContrast!=="undefined"){themeService.setAutoDetectHighContrast(Boolean(options2.autoDetectHighContrast))}super(domElement,options2,{},contextKeyService,instantiationService,codeEditorService,audioCueService,editorProgressService);this._configurationService=configurationService;this._standaloneThemeService=themeService;this._register(themeDomRegistration)}dispose(){super.dispose()}updateOptions(newOptions){updateConfigurationService(this._configurationService,newOptions,true);if(typeof newOptions.theme==="string"){this._standaloneThemeService.setTheme(newOptions.theme)}if(typeof newOptions.autoDetectHighContrast!=="undefined"){this._standaloneThemeService.setAutoDetectHighContrast(Boolean(newOptions.autoDetectHighContrast))}super.updateOptions(newOptions)}_createInnerEditor(instantiationService,container,options2){return instantiationService.createInstance(StandaloneCodeEditor,container,options2)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(keybinding,handler,context){return this.getModifiedEditor().addCommand(keybinding,handler,context)}createContextKey(key,defaultValue){return this.getModifiedEditor().createContextKey(key,defaultValue)}addAction(descriptor){return this.getModifiedEditor().addAction(descriptor)}};StandaloneDiffEditor22=__decorate51([__param44(2,IInstantiationService),__param44(3,IContextKeyService),__param44(4,ICodeEditorService),__param44(5,IStandaloneThemeService),__param44(6,INotificationService),__param44(7,IConfigurationService),__param44(8,IContextMenuService),__param44(9,IEditorProgressService),__param44(10,IClipboardService),__param44(11,IAudioCueService)],StandaloneDiffEditor22)}});function create2(domElement,options2,override){const instantiationService=StandaloneServices.initialize(override||{});return instantiationService.createInstance(StandaloneEditor,domElement,options2)}function onDidCreateEditor(listener){const codeEditorService=StandaloneServices.get(ICodeEditorService);return codeEditorService.onCodeEditorAdd((editor2=>{listener(editor2)}))}function onDidCreateDiffEditor(listener){const codeEditorService=StandaloneServices.get(ICodeEditorService);return codeEditorService.onDiffEditorAdd((editor2=>{listener(editor2)}))}function getEditors(){const codeEditorService=StandaloneServices.get(ICodeEditorService);return codeEditorService.listCodeEditors()}function getDiffEditors(){const codeEditorService=StandaloneServices.get(ICodeEditorService);return codeEditorService.listDiffEditors()}function createDiffEditor(domElement,options2,override){var _a6;const instantiationService=StandaloneServices.initialize(override||{});if((_a6=options2===null||options2===void 0?void 0:options2.experimental)===null||_a6===void 0?void 0:_a6.useVersion2){return instantiationService.createInstance(StandaloneDiffEditor22,domElement,options2)}return instantiationService.createInstance(StandaloneDiffEditor,domElement,options2)}function createDiffNavigator(diffEditor,opts){const instantiationService=StandaloneServices.initialize({});return instantiationService.createInstance(DiffNavigator,diffEditor,opts)}function addCommand(descriptor){if(typeof descriptor.id!=="string"||typeof descriptor.run!=="function"){throw new Error("Invalid command descriptor, `id` and `run` are required properties!")}return CommandsRegistry.registerCommand(descriptor.id,descriptor.run)}function addEditorAction(descriptor){if(typeof descriptor.id!=="string"||typeof descriptor.label!=="string"||typeof descriptor.run!=="function"){throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!")}const precondition=ContextKeyExpr.deserialize(descriptor.precondition);const run=(accessor,...args)=>EditorCommand.runEditorCommand(accessor,args,precondition,((accessor2,editor2,args2)=>Promise.resolve(descriptor.run(editor2,...args2))));const toDispose=new DisposableStore;toDispose.add(CommandsRegistry.registerCommand(descriptor.id,run));if(descriptor.contextMenuGroupId){const menuItem={command:{id:descriptor.id,title:descriptor.label},when:precondition,group:descriptor.contextMenuGroupId,order:descriptor.contextMenuOrder||0};toDispose.add(MenuRegistry.appendMenuItem(MenuId.EditorContext,menuItem))}if(Array.isArray(descriptor.keybindings)){const keybindingService=StandaloneServices.get(IKeybindingService);if(!(keybindingService instanceof StandaloneKeybindingService)){console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService")}else{const keybindingsWhen=ContextKeyExpr.and(precondition,ContextKeyExpr.deserialize(descriptor.keybindingContext));toDispose.add(keybindingService.addDynamicKeybindings(descriptor.keybindings.map((keybinding=>({keybinding:keybinding,command:descriptor.id,when:keybindingsWhen})))))}}return toDispose}function addKeybindingRule(rule){return addKeybindingRules([rule])}function addKeybindingRules(rules){const keybindingService=StandaloneServices.get(IKeybindingService);if(!(keybindingService instanceof StandaloneKeybindingService)){console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");return Disposable.None}return keybindingService.addDynamicKeybindings(rules.map((rule=>({keybinding:rule.keybinding,command:rule.command,commandArgs:rule.commandArgs,when:ContextKeyExpr.deserialize(rule.when)}))))}function createModel(value,language81,uri){const languageService=StandaloneServices.get(ILanguageService);const languageId=languageService.getLanguageIdByMimeType(language81)||language81;return createTextModel(StandaloneServices.get(IModelService),languageService,value,languageId,uri)}function setModelLanguage(model,mimeTypeOrLanguageId){const languageService=StandaloneServices.get(ILanguageService);const languageId=languageService.getLanguageIdByMimeType(mimeTypeOrLanguageId)||mimeTypeOrLanguageId||PLAINTEXT_LANGUAGE_ID;model.setLanguage(languageService.createById(languageId))}function setModelMarkers(model,owner,markers){if(model){const markerService=StandaloneServices.get(IMarkerService);markerService.changeOne(owner,model.uri,markers)}}function removeAllMarkers(owner){const markerService=StandaloneServices.get(IMarkerService);markerService.changeAll(owner,[])}function getModelMarkers(filter){const markerService=StandaloneServices.get(IMarkerService);return markerService.read(filter)}function onDidChangeMarkers(listener){const markerService=StandaloneServices.get(IMarkerService);return markerService.onMarkerChanged(listener)}function getModel(uri){const modelService=StandaloneServices.get(IModelService);return modelService.getModel(uri)}function getModels(){const modelService=StandaloneServices.get(IModelService);return modelService.getModels()}function onDidCreateModel(listener){const modelService=StandaloneServices.get(IModelService);return modelService.onModelAdded(listener)}function onWillDisposeModel(listener){const modelService=StandaloneServices.get(IModelService);return modelService.onModelRemoved(listener)}function onDidChangeModelLanguage(listener){const modelService=StandaloneServices.get(IModelService);return modelService.onModelLanguageChanged((e=>{listener({model:e.model,oldLanguage:e.oldLanguageId})}))}function createWebWorker2(opts){return createWebWorker(StandaloneServices.get(IModelService),StandaloneServices.get(ILanguageConfigurationService),opts)}function colorizeElement(domNode,options2){const languageService=StandaloneServices.get(ILanguageService);const themeService=StandaloneServices.get(IStandaloneThemeService);return Colorizer.colorizeElement(themeService,languageService,domNode,options2).then((()=>{themeService.registerEditorContainer(domNode)}))}function colorize(text2,languageId,options2){const languageService=StandaloneServices.get(ILanguageService);const themeService=StandaloneServices.get(IStandaloneThemeService);themeService.registerEditorContainer(document.body);return Colorizer.colorize(languageService,text2,languageId,options2)}function colorizeModelLine(model,lineNumber,tabSize=4){const themeService=StandaloneServices.get(IStandaloneThemeService);themeService.registerEditorContainer(document.body);return Colorizer.colorizeModelLine(model,lineNumber,tabSize)}function getSafeTokenizationSupport(language81){const tokenizationSupport=TokenizationRegistry2.get(language81);if(tokenizationSupport){return tokenizationSupport}return{getInitialState:()=>NullState,tokenize:(line,hasEOL,state)=>nullTokenize(language81,state)}}function tokenize(text2,languageId){TokenizationRegistry2.getOrCreate(languageId);const tokenizationSupport=getSafeTokenizationSupport(languageId);const lines=splitLines(text2);const result=[];let state=tokenizationSupport.getInitialState();for(let i=0,len=lines.length;i__awaiter32(this,void 0,void 0,(function*(){var _a6;if(!source){return null}const selection=(_a6=input.options)===null||_a6===void 0?void 0:_a6.selection;let selectionOrPosition;if(selection&&typeof selection.endLineNumber==="number"&&typeof selection.endColumn==="number"){selectionOrPosition=selection}else if(selection){selectionOrPosition={lineNumber:selection.startLineNumber,column:selection.startColumn}}if(yield opener.openCodeEditor(source,input.resource,selectionOrPosition)){return source}return null}))))}function createMonacoEditorAPI(){return{create:create2,getEditors:getEditors,getDiffEditors:getDiffEditors,onDidCreateEditor:onDidCreateEditor,onDidCreateDiffEditor:onDidCreateDiffEditor,createDiffEditor:createDiffEditor,createDiffNavigator:createDiffNavigator,addCommand:addCommand,addEditorAction:addEditorAction,addKeybindingRule:addKeybindingRule,addKeybindingRules:addKeybindingRules,createModel:createModel,setModelLanguage:setModelLanguage,setModelMarkers:setModelMarkers,getModelMarkers:getModelMarkers,removeAllMarkers:removeAllMarkers,onDidChangeMarkers:onDidChangeMarkers,getModels:getModels,getModel:getModel,onDidCreateModel:onDidCreateModel,onWillDisposeModel:onWillDisposeModel,onDidChangeModelLanguage:onDidChangeModelLanguage,createWebWorker:createWebWorker2,colorizeElement:colorizeElement,colorize:colorize,colorizeModelLine:colorizeModelLine,tokenize:tokenize,defineTheme:defineTheme,setTheme:setTheme,remeasureFonts:remeasureFonts,registerCommand:registerCommand3,registerLinkOpener:registerLinkOpener,registerEditorOpener:registerEditorOpener,AccessibilitySupport:AccessibilitySupport,ContentWidgetPositionPreference:ContentWidgetPositionPreference,CursorChangeReason:CursorChangeReason,DefaultEndOfLine:DefaultEndOfLine,EditorAutoIndentStrategy:EditorAutoIndentStrategy,EditorOption:EditorOption,EndOfLinePreference:EndOfLinePreference,EndOfLineSequence:EndOfLineSequence,MinimapPosition:MinimapPosition,MouseTargetType:MouseTargetType,OverlayWidgetPositionPreference:OverlayWidgetPositionPreference,OverviewRulerLane:OverviewRulerLane,GlyphMarginLane:GlyphMarginLane,RenderLineNumbersType:RenderLineNumbersType,RenderMinimap:RenderMinimap,ScrollbarVisibility:ScrollbarVisibility,ScrollType:ScrollType,TextEditorCursorBlinkingStyle:TextEditorCursorBlinkingStyle,TextEditorCursorStyle:TextEditorCursorStyle2,TrackedRangeStickiness:TrackedRangeStickiness,WrappingIndent:WrappingIndent,InjectedTextCursorStops:InjectedTextCursorStops,PositionAffinity:PositionAffinity,ConfigurationChangedEvent:ConfigurationChangedEvent,BareFontInfo:BareFontInfo,FontInfo:FontInfo,TextModelResolvedOptions:TextModelResolvedOptions,FindMatch:FindMatch,ApplyUpdateResult:ApplyUpdateResult,LineRange:LineRange,LineRangeMapping:LineRangeMapping,RangeMapping:RangeMapping,EditorZoom:EditorZoom,MovedText:MovedText,SimpleLineRangeMapping:SimpleLineRangeMapping,EditorType:EditorType,EditorOptions:EditorOptions}}var __awaiter32;var init_standaloneEditor=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneEditor.js"(){init_();init_lifecycle();init_strings();init_uri();init_fontMeasurements();init_codeEditorService();init_diffNavigator();init_editorOptions();init_fontInfo();init_editorCommon();init_model();init_languages();init_languageConfigurationRegistry();init_nullTokenize();init_language();init_model2();init_webWorker();init_standaloneEnums();init_colorizer();init_standaloneCodeEditor();init_standaloneServices();init_standaloneTheme();init_commands();init_markers();init_keybinding();init_editorExtensions();init_actions2();init_contextkey();init_modesRegistry();init_linesDiffComputer();init_lineRange();init_editorZoom();init_opener();__awaiter32=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))}}});function isArrayOf(elemType,obj){if(!obj){return false}if(!Array.isArray(obj)){return false}for(const el of obj){if(!elemType(el)){return false}}return true}function bool(prop,defValue){if(typeof prop==="boolean"){return prop}return defValue}function string(prop,defValue){if(typeof prop==="string"){return prop}return defValue}function arrayToHash(array2){const result={};for(const e of array2){result[e]=true}return result}function createKeywordMatcher(arr,caseInsensitive=false){if(caseInsensitive){arr=arr.map((function(x){return x.toLowerCase()}))}const hash2=arrayToHash(arr);if(caseInsensitive){return function(word){return hash2[word.toLowerCase()]!==void 0&&hash2.hasOwnProperty(word.toLowerCase())}}else{return function(word){return hash2[word]!==void 0&&hash2.hasOwnProperty(word)}}}function compileRegExp(lexer2,str){str=str.replace(/@@/g,``);let n=0;let hadExpansion;do{hadExpansion=false;str=str.replace(/@(\w+)/g,(function(s,attr){hadExpansion=true;let sub="";if(typeof lexer2[attr]==="string"){sub=lexer2[attr]}else if(lexer2[attr]&&lexer2[attr]instanceof RegExp){sub=lexer2[attr].source}else{if(lexer2[attr]===void 0){throw createError(lexer2,"language definition does not contain attribute '"+attr+"', used at: "+str)}else{throw createError(lexer2,"attribute reference '"+attr+"' must be a string, used at: "+str)}}return empty(sub)?"":"(?:"+sub+")"}));n++}while(hadExpansion&&n<5);str=str.replace(/\x01/g,"@");const flags=(lexer2.ignoreCase?"i":"")+(lexer2.unicode?"u":"");return new RegExp(str,flags)}function selectScrutinee(id,matches,state,num){if(num<0){return id}if(num=100){num=num-100;const parts=state.split(".");parts.unshift(state);if(num=0){newAction.tokenSubst=true}if(typeof action.bracket==="string"){if(action.bracket==="@open"){newAction.bracket=1}else if(action.bracket==="@close"){newAction.bracket=-1}else{throw createError(lexer2,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+ruleName)}}if(action.next){if(typeof action.next!=="string"){throw createError(lexer2,"the next state must be a string value in rule: "+ruleName)}else{let next=action.next;if(!/^(@pop|@push|@popall)$/.test(next)){if(next[0]==="@"){next=next.substr(1)}if(next.indexOf("$")<0){if(!stateExists(lexer2,substituteMatches(lexer2,next,"",[],""))){throw createError(lexer2,"the next state '"+action.next+"' is not defined in rule: "+ruleName)}}}newAction.next=next}}if(typeof action.goBack==="number"){newAction.goBack=action.goBack}if(typeof action.switchTo==="string"){newAction.switchTo=action.switchTo}if(typeof action.log==="string"){newAction.log=action.log}if(typeof action.nextEmbedded==="string"){newAction.nextEmbedded=action.nextEmbedded;lexer2.usesEmbedded=true}return newAction}}else if(Array.isArray(action)){const results=[];for(let i=0,len=action.length;i=1&&rule.length<=3){newrule.setRegex(lexerMin,rule[0]);if(rule.length>=3){if(typeof rule[1]==="string"){newrule.setAction(lexerMin,{token:rule[1],next:rule[2]})}else if(typeof rule[1]==="object"){const rule1=rule[1];rule1.next=rule[2];newrule.setAction(lexerMin,rule1)}else{throw createError(lexer2,"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)}}else{newrule.setAction(lexerMin,rule[1])}}else{if(!rule.regex){throw createError(lexer2,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+state)}if(rule.name){if(typeof rule.name==="string"){newrule.name=rule.name}}if(rule.matchOnlyAtStart){newrule.matchOnlyAtLineStart=bool(rule.matchOnlyAtLineStart,false)}newrule.setRegex(lexerMin,rule.regex);newrule.setAction(lexerMin,rule.action)}newrules.push(newrule)}}}if(!json.tokenizer||typeof json.tokenizer!=="object"){throw createError(lexer2,"a language definition must define the 'tokenizer' attribute as an object")}lexer2.tokenizer=[];for(const key in json.tokenizer){if(json.tokenizer.hasOwnProperty(key)){if(!lexer2.start){lexer2.start=key}const rules=json.tokenizer[key];lexer2.tokenizer[key]=new Array;addRules("tokenizer."+key,lexer2.tokenizer[key],rules)}}lexer2.usesEmbedded=lexerMin.usesEmbedded;if(json.brackets){if(!Array.isArray(json.brackets)){throw createError(lexer2,"the 'brackets' attribute must be defined as an array")}}else{json.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}]}const brackets=[];for(const el of json.brackets){let desc=el;if(desc&&Array.isArray(desc)&&desc.length===3){desc={token:desc[2],open:desc[0],close:desc[1]}}if(desc.open===desc.close){throw createError(lexer2,"open and close brackets in a 'brackets' attribute must be different: "+desc.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.")}if(typeof desc.open==="string"&&typeof desc.token==="string"&&typeof desc.close==="string"){brackets.push({token:desc.token+lexer2.tokenPostfix,open:fixCase(lexer2,desc.open),close:fixCase(lexer2,desc.close)})}else{throw createError(lexer2,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}}lexer2.brackets=brackets;lexer2.noThrow=true;return lexer2}var Rule;var init_monarchCompile=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchCompile.js"(){init_monarchCommon();Rule=class{constructor(name){this.regex=new RegExp("");this.action={token:""};this.matchOnlyAtLineStart=false;this.name="";this.name=name}setRegex(lexer2,re){let sregex;if(typeof re==="string"){sregex=re}else if(re instanceof RegExp){sregex=re.source}else{throw createError(lexer2,"rules must start with a match string or regular expression: "+this.name)}this.matchOnlyAtLineStart=sregex.length>0&&sregex[0]==="^";this.name=this.name+": "+sregex;this.regex=compileRegExp(lexer2,"^(?:"+(this.matchOnlyAtLineStart?sregex.substr(1):sregex)+")")}setAction(lexer2,act){this.action=compileAction(lexer2,this.name,act)}}}});function register3(language81){ModesRegistry.registerLanguage(language81)}function getLanguages(){let result=[];result=result.concat(ModesRegistry.getLanguages());return result}function getEncodedLanguageId(languageId){const languageService=StandaloneServices.get(ILanguageService);return languageService.languageIdCodec.encodeLanguageId(languageId)}function onLanguage(languageId,callback){return StandaloneServices.withServices((()=>{const languageService=StandaloneServices.get(ILanguageService);const disposable=languageService.onDidRequestRichLanguageFeatures((encounteredLanguageId=>{if(encounteredLanguageId===languageId){disposable.dispose();callback()}}));return disposable}))}function onLanguageEncountered(languageId,callback){return StandaloneServices.withServices((()=>{const languageService=StandaloneServices.get(ILanguageService);const disposable=languageService.onDidRequestBasicLanguageFeatures((encounteredLanguageId=>{if(encounteredLanguageId===languageId){disposable.dispose();callback()}}));return disposable}))}function setLanguageConfiguration(languageId,configuration){const languageService=StandaloneServices.get(ILanguageService);if(!languageService.isRegisteredLanguageId(languageId)){throw new Error(`Cannot set configuration for unknown language ${languageId}`)}const languageConfigurationService=StandaloneServices.get(ILanguageConfigurationService);return languageConfigurationService.register(languageId,configuration,100)}function isATokensProvider(provider){return typeof provider.getInitialState==="function"}function isEncodedTokensProvider(provider){return"tokenizeEncoded"in provider}function isThenable2(obj){return obj&&typeof obj.then==="function"}function setColorMap(colorMap){const standaloneThemeService=StandaloneServices.get(IStandaloneThemeService);if(colorMap){const result=[null];for(let i=1,len=colorMap.length;i__awaiter33(this,void 0,void 0,(function*(){const result=yield Promise.resolve(factory.create());if(!result){return null}if(isATokensProvider(result)){return createTokenizationSupportAdapter(languageId,result)}return new MonarchTokenizer(StandaloneServices.get(ILanguageService),StandaloneServices.get(IStandaloneThemeService),languageId,compile(languageId,result),StandaloneServices.get(IConfigurationService))}))));return TokenizationRegistry2.registerFactory(languageId,adaptedFactory)}function setTokensProvider(languageId,provider){const languageService=StandaloneServices.get(ILanguageService);if(!languageService.isRegisteredLanguageId(languageId)){throw new Error(`Cannot set tokens provider for unknown language ${languageId}`)}if(isThenable2(provider)){return registerTokensProviderFactory(languageId,{create:()=>provider})}return TokenizationRegistry2.register(languageId,createTokenizationSupportAdapter(languageId,provider))}function setMonarchTokensProvider(languageId,languageDef){const create3=languageDef2=>new MonarchTokenizer(StandaloneServices.get(ILanguageService),StandaloneServices.get(IStandaloneThemeService),languageId,compile(languageId,languageDef2),StandaloneServices.get(IConfigurationService));if(isThenable2(languageDef)){return registerTokensProviderFactory(languageId,{create:()=>languageDef})}return TokenizationRegistry2.register(languageId,create3(languageDef))}function registerReferenceProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.referenceProvider.register(languageSelector,provider)}function registerRenameProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.renameProvider.register(languageSelector,provider)}function registerSignatureHelpProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.signatureHelpProvider.register(languageSelector,provider)}function registerHoverProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.hoverProvider.register(languageSelector,{provideHover:(model,position,token)=>{const word=model.getWordAtPosition(position);return Promise.resolve(provider.provideHover(model,position,token)).then((value=>{if(!value){return void 0}if(!value.range&&word){value.range=new Range(position.lineNumber,word.startColumn,position.lineNumber,word.endColumn)}if(!value.range){value.range=new Range(position.lineNumber,position.column,position.lineNumber,position.column)}return value}))}})}function registerDocumentSymbolProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.documentSymbolProvider.register(languageSelector,provider)}function registerDocumentHighlightProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.documentHighlightProvider.register(languageSelector,provider)}function registerLinkedEditingRangeProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.linkedEditingRangeProvider.register(languageSelector,provider)}function registerDefinitionProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.definitionProvider.register(languageSelector,provider)}function registerImplementationProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.implementationProvider.register(languageSelector,provider)}function registerTypeDefinitionProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.typeDefinitionProvider.register(languageSelector,provider)}function registerCodeLensProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.codeLensProvider.register(languageSelector,provider)}function registerCodeActionProvider(languageSelector,provider,metadata){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.codeActionProvider.register(languageSelector,{providedCodeActionKinds:metadata===null||metadata===void 0?void 0:metadata.providedCodeActionKinds,documentation:metadata===null||metadata===void 0?void 0:metadata.documentation,provideCodeActions:(model,range2,context,token)=>{const markerService=StandaloneServices.get(IMarkerService);const markers=markerService.read({resource:model.uri}).filter((m=>Range.areIntersectingOrTouching(m,range2)));return provider.provideCodeActions(model,range2,{markers:markers,only:context.only,trigger:context.trigger},token)},resolveCodeAction:provider.resolveCodeAction})}function registerDocumentFormattingEditProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.documentFormattingEditProvider.register(languageSelector,provider)}function registerDocumentRangeFormattingEditProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.documentRangeFormattingEditProvider.register(languageSelector,provider)}function registerOnTypeFormattingEditProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.onTypeFormattingEditProvider.register(languageSelector,provider)}function registerLinkProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.linkProvider.register(languageSelector,provider)}function registerCompletionItemProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.completionProvider.register(languageSelector,provider)}function registerColorProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.colorProvider.register(languageSelector,provider)}function registerFoldingRangeProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.foldingRangeProvider.register(languageSelector,provider)}function registerDeclarationProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.declarationProvider.register(languageSelector,provider)}function registerSelectionRangeProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.selectionRangeProvider.register(languageSelector,provider)}function registerDocumentSemanticTokensProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.documentSemanticTokensProvider.register(languageSelector,provider)}function registerDocumentRangeSemanticTokensProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.documentRangeSemanticTokensProvider.register(languageSelector,provider)}function registerInlineCompletionsProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.inlineCompletionsProvider.register(languageSelector,provider)}function registerInlayHintsProvider(languageSelector,provider){const languageFeaturesService=StandaloneServices.get(ILanguageFeaturesService);return languageFeaturesService.inlayHintsProvider.register(languageSelector,provider)}function createMonacoLanguagesAPI(){return{register:register3,getLanguages:getLanguages,onLanguage:onLanguage,onLanguageEncountered:onLanguageEncountered,getEncodedLanguageId:getEncodedLanguageId,setLanguageConfiguration:setLanguageConfiguration,setColorMap:setColorMap,registerTokensProviderFactory:registerTokensProviderFactory,setTokensProvider:setTokensProvider,setMonarchTokensProvider:setMonarchTokensProvider,registerReferenceProvider:registerReferenceProvider,registerRenameProvider:registerRenameProvider,registerCompletionItemProvider:registerCompletionItemProvider,registerSignatureHelpProvider:registerSignatureHelpProvider,registerHoverProvider:registerHoverProvider,registerDocumentSymbolProvider:registerDocumentSymbolProvider,registerDocumentHighlightProvider:registerDocumentHighlightProvider,registerLinkedEditingRangeProvider:registerLinkedEditingRangeProvider,registerDefinitionProvider:registerDefinitionProvider,registerImplementationProvider:registerImplementationProvider,registerTypeDefinitionProvider:registerTypeDefinitionProvider,registerCodeLensProvider:registerCodeLensProvider,registerCodeActionProvider:registerCodeActionProvider,registerDocumentFormattingEditProvider:registerDocumentFormattingEditProvider,registerDocumentRangeFormattingEditProvider:registerDocumentRangeFormattingEditProvider,registerOnTypeFormattingEditProvider:registerOnTypeFormattingEditProvider,registerLinkProvider:registerLinkProvider,registerColorProvider:registerColorProvider,registerFoldingRangeProvider:registerFoldingRangeProvider,registerDeclarationProvider:registerDeclarationProvider,registerSelectionRangeProvider:registerSelectionRangeProvider,registerDocumentSemanticTokensProvider:registerDocumentSemanticTokensProvider,registerDocumentRangeSemanticTokensProvider:registerDocumentRangeSemanticTokensProvider,registerInlineCompletionsProvider:registerInlineCompletionsProvider,registerInlayHintsProvider:registerInlayHintsProvider,DocumentHighlightKind:DocumentHighlightKind2,CompletionItemKind:CompletionItemKind,CompletionItemTag:CompletionItemTag,CompletionItemInsertTextRule:CompletionItemInsertTextRule,SymbolKind:SymbolKind,SymbolTag:SymbolTag,IndentAction:IndentAction,CompletionTriggerKind:CompletionTriggerKind,SignatureHelpTriggerKind:SignatureHelpTriggerKind2,InlayHintKind:InlayHintKind2,InlineCompletionTriggerKind:InlineCompletionTriggerKind2,CodeActionTriggerType:CodeActionTriggerType,FoldingRangeKind:FoldingRangeKind,SelectedSuggestionInfo:SelectedSuggestionInfo}}var __awaiter33,EncodedTokenizationSupportAdapter,TokenizationSupportAdapter;var init_standaloneLanguages=__esm({"node_modules/monaco-editor/esm/vs/editor/standalone/browser/standaloneLanguages.js"(){init_color();init_range();init_languages();init_languageConfigurationRegistry();init_modesRegistry();init_language();init_standaloneEnums();init_standaloneServices();init_monarchCompile();init_monarchLexer();init_standaloneTheme();init_markers();init_languageFeatures();init_configuration();__awaiter33=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};EncodedTokenizationSupportAdapter=class{constructor(languageId,actual){this._languageId=languageId;this._actual=actual}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(line,hasEOL,state){if(typeof this._actual.tokenize==="function"){return TokenizationSupportAdapter.adaptTokenize(this._languageId,this._actual,line,state)}throw new Error("Not supported!")}tokenizeEncoded(line,hasEOL,state){const result=this._actual.tokenizeEncoded(line,state);return new EncodedTokenizationResult(result.tokens,result.endState)}};TokenizationSupportAdapter=class{constructor(_languageId,_actual,_languageService,_standaloneThemeService){this._languageId=_languageId;this._actual=_actual;this._languageService=_languageService;this._standaloneThemeService=_standaloneThemeService}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(tokens,language81){const result=[];let previousStartIndex=0;for(let i=0,len=tokens.length;i0&&result[resultLen-1]===metadata){continue}let startIndex=t2.startIndex;if(i===0){startIndex=0}else if(startIndex{const key=ctxCancellableOperation.bindTo(accessor.get(IContextKeyService));const tokens=new LinkedList;return{key:key,tokens:tokens}}));this._tokens.set(editor2,data)}let removeFn;data.key.set(true);removeFn=data.tokens.push(cts);return()=>{if(removeFn){removeFn();data.key.set(!data.tokens.isEmpty());removeFn=void 0}}}cancel(editor2){const data=this._tokens.get(editor2);if(!data){return}const cts=data.tokens.pop();if(cts){cts.cancel();data.key.set(!data.tokens.isEmpty())}}},1);EditorKeybindingCancellationTokenSource=class extends CancellationTokenSource{constructor(editor2,parent){super(parent);this.editor=editor2;this._unregister=editor2.invokeWithinContext((accessor=>accessor.get(IEditorCancellationTokens).add(editor2,this)))}dispose(){this._unregister();super.dispose()}};registerEditorCommand(new class extends EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:ctxCancellableOperation})}runEditorCommand(accessor,editor2){accessor.get(IEditorCancellationTokens).cancel(editor2)}})}});var EditorState,EditorStateCancellationTokenSource,TextModelCancellationTokenSource;var init_editorState=__esm({"node_modules/monaco-editor/esm/vs/editor/contrib/editorState/browser/editorState.js"(){init_strings();init_range();init_cancellation();init_lifecycle();init_keybindingCancellation();EditorState=class{constructor(editor2,flags){this.flags=flags;if((this.flags&1)!==0){const model=editor2.getModel();this.modelVersionId=model?format("{0}#{1}",model.uri.toString(),model.getVersionId()):null}else{this.modelVersionId=null}if((this.flags&4)!==0){this.position=editor2.getPosition()}else{this.position=null}if((this.flags&2)!==0){this.selection=editor2.getSelection()}else{this.selection=null}if((this.flags&8)!==0){this.scrollLeft=editor2.getScrollLeft();this.scrollTop=editor2.getScrollTop()}else{this.scrollLeft=-1;this.scrollTop=-1}}_equals(other){if(!(other instanceof EditorState)){return false}const state=other;if(this.modelVersionId!==state.modelVersionId){return false}if(this.scrollLeft!==state.scrollLeft||this.scrollTop!==state.scrollTop){return false}if(!this.position&&state.position||this.position&&!state.position||this.position&&state.position&&!this.position.equals(state.position)){return false}if(!this.selection&&state.selection||this.selection&&!state.selection||this.selection&&state.selection&&!this.selection.equalsRange(state.selection)){return false}return true}validate(editor2){return this._equals(new EditorState(editor2,this.flags))}};EditorStateCancellationTokenSource=class extends EditorKeybindingCancellationTokenSource{constructor(editor2,flags,range2,parent){super(editor2,parent);this._listener=new DisposableStore;if(flags&4){this._listener.add(editor2.onDidChangeCursorPosition((e=>{if(!range2||!Range.containsPosition(range2,e.position)){this.cancel()}})))}if(flags&2){this._listener.add(editor2.onDidChangeCursorSelection((e=>{if(!range2||!Range.containsRange(range2,e.selection)){this.cancel()}})))}if(flags&8){this._listener.add(editor2.onDidScrollChange((_=>this.cancel())))}if(flags&1){this._listener.add(editor2.onDidChangeModel((_=>this.cancel())));this._listener.add(editor2.onDidChangeModelContent((_=>this.cancel())))}}dispose(){this._listener.dispose();super.dispose()}};TextModelCancellationTokenSource=class extends CancellationTokenSource{constructor(model,parent){super(parent);this._listener=model.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose();super.dispose()}}}});function isCodeEditor(thing){if(thing&&typeof thing.getEditorType==="function"){return thing.getEditorType()===EditorType.ICodeEditor}else{return false}}function isDiffEditor(thing){if(thing&&typeof thing.getEditorType==="function"){return thing.getEditorType()===EditorType.IDiffEditor}else{return false}}function isCompositeEditor(thing){return!!thing&&typeof thing==="object"&&typeof thing.onDidChangeActiveEditor==="function"}function getCodeEditor(thing){if(isCodeEditor(thing)){return thing}if(isDiffEditor(thing)){return thing.getModifiedEditor()}if(isCompositeEditor(thing)&&isCodeEditor(thing.activeCodeEditor)){return thing.activeCodeEditor}return null}var init_editorBrowser=__esm({"node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js"(){init_editorCommon()}});var FormattingEdit;var init_formattingEdit=__esm({"node_modules/monaco-editor/esm/vs/editor/contrib/format/browser/formattingEdit.js"(){init_editOperation();init_range();init_stableEditorScroll();FormattingEdit=class{static _handleEolEdits(editor2,edits){let newEol=void 0;const singleEdits=[];for(const edit of edits){if(typeof edit.eol==="number"){newEol=edit.eol}if(edit.range&&typeof edit.text==="string"){singleEdits.push(edit)}}if(typeof newEol==="number"){if(editor2.hasModel()){editor2.getModel().pushEOL(newEol)}}return singleEdits}static _isFullModelReplaceEdit(editor2,edit){if(!editor2.hasModel()){return false}const model=editor2.getModel();const editRange=model.validateRange(edit.range);const fullModelRange=model.getFullModelRange();return fullModelRange.equalsRange(editRange)}static execute(editor2,_edits,addUndoStops){if(addUndoStops){editor2.pushUndoStop()}const scrollState=StableEditorScrollState.capture(editor2);const edits=FormattingEdit._handleEolEdits(editor2,_edits);if(edits.length===1&&FormattingEdit._isFullModelReplaceEdit(editor2,edits[0])){editor2.executeEdits("formatEditsCommand",edits.map((edit=>EditOperation.replace(Range.lift(edit.range),edit.text))))}else{editor2.executeEdits("formatEditsCommand",edits.map((edit=>EditOperation.replaceMove(Range.lift(edit.range),edit.text))))}if(addUndoStops){editor2.pushUndoStop()}scrollState.restoreRelativeVerticalPositionOfCursor(editor2)}}}});var ExtensionIdentifier,ExtensionIdentifierSet;var init_extensions2=__esm({"node_modules/monaco-editor/esm/vs/platform/extensions/common/extensions.js"(){ExtensionIdentifier=class{constructor(value){this.value=value;this._lower=value.toLowerCase()}static toKey(id){if(typeof id==="string"){return id.toLowerCase()}return id._lower}};ExtensionIdentifierSet=class{constructor(iterable){this._set=new Set;if(iterable){for(const value of iterable){this.add(value)}}}add(id){this._set.add(ExtensionIdentifier.toKey(id))}has(id){return this._set.has(ExtensionIdentifier.toKey(id))}}}});function alertFormattingEdits(edits){edits=edits.filter((edit=>edit.range));if(!edits.length){return}let{range:range2}=edits[0];for(let i=1;i0&&Range.areIntersectingOrTouching(ranges[len-1],range2)){ranges[len-1]=Range.fromPositions(ranges[len-1].getStartPosition(),range2.getEndPosition())}else{len=ranges.push(range2)}}const computeEdits=range2=>__awaiter34(this,void 0,void 0,(function*(){var _c2,_d2;logService.trace(`[format][provideDocumentRangeFormattingEdits] (request)`,(_c2=provider.extensionId)===null||_c2===void 0?void 0:_c2.value,range2);const result=(yield provider.provideDocumentRangeFormattingEdits(model,range2,model.getFormattingOptions(),cts.token))||[];logService.trace(`[format][provideDocumentRangeFormattingEdits] (response)`,(_d2=provider.extensionId)===null||_d2===void 0?void 0:_d2.value,result);return result}));const hasIntersectingEdit=(a,b)=>{if(!a.length||!b.length){return false}const mergedA=a.reduce(((acc,val)=>Range.plusRange(acc,val.range)),a[0].range);if(!b.some((x=>Range.intersectRanges(mergedA,x.range)))){return false}for(const edit of a){for(const otherEdit of b){if(Range.intersectRanges(edit.range,otherEdit.range)){return true}}}return false};const allEdits=[];const rawEditsList=[];try{if(typeof provider.provideDocumentRangesFormattingEdits==="function"){logService.trace(`[format][provideDocumentRangeFormattingEdits] (request)`,(_a6=provider.extensionId)===null||_a6===void 0?void 0:_a6.value,ranges);const result=(yield provider.provideDocumentRangesFormattingEdits(model,ranges,model.getFormattingOptions(),cts.token))||[];logService.trace(`[format][provideDocumentRangeFormattingEdits] (response)`,(_b3=provider.extensionId)===null||_b3===void 0?void 0:_b3.value,result);rawEditsList.push(result)}else{for(const range2 of ranges){if(cts.token.isCancellationRequested){return true}rawEditsList.push(yield computeEdits(range2))}for(let i=0;i({text:edit.text,range:Range.lift(edit.range),forceMoveMarkers:true}))),(undoEdits=>{for(const{range:range3}of undoEdits){if(Range.areIntersectingOrTouching(range3,initialSelection)){return[new Selection(range3.startLineNumber,range3.startColumn,range3.endLineNumber,range3.endColumn)]}}return null}))}return true}))}function formatDocumentWithSelectedProvider(accessor,editorOrModel,mode,progress,token){return __awaiter34(this,void 0,void 0,(function*(){const instaService=accessor.get(IInstantiationService);const languageFeaturesService=accessor.get(ILanguageFeaturesService);const model=isCodeEditor(editorOrModel)?editorOrModel.getModel():editorOrModel;const provider=getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider,languageFeaturesService.documentRangeFormattingEditProvider,model);const selected=yield FormattingConflicts.select(provider,model,mode);if(selected){progress.report(selected);yield instaService.invokeFunction(formatDocumentWithProvider,selected,editorOrModel,mode,token)}}))}function formatDocumentWithProvider(accessor,provider,editorOrModel,mode,token){return __awaiter34(this,void 0,void 0,(function*(){const workerService=accessor.get(IEditorWorkerService);let model;let cts;if(isCodeEditor(editorOrModel)){model=editorOrModel.getModel();cts=new EditorStateCancellationTokenSource(editorOrModel,1|4,void 0,token)}else{model=editorOrModel;cts=new TextModelCancellationTokenSource(editorOrModel,token)}let edits;try{const rawEdits=yield provider.provideDocumentFormattingEdits(model,model.getFormattingOptions(),cts.token);edits=yield workerService.computeMoreMinimalEdits(model.uri,rawEdits);if(cts.token.isCancellationRequested){return true}}finally{cts.dispose()}if(!edits||edits.length===0){return false}if(isCodeEditor(editorOrModel)){FormattingEdit.execute(editorOrModel,edits,mode!==2);if(mode!==2){alertFormattingEdits(edits);editorOrModel.revealPositionInCenterIfOutsideViewport(editorOrModel.getPosition(),1)}}else{const[{range:range2}]=edits;const initialSelection=new Selection(range2.startLineNumber,range2.startColumn,range2.endLineNumber,range2.endColumn);model.pushEditOperations([initialSelection],edits.map((edit=>({text:edit.text,range:Range.lift(edit.range),forceMoveMarkers:true}))),(undoEdits=>{for(const{range:range3}of undoEdits){if(Range.areIntersectingOrTouching(range3,initialSelection)){return[new Selection(range3.startLineNumber,range3.startColumn,range3.endLineNumber,range3.endColumn)]}}return null}))}return true}))}function getDocumentRangeFormattingEditsUntilResult(workerService,languageFeaturesService,model,range2,options2,token){return __awaiter34(this,void 0,void 0,(function*(){const providers=languageFeaturesService.documentRangeFormattingEditProvider.ordered(model);for(const provider of providers){const rawEdits=yield Promise.resolve(provider.provideDocumentRangeFormattingEdits(model,range2,options2,token)).catch(onUnexpectedExternalError);if(isNonEmptyArray(rawEdits)){return yield workerService.computeMoreMinimalEdits(model.uri,rawEdits)}}return void 0}))}function getDocumentFormattingEditsUntilResult(workerService,languageFeaturesService,model,options2,token){return __awaiter34(this,void 0,void 0,(function*(){const providers=getRealAndSyntheticDocumentFormattersOrdered(languageFeaturesService.documentFormattingEditProvider,languageFeaturesService.documentRangeFormattingEditProvider,model);for(const provider of providers){const rawEdits=yield Promise.resolve(provider.provideDocumentFormattingEdits(model,options2,token)).catch(onUnexpectedExternalError);if(isNonEmptyArray(rawEdits)){return yield workerService.computeMoreMinimalEdits(model.uri,rawEdits)}}return void 0}))}function getOnTypeFormattingEdits(workerService,languageFeaturesService,model,position,ch,options2,token){const providers=languageFeaturesService.onTypeFormattingEditProvider.ordered(model);if(providers.length===0){return Promise.resolve(void 0)}if(providers[0].autoFormatTriggerCharacters.indexOf(ch)<0){return Promise.resolve(void 0)}return Promise.resolve(providers[0].provideOnTypeFormattingEdits(model,position,ch,options2,token)).catch(onUnexpectedExternalError).then((edits=>workerService.computeMoreMinimalEdits(model.uri,edits)))}var __awaiter34,FormattingConflicts;var init_format=__esm({"node_modules/monaco-editor/esm/vs/editor/contrib/format/browser/format.js"(){init_aria();init_arrays();init_cancellation();init_errors();init_iterator();init_linkedList();init_types();init_uri();init_editorState();init_editorBrowser();init_position();init_range();init_selection();init_editorWorker();init_resolverService();init_formattingEdit();init_nls();init_commands();init_extensions2();init_instantiation();init_languageFeatures();init_log();__awaiter34=function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve2){resolve2(value)}))}return new(P||(P=Promise))((function(resolve2,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve2(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};FormattingConflicts=class{static setFormatterSelector(selector){const remove=FormattingConflicts._selectors.unshift(selector);return{dispose:remove}}static select(formatter,document2,mode){return __awaiter34(this,void 0,void 0,(function*(){if(formatter.length===0){return void 0}const selector=Iterable.first(FormattingConflicts._selectors);if(selector){return yield selector(formatter,document2,mode)}return void 0}))}};FormattingConflicts._selectors=new LinkedList;CommandsRegistry.registerCommand("_executeFormatRangeProvider",(function(accessor,...args){return __awaiter34(this,void 0,void 0,(function*(){const[resource,range2,options2]=args;assertType(URI.isUri(resource));assertType(Range.isIRange(range2));const resolverService=accessor.get(ITextModelService);const workerService=accessor.get(IEditorWorkerService);const languageFeaturesService=accessor.get(ILanguageFeaturesService);const reference=yield resolverService.createModelReference(resource);try{return getDocumentRangeFormattingEditsUntilResult(workerService,languageFeaturesService,reference.object.textEditorModel,Range.lift(range2),options2,CancellationToken.None)}finally{reference.dispose()}}))}));CommandsRegistry.registerCommand("_executeFormatDocumentProvider",(function(accessor,...args){return __awaiter34(this,void 0,void 0,(function*(){const[resource,options2]=args;assertType(URI.isUri(resource));const resolverService=accessor.get(ITextModelService);const workerService=accessor.get(IEditorWorkerService);const languageFeaturesService=accessor.get(ILanguageFeaturesService);const reference=yield resolverService.createModelReference(resource);try{return getDocumentFormattingEditsUntilResult(workerService,languageFeaturesService,reference.object.textEditorModel,options2,CancellationToken.None)}finally{reference.dispose()}}))}));CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",(function(accessor,...args){return __awaiter34(this,void 0,void 0,(function*(){const[resource,position,ch,options2]=args;assertType(URI.isUri(resource));assertType(Position.isIPosition(position));assertType(typeof ch==="string");const resolverService=accessor.get(ITextModelService);const workerService=accessor.get(IEditorWorkerService);const languageFeaturesService=accessor.get(ILanguageFeaturesService);const reference=yield resolverService.createModelReference(resource);try{return getOnTypeFormattingEdits(workerService,languageFeaturesService,reference.object.textEditorModel,Position.lift(position),ch,options2,CancellationToken.None)}finally{reference.dispose()}}))}))}});var editor_api_exports={};__export(editor_api_exports,{CancellationTokenSource:()=>CancellationTokenSource2,Emitter:()=>Emitter2,KeyCode:()=>KeyCode2,KeyMod:()=>KeyMod2,MarkerSeverity:()=>MarkerSeverity3,MarkerTag:()=>MarkerTag2,Position:()=>Position2,Range:()=>Range3,Selection:()=>Selection2,SelectionDirection:()=>SelectionDirection2,Token:()=>Token3,Uri:()=>Uri2,editor:()=>editor,languages:()=>languages});var api,CancellationTokenSource2,Emitter2,KeyCode2,KeyMod2,Position2,Range3,Selection2,SelectionDirection2,MarkerSeverity3,MarkerTag2,Uri2,Token3,editor,languages,monacoEnvironment;var init_editor_api=__esm({"node_modules/monaco-editor/esm/vs/editor/editor.api.js"(){init_editorOptions();init_editorBaseApi();init_standaloneEditor();init_standaloneLanguages();init_format();EditorOptions.wrappingIndent.defaultValue=0;EditorOptions.glyphMargin.defaultValue=false;EditorOptions.autoIndent.defaultValue=3;EditorOptions.overviewRulerLanes.defaultValue=2;FormattingConflicts.setFormatterSelector(((formatter,document2,mode)=>Promise.resolve(formatter[0])));api=createMonacoBaseAPI();api.editor=createMonacoEditorAPI();api.languages=createMonacoLanguagesAPI();CancellationTokenSource2=api.CancellationTokenSource;Emitter2=api.Emitter;KeyCode2=api.KeyCode;KeyMod2=api.KeyMod;Position2=api.Position;Range3=api.Range;Selection2=api.Selection;SelectionDirection2=api.SelectionDirection;MarkerSeverity3=api.MarkerSeverity;MarkerTag2=api.MarkerTag;Uri2=api.Uri;Token3=api.Token;editor=api.editor;languages=api.languages;monacoEnvironment=globalThis.MonacoEnvironment;if((monacoEnvironment===null||monacoEnvironment===void 0?void 0:monacoEnvironment.globalAPI)||typeof define==="function"&&define.amd){globalThis.monaco=api}if(typeof globalThis.require!=="undefined"&&typeof globalThis.require.config==="function"){globalThis.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})}}});var abap_exports={};__export(abap_exports,{conf:()=>conf,language:()=>language2});var conf,language2;var init_abap=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/abap/abap.js"(){conf={comments:{lineComment:"*"},brackets:[["[","]"],["(",")"]]};language2={defaultToken:"invalid",ignoreCase:true,tokenPostfix:".abap",keywords:["abap-source","abbreviated","abstract","accept","accepting","according","activation","actual","add","add-corresponding","adjacent","after","alias","aliases","align","all","allocate","alpha","analysis","analyzer","and","append","appendage","appending","application","archive","area","arithmetic","as","ascending","aspect","assert","assign","assigned","assigning","association","asynchronous","at","attributes","authority","authority-check","avg","back","background","backup","backward","badi","base","before","begin","between","big","binary","bintohex","bit","black","blank","blanks","blob","block","blocks","blue","bound","boundaries","bounds","boxed","break-point","buffer","by","bypassing","byte","byte-order","call","calling","case","cast","casting","catch","center","centered","chain","chain-input","chain-request","change","changing","channels","character","char-to-hex","check","checkbox","ci_","circular","class","class-coding","class-data","class-events","class-methods","class-pool","cleanup","clear","client","clob","clock","close","coalesce","code","coding","col_background","col_group","col_heading","col_key","col_negative","col_normal","col_positive","col_total","collect","color","column","columns","comment","comments","commit","common","communication","comparing","component","components","compression","compute","concat","concat_with_space","concatenate","cond","condense","condition","connect","connection","constants","context","contexts","continue","control","controls","conv","conversion","convert","copies","copy","corresponding","country","cover","cpi","create","creating","critical","currency","currency_conversion","current","cursor","cursor-selection","customer","customer-function","dangerous","data","database","datainfo","dataset","date","dats_add_days","dats_add_months","dats_days_between","dats_is_valid","daylight","dd/mm/yy","dd/mm/yyyy","ddmmyy","deallocate","decimal_shift","decimals","declarations","deep","default","deferred","define","defining","definition","delete","deleting","demand","department","descending","describe","destination","detail","dialog","directory","disconnect","display","display-mode","distinct","divide","divide-corresponding","division","do","dummy","duplicate","duplicates","duration","during","dynamic","dynpro","edit","editor-call","else","elseif","empty","enabled","enabling","encoding","end","endat","endcase","endcatch","endchain","endclass","enddo","endenhancement","end-enhancement-section","endexec","endform","endfunction","endian","endif","ending","endinterface","end-lines","endloop","endmethod","endmodule","end-of-definition","end-of-editing","end-of-file","end-of-page","end-of-selection","endon","endprovide","endselect","end-test-injection","end-test-seam","endtry","endwhile","endwith","engineering","enhancement","enhancement-point","enhancements","enhancement-section","entries","entry","enum","environment","equiv","errormessage","errors","escaping","event","events","exact","except","exception","exceptions","exception-table","exclude","excluding","exec","execute","exists","exit","exit-command","expand","expanding","expiration","explicit","exponent","export","exporting","extend","extended","extension","extract","fail","fetch","field","field-groups","fields","field-symbol","field-symbols","file","filter","filters","filter-table","final","find","first","first-line","fixed-point","fkeq","fkge","flush","font","for","form","format","forward","found","frame","frames","free","friends","from","function","functionality","function-pool","further","gaps","generate","get","giving","gkeq","gkge","global","grant","green","group","groups","handle","handler","harmless","hashed","having","hdb","header","headers","heading","head-lines","help-id","help-request","hextobin","hide","high","hint","hold","hotspot","icon","id","identification","identifier","ids","if","ignore","ignoring","immediately","implementation","implementations","implemented","implicit","import","importing","in","inactive","incl","include","includes","including","increment","index","index-line","infotypes","inheriting","init","initial","initialization","inner","inout","input","insert","instance","instances","instr","intensified","interface","interface-pool","interfaces","internal","intervals","into","inverse","inverted-date","is","iso","job","join","keep","keeping","kernel","key","keys","keywords","kind","language","last","late","layout","leading","leave","left","left-justified","leftplus","leftspace","legacy","length","let","level","levels","like","line","lines","line-count","linefeed","line-selection","line-size","list","listbox","list-processing","little","llang","load","load-of-program","lob","local","locale","locator","logfile","logical","log-point","long","loop","low","lower","lpad","lpi","ltrim","mail","main","major-id","mapping","margin","mark","mask","match","matchcode","max","maximum","medium","members","memory","mesh","message","message-id","messages","messaging","method","methods","min","minimum","minor-id","mm/dd/yy","mm/dd/yyyy","mmddyy","mode","modif","modifier","modify","module","move","move-corresponding","multiply","multiply-corresponding","name","nametab","native","nested","nesting","new","new-line","new-page","new-section","next","no","no-display","no-extension","no-gap","no-gaps","no-grouping","no-heading","no-scrolling","no-sign","no-title","no-topofpage","no-zero","node","nodes","non-unicode","non-unique","not","null","number","object","objects","obligatory","occurrence","occurrences","occurs","of","off","offset","ole","on","only","open","option","optional","options","or","order","other","others","out","outer","output","output-length","overflow","overlay","pack","package","pad","padding","page","pages","parameter","parameters","parameter-table","part","partially","pattern","percentage","perform","performing","person","pf1","pf10","pf11","pf12","pf13","pf14","pf15","pf2","pf3","pf4","pf5","pf6","pf7","pf8","pf9","pf-status","pink","places","pool","pos_high","pos_low","position","pragmas","precompiled","preferred","preserving","primary","print","print-control","priority","private","procedure","process","program","property","protected","provide","public","push","pushbutton","put","queue-only","quickinfo","radiobutton","raise","raising","range","ranges","read","reader","read-only","receive","received","receiver","receiving","red","redefinition","reduce","reduced","ref","reference","refresh","regex","reject","remote","renaming","replace","replacement","replacing","report","request","requested","reserve","reset","resolution","respecting","responsible","result","results","resumable","resume","retry","return","returncode","returning","returns","right","right-justified","rightplus","rightspace","risk","rmc_communication_failure","rmc_invalid_status","rmc_system_failure","role","rollback","rows","rpad","rtrim","run","sap","sap-spool","saving","scale_preserving","scale_preserving_scientific","scan","scientific","scientific_with_leading_zero","scroll","scroll-boundary","scrolling","search","secondary","seconds","section","select","selection","selections","selection-screen","selection-set","selection-sets","selection-table","select-options","send","separate","separated","set","shared","shift","short","shortdump-id","sign_as_postfix","single","size","skip","skipping","smart","some","sort","sortable","sorted","source","specified","split","spool","spots","sql","sqlscript","stable","stamp","standard","starting","start-of-editing","start-of-selection","state","statement","statements","static","statics","statusinfo","step-loop","stop","structure","structures","style","subkey","submatches","submit","subroutine","subscreen","subtract","subtract-corresponding","suffix","sum","summary","summing","supplied","supply","suppress","switch","switchstates","symbol","syncpoints","syntax","syntax-check","syntax-trace","system-call","system-exceptions","system-exit","tab","tabbed","table","tables","tableview","tabstrip","target","task","tasks","test","testing","test-injection","test-seam","text","textpool","then","throw","time","times","timestamp","timezone","tims_is_valid","title","titlebar","title-lines","to","tokenization","tokens","top-lines","top-of-page","trace-file","trace-table","trailing","transaction","transfer","transformation","translate","transporting","trmac","truncate","truncation","try","tstmp_add_seconds","tstmp_current_utctimestamp","tstmp_is_valid","tstmp_seconds_between","type","type-pool","type-pools","types","uline","unassign","under","unicode","union","unique","unit_conversion","unix","unpack","until","unwind","up","update","upper","user","user-command","using","utf-8","valid","value","value-request","values","vary","varying","verification-message","version","via","view","visible","wait","warning","when","whenever","where","while","width","window","windows","with","with-heading","without","with-title","word","work","write","writer","xml","xsd","yellow","yes","yymmdd","zero","zone","abap_system_timezone","abap_user_timezone","access","action","adabas","adjust_numbers","allow_precision_loss","allowed","amdp","applicationuser","as_geo_json","as400","associations","balance","behavior","breakup","bulk","cds","cds_client","check_before_save","child","clients","corr","corr_spearman","cross","cycles","datn_add_days","datn_add_months","datn_days_between","dats_from_datn","dats_tims_to_tstmp","dats_to_datn","db2","db6","ddl","dense_rank","depth","deterministic","discarding","entities","entity","error","failed","finalize","first_value","fltp_to_dec","following","fractional","full","graph","grouping","hierarchy","hierarchy_ancestors","hierarchy_ancestors_aggregate","hierarchy_descendants","hierarchy_descendants_aggregate","hierarchy_siblings","incremental","indicators","lag","last_value","lead","leaves","like_regexpr","link","locale_sap","lock","locks","many","mapped","matched","measures","median","mssqlnt","multiple","nodetype","ntile","nulls","occurrences_regexpr","one","operations","oracle","orphans","over","parent","parents","partition","pcre","period","pfcg_mapping","preceding","privileged","product","projection","rank","redirected","replace_regexpr","reported","response","responses","root","row","row_number","sap_system_date","save","schema","session","sets","shortdump","siblings","spantree","start","stddev","string_agg","subtotal","sybase","tims_from_timn","tims_to_timn","to_blob","to_clob","total","trace-entry","tstmp_to_dats","tstmp_to_dst","tstmp_to_tims","tstmpl_from_utcl","tstmpl_to_utcl","unbounded","utcl_add_seconds","utcl_current","utcl_seconds_between","uuid","var","verbatim"],builtinFunctions:["abs","acos","asin","atan","bit-set","boolc","boolx","ceil","char_off","charlen","cmax","cmin","concat_lines_of","contains","contains_any_not_of","contains_any_of","cos","cosh","count","count_any_not_of","count_any_of","dbmaxlen","distance","escape","exp","find_any_not_of","find_any_of","find_end","floor","frac","from_mixed","ipow","line_exists","line_index","log","log10","matches","nmax","nmin","numofchar","repeat","rescale","reverse","round","segment","shift_left","shift_right","sign","sin","sinh","sqrt","strlen","substring","substring_after","substring_before","substring_from","substring_to","tan","tanh","to_lower","to_mixed","to_upper","trunc","utclong_add","utclong_current","utclong_diff","xsdbool","xstrlen"],typeKeywords:["b","c","d","decfloat16","decfloat34","f","i","int8","n","p","s","string","t","utclong","x","xstring","any","clike","csequence","decfloat","numeric","simple","xsequence","accp","char","clnt","cuky","curr","datn","dats","d16d","d16n","d16r","d34d","d34n","d34r","dec","df16_dec","df16_raw","df34_dec","df34_raw","fltp","geom_ewkb","int1","int2","int4","lang","lchr","lraw","numc","quan","raw","rawstring","sstring","timn","tims","unit","utcl","df16_scl","df34_scl","prec","varc","abap_bool","abap_false","abap_true","abap_undefined","me","screen","space","super","sy","syst","table_line","*sys*"],builtinMethods:["class_constructor","constructor"],derivedTypes:["%CID","%CID_REF","%CONTROL","%DATA","%ELEMENT","%FAIL","%KEY","%MSG","%PARAM","%PID","%PID_ASSOC","%PID_PARENT","%_HINTS"],cdsLanguage:["@AbapAnnotation","@AbapCatalog","@AccessControl","@API","@ClientDependent","@ClientHandling","@CompatibilityContract","@DataAging","@EndUserText","@Environment","@LanguageDependency","@MappingRole","@Metadata","@MetadataExtension","@ObjectModel","@Scope","@Semantics","$EXTENSION","$SELF"],selectors:["->","->*","=>","~","~*"],operators:[" +"," -","/","*","**","div","mod","=","#","@","+=","-=","*=","/=","**=","&&=","?=","&","&&","bit-and","bit-not","bit-or","bit-xor","m","o","z","<"," >","<=",">=","<>","><","=<","=>","bt","byte-ca","byte-cn","byte-co","byte-cs","byte-na","byte-ns","ca","cn","co","cp","cs","eq","ge","gt","le","lt","na","nb","ne","np","ns","*/","*:","--","/*","//"],symbols:/[=>))*/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@cdsLanguage":"annotation","@derivedTypes":"type","@builtinFunctions":"type","@builtinMethods":"type","@operators":"key","@default":"identifier"}}],[/<[\w]+>/,"identifier"],[/##[\w|_]+/,"comment"],{include:"@whitespace"},[/[:,.]/,"delimiter"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@selectors":"tag","@operators":"key","@default":""}}],[/'/,{token:"string",bracket:"@open",next:"@stringquote"}],[/`/,{token:"string",bracket:"@open",next:"@stringping"}],[/\|/,{token:"string",bracket:"@open",next:"@stringtemplate"}],[/\d+/,"number"]],stringtemplate:[[/[^\\\|]+/,"string"],[/\\\|/,"string"],[/\|/,{token:"string",bracket:"@close",next:"@pop"}]],stringping:[[/[^\\`]+/,"string"],[/`/,{token:"string",bracket:"@close",next:"@pop"}]],stringquote:[[/[^\\']+/,"string"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/^\*.*$/,"comment"],[/\".*$/,"comment"]]}}}});var apex_exports={};__export(apex_exports,{conf:()=>conf2,language:()=>language3});var conf2,keywords,uppercaseFirstLetter,keywordsWithCaseVariations,language3;var init_apex=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/apex/apex.js"(){conf2={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}};keywords=["abstract","activate","and","any","array","as","asc","assert","autonomous","begin","bigdecimal","blob","boolean","break","bulk","by","case","cast","catch","char","class","collect","commit","const","continue","convertcurrency","decimal","default","delete","desc","do","double","else","end","enum","exception","exit","export","extends","false","final","finally","float","for","from","future","get","global","goto","group","having","hint","if","implements","import","in","inner","insert","instanceof","int","interface","into","join","last_90_days","last_month","last_n_days","last_week","like","limit","list","long","loop","map","merge","native","new","next_90_days","next_month","next_n_days","next_week","not","null","nulls","number","object","of","on","or","outer","override","package","parallel","pragma","private","protected","public","retrieve","return","returning","rollback","savepoint","search","select","set","short","sort","stat","static","strictfp","super","switch","synchronized","system","testmethod","then","this","this_month","this_week","throw","throws","today","tolabel","tomorrow","transaction","transient","trigger","true","try","type","undelete","update","upsert","using","virtual","void","volatile","webservice","when","where","while","yesterday"];uppercaseFirstLetter=lowercase=>lowercase.charAt(0).toUpperCase()+lowercase.substr(1);keywordsWithCaseVariations=[];keywords.forEach((lowercase=>{keywordsWithCaseVariations.push(lowercase);keywordsWithCaseVariations.push(lowercase.toUpperCase());keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase))}));language3={defaultToken:"",tokenPostfix:".apex",keywords:keywordsWithCaseVariations,operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@apexdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],apexdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}}});var azcli_exports={};__export(azcli_exports,{conf:()=>conf3,language:()=>language4});var conf3,language4;var init_azcli=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/azcli/azcli.js"(){conf3={comments:{lineComment:"#"}};language4={defaultToken:"keyword",ignoreCase:true,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}}}});var bat_exports={};__export(bat_exports,{conf:()=>conf4,language:()=>language5});var conf4,language5;var init_bat=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/bat/bat.js"(){conf4={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}};language5={defaultToken:"",ignoreCase:true,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=>conf5,language:()=>language6});var bounded,identifierStart,identifierContinue,identifier,keywords2,namedLiterals,nonCommentWs,numericLiteral,conf5,language6;var init_bicep=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/bicep/bicep.js"(){bounded=text2=>`\\b${text2}\\b`;identifierStart="[_a-zA-Z]";identifierContinue="[_a-zA-Z0-9]";identifier=bounded(`${identifierStart}${identifierContinue}*`);keywords2=["targetScope","resource","module","param","var","output","for","in","if","existing"];namedLiterals=["true","false","null"];nonCommentWs=`[ \\t\\r\\n]`;numericLiteral=`[0-9]+`;conf5={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:"'''",close:"'''"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:"'''",close:"'''",notIn:["string","comment"]}],autoCloseBefore:":.,=}])' \n\t",indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}};language6={defaultToken:"",tokenPostfix:".bicep",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=>conf6,language:()=>language7});var conf6,language7;var init_cameligo=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/cameligo/cameligo.js"(){conf6={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}]};language7={defaultToken:"",tokenPostfix:".cameligo",ignoreCase:true,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["abs","assert","block","Bytes","case","Crypto","Current","else","failwith","false","for","fun","if","in","let","let%entry","let%init","List","list","Map","map","match","match%nat","mod","not","operation","Operation","of","record","Set","set","sender","skip","source","String","then","to","true","type","with"],typeKeywords:["int","unit","string","tz","nat","bool"],operators:["=",">","<","<=",">=","<>",":",":=","and","mod","or","+","-","*","/","@","&","^","%","->","<-","&&","||"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\(\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\(\*/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}}});var clojure_exports={};__export(clojure_exports,{conf:()=>conf7,language:()=>language8});var conf7,language8;var init_clojure=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/clojure/clojure.js"(){conf7={comments:{lineComment:";;"},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}],surroundingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}]};language8={defaultToken:"",ignoreCase:true,tokenPostfix:".clj",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"}],constants:["true","false","nil"],numbers:/^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,characters:/^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,escapes:/^\\(?:["'\\bfnrt]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,qualifiedSymbols:/^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/,specialForms:[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],coreSymbols:["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"],tokenizer:{root:[{include:"@whitespace"},[/@numbers/,"number"],[/@characters/,"string"],{include:"@string"},[/[()\[\]{}]/,"@brackets"],[/\/#"(?:\.|(?:")|[^"\n])*"\/g/,"regexp"],[/[#'@^`~]/,"meta"],[/@qualifiedSymbols/,{cases:{"^:.+$":"constant","@specialForms":"keyword","@coreSymbols":"keyword","@constants":"constant","@default":"identifier"}}]],whitespace:[[/[\s,]+/,"white"],[/;.*$/,"comment"],[/\(comment\b/,"comment","@comment"]],comment:[[/\(/,"comment","@push"],[/\)/,"comment","@pop"],[/[^()]/,"comment"]],string:[[/"/,"string","@multiLineString"]],multiLineString:[[/"/,"string","@popall"],[/@escapes/,"string.escape"],[/./,"string"]]}}}});var coffee_exports={};__export(coffee_exports,{conf:()=>conf8,language:()=>language9});var conf8,language9;var init_coffee=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/coffee/coffee.js"(){conf8={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}};language9={defaultToken:"",ignoreCase:true,tokenPostfix:".coffee",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:["and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when"],symbols:/[=>conf9,language:()=>language10});var conf9,language10;var init_cpp=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/cpp/cpp.js"(){conf9={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}};language10={defaultToken:"",tokenPostfix:".cpp",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m512","__m512d","__m512i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*\\$/,"comment","@linecomment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],linecomment:[[/.*[^\\]$/,"comment","@pop"],[/[^]+/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],raw:[[/(.*)(\))(?:([^ ()\\\t"]*))(\")/,{cases:{"$3==$S2":["string.raw","string.raw.end","string.raw.end",{token:"string.raw.end",next:"@pop"}],"@default":["string.raw","string.raw","string.raw","string.raw"]}}],[/.*/,"string.raw"]],annotation:[{include:"@whitespace"},[/using|alignas/,"keyword"],[/[a-zA-Z0-9_]+/,"annotation"],[/[,:]/,"delimiter"],[/[()]/,"@brackets"],[/\]\s*\]/,{token:"annotation",next:"@pop"}]],include:[[/(\s*)(<)([^<>]*)(>)/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]],[/(\s*)(")([^"]*)(")/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]]]}}}});var csharp_exports={};__export(csharp_exports,{conf:()=>conf10,language:()=>language11});var conf10,language11;var init_csharp=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/csharp/csharp.js"(){conf10={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}};language11={defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}}});var csp_exports={};__export(csp_exports,{conf:()=>conf11,language:()=>language12});var conf11,language12;var init_csp=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/csp/csp.js"(){conf11={brackets:[],autoClosingPairs:[],surroundingPairs:[]};language12={keywords:[],typeKeywords:[],tokenPostfix:".csp",operators:[],symbols:/[=>conf12,language:()=>language13});var conf12,language13;var init_css=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/css/css.js"(){conf12={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}};language13={defaultToken:"",tokenPostfix:".css",ws:"[ \t\n\r\f]*",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}}}});var cypher_exports={};__export(cypher_exports,{conf:()=>conf13,language:()=>language14});var conf13,language14;var init_cypher=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/cypher/cypher.js"(){conf13={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]};language14={defaultToken:"",tokenPostfix:`.cypher`,ignoreCase:true,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ALL","AND","AS","ASC","ASCENDING","BY","CALL","CASE","CONTAINS","CREATE","DELETE","DESC","DESCENDING","DETACH","DISTINCT","ELSE","END","ENDS","EXISTS","IN","IS","LIMIT","MANDATORY","MATCH","MERGE","NOT","ON","ON","OPTIONAL","OR","ORDER","REMOVE","RETURN","SET","SKIP","STARTS","THEN","UNION","UNWIND","WHEN","WHERE","WITH","XOR","YIELD"],builtinLiterals:["true","TRUE","false","FALSE","null","NULL"],builtinFunctions:["abs","acos","asin","atan","atan2","avg","ceil","coalesce","collect","cos","cot","count","degrees","e","endNode","exists","exp","floor","head","id","keys","labels","last","left","length","log","log10","lTrim","max","min","nodes","percentileCont","percentileDisc","pi","properties","radians","rand","range","relationships","replace","reverse","right","round","rTrim","sign","sin","size","split","sqrt","startNode","stDev","stDevP","substring","sum","tail","tan","timestamp","toBoolean","toFloat","toInteger","toLower","toString","toUpper","trim","type"],operators:["+","-","*","/","%","^","=","<>","<",">","<=",">=","->","<-","--\x3e","<--"],escapes:/\\(?:[tbnrf\\"'`]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+/,octaldigits:/[0-7]+/,hexdigits:/[0-9a-fA-F]+/,tokenizer:{root:[[/[{}[\]()]/,"@brackets"],{include:"common"}],common:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/:[a-zA-Z_][\w]*/,"type.identifier"],[/[a-zA-Z_][\w]*(?=\()/,{cases:{"@builtinFunctions":"predefined.function"}}],[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":"keyword","@builtinLiterals":"predefined.literal","@default":"identifier"}}],[/`/,"identifier.escape","@identifierBacktick"],[/[;,.:|]/,"delimiter"],[/[<>=%+\-*/^]+/,{cases:{"@operators":"delimiter","@default":""}}]],numbers:[[/-?(@digits)[eE](-?(@digits))?/,"number.float"],[/-?(@digits)?\.(@digits)([eE]-?(@digits))?/,"number.float"],[/-?0x(@hexdigits)/,"number.hex"],[/-?0(@octaldigits)/,"number.octal"],[/-?(@digits)/,"number"]],strings:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@stringDouble"],[/'/,"string","@stringSingle"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/\/\/.*/,"comment"],[/[^/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[/*]/,"comment"]],stringDouble:[[/[^\\"]+/,"string"],[/@escapes/,"string"],[/\\./,"string.invalid"],[/"/,"string","@pop"]],stringSingle:[[/[^\\']+/,"string"],[/@escapes/,"string"],[/\\./,"string.invalid"],[/'/,"string","@pop"]],identifierBacktick:[[/[^\\`]+/,"identifier.escape"],[/@escapes/,"identifier.escape"],[/\\./,"identifier.escape.invalid"],[/`/,"identifier.escape","@pop"]]}}}});var dart_exports={};__export(dart_exports,{conf:()=>conf14,language:()=>language15});var conf14,language15;var init_dart=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/dart/dart.js"(){conf14={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:"(",close:")"},{open:'"',close:'"'},{open:"`",close:"`"}],folding:{markers:{start:/^\s*\s*#?region\b/,end:/^\s*\s*#?endregion\b/}}};language15={defaultToken:"invalid",tokenPostfix:".dart",keywords:["abstract","dynamic","implements","show","as","else","import","static","assert","enum","in","super","async","export","interface","switch","await","extends","is","sync","break","external","library","this","case","factory","mixin","throw","catch","false","new","true","class","final","null","try","const","finally","on","typedef","continue","for","operator","var","covariant","Function","part","void","default","get","rethrow","while","deferred","hide","return","with","do","if","set","yield"],typeKeywords:["int","double","String","bool"],operators:["+","-","*","/","~/","%","++","--","==","!=",">","<",">=","<=","=","-=","/=","%=",">>=","^=","+=","*=","~/=","<<=","&=","!=","||","&&","&","|","^","~","<<",">>","!",">>>","??","?",":","|="],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/\/.*$/,"comment.doc"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"\$]+/,"string"],[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"],[/\$\w+/,"identifier"]],string_single:[[/[^\\'\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"],[/\$\w+/,"identifier"]]}}}});var dockerfile_exports={};__export(dockerfile_exports,{conf:()=>conf15,language:()=>language16});var conf15,language16;var init_dockerfile=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/dockerfile/dockerfile.js"(){conf15={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]};language16={defaultToken:"",tokenPostfix:".dockerfile",variable:/\${?[\w]+}?/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/(ONBUILD)(\s+)/,["keyword",""]],[/(ENV)(\s+)([\w]+)/,["keyword","",{token:"variable",next:"@arguments"}]],[/(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/,{token:"keyword",next:"@arguments"}]],arguments:[{include:"@whitespace"},{include:"@strings"},[/(@variable)/,{cases:{"@eos":{token:"variable",next:"@popall"},"@default":"variable"}}],[/\\/,{cases:{"@eos":"","@default":""}}],[/./,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],whitespace:[[/\s+/,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],comment:[[/(^#.*$)/,"comment","@popall"]],strings:[[/\\'$/,"","@popall"],[/\\'/,""],[/'$/,"string","@popall"],[/'/,"string","@stringBody"],[/"$/,"string","@popall"],[/"/,"string","@dblStringBody"]],stringBody:[[/[^\\\$']/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/'$/,"string","@popall"],[/'/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]],dblStringBody:[[/[^\\\$"]/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/"$/,"string","@popall"],[/"/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]]}}}});var ecl_exports={};__export(ecl_exports,{conf:()=>conf16,language:()=>language17});var conf16,language17;var init_ecl=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/ecl/ecl.js"(){conf16={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}]};language17={defaultToken:"",tokenPostfix:".ecl",ignoreCase:true,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],pounds:["append","break","declare","demangle","end","for","getdatatype","if","inmodule","loop","mangle","onwarning","option","set","stored","uniquename"].join("|"),keywords:["__compressed__","after","all","and","any","as","atmost","before","beginc","best","between","case","cluster","compressed","compression","const","counter","csv","default","descend","embed","encoding","encrypt","end","endc","endembed","endmacro","enum","escape","except","exclusive","expire","export","extend","fail","few","fileposition","first","flat","forward","from","full","function","functionmacro","group","grouped","heading","hole","ifblock","import","in","inner","interface","internal","joined","keep","keyed","last","left","limit","linkcounted","literal","little_endian","load","local","locale","lookup","lzw","macro","many","maxcount","maxlength","min skew","module","mofn","multiple","named","namespace","nocase","noroot","noscan","nosort","not","noxpath","of","onfail","only","opt","or","outer","overwrite","packed","partition","penalty","physicallength","pipe","prefetch","quote","record","repeat","retry","return","right","right1","right2","rows","rowset","scan","scope","self","separator","service","shared","skew","skip","smart","soapaction","sql","stable","store","terminator","thor","threshold","timelimit","timeout","token","transform","trim","type","unicodeorder","unordered","unsorted","unstable","update","use","validate","virtual","whole","width","wild","within","wnotrim","xml","xpath"],functions:["abs","acos","aggregate","allnodes","apply","ascii","asin","assert","asstring","atan","atan2","ave","build","buildindex","case","catch","choose","choosen","choosesets","clustersize","combine","correlation","cos","cosh","count","covariance","cron","dataset","dedup","define","denormalize","dictionary","distribute","distributed","distribution","ebcdic","enth","error","evaluate","event","eventextra","eventname","exists","exp","fail","failcode","failmessage","fetch","fromunicode","fromxml","getenv","getisvalid","global","graph","group","hash","hash32","hash64","hashcrc","hashmd5","having","httpcall","httpheader","if","iff","index","intformat","isvalid","iterate","join","keydiff","keypatch","keyunicode","length","library","limit","ln","loadxml","local","log","loop","map","matched","matchlength","matchposition","matchtext","matchunicode","max","merge","mergejoin","min","nofold","nolocal","nonempty","normalize","nothor","notify","output","parallel","parse","pipe","power","preload","process","project","pull","random","range","rank","ranked","realformat","recordof","regexfind","regexreplace","regroup","rejected","rollup","round","roundup","row","rowdiff","sample","sequential","set","sin","sinh","sizeof","soapcall","sort","sorted","sqrt","stepped","stored","sum","table","tan","tanh","thisnode","topn","tounicode","toxml","transfer","transform","trim","truncate","typeof","ungroup","unicodeorder","variance","wait","which","workunit","xmldecode","xmlencode","xmltext","xmlunicode"],typesint:["integer","unsigned"].join("|"),typesnum:["data","qstring","string","unicode","utf8","varstring","varunicode"],typesone:["ascii","big_endian","boolean","data","decimal","ebcdic","grouped","integer","linkcounted","pattern","qstring","real","record","rule","set of","streamed","string","token","udecimal","unicode","unsigned","utf8","varstring","varunicode"].join("|"),operators:["+","-","/",":=","<","<>","=",">","\\","and","in","not","or"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]]}}}});var elixir_exports={};__export(elixir_exports,{conf:()=>conf17,language:()=>language18});var conf17,language18;var init_elixir=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/elixir/elixir.js"(){conf17={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:'"',close:'"'}],autoClosingPairs:[{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["comment"]},{open:'"""',close:'"""'},{open:"`",close:"`",notIn:["string","comment"]},{open:"(",close:")"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"<<",close:">>"}],indentationRules:{increaseIndentPattern:/^\s*(after|else|catch|rescue|fn|[^#]*(do|<\-|\->|\{|\[|\=))\s*$/,decreaseIndentPattern:/^\s*((\}|\])\s*$|(after|else|catch|rescue|end)\b)/}};language18={defaultToken:"source",tokenPostfix:".elixir",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"<<",close:">>",token:"delimiter.angle.special"}],declarationKeywords:["def","defp","defn","defnp","defguard","defguardp","defmacro","defmacrop","defdelegate","defcallback","defmacrocallback","defmodule","defprotocol","defexception","defimpl","defstruct"],operatorKeywords:["and","in","not","or","when"],namespaceKeywords:["alias","import","require","use"],otherKeywords:["after","case","catch","cond","do","else","end","fn","for","if","quote","raise","receive","rescue","super","throw","try","unless","unquote_splicing","unquote","with"],constants:["true","false","nil"],nameBuiltin:["__MODULE__","__DIR__","__ENV__","__CALLER__","__STACKTRACE__"],operator:/-[->]?|!={0,2}|\*{1,2}|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/,variableName:/[a-z_][a-zA-Z0-9_]*[?!]?/,atomName:/[a-zA-Z_][a-zA-Z0-9_@]*[?!]?|@specialAtomName|@operator/,specialAtomName:/\.\.\.|<<>>|%\{\}|%|\{\}/,aliasPart:/[A-Z][a-zA-Z0-9_]*/,moduleName:/@aliasPart(?:\.@aliasPart)*/,sigilSymmetricDelimiter:/"""|'''|"|'|\/|\|/,sigilStartDelimiter:/@sigilSymmetricDelimiter|<|\{|\[|\(/,sigilEndDelimiter:/@sigilSymmetricDelimiter|>|\}|\]|\)/,sigilModifiers:/[a-zA-Z0-9]*/,decimal:/\d(?:_?\d)*/,hex:/[0-9a-fA-F](_?[0-9a-fA-F])*/,octal:/[0-7](_?[0-7])*/,binary:/[01](_?[01])*/,escape:/\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}|\\./,tokenizer:{root:[{include:"@whitespace"},{include:"@comments"},{include:"@keywordsShorthand"},{include:"@numbers"},{include:"@identifiers"},{include:"@strings"},{include:"@atoms"},{include:"@sigils"},{include:"@attributes"},{include:"@symbols"}],whitespace:[[/\s+/,"white"]],comments:[[/(#)(.*)/,["comment.punctuation","comment"]]],keywordsShorthand:[[/(@atomName)(:)(\s+)/,["constant","constant.punctuation","white"]],[/"(?=([^"]|#\{.*?\}|\\")*":)/,{token:"constant.delimiter",next:"@doubleQuotedStringKeyword"}],[/'(?=([^']|#\{.*?\}|\\')*':)/,{token:"constant.delimiter",next:"@singleQuotedStringKeyword"}]],doubleQuotedStringKeyword:[[/":/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringKeyword:[[/':/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],numbers:[[/0b@binary/,"number.binary"],[/0o@octal/,"number.octal"],[/0x@hex/,"number.hex"],[/@decimal\.@decimal([eE]-?@decimal)?/,"number.float"],[/@decimal/,"number"]],identifiers:[[/\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,["keyword.declaration","white",{cases:{unquote:"keyword","@default":"function"}}]],[/(@variableName)(?=\s*\.?\s*\()/,{cases:{"@declarationKeywords":"keyword.declaration","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@default":"function.call"}}],[/(@moduleName)(\s*)(\.)(\s*)(@variableName)/,["type.identifier","white","operator","white","function.call"]],[/(:)(@atomName)(\s*)(\.)(\s*)(@variableName)/,["constant.punctuation","constant","white","operator","white","function.call"]],[/(\|>)(\s*)(@variableName)/,["operator","white",{cases:{"@otherKeywords":"keyword","@default":"function.call"}}]],[/(&)(\s*)(@variableName)/,["operator","white","function.call"]],[/@variableName/,{cases:{"@declarationKeywords":"keyword.declaration","@operatorKeywords":"keyword.operator","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@constants":"constant.language","@nameBuiltin":"variable.language","_.*":"comment.unused","@default":"identifier"}}],[/@moduleName/,"type.identifier"]],strings:[[/"""/,{token:"string.delimiter",next:"@doubleQuotedHeredoc"}],[/'''/,{token:"string.delimiter",next:"@singleQuotedHeredoc"}],[/"/,{token:"string.delimiter",next:"@doubleQuotedString"}],[/'/,{token:"string.delimiter",next:"@singleQuotedString"}]],doubleQuotedHeredoc:[[/"""/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedHeredoc:[[/'''/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],doubleQuotedString:[[/"/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedString:[[/'/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],atoms:[[/(:)(@atomName)/,["constant.punctuation","constant"]],[/:"/,{token:"constant.delimiter",next:"@doubleQuotedStringAtom"}],[/:'/,{token:"constant.delimiter",next:"@singleQuotedStringAtom"}]],doubleQuotedStringAtom:[[/"/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringAtom:[[/'/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],sigils:[[/~[a-z]@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.interpol"}],[/~([A-Z]+)@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.noInterpol"}]],sigil:[[/~([a-z]|[A-Z]+)\{/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.{.}"}],[/~([a-z]|[A-Z]+)\[/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.[.]"}],[/~([a-z]|[A-Z]+)\(/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.(.)"}],[/~([a-z]|[A-Z]+)\"}],[/~([a-z]|[A-Z]+)(@sigilSymmetricDelimiter)/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.$2.$2"}]],"sigilStart.interpol.s":[[/~s@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.s":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContentInterpol"}],"sigilStart.noInterpol.S":[[/~S@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.S":[[/(^|[^\\])\\@sigilEndDelimiter/,"string"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContent"}],"sigilStart.interpol.r":[[/~r@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.r":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContentInterpol"}],"sigilStart.noInterpol.R":[[/~R@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.R":[[/(^|[^\\])\\@sigilEndDelimiter/,"regexp"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContent"}],"sigilStart.interpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContentInterpol"}],"sigilStart.noInterpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol":[[/(^|[^\\])\\@sigilEndDelimiter/,"sigil"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContent"}],attributes:[[/\@(module|type)?doc (~[sS])?"""/,{token:"comment.block.documentation",next:"@doubleQuotedHeredocDocstring"}],[/\@(module|type)?doc (~[sS])?'''/,{token:"comment.block.documentation",next:"@singleQuotedHeredocDocstring"}],[/\@(module|type)?doc (~[sS])?"/,{token:"comment.block.documentation",next:"@doubleQuotedStringDocstring"}],[/\@(module|type)?doc (~[sS])?'/,{token:"comment.block.documentation",next:"@singleQuotedStringDocstring"}],[/\@(module|type)?doc false/,"comment.block.documentation"],[/\@(@variableName)/,"variable"]],doubleQuotedHeredocDocstring:[[/"""/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],singleQuotedHeredocDocstring:[[/'''/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],doubleQuotedStringDocstring:[[/"/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],singleQuotedStringDocstring:[[/'/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],symbols:[[/\?(\\.|[^\\\s])/,"number.constant"],[/&\d+/,"operator"],[/<<<|>>>/,"operator"],[/[()\[\]\{\}]|<<|>>/,"@brackets"],[/\.\.\./,"identifier"],[/=>/,"punctuation"],[/@operator/,"operator"],[/[:;,.%]/,"punctuation"]],stringContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringContent"}],stringContent:[[/./,"string"]],stringConstantContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringConstantContent"}],stringConstantContent:[[/./,"constant"]],regexpContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@regexpContent"}],regexpContent:[[/(\s)(#)(\s.*)$/,["white","comment.punctuation","comment"]],[/./,"regexp"]],sigilContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@sigilContent"}],sigilContent:[[/./,"sigil"]],docstringContent:[[/./,"comment.block.documentation"]],escapeChar:[[/@escape/,"constant.character.escape"]],interpolation:[[/#{/,{token:"delimiter.bracket.embed",next:"@interpolationContinue"}]],interpolationContinue:[[/}/,{token:"delimiter.bracket.embed",next:"@pop"}],{include:"@root"}]}}}});var flow9_exports={};__export(flow9_exports,{conf:()=>conf18,language:()=>language19});var conf18,language19;var init_flow9=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/flow9/flow9.js"(){conf18={comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:"(",close:")",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]};language19={defaultToken:"",tokenPostfix:".flow",keywords:["import","require","export","forbid","native","if","else","cast","unsafe","switch","default"],types:["io","mutable","bool","int","double","string","flow","void","ref","true","false","with"],operators:["=",">","<","<=",">=","==","!","!=",":=","::=","&&","||","+","-","*","/","@","&","%",":","->","\\","$","??","^"],symbols:/[@$=>](?!@symbols)/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}}});var fsharp_exports={};__export(fsharp_exports,{conf:()=>conf19,language:()=>language20});var conf19,language20;var init_fsharp=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/fsharp/fsharp.js"(){conf19={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),end:new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")}}};language20={defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*(?!\))/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^*(]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"],[/\(\*\)/,"comment"],[/\(/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}}}});var freemarker2_exports={};__export(freemarker2_exports,{TagAngleInterpolationBracket:()=>TagAngleInterpolationBracket,TagAngleInterpolationDollar:()=>TagAngleInterpolationDollar,TagAutoInterpolationBracket:()=>TagAutoInterpolationBracket,TagAutoInterpolationDollar:()=>TagAutoInterpolationDollar,TagBracketInterpolationBracket:()=>TagBracketInterpolationBracket,TagBracketInterpolationDollar:()=>TagBracketInterpolationDollar});function createLangConfiguration(ts){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${ts.open}--`,`--${ts.close}`]},autoCloseBefore:"\n\r\t }]),.:;=",autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${ts.open}#(?:${BLOCK_ELEMENTS.join("|")})([^/${ts.close}]*(?!/)${ts.close})[^${ts.open}]*$`),end:new RegExp(`${ts.open}/#(?:${BLOCK_ELEMENTS.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${ts.open}#(?!(?:${EMPTY_ELEMENTS.join("|")}))([a-zA-Z_]+)([^/${ts.close}]*(?!/)${ts.close})[^${ts.open}]*$`),afterText:new RegExp(`^${ts.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${ts.close}$`),action:{indentAction:monaco_editor_core_exports2.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${ts.open}#(?!(?:${EMPTY_ELEMENTS.join("|")}))([a-zA-Z_]+)([^/${ts.close}]*(?!/)${ts.close})[^${ts.open}]*$`),action:{indentAction:monaco_editor_core_exports2.languages.IndentAction.Indent}}]}}function createLangConfigurationAuto(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:"\n\r\t }]),.:;=",autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${BLOCK_ELEMENTS.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${BLOCK_ELEMENTS.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${EMPTY_ELEMENTS.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp(`^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$`),action:{indentAction:monaco_editor_core_exports2.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${EMPTY_ELEMENTS.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:monaco_editor_core_exports2.languages.IndentAction.Indent}}]}}function createMonarchLanguage(ts,is){const id=`_${ts.id}_${is.id}`;const s=name=>name.replace(/__id__/g,id);const r=regexp=>{const source=regexp.source.replace(/__id__/g,id);return new RegExp(source,regexp.flags)};return{unicode:true,includeLF:false,start:s("default__id__"),ignoreCase:false,defaultToken:"invalid",tokenPostfix:`.freemarker2`,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[s("open__id__")]:new RegExp(ts.open),[s("close__id__")]:new RegExp(ts.close),[s("iOpen1__id__")]:new RegExp(is.open1),[s("iOpen2__id__")]:new RegExp(is.open2),[s("iClose__id__")]:new RegExp(is.close),[s("startTag__id__")]:r(/(@open__id__)(#)/),[s("endTag__id__")]:r(/(@open__id__)(\/#)/),[s("startOrEndTag__id__")]:r(/(@open__id__)(\/?#)/),[s("closeTag1__id__")]:r(/((?:@blank)*)(@close__id__)/),[s("closeTag2__id__")]:r(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\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-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\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]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[s("default__id__")]:[{include:s("@directive_token__id__")},{include:s("@interpolation_and_text_token__id__")}],[s("fmExpression__id__.directive")]:[{include:s("@blank_and_expression_comment_token__id__")},{include:s("@directive_end_token__id__")},{include:s("@expression_token__id__")}],[s("fmExpression__id__.interpolation")]:[{include:s("@blank_and_expression_comment_token__id__")},{include:s("@expression_token__id__")},{include:s("@greater_operators_token__id__")}],[s("inParen__id__.plain")]:[{include:s("@blank_and_expression_comment_token__id__")},{include:s("@directive_end_token__id__")},{include:s("@expression_token__id__")}],[s("inParen__id__.gt")]:[{include:s("@blank_and_expression_comment_token__id__")},{include:s("@expression_token__id__")},{include:s("@greater_operators_token__id__")}],[s("noSpaceExpression__id__")]:[{include:s("@no_space_expression_end_token__id__")},{include:s("@directive_end_token__id__")},{include:s("@expression_token__id__")}],[s("unifiedCall__id__")]:[{include:s("@unified_call_token__id__")}],[s("singleString__id__")]:[{include:s("@string_single_token__id__")}],[s("doubleString__id__")]:[{include:s("@string_double_token__id__")}],[s("rawSingleString__id__")]:[{include:s("@string_single_raw_token__id__")}],[s("rawDoubleString__id__")]:[{include:s("@string_double_raw_token__id__")}],[s("expressionComment__id__")]:[{include:s("@expression_comment_token__id__")}],[s("noParse__id__")]:[{include:s("@no_parse_token__id__")}],[s("terseComment__id__")]:[{include:s("@terse_comment_token__id__")}],[s("directive_token__id__")]:[[r(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),ts.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${is.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${is.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:s("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[r(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),ts.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${is.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${is.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[r(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),ts.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${is.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${is.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:s("@fmExpression__id__.directive")}]],[r(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),ts.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${is.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${is.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[r(/(@open__id__)(@)/),ts.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${is.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${is.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:s("@unifiedCall__id__")}]],[r(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[r(/(@open__id__)#--/),ts.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${is.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${is.id}`}}}:{token:"comment",next:s("@terseComment__id__")}],[r(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),ts.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${is.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${is.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:s("@fmExpression__id__.directive")}]]],[s("interpolation_and_text_token__id__")]:[[r(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:is.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:is.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:s("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[s("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[s("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[s("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[s("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[s("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:s("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:s("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:s("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:s("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:s("@inParen__id__.gt")},"@default":{token:"@brackets",next:s("@inParen__id__.plain")}}},"\\]":{cases:{...is.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...ts.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[s("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:s("@inParen__id__.gt")},"\\)":{cases:{[s("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:s("@inParen__id__.gt")},"@default":{token:"@brackets",next:s("@inParen__id__.plain")}}},"\\}":{cases:{...is.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[s("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[s("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:s("@expressionComment__id__")}]],[s("directive_end_token__id__")]:[[/>/,ts.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[r(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[s("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[s("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:s("@fmExpression__id__.directive")}]],[s("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:s("@fmExpression__id__.directive")}]],[r(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:s("@noSpaceExpression__id__")}]],[s("no_parse_token__id__")]:[[r(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[s("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[s("terse_comment_token__id__")]:[[r(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function createMonarchLanguageAuto(is){const angle=createMonarchLanguage(TagSyntaxAngle,is);const bracket=createMonarchLanguage(TagSyntaxBracket,is);const auto=createMonarchLanguage(TagSyntaxAuto,is);return{...angle,...bracket,...auto,unicode:true,includeLF:false,start:`default_auto_${is.id}`,ignoreCase:false,defaultToken:"invalid",tokenPostfix:`.freemarker2`,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...angle.tokenizer,...bracket.tokenizer,...auto.tokenizer}}}var __defProp3,__getOwnPropDesc3,__getOwnPropNames3,__hasOwnProp3,__copyProps3,__reExport2,monaco_editor_core_exports2,EMPTY_ELEMENTS,BLOCK_ELEMENTS,TagSyntaxAngle,TagSyntaxBracket,TagSyntaxAuto,InterpolationSyntaxDollar,InterpolationSyntaxBracket,TagAngleInterpolationDollar,TagBracketInterpolationDollar,TagAngleInterpolationBracket,TagBracketInterpolationBracket,TagAutoInterpolationDollar,TagAutoInterpolationBracket;var init_freemarker2=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/freemarker2/freemarker2.js"(){init_editor_api();__defProp3=Object.defineProperty;__getOwnPropDesc3=Object.getOwnPropertyDescriptor;__getOwnPropNames3=Object.getOwnPropertyNames;__hasOwnProp3=Object.prototype.hasOwnProperty;__copyProps3=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames3(from))if(!__hasOwnProp3.call(to,key)&&key!==except)__defProp3(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc3(from,key))||desc.enumerable})}return to};__reExport2=(target,mod,secondTarget)=>(__copyProps3(target,mod,"default"),secondTarget&&__copyProps3(secondTarget,mod,"default"));monaco_editor_core_exports2={};__reExport2(monaco_editor_core_exports2,editor_api_exports);EMPTY_ELEMENTS=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"];BLOCK_ELEMENTS=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"];TagSyntaxAngle={close:">",id:"angle",open:"<"};TagSyntaxBracket={close:"\\]",id:"bracket",open:"\\["};TagSyntaxAuto={close:"[>\\]]",id:"auto",open:"[<\\[]"};InterpolationSyntaxDollar={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"};InterpolationSyntaxBracket={close:"\\]",id:"bracket",open1:"\\[",open2:"="};TagAngleInterpolationDollar={conf:createLangConfiguration(TagSyntaxAngle),language:createMonarchLanguage(TagSyntaxAngle,InterpolationSyntaxDollar)};TagBracketInterpolationDollar={conf:createLangConfiguration(TagSyntaxBracket),language:createMonarchLanguage(TagSyntaxBracket,InterpolationSyntaxDollar)};TagAngleInterpolationBracket={conf:createLangConfiguration(TagSyntaxAngle),language:createMonarchLanguage(TagSyntaxAngle,InterpolationSyntaxBracket)};TagBracketInterpolationBracket={conf:createLangConfiguration(TagSyntaxBracket),language:createMonarchLanguage(TagSyntaxBracket,InterpolationSyntaxBracket)};TagAutoInterpolationDollar={conf:createLangConfigurationAuto(),language:createMonarchLanguageAuto(InterpolationSyntaxDollar)};TagAutoInterpolationBracket={conf:createLangConfigurationAuto(),language:createMonarchLanguageAuto(InterpolationSyntaxBracket)}}});var go_exports={};__export(go_exports,{conf:()=>conf20,language:()=>language21});var conf20,language21;var init_go=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/go/go.js"(){conf20={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]};language21={defaultToken:"",tokenPostfix:".go",keywords:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}}}});var graphql_exports={};__export(graphql_exports,{conf:()=>conf21,language:()=>language22});var conf21,language22;var init_graphql=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/graphql/graphql.js"(){conf21={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""'},{open:'"',close:'"'}],folding:{offSide:true}};language22={defaultToken:"invalid",tokenPostfix:".gql",keywords:["null","true","false","query","mutation","subscription","extend","schema","directive","scalar","type","interface","union","enum","input","implements","fragment","on"],typeKeywords:["Int","Float","String","Boolean","ID"],directiveLocations:["SCHEMA","SCALAR","OBJECT","FIELD_DEFINITION","ARGUMENT_DEFINITION","INTERFACE","UNION","ENUM","ENUM_VALUE","INPUT_OBJECT","INPUT_FIELD_DEFINITION","QUERY","MUTATION","SUBSCRIPTION","FIELD","FRAGMENT_DEFINITION","FRAGMENT_SPREAD","INLINE_FRAGMENT","VARIABLE_DEFINITION"],operators:["=","!","?",":","&","|"],symbols:/[=!?:&|]+/,escapes:/\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,tokenizer:{root:[[/[a-z_][\w$]*/,{cases:{"@keywords":"keyword","@default":"key.identifier"}}],[/[$][\w$]*/,{cases:{"@keywords":"keyword","@default":"argument.identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@typeKeywords":"keyword","@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,{token:"annotation",log:"annotation token: $0"}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@mlstring",nextEmbedded:"markdown"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],mlstring:[[/[^"]+/,"string"],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]]}}}});var handlebars_exports={};__export(handlebars_exports,{conf:()=>conf22,language:()=>language23});var __defProp4,__getOwnPropDesc4,__getOwnPropNames4,__hasOwnProp4,__copyProps4,__reExport3,monaco_editor_core_exports3,EMPTY_ELEMENTS2,conf22,language23;var init_handlebars=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/handlebars/handlebars.js"(){init_editor_api();__defProp4=Object.defineProperty;__getOwnPropDesc4=Object.getOwnPropertyDescriptor;__getOwnPropNames4=Object.getOwnPropertyNames;__hasOwnProp4=Object.prototype.hasOwnProperty;__copyProps4=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames4(from))if(!__hasOwnProp4.call(to,key)&&key!==except)__defProp4(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc4(from,key))||desc.enumerable})}return to};__reExport3=(target,mod,secondTarget)=>(__copyProps4(target,mod,"default"),secondTarget&&__copyProps4(secondTarget,mod,"default"));monaco_editor_core_exports3={};__reExport3(monaco_editor_core_exports3,editor_api_exports);EMPTY_ELEMENTS2=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];conf22={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["\x3c!--","--\x3e"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${EMPTY_ELEMENTS2.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:monaco_editor_core_exports3.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${EMPTY_ELEMENTS2.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:monaco_editor_core_exports3.languages.IndentAction.Indent}}]};language23={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}}}});var hcl_exports={};__export(hcl_exports,{conf:()=>conf23,language:()=>language24});var conf23,language24;var init_hcl=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.js"(){conf23={comments:{lineComment:"#",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]};language24={defaultToken:"",tokenPostfix:".hcl",keywords:["var","local","path","for_each","any","string","number","bool","true","false","null","if ","else ","endif ","for ","in","endfor"],operators:["=",">=","<=","==","!=","+","-","*","/","%","&&","||","!","<",">","?","...",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"/,"string","@string"],[/'/,"invalid"]],heredoc:[[/<<[-]*\s*["]?([\w\-]+)["]?/,{token:"string.heredoc.delimiter",next:"@heredocBody.$1"}]],heredocBody:[[/([\w\-]+)$/,{cases:{"$1==$S2":[{token:"string.heredoc.delimiter",next:"@popall"}],"@default":"string.heredoc"}}],[/./,"string.heredoc"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/#.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/\$\{/,{token:"delimiter",next:"@stringExpression"}],[/[^\\"\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@popall"]],stringInsideExpression:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],stringExpression:[[/\}/,{token:"delimiter",next:"@pop"}],[/"/,"string","@stringInsideExpression"],{include:"@terraform"}]}}}});var html_exports={};__export(html_exports,{conf:()=>conf24,language:()=>language25});var __defProp5,__getOwnPropDesc5,__getOwnPropNames5,__hasOwnProp5,__copyProps5,__reExport4,monaco_editor_core_exports4,EMPTY_ELEMENTS3,conf24,language25;var init_html=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/html/html.js"(){init_editor_api();__defProp5=Object.defineProperty;__getOwnPropDesc5=Object.getOwnPropertyDescriptor;__getOwnPropNames5=Object.getOwnPropertyNames;__hasOwnProp5=Object.prototype.hasOwnProperty;__copyProps5=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames5(from))if(!__hasOwnProp5.call(to,key)&&key!==except)__defProp5(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc5(from,key))||desc.enumerable})}return to};__reExport4=(target,mod,secondTarget)=>(__copyProps5(target,mod,"default"),secondTarget&&__copyProps5(secondTarget,mod,"default"));monaco_editor_core_exports4={};__reExport4(monaco_editor_core_exports4,editor_api_exports);EMPTY_ELEMENTS3=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];conf24={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["\x3c!--","--\x3e"]},brackets:[["\x3c!--","--\x3e"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${EMPTY_ELEMENTS3.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:monaco_editor_core_exports4.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${EMPTY_ELEMENTS3.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:monaco_editor_core_exports4.languages.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*\x3c!--\\s*#region\\b.*--\x3e"),end:new RegExp("^\\s*\x3c!--\\s*#endregion\\b.*--\x3e")}}};language25={defaultToken:"",tokenPostfix:".html",ignoreCase:true,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}}});var ini_exports={};__export(ini_exports,{conf:()=>conf25,language:()=>language26});var conf25,language26;var init_ini=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/ini/ini.js"(){conf25={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]};language26={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/^\s*[#;].*$/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}}});var java_exports={};__export(java_exports,{conf:()=>conf26,language:()=>language27});var conf26,language27;var init_java=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/java/java.js"(){conf26={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}};language27={defaultToken:"",tokenPostfix:".java",keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false","yield","record","sealed","non-sealed","permits"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}}}});var typescript_exports={};__export(typescript_exports,{conf:()=>conf27,language:()=>language28});var __defProp6,__getOwnPropDesc6,__getOwnPropNames6,__hasOwnProp6,__copyProps6,__reExport5,monaco_editor_core_exports5,conf27,language28;var init_typescript=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/typescript/typescript.js"(){init_editor_api();__defProp6=Object.defineProperty;__getOwnPropDesc6=Object.getOwnPropertyDescriptor;__getOwnPropNames6=Object.getOwnPropertyNames;__hasOwnProp6=Object.prototype.hasOwnProperty;__copyProps6=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames6(from))if(!__hasOwnProp6.call(to,key)&&key!==except)__defProp6(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc6(from,key))||desc.enumerable})}return to};__reExport5=(target,mod,secondTarget)=>(__copyProps6(target,mod,"default"),secondTarget&&__copyProps6(secondTarget,mod,"default"));monaco_editor_core_exports5={};__reExport5(monaco_editor_core_exports5,editor_api_exports);conf27={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:monaco_editor_core_exports5.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:monaco_editor_core_exports5.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:monaco_editor_core_exports5.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:monaco_editor_core_exports5.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}};language28={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}}}});var javascript_exports={};__export(javascript_exports,{conf:()=>conf28,language:()=>language29});var conf28,language29;var init_javascript=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/javascript/javascript.js"(){init_typescript();conf28=conf27;language29={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:language28.operators,symbols:language28.symbols,escapes:language28.escapes,digits:language28.digits,octaldigits:language28.octaldigits,binarydigits:language28.binarydigits,hexdigits:language28.hexdigits,regexpctl:language28.regexpctl,regexpesc:language28.regexpesc,tokenizer:language28.tokenizer}}});var julia_exports={};__export(julia_exports,{conf:()=>conf29,language:()=>language30});var conf29,language30;var init_julia=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/julia/julia.js"(){conf29={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]};language30={tokenPostfix:".julia",keywords:["begin","while","if","for","try","return","break","continue","function","macro","quote","let","local","global","const","do","struct","module","baremodule","using","import","export","end","else","elseif","catch","finally","mutable","primitive","abstract","type","in","isa","where","new"],types:["LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pipe","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UInt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","AbstractArray","UndefKeywordError","AbstractChannel","UndefRefError","AbstractChar","UndefVarError","AbstractDict","Union","AbstractDisplay","UnionAll","AbstractFloat","UnitRange","AbstractIrrational","Unsigned","AbstractMatrix","AbstractRange","Val","AbstractSet","Vararg","AbstractString","VecElement","AbstractUnitRange","VecOrMat","AbstractVecOrMat","Vector","AbstractVector","VersionNumber","Any","WeakKeyDict","ArgumentError","WeakRef","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex","ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","IOContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError"],keywordops:["<:",">:",":","=>","...",".","->","?"],allops:/[^\w\d\s()\[\]{}"'#]+/,constants:["true","false","nothing","missing","undef","Inf","pi","NaN","π","ℯ","ans","PROGRAM_FILE","ARGS","C_NULL","VERSION","DEPOT_PATH","LOAD_PATH"],operators:["!","!=","!==","%","&","*","+","-","/","//","<","<<","<=","==","===","=>",">",">=",">>",">>>","\\","^","|","|>","~","÷","∈","∉","∋","∌","∘","√","∛","∩","∪","≈","≉","≠","≡","≢","≤","≥","⊆","⊇","⊈","⊉","⊊","⊋","⊻"],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],ident:/π|ℯ|\b(?!\d)\w+\b/,escape:/(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,escapes:/\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,tokenizer:{root:[[/(::)\s*|\b(isa)\s+/,"keyword","@typeanno"],[/\b(isa)(\s*\(@ident\s*,\s*)/,["keyword",{token:"",next:"@typeanno"}]],[/\b(type|struct)[ \t]+/,"keyword","@typeanno"],[/^\s*:@ident[!?]?/,"metatag"],[/(return)(\s*:@ident[!?]?)/,["keyword","metatag"]],[/(\(|\[|\{|@allops)(\s*:@ident[!?]?)/,["","metatag"]],[/:\(/,"metatag","@quote"],[/r"""/,"regexp.delim","@tregexp"],[/r"/,"regexp.delim","@sregexp"],[/raw"""/,"string.delim","@rtstring"],[/[bv]?"""/,"string.delim","@dtstring"],[/raw"/,"string.delim","@rsstring"],[/[bv]?"/,"string.delim","@dsstring"],[/(@ident)\{/,{cases:{"$1@types":{token:"type",next:"@gen"},"@default":{token:"type",next:"@gen"}}}],[/@ident[!?'']?(?=\.?\()/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"keyword.flow"}}],[/@ident[!?']?/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"identifier"}}],[/\$\w+/,"key"],[/\$\(/,"key","@paste"],[/@@@ident/,"annotation"],{include:"@whitespace"},[/'(?:@escapes|.)'/,"string.character"],[/[()\[\]{}]/,"@brackets"],[/@allops/,{cases:{"@keywordops":"keyword","@operators":"operator"}}],[/[;,]/,"delimiter"],[/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/,"number.hex"],[/0[_oO][0-7](_?[0-7])*/,"number.octal"],[/0[bB][01](_?[01])*/,"number.binary"],[/[+\-]?\d+(\.\d+)?(im?|[eE][+\-]?\d+(\.\d+)?)?/,"number"]],typeanno:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@gen"],[/([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(\s*<:\s*)/,["type","keyword"]],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type","@pop"],["","","@pop"]],gen:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@push"],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type"],[/<:/,"keyword"],[/(\})(\s*<:\s*)/,["type",{token:"keyword",next:"@pop"}]],[/\}/,"type","@pop"],{include:"@root"}],quote:[[/\$\(/,"key","@paste"],[/\(/,"@brackets","@paren"],[/\)/,"metatag","@pop"],{include:"@root"}],paste:[[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@paren"],[/\)/,"key","@pop"],{include:"@root"}],paren:[[/\$\(/,"key","@paste"],[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@push"],[/\)/,"@brackets","@pop"],{include:"@root"}],sregexp:[[/^.*/,"invalid"],[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"[imsx]*/,"regexp.delim","@pop"]],tregexp:[[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"(?!"")/,"string"],[/"""[imsx]*/,"regexp.delim","@pop"]],rsstring:[[/^.*/,"invalid"],[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"/,"string.delim","@pop"]],rtstring:[[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],dsstring:[[/^.*/,"invalid"],[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string.delim","@pop"]],dtstring:[[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],interpolated:[[/\(/,{token:"",switchTo:"@interpolated_compound"}],[/[a-zA-Z_]\w*/,"identifier"],["","","@pop"]],interpolated_compound:[[/\)/,"","@pop"],{include:"@root"}],whitespace:[[/[ \t\r\n]+/,""],[/#=/,"comment","@multi_comment"],[/#.*$/,"comment"]],multi_comment:[[/#=/,"comment","@push"],[/=#/,"comment","@pop"],[/=(?!#)|#(?!=)/,"comment"],[/[^#=]+/,"comment"]]}}}});var kotlin_exports={};__export(kotlin_exports,{conf:()=>conf30,language:()=>language31});var conf30,language31;var init_kotlin=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/kotlin/kotlin.js"(){conf30={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}};language31={defaultToken:"",tokenPostfix:".kt",keywords:["as","as?","break","class","continue","do","else","false","for","fun","if","in","!in","interface","is","!is","null","object","package","return","super","this","throw","true","try","typealias","val","var","when","while","by","catch","constructor","delegate","dynamic","field","file","finally","get","import","init","param","property","receiver","set","setparam","where","actual","abstract","annotation","companion","const","crossinline","data","enum","expect","external","final","infix","inline","inner","internal","lateinit","noinline","open","operator","out","override","private","protected","public","reified","sealed","suspend","tailrec","vararg","field","it"],operators:["+","-","*","/","%","=","+=","-=","*=","/=","%=","++","--","&&","||","!","==","!=","===","!==",">","<","<=",">=","[","]","!!","?.","?:","::","..",":","?","->","@",";","$","_"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc","@push"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}}}});var less_exports={};__export(less_exports,{conf:()=>conf31,language:()=>language32});var conf31,language32;var init_less=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/less/less.js"(){conf31={wordPattern:/(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}};language32={defaultToken:"",tokenPostfix:".less",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",identifierPlus:"-?-?([a-zA-Z:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@nestedJSBegin"},["[ \\t\\r\\n]+",""],{include:"@comments"},{include:"@keyword"},{include:"@strings"},{include:"@numbers"},["[*_]?[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))","attribute.name","@attribute"],["url(\\-prefix)?\\(",{token:"tag",next:"@urldeclaration"}],["[{}()\\[\\]]","@brackets"],["[,:;]","delimiter"],["#@identifierPlus","tag.id"],["&","tag"],["\\.@identifierPlus(?=\\()","tag.class","@attribute"],["\\.@identifierPlus","tag.class"],["@identifierPlus","tag"],{include:"@operators"},["@(@identifier(?=[:,\\)]))","variable","@attribute"],["@(@identifier)","variable"],["@","key","@atRules"]],nestedJSBegin:[["``","delimiter.backtick"],["`",{token:"delimiter.backtick",next:"@nestedJSEnd",nextEmbedded:"text/javascript"}]],nestedJSEnd:[["`",{token:"delimiter.backtick",next:"@pop",nextEmbedded:"@pop"}]],operators:[["[<>=\\+\\-\\*\\/\\^\\|\\~]","operator"]],keyword:[["(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b","keyword"]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"tag",next:"@pop"}]],attribute:[{include:"@nestedJSBegin"},{include:"@comments"},{include:"@strings"},{include:"@numbers"},{include:"@keyword"},["[a-zA-Z\\-]+(?=\\()","attribute.value","@attribute"],[">","operator","@pop"],["@identifier","attribute.value"],{include:"@operators"},["@(@identifier)","variable"],["[)\\}]","@brackets","@pop"],["[{}()\\[\\]>]","@brackets"],["[;]","delimiter","@pop"],["[,=:]","delimiter"],["\\s",""],[".","attribute.value"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],strings:[['~?"',{token:"string.delimiter",next:"@stringsEndDoubleQuote"}],["~?'",{token:"string.delimiter",next:"@stringsEndQuote"}]],stringsEndDoubleQuote:[['\\\\"',"string"],['"',{token:"string.delimiter",next:"@popall"}],[".","string"]],stringsEndQuote:[["\\\\'","string"],["'",{token:"string.delimiter",next:"@popall"}],[".","string"]],atRules:[{include:"@comments"},{include:"@strings"},["[()]","delimiter"],["[\\{;]","delimiter","@pop"],[".","key"]]}}}});var lexon_exports={};__export(lexon_exports,{conf:()=>conf32,language:()=>language33});var conf32,language33;var init_lexon=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/lexon/lexon.js"(){conf32={comments:{lineComment:"COMMENT"},brackets:[["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:":",close:"."}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"},{open:":",close:"."}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#region"),end:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#endregion")}}};language33={tokenPostfix:".lexon",ignoreCase:true,keywords:["lexon","lex","clause","terms","contracts","may","pay","pays","appoints","into","to"],typeKeywords:["amount","person","key","time","date","asset","text"],operators:["less","greater","equal","le","gt","or","and","add","added","subtract","subtracted","multiply","multiplied","times","divide","divided","is","be","certified"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\.\d*\.\d*/,"number.semver"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"]],quoted_identifier:[[/[^\\"]+/,"identifier"],[/"/,{token:"identifier.quote",bracket:"@close",next:"@pop"}]],space_identifier_until_period:[[":","delimiter"],[" ",{token:"white",next:"@identifier_rest"}]],identifier_until_period:[{include:"@whitespace"},[":",{token:"delimiter",next:"@identifier_rest"}],[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],identifier_rest:[[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],semver:[{include:"@whitespace"},[":","delimiter"],[/\d*\.\d*\.\d*/,{token:"number.semver",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"]]}}}});var lua_exports={};__export(lua_exports,{conf:()=>conf33,language:()=>language34});var conf33,language34;var init_lua=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/lua/lua.js"(){conf33={comments:{lineComment:"--",blockComment:["--[[","]]"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]};language34={defaultToken:"",tokenPostfix:".lua",keywords:["and","break","do","else","elseif","end","false","for","function","goto","if","in","local","nil","not","or","repeat","return","then","true","until","while"],brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],operators:["+","-","*","/","%","^","#","==","~=","<=",">=","<",">","=",";",":",",",".","..","..."],symbols:/[=>conf34,language:()=>language35});var __defProp7,__getOwnPropDesc7,__getOwnPropNames7,__hasOwnProp7,__copyProps7,__reExport6,monaco_editor_core_exports6,EMPTY_ELEMENTS4,conf34,language35;var init_liquid=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/liquid/liquid.js"(){init_editor_api();__defProp7=Object.defineProperty;__getOwnPropDesc7=Object.getOwnPropertyDescriptor;__getOwnPropNames7=Object.getOwnPropertyNames;__hasOwnProp7=Object.prototype.hasOwnProperty;__copyProps7=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames7(from))if(!__hasOwnProp7.call(to,key)&&key!==except)__defProp7(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc7(from,key))||desc.enumerable})}return to};__reExport6=(target,mod,secondTarget)=>(__copyProps7(target,mod,"default"),secondTarget&&__copyProps7(secondTarget,mod,"default"));monaco_editor_core_exports6={};__reExport6(monaco_editor_core_exports6,editor_api_exports);EMPTY_ELEMENTS4=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];conf34={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[["\x3c!--","--\x3e"],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${EMPTY_ELEMENTS4.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:monaco_editor_core_exports6.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${EMPTY_ELEMENTS4.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:monaco_editor_core_exports6.languages.IndentAction.Indent}}]};language35={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[//,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}}}});var m3_exports={};__export(m3_exports,{conf:()=>conf35,language:()=>language36});var conf35,language36;var init_m3=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/m3/m3.js"(){conf35={comments:{blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"(*",close:"*)"},{open:"<*",close:"*>"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}]};language36={defaultToken:"",tokenPostfix:".m3",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["AND","ANY","ARRAY","AS","BEGIN","BITS","BRANDED","BY","CASE","CONST","DIV","DO","ELSE","ELSIF","END","EVAL","EXCEPT","EXCEPTION","EXIT","EXPORTS","FINALLY","FOR","FROM","GENERIC","IF","IMPORT","IN","INTERFACE","LOCK","LOOP","METHODS","MOD","MODULE","NOT","OBJECT","OF","OR","OVERRIDES","PROCEDURE","RAISE","RAISES","READONLY","RECORD","REF","REPEAT","RETURN","REVEAL","SET","THEN","TO","TRY","TYPE","TYPECASE","UNSAFE","UNTIL","UNTRACED","VALUE","VAR","WHILE","WITH"],reservedConstNames:["ABS","ADR","ADRSIZE","BITSIZE","BYTESIZE","CEILING","DEC","DISPOSE","FALSE","FIRST","FLOAT","FLOOR","INC","ISTYPE","LAST","LOOPHOLE","MAX","MIN","NARROW","NEW","NIL","NUMBER","ORD","ROUND","SUBARRAY","TRUE","TRUNC","TYPECODE","VAL"],reservedTypeNames:["ADDRESS","ANY","BOOLEAN","CARDINAL","CHAR","EXTENDED","INTEGER","LONGCARD","LONGINT","LONGREAL","MUTEX","NULL","REAL","REFANY","ROOT","TEXT"],operators:["+","-","*","/","&","^","."],relations:["=","#","<","<=",">",">=","<:",":"],delimiters:["|","..","=>",",",";",":="],symbols:/[>=<#.,:;+\-*/&^]+/,escapes:/\\(?:[\\fnrt"']|[0-7]{3})/,tokenizer:{root:[[/_\w*/,"invalid"],[/[a-zA-Z][a-zA-Z0-9_]*/,{cases:{"@keywords":{token:"keyword.$0"},"@reservedConstNames":{token:"constant.reserved.$0"},"@reservedTypeNames":{token:"type.reserved.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[0-9]+\.[0-9]+(?:[DdEeXx][\+\-]?[0-9]+)?/,"number.float"],[/[0-9]+(?:\_[0-9a-fA-F]+)?L?/,"number"],[/@symbols/,{cases:{"@operators":"operators","@relations":"operators","@delimiters":"delimiter","@default":"invalid"}}],[/'[^\\']'/,"string.char"],[/(')(@escapes)(')/,["string.char","string.escape","string.char"]],[/'/,"invalid"],[/"([^"\\]|\\.)*$/,"invalid"],[/"/,"string.text","@text"]],text:[[/[^\\"]+/,"string.text"],[/@escapes/,"string.escape"],[/\\./,"invalid"],[/"/,"string.text","@pop"]],comment:[[/\(\*/,"comment","@push"],[/\*\)/,"comment","@pop"],[/./,"comment"]],pragma:[[/<\*/,"keyword.pragma","@push"],[/\*>/,"keyword.pragma","@pop"],[/./,"keyword.pragma"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/<\*/,"keyword.pragma","@pragma"]]}}}});var markdown_exports={};__export(markdown_exports,{conf:()=>conf36,language:()=>language37});var conf36,language37;var init_markdown=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/markdown/markdown.js"(){conf36={comments:{blockComment:["\x3c!--","--\x3e"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*\x3c!--\\s*#?region\\b.*--\x3e"),end:new RegExp("^\\s*\x3c!--\\s*#?endregion\\b.*--\x3e")}}};language37={defaultToken:"",tokenPostfix:".md",control:/[\\`*_\[\]{}()#+\-\.!]/,noncontrol:/[^\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,jsescapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],tokenizer:{root:[[/^\s*\|/,"@rematch","@table_header"],[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/,["white","keyword","keyword","keyword"]],[/^\s*(=+|\-+)\s*$/,"keyword"],[/^\s*((\*[ ]?)+)\s*$/,"meta.separator"],[/^\s*>+/,"comment"],[/^\s*([\*\-+:]|\d+\.)\s/,"keyword"],[/^(\t|[ ]{4})[^ ].*$/,"string"],[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/,{token:"string",next:"@codeblock"}],[/^\s*```\s*((?:\w|[\/\-#])+).*$/,{token:"string",next:"@codeblockgh",nextEmbedded:"$1"}],[/^\s*```\s*$/,{token:"string",next:"@codeblock"}],{include:"@linecontent"}],table_header:[{include:"@table_common"},[/[^\|]+/,"keyword.table.header"]],table_body:[{include:"@table_common"},{include:"@linecontent"}],table_common:[[/\s*[\-:]+\s*/,{token:"keyword",switchTo:"table_body"}],[/^\s*\|/,"keyword.table.left"],[/^\s*[^\|]/,"@rematch","@pop"],[/^\s*$/,"@rematch","@pop"],[/\|/,{cases:{"@eos":"keyword.table.right","@default":"keyword.table.middle"}}]],codeblock:[[/^\s*~~~\s*$/,{token:"string",next:"@pop"}],[/^\s*```\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblockgh:[[/```\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,"variable.source"]],linecontent:[[/&\w+;/,"string.escape"],[/@escapes/,"escape"],[/\b__([^\\_]|@escapes|_(?!_))+__\b/,"strong"],[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/,"strong"],[/\b_[^_]+_\b/,"emphasis"],[/\*([^\\*]|@escapes)+\*/,"emphasis"],[/`([^\\`]|@escapes)+`/,"variable"],[/\{+[^}]+\}+/,"string.target"],[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/,["string.link","","string.link"]],[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/,"string.link"],{include:"html"}],html:[[/<(\w+)\/>/,"tag"],[/<(\w+)(\-|\w)*/,{cases:{"@empty":{token:"tag",next:"@tag.$1"},"@default":{token:"tag",next:"@tag.$1"}}}],[/<\/(\w+)(\-|\w)*\s*>/,{token:"tag"}],[//,"comment","@pop"],[//,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],phpInSimpleState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3"}],{include:"phpRoot"}],phpInEmbeddedState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"phpRoot"}],phpRoot:[[/[a-zA-Z_]\w*/,{cases:{"@phpKeywords":{token:"keyword.php"},"@phpCompileTimeConstants":{token:"constant.php"},"@default":"identifier.php"}}],[/[$a-zA-Z_]\w*/,{cases:{"@phpPreDefinedVariables":{token:"variable.predefined.php"},"@default":"variable.php"}}],[/[{}]/,"delimiter.bracket.php"],[/[\[\]]/,"delimiter.array.php"],[/[()]/,"delimiter.parenthesis.php"],[/[ \t\r\n]+/],[/(#|\/\/)$/,"comment.php"],[/(#|\/\/)/,"comment.php","@phpLineComment"],[/\/\*/,"comment.php","@phpComment"],[/"/,"string.php","@phpDoubleQuoteString"],[/'/,"string.php","@phpSingleQuoteString"],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/,"delimiter.php"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.php"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.php"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.php"],[/0[0-7']*[0-7]/,"number.octal.php"],[/0[bB][0-1']*[0-1]/,"number.binary.php"],[/\d[\d']*/,"number.php"],[/\d/,"number.php"]],phpComment:[[/\*\//,"comment.php","@pop"],[/[^*]+/,"comment.php"],[/./,"comment.php"]],phpLineComment:[[/\?>/,{token:"@rematch",next:"@pop"}],[/.$/,"comment.php","@pop"],[/[^?]+$/,"comment.php","@pop"],[/[^?]+/,"comment.php"],[/./,"comment.php"]],phpDoubleQuoteString:[[/[^\\"]+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/"/,"string.php","@pop"]],phpSingleQuoteString:[[/[^\\']+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/'/,"string.php","@pop"]]},phpKeywords:["abstract","and","array","as","break","callable","case","catch","cfunction","class","clone","const","continue","declare","default","do","else","elseif","enddeclare","endfor","endforeach","endif","endswitch","endwhile","extends","false","final","for","foreach","function","global","goto","if","implements","interface","instanceof","insteadof","namespace","new","null","object","old_function","or","private","protected","public","resource","static","switch","throw","trait","try","true","use","var","while","xor","die","echo","empty","exit","eval","include","include_once","isset","list","require","require_once","return","print","unset","yield","__construct"],phpCompileTimeConstants:["__CLASS__","__DIR__","__FILE__","__LINE__","__NAMESPACE__","__METHOD__","__FUNCTION__","__TRAIT__"],phpPreDefinedVariables:["$GLOBALS","$_SERVER","$_GET","$_POST","$_FILES","$_REQUEST","$_SESSION","$_ENV","$_COOKIE","$php_errormsg","$HTTP_RAW_POST_DATA","$http_response_header","$argc","$argv"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/}}});var pla_exports={};__export(pla_exports,{conf:()=>conf47,language:()=>language48});var conf47,language48;var init_pla=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/pla/pla.js"(){conf47={comments:{lineComment:"#"},brackets:[["[","]"],["<",">"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}]};language48={defaultToken:"",tokenPostfix:".pla",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"<",close:">",token:"delimiter.angle"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:[".i",".o",".mv",".ilb",".ob",".label",".type",".phase",".pair",".symbolic",".symbolic-output",".kiss",".p",".e",".end"],comment:/#.*$/,identifier:/[a-zA-Z]+[a-zA-Z0-9_\-]*/,plaContent:/[01\-~\|]+/,tokenizer:{root:[{include:"@whitespace"},[/@comment/,"comment"],[/\.([a-zA-Z_\-]+)/,{cases:{"@eos":{token:"keyword.$1"},"@keywords":{cases:{".type":{token:"keyword.$1",next:"@type"},"@default":{token:"keyword.$1",next:"@keywordArg"}}},"@default":{token:"keyword.$1"}}}],[/@identifier/,"identifier"],[/@plaContent/,"string"]],whitespace:[[/[ \t\r\n]+/,""]],type:[{include:"@whitespace"},[/\w+/,{token:"type",next:"@pop"}]],keywordArg:[[/[ \t\r\n]+/,{cases:{"@eos":{token:"",next:"@pop"},"@default":""}}],[/@comment/,"comment","@pop"],[/[<>()\[\]]/,{cases:{"@eos":{token:"@brackets",next:"@pop"},"@default":"@brackets"}}],[/\-?\d+/,{cases:{"@eos":{token:"number",next:"@pop"},"@default":"number"}}],[/@identifier/,{cases:{"@eos":{token:"identifier",next:"@pop"},"@default":"identifier"}}],[/[;=]/,{cases:{"@eos":{token:"delimiter",next:"@pop"},"@default":"delimiter"}}]]}}}});var postiats_exports={};__export(postiats_exports,{conf:()=>conf48,language:()=>language49});var conf48,language49;var init_postiats=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/postiats/postiats.js"(){conf48={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]};language49={tokenPostfix:".pats",defaultToken:"invalid",keywords:["abstype","abst0ype","absprop","absview","absvtype","absviewtype","absvt0ype","absviewt0ype","as","and","assume","begin","classdec","datasort","datatype","dataprop","dataview","datavtype","dataviewtype","do","end","extern","extype","extvar","exception","fn","fnx","fun","prfn","prfun","praxi","castfn","if","then","else","ifcase","in","infix","infixl","infixr","prefix","postfix","implmnt","implement","primplmnt","primplement","import","let","local","macdef","macrodef","nonfix","symelim","symintr","overload","of","op","rec","sif","scase","sortdef","sta","stacst","stadef","static","staload","dynload","try","tkindef","typedef","propdef","viewdef","vtypedef","viewtypedef","prval","var","prvar","when","where","with","withtype","withprop","withview","withvtype","withviewtype"],keywords_dlr:["$delay","$ldelay","$arrpsz","$arrptrsize","$d2ctype","$effmask","$effmask_ntm","$effmask_exn","$effmask_ref","$effmask_wrt","$effmask_all","$extern","$extkind","$extype","$extype_struct","$extval","$extfcall","$extmcall","$literal","$myfilename","$mylocation","$myfunction","$lst","$lst_t","$lst_vt","$list","$list_t","$list_vt","$rec","$rec_t","$rec_vt","$record","$record_t","$record_vt","$tup","$tup_t","$tup_vt","$tuple","$tuple_t","$tuple_vt","$break","$continue","$raise","$showtype","$vcopyenv_v","$vcopyenv_vt","$tempenver","$solver_assert","$solver_verify"],keywords_srp:["#if","#ifdef","#ifndef","#then","#elif","#elifdef","#elifndef","#else","#endif","#error","#prerr","#print","#assert","#undef","#define","#include","#require","#pragma","#codegen2","#codegen3"],irregular_keyword_list:["val+","val-","val","case+","case-","case","addr@","addr","fold@","free@","fix@","fix","lam@","lam","llam@","llam","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","view+","view-","view@","view","type+","type-","type","vtype+","vtype-","vtype","vt@ype+","vt@ype-","vt@ype","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","prop+","prop-","prop","type+","type-","type","t@ype","t@ype+","t@ype-","abst@ype","abstype","absviewt@ype","absvt@ype","for*","for","while*","while"],keywords_types:["bool","double","byte","int","short","char","void","unit","long","float","string","strptr"],keywords_effects:["0","fun","clo","prf","funclo","cloptr","cloref","ref","ntm","1"],operators:["@","!","|","`",":","$",".","=","#","~","..","...","=>","=<>","=/=>","=>>","=/=>>","<",">","><",".<",">.",".<>.","->","-<>"],brackets:[{open:",(",close:")",token:"delimiter.parenthesis"},{open:"`(",close:")",token:"delimiter.parenthesis"},{open:"%(",close:")",token:"delimiter.parenthesis"},{open:"'(",close:")",token:"delimiter.parenthesis"},{open:"'{",close:"}",token:"delimiter.parenthesis"},{open:"@(",close:")",token:"delimiter.parenthesis"},{open:"@{",close:"}",token:"delimiter.brace"},{open:"@[",close:"]",token:"delimiter.square"},{open:"#[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=>]/,digit:/[0-9]/,digitseq0:/@digit*/,xdigit:/[0-9A-Za-z]/,xdigitseq0:/@xdigit*/,INTSP:/[lLuU]/,FLOATSP:/[fFlL]/,fexponent:/[eE][+-]?[0-9]+/,fexponent_bin:/[pP][+-]?[0-9]+/,deciexp:/\.[0-9]*@fexponent?/,hexiexp:/\.[0-9a-zA-Z]*@fexponent_bin?/,irregular_keywords:/val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/,ESCHAR:/[ntvbrfa\\\?'"\(\[\{]/,start:"root",tokenizer:{root:[{regex:/[ \t\r\n]+/,action:{token:""}},{regex:/\(\*\)/,action:{token:"invalid"}},{regex:/\(\*/,action:{token:"comment",next:"lexing_COMMENT_block_ml"}},{regex:/\(/,action:"@brackets"},{regex:/\)/,action:"@brackets"},{regex:/\[/,action:"@brackets"},{regex:/\]/,action:"@brackets"},{regex:/\{/,action:"@brackets"},{regex:/\}/,action:"@brackets"},{regex:/,\(/,action:"@brackets"},{regex:/,/,action:{token:"delimiter.comma"}},{regex:/;/,action:{token:"delimiter.semicolon"}},{regex:/@\(/,action:"@brackets"},{regex:/@\[/,action:"@brackets"},{regex:/@\{/,action:"@brackets"},{regex:/:/,action:{token:"@rematch",next:"@pop"}}],lexing_EXTCODE:[{regex:/^%}/,action:{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}},{regex:/[^%]+/,action:""}],lexing_DQUOTE:[{regex:/"/,action:{token:"string.quote",next:"@pop"}},{regex:/(\{\$)(@IDENTFST@IDENTRST*)(\})/,action:[{token:"string.escape"},{token:"identifier"},{token:"string.escape"}]},{regex:/\\$/,action:{token:"string.escape"}},{regex:/\\(@ESCHAR|[xX]@xdigit+|@digit+)/,action:{token:"string.escape"}},{regex:/[^\\"]+/,action:{token:"string"}}]}}}});var powerquery_exports={};__export(powerquery_exports,{conf:()=>conf49,language:()=>language50});var conf49,language50;var init_powerquery=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/powerquery/powerquery.js"(){conf49={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment","identifier"]},{open:"[",close:"]",notIn:["string","comment","identifier"]},{open:"(",close:")",notIn:["string","comment","identifier"]},{open:"{",close:"}",notIn:["string","comment","identifier"]}]};language50={defaultToken:"",tokenPostfix:".pq",ignoreCase:false,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.brackets"},{open:"(",close:")",token:"delimiter.parenthesis"}],operatorKeywords:["and","not","or"],keywords:["as","each","else","error","false","if","in","is","let","meta","otherwise","section","shared","then","true","try","type"],constructors:["#binary","#date","#datetime","#datetimezone","#duration","#table","#time"],constants:["#infinity","#nan","#sections","#shared"],typeKeywords:["action","any","anynonnull","none","null","logical","number","time","date","datetime","datetimezone","duration","text","binary","list","record","table","function"],builtinFunctions:["Access.Database","Action.Return","Action.Sequence","Action.Try","ActiveDirectory.Domains","AdoDotNet.DataSource","AdoDotNet.Query","AdobeAnalytics.Cubes","AnalysisServices.Database","AnalysisServices.Databases","AzureStorage.BlobContents","AzureStorage.Blobs","AzureStorage.Tables","Binary.Buffer","Binary.Combine","Binary.Compress","Binary.Decompress","Binary.End","Binary.From","Binary.FromList","Binary.FromText","Binary.InferContentType","Binary.Length","Binary.ToList","Binary.ToText","BinaryFormat.7BitEncodedSignedInteger","BinaryFormat.7BitEncodedUnsignedInteger","BinaryFormat.Binary","BinaryFormat.Byte","BinaryFormat.ByteOrder","BinaryFormat.Choice","BinaryFormat.Decimal","BinaryFormat.Double","BinaryFormat.Group","BinaryFormat.Length","BinaryFormat.List","BinaryFormat.Null","BinaryFormat.Record","BinaryFormat.SignedInteger16","BinaryFormat.SignedInteger32","BinaryFormat.SignedInteger64","BinaryFormat.Single","BinaryFormat.Text","BinaryFormat.Transform","BinaryFormat.UnsignedInteger16","BinaryFormat.UnsignedInteger32","BinaryFormat.UnsignedInteger64","Byte.From","Character.FromNumber","Character.ToNumber","Combiner.CombineTextByDelimiter","Combiner.CombineTextByEachDelimiter","Combiner.CombineTextByLengths","Combiner.CombineTextByPositions","Combiner.CombineTextByRanges","Comparer.Equals","Comparer.FromCulture","Comparer.Ordinal","Comparer.OrdinalIgnoreCase","Csv.Document","Cube.AddAndExpandDimensionColumn","Cube.AddMeasureColumn","Cube.ApplyParameter","Cube.AttributeMemberId","Cube.AttributeMemberProperty","Cube.CollapseAndRemoveColumns","Cube.Dimensions","Cube.DisplayFolders","Cube.Measures","Cube.Parameters","Cube.Properties","Cube.PropertyKey","Cube.ReplaceDimensions","Cube.Transform","Currency.From","DB2.Database","Date.AddDays","Date.AddMonths","Date.AddQuarters","Date.AddWeeks","Date.AddYears","Date.Day","Date.DayOfWeek","Date.DayOfWeekName","Date.DayOfYear","Date.DaysInMonth","Date.EndOfDay","Date.EndOfMonth","Date.EndOfQuarter","Date.EndOfWeek","Date.EndOfYear","Date.From","Date.FromText","Date.IsInCurrentDay","Date.IsInCurrentMonth","Date.IsInCurrentQuarter","Date.IsInCurrentWeek","Date.IsInCurrentYear","Date.IsInNextDay","Date.IsInNextMonth","Date.IsInNextNDays","Date.IsInNextNMonths","Date.IsInNextNQuarters","Date.IsInNextNWeeks","Date.IsInNextNYears","Date.IsInNextQuarter","Date.IsInNextWeek","Date.IsInNextYear","Date.IsInPreviousDay","Date.IsInPreviousMonth","Date.IsInPreviousNDays","Date.IsInPreviousNMonths","Date.IsInPreviousNQuarters","Date.IsInPreviousNWeeks","Date.IsInPreviousNYears","Date.IsInPreviousQuarter","Date.IsInPreviousWeek","Date.IsInPreviousYear","Date.IsInYearToDate","Date.IsLeapYear","Date.Month","Date.MonthName","Date.QuarterOfYear","Date.StartOfDay","Date.StartOfMonth","Date.StartOfQuarter","Date.StartOfWeek","Date.StartOfYear","Date.ToRecord","Date.ToText","Date.WeekOfMonth","Date.WeekOfYear","Date.Year","DateTime.AddZone","DateTime.Date","DateTime.FixedLocalNow","DateTime.From","DateTime.FromFileTime","DateTime.FromText","DateTime.IsInCurrentHour","DateTime.IsInCurrentMinute","DateTime.IsInCurrentSecond","DateTime.IsInNextHour","DateTime.IsInNextMinute","DateTime.IsInNextNHours","DateTime.IsInNextNMinutes","DateTime.IsInNextNSeconds","DateTime.IsInNextSecond","DateTime.IsInPreviousHour","DateTime.IsInPreviousMinute","DateTime.IsInPreviousNHours","DateTime.IsInPreviousNMinutes","DateTime.IsInPreviousNSeconds","DateTime.IsInPreviousSecond","DateTime.LocalNow","DateTime.Time","DateTime.ToRecord","DateTime.ToText","DateTimeZone.FixedLocalNow","DateTimeZone.FixedUtcNow","DateTimeZone.From","DateTimeZone.FromFileTime","DateTimeZone.FromText","DateTimeZone.LocalNow","DateTimeZone.RemoveZone","DateTimeZone.SwitchZone","DateTimeZone.ToLocal","DateTimeZone.ToRecord","DateTimeZone.ToText","DateTimeZone.ToUtc","DateTimeZone.UtcNow","DateTimeZone.ZoneHours","DateTimeZone.ZoneMinutes","Decimal.From","Diagnostics.ActivityId","Diagnostics.Trace","DirectQueryCapabilities.From","Double.From","Duration.Days","Duration.From","Duration.FromText","Duration.Hours","Duration.Minutes","Duration.Seconds","Duration.ToRecord","Duration.ToText","Duration.TotalDays","Duration.TotalHours","Duration.TotalMinutes","Duration.TotalSeconds","Embedded.Value","Error.Record","Excel.CurrentWorkbook","Excel.Workbook","Exchange.Contents","Expression.Constant","Expression.Evaluate","Expression.Identifier","Facebook.Graph","File.Contents","Folder.Contents","Folder.Files","Function.From","Function.Invoke","Function.InvokeAfter","Function.IsDataSource","GoogleAnalytics.Accounts","Guid.From","HdInsight.Containers","HdInsight.Contents","HdInsight.Files","Hdfs.Contents","Hdfs.Files","Informix.Database","Int16.From","Int32.From","Int64.From","Int8.From","ItemExpression.From","Json.Document","Json.FromValue","Lines.FromBinary","Lines.FromText","Lines.ToBinary","Lines.ToText","List.Accumulate","List.AllTrue","List.Alternate","List.AnyTrue","List.Average","List.Buffer","List.Combine","List.Contains","List.ContainsAll","List.ContainsAny","List.Count","List.Covariance","List.DateTimeZones","List.DateTimes","List.Dates","List.Difference","List.Distinct","List.Durations","List.FindText","List.First","List.FirstN","List.Generate","List.InsertRange","List.Intersect","List.IsDistinct","List.IsEmpty","List.Last","List.LastN","List.MatchesAll","List.MatchesAny","List.Max","List.MaxN","List.Median","List.Min","List.MinN","List.Mode","List.Modes","List.NonNullCount","List.Numbers","List.PositionOf","List.PositionOfAny","List.Positions","List.Product","List.Random","List.Range","List.RemoveFirstN","List.RemoveItems","List.RemoveLastN","List.RemoveMatchingItems","List.RemoveNulls","List.RemoveRange","List.Repeat","List.ReplaceMatchingItems","List.ReplaceRange","List.ReplaceValue","List.Reverse","List.Select","List.Single","List.SingleOrDefault","List.Skip","List.Sort","List.StandardDeviation","List.Sum","List.Times","List.Transform","List.TransformMany","List.Union","List.Zip","Logical.From","Logical.FromText","Logical.ToText","MQ.Queue","MySQL.Database","Number.Abs","Number.Acos","Number.Asin","Number.Atan","Number.Atan2","Number.BitwiseAnd","Number.BitwiseNot","Number.BitwiseOr","Number.BitwiseShiftLeft","Number.BitwiseShiftRight","Number.BitwiseXor","Number.Combinations","Number.Cos","Number.Cosh","Number.Exp","Number.Factorial","Number.From","Number.FromText","Number.IntegerDivide","Number.IsEven","Number.IsNaN","Number.IsOdd","Number.Ln","Number.Log","Number.Log10","Number.Mod","Number.Permutations","Number.Power","Number.Random","Number.RandomBetween","Number.Round","Number.RoundAwayFromZero","Number.RoundDown","Number.RoundTowardZero","Number.RoundUp","Number.Sign","Number.Sin","Number.Sinh","Number.Sqrt","Number.Tan","Number.Tanh","Number.ToText","OData.Feed","Odbc.DataSource","Odbc.Query","OleDb.DataSource","OleDb.Query","Oracle.Database","Percentage.From","PostgreSQL.Database","RData.FromBinary","Record.AddField","Record.Combine","Record.Field","Record.FieldCount","Record.FieldNames","Record.FieldOrDefault","Record.FieldValues","Record.FromList","Record.FromTable","Record.HasFields","Record.RemoveFields","Record.RenameFields","Record.ReorderFields","Record.SelectFields","Record.ToList","Record.ToTable","Record.TransformFields","Replacer.ReplaceText","Replacer.ReplaceValue","RowExpression.Column","RowExpression.From","Salesforce.Data","Salesforce.Reports","SapBusinessWarehouse.Cubes","SapHana.Database","SharePoint.Contents","SharePoint.Files","SharePoint.Tables","Single.From","Soda.Feed","Splitter.SplitByNothing","Splitter.SplitTextByAnyDelimiter","Splitter.SplitTextByDelimiter","Splitter.SplitTextByEachDelimiter","Splitter.SplitTextByLengths","Splitter.SplitTextByPositions","Splitter.SplitTextByRanges","Splitter.SplitTextByRepeatedLengths","Splitter.SplitTextByWhitespace","Sql.Database","Sql.Databases","SqlExpression.SchemaFrom","SqlExpression.ToExpression","Sybase.Database","Table.AddColumn","Table.AddIndexColumn","Table.AddJoinColumn","Table.AddKey","Table.AggregateTableColumn","Table.AlternateRows","Table.Buffer","Table.Column","Table.ColumnCount","Table.ColumnNames","Table.ColumnsOfType","Table.Combine","Table.CombineColumns","Table.Contains","Table.ContainsAll","Table.ContainsAny","Table.DemoteHeaders","Table.Distinct","Table.DuplicateColumn","Table.ExpandListColumn","Table.ExpandRecordColumn","Table.ExpandTableColumn","Table.FillDown","Table.FillUp","Table.FilterWithDataTable","Table.FindText","Table.First","Table.FirstN","Table.FirstValue","Table.FromColumns","Table.FromList","Table.FromPartitions","Table.FromRecords","Table.FromRows","Table.FromValue","Table.Group","Table.HasColumns","Table.InsertRows","Table.IsDistinct","Table.IsEmpty","Table.Join","Table.Keys","Table.Last","Table.LastN","Table.MatchesAllRows","Table.MatchesAnyRows","Table.Max","Table.MaxN","Table.Min","Table.MinN","Table.NestedJoin","Table.Partition","Table.PartitionValues","Table.Pivot","Table.PositionOf","Table.PositionOfAny","Table.PrefixColumns","Table.Profile","Table.PromoteHeaders","Table.Range","Table.RemoveColumns","Table.RemoveFirstN","Table.RemoveLastN","Table.RemoveMatchingRows","Table.RemoveRows","Table.RemoveRowsWithErrors","Table.RenameColumns","Table.ReorderColumns","Table.Repeat","Table.ReplaceErrorValues","Table.ReplaceKeys","Table.ReplaceMatchingRows","Table.ReplaceRelationshipIdentity","Table.ReplaceRows","Table.ReplaceValue","Table.ReverseRows","Table.RowCount","Table.Schema","Table.SelectColumns","Table.SelectRows","Table.SelectRowsWithErrors","Table.SingleRow","Table.Skip","Table.Sort","Table.SplitColumn","Table.ToColumns","Table.ToList","Table.ToRecords","Table.ToRows","Table.TransformColumnNames","Table.TransformColumnTypes","Table.TransformColumns","Table.TransformRows","Table.Transpose","Table.Unpivot","Table.UnpivotOtherColumns","Table.View","Table.ViewFunction","TableAction.DeleteRows","TableAction.InsertRows","TableAction.UpdateRows","Tables.GetRelationships","Teradata.Database","Text.AfterDelimiter","Text.At","Text.BeforeDelimiter","Text.BetweenDelimiters","Text.Clean","Text.Combine","Text.Contains","Text.End","Text.EndsWith","Text.Format","Text.From","Text.FromBinary","Text.Insert","Text.Length","Text.Lower","Text.Middle","Text.NewGuid","Text.PadEnd","Text.PadStart","Text.PositionOf","Text.PositionOfAny","Text.Proper","Text.Range","Text.Remove","Text.RemoveRange","Text.Repeat","Text.Replace","Text.ReplaceRange","Text.Select","Text.Split","Text.SplitAny","Text.Start","Text.StartsWith","Text.ToBinary","Text.ToList","Text.Trim","Text.TrimEnd","Text.TrimStart","Text.Upper","Time.EndOfHour","Time.From","Time.FromText","Time.Hour","Time.Minute","Time.Second","Time.StartOfHour","Time.ToRecord","Time.ToText","Type.AddTableKey","Type.ClosedRecord","Type.Facets","Type.ForFunction","Type.ForRecord","Type.FunctionParameters","Type.FunctionRequiredParameters","Type.FunctionReturn","Type.Is","Type.IsNullable","Type.IsOpenRecord","Type.ListItem","Type.NonNullable","Type.OpenRecord","Type.RecordFields","Type.ReplaceFacets","Type.ReplaceTableKeys","Type.TableColumn","Type.TableKeys","Type.TableRow","Type.TableSchema","Type.Union","Uri.BuildQueryString","Uri.Combine","Uri.EscapeDataString","Uri.Parts","Value.Add","Value.As","Value.Compare","Value.Divide","Value.Equals","Value.Firewall","Value.FromText","Value.Is","Value.Metadata","Value.Multiply","Value.NativeQuery","Value.NullableEquals","Value.RemoveMetadata","Value.ReplaceMetadata","Value.ReplaceType","Value.Subtract","Value.Type","ValueAction.NativeStatement","ValueAction.Replace","Variable.Value","Web.Contents","Web.Page","WebAction.Request","Xml.Document","Xml.Tables"],builtinConstants:["BinaryEncoding.Base64","BinaryEncoding.Hex","BinaryOccurrence.Optional","BinaryOccurrence.Repeating","BinaryOccurrence.Required","ByteOrder.BigEndian","ByteOrder.LittleEndian","Compression.Deflate","Compression.GZip","CsvStyle.QuoteAfterDelimiter","CsvStyle.QuoteAlways","Culture.Current","Day.Friday","Day.Monday","Day.Saturday","Day.Sunday","Day.Thursday","Day.Tuesday","Day.Wednesday","ExtraValues.Error","ExtraValues.Ignore","ExtraValues.List","GroupKind.Global","GroupKind.Local","JoinAlgorithm.Dynamic","JoinAlgorithm.LeftHash","JoinAlgorithm.LeftIndex","JoinAlgorithm.PairwiseHash","JoinAlgorithm.RightHash","JoinAlgorithm.RightIndex","JoinAlgorithm.SortMerge","JoinKind.FullOuter","JoinKind.Inner","JoinKind.LeftAnti","JoinKind.LeftOuter","JoinKind.RightAnti","JoinKind.RightOuter","JoinSide.Left","JoinSide.Right","MissingField.Error","MissingField.Ignore","MissingField.UseNull","Number.E","Number.Epsilon","Number.NaN","Number.NegativeInfinity","Number.PI","Number.PositiveInfinity","Occurrence.All","Occurrence.First","Occurrence.Last","Occurrence.Optional","Occurrence.Repeating","Occurrence.Required","Order.Ascending","Order.Descending","Precision.Decimal","Precision.Double","QuoteStyle.Csv","QuoteStyle.None","RelativePosition.FromEnd","RelativePosition.FromStart","RoundingMode.AwayFromZero","RoundingMode.Down","RoundingMode.ToEven","RoundingMode.TowardZero","RoundingMode.Up","SapHanaDistribution.All","SapHanaDistribution.Connection","SapHanaDistribution.Off","SapHanaDistribution.Statement","SapHanaRangeOperator.Equals","SapHanaRangeOperator.GreaterThan","SapHanaRangeOperator.GreaterThanOrEquals","SapHanaRangeOperator.LessThan","SapHanaRangeOperator.LessThanOrEquals","SapHanaRangeOperator.NotEquals","TextEncoding.Ascii","TextEncoding.BigEndianUnicode","TextEncoding.Unicode","TextEncoding.Utf16","TextEncoding.Utf8","TextEncoding.Windows","TraceLevel.Critical","TraceLevel.Error","TraceLevel.Information","TraceLevel.Verbose","TraceLevel.Warning","WebMethod.Delete","WebMethod.Get","WebMethod.Head","WebMethod.Patch","WebMethod.Post","WebMethod.Put"],builtinTypes:["Action.Type","Any.Type","Binary.Type","BinaryEncoding.Type","BinaryOccurrence.Type","Byte.Type","ByteOrder.Type","Character.Type","Compression.Type","CsvStyle.Type","Currency.Type","Date.Type","DateTime.Type","DateTimeZone.Type","Day.Type","Decimal.Type","Double.Type","Duration.Type","ExtraValues.Type","Function.Type","GroupKind.Type","Guid.Type","Int16.Type","Int32.Type","Int64.Type","Int8.Type","JoinAlgorithm.Type","JoinKind.Type","JoinSide.Type","List.Type","Logical.Type","MissingField.Type","None.Type","Null.Type","Number.Type","Occurrence.Type","Order.Type","Password.Type","Percentage.Type","Precision.Type","QuoteStyle.Type","Record.Type","RelativePosition.Type","RoundingMode.Type","SapHanaDistribution.Type","SapHanaRangeOperator.Type","Single.Type","Table.Type","Text.Type","TextEncoding.Type","Time.Type","TraceLevel.Type","Type.Type","Uri.Type","WebMethod.Type"],tokenizer:{root:[[/#"[\w \.]+"/,"identifier.quote"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+([eE][\-+]?\d+)?/,"number"],[/(#?[a-z]+)\b/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@constants":"constant","@constructors":"constructor","@operatorKeywords":"operators","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.Type)\b/,{cases:{"@builtinTypes":"type","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.[A-Z][a-zA-Z0-9]+)\b/,{cases:{"@builtinFunctions":"keyword.function","@builtinConstants":"constant","@default":"identifier"}}],[/\b([a-zA-Z_][\w\.]*)\b/,"identifier"],{include:"@whitespace"},{include:"@comments"},{include:"@strings"},[/[{}()\[\]]/,"@brackets"],[/([=\+<>\-\*&@\?\/!])|([<>]=)|(<>)|(=>)|(\.\.\.)|(\.\.)/,"operators"],[/[,;]/,"delimiter"]],whitespace:[[/\s+/,"white"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],strings:[['"',"string","@string"]],string:[['""',"string.escape"],['"',"string","@pop"],[".","string"]]}}}});var powershell_exports={};__export(powershell_exports,{conf:()=>conf50,language:()=>language51});var conf50,language51;var init_powershell=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/powershell/powershell.js"(){conf50={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"#",blockComment:["<#","#>"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}};language51={defaultToken:"",ignoreCase:true,tokenPostfix:".ps1",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["begin","break","catch","class","continue","data","define","do","dynamicparam","else","elseif","end","exit","filter","finally","for","foreach","from","function","if","in","param","process","return","switch","throw","trap","try","until","using","var","while","workflow","parallel","sequence","inlinescript","configuration"],helpKeywords:/SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/,symbols:/[=>/,"comment","@pop"],[/(\.)(@helpKeywords)(?!\w)/,{token:"comment.keyword.$2"}],[/[\.#]/,"comment"]]}}}});var protobuf_exports={};__export(protobuf_exports,{conf:()=>conf51,language:()=>language52});var namedLiterals2,conf51,language52;var init_protobuf=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/protobuf/protobuf.js"(){namedLiterals2=["true","false"];conf51={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],autoCloseBefore:".,=}])>' \n\t",indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}};language52={defaultToken:"",tokenPostfix:".proto",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=>/,{token:"@brackets",bracket:"@close",switchTo:"identifier"}]],field:[{include:"@whitespace"},["group",{cases:{"$S2==proto2":{token:"keyword",switchTo:"@groupDecl.$S2"}}}],[/(@identifier)(\s*)(=)/,["identifier","white",{token:"delimiter",next:"@pop"}]],[/@fullIdentifier|\./,{cases:{"@builtinTypes":"keyword","@default":"type.identifier"}}]],groupDecl:[{include:"@whitespace"},[/@identifier/,"identifier"],["=","operator"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@messageBody.$S2"}],{include:"@constant"}],type:[{include:"@whitespace"},[/@identifier/,"type.identifier","@pop"],[/./,"delimiter"]],identifier:[{include:"@whitespace"},[/@identifier/,"identifier","@pop"]],serviceDecl:[{include:"@whitespace"},[/@identifier/,"identifier"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@serviceBody.$S2"}]],serviceBody:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],[/option\b/,"keyword","@option.$S2"],[/rpc\b/,"keyword","@rpc.$S2"],[/\[/,{token:"@brackets",bracket:"@open",next:"@options.$S2"}],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],rpc:[{include:"@whitespace"},[/@identifier/,"identifier"],[/\(/,{token:"@brackets",bracket:"@open",switchTo:"@request.$S2"}],[/{/,{token:"@brackets",bracket:"@open",next:"@methodOptions.$S2"}],[/;/,"delimiter","@pop"]],request:[{include:"@whitespace"},[/@messageType/,{cases:{stream:{token:"keyword",next:"@type.$S2"},"@default":"type.identifier"}}],[/\)/,{token:"@brackets",bracket:"@close",switchTo:"@returns.$S2"}]],returns:[{include:"@whitespace"},[/returns\b/,"keyword"],[/\(/,{token:"@brackets",bracket:"@open",switchTo:"@response.$S2"}]],response:[{include:"@whitespace"},[/@messageType/,{cases:{stream:{token:"keyword",next:"@type.$S2"},"@default":"type.identifier"}}],[/\)/,{token:"@brackets",bracket:"@close",switchTo:"@rpc.$S2"}]],methodOptions:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],["option","keyword"],[/@optionName/,"annotation"],[/[()]/,"annotation.brackets"],[/=/,"operator"],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringSingle:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],constant:[["@boolLit","keyword.constant"],["@hexLit","number.hex"],["@octalLit","number.octal"],["@decimalLit","number"],["@floatLit","number.float"],[/("([^"\\]|\\.)*|'([^'\\]|\\.)*)$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'/,{token:"string.quote",bracket:"@open",next:"@stringSingle"}],[/{/,{token:"@brackets",bracket:"@open",next:"@prototext"}],[/identifier/,"identifier"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],prototext:[{include:"@whitespace"},{include:"@constant"},[/@identifier/,"identifier"],[/[:;]/,"delimiter"],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]]}}}});var pug_exports={};__export(pug_exports,{conf:()=>conf52,language:()=>language53});var conf52,language53;var init_pug=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/pug/pug.js"(){conf52={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}],folding:{offSide:true}};language53={defaultToken:"",tokenPostfix:".pug",ignoreCase:true,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[//,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/}}});var redis_exports={};__export(redis_exports,{conf:()=>conf57,language:()=>language58});var conf57,language58;var init_redis=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/redis/redis.js"(){conf57={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]};language58={defaultToken:"",tokenPostfix:".redis",ignoreCase:true,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["APPEND","AUTH","BGREWRITEAOF","BGSAVE","BITCOUNT","BITFIELD","BITOP","BITPOS","BLPOP","BRPOP","BRPOPLPUSH","CLIENT","KILL","LIST","GETNAME","PAUSE","REPLY","SETNAME","CLUSTER","ADDSLOTS","COUNT-FAILURE-REPORTS","COUNTKEYSINSLOT","DELSLOTS","FAILOVER","FORGET","GETKEYSINSLOT","INFO","KEYSLOT","MEET","NODES","REPLICATE","RESET","SAVECONFIG","SET-CONFIG-EPOCH","SETSLOT","SLAVES","SLOTS","COMMAND","COUNT","GETKEYS","CONFIG","GET","REWRITE","SET","RESETSTAT","DBSIZE","DEBUG","OBJECT","SEGFAULT","DECR","DECRBY","DEL","DISCARD","DUMP","ECHO","EVAL","EVALSHA","EXEC","EXISTS","EXPIRE","EXPIREAT","FLUSHALL","FLUSHDB","GEOADD","GEOHASH","GEOPOS","GEODIST","GEORADIUS","GEORADIUSBYMEMBER","GETBIT","GETRANGE","GETSET","HDEL","HEXISTS","HGET","HGETALL","HINCRBY","HINCRBYFLOAT","HKEYS","HLEN","HMGET","HMSET","HSET","HSETNX","HSTRLEN","HVALS","INCR","INCRBY","INCRBYFLOAT","KEYS","LASTSAVE","LINDEX","LINSERT","LLEN","LPOP","LPUSH","LPUSHX","LRANGE","LREM","LSET","LTRIM","MGET","MIGRATE","MONITOR","MOVE","MSET","MSETNX","MULTI","PERSIST","PEXPIRE","PEXPIREAT","PFADD","PFCOUNT","PFMERGE","PING","PSETEX","PSUBSCRIBE","PUBSUB","PTTL","PUBLISH","PUNSUBSCRIBE","QUIT","RANDOMKEY","READONLY","READWRITE","RENAME","RENAMENX","RESTORE","ROLE","RPOP","RPOPLPUSH","RPUSH","RPUSHX","SADD","SAVE","SCARD","SCRIPT","FLUSH","LOAD","SDIFF","SDIFFSTORE","SELECT","SETBIT","SETEX","SETNX","SETRANGE","SHUTDOWN","SINTER","SINTERSTORE","SISMEMBER","SLAVEOF","SLOWLOG","SMEMBERS","SMOVE","SORT","SPOP","SRANDMEMBER","SREM","STRLEN","SUBSCRIBE","SUNION","SUNIONSTORE","SWAPDB","SYNC","TIME","TOUCH","TTL","TYPE","UNSUBSCRIBE","UNLINK","UNWATCH","WAIT","WATCH","ZADD","ZCARD","ZCOUNT","ZINCRBY","ZINTERSTORE","ZLEXCOUNT","ZRANGE","ZRANGEBYLEX","ZREVRANGEBYLEX","ZRANGEBYSCORE","ZRANK","ZREM","ZREMRANGEBYLEX","ZREMRANGEBYRANK","ZREMRANGEBYSCORE","ZREVRANGE","ZREVRANGEBYSCORE","ZREVRANK","ZSCORE","ZUNIONSTORE","SCAN","SSCAN","HSCAN","ZSCAN"],operators:[],builtinFunctions:[],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}],[/"/,{token:"string.double",next:"@stringDouble"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],stringDouble:[[/[^"]+/,"string.double"],[/""/,"string.double"],[/"/,{token:"string.double",next:"@pop"}]],scopes:[]}}}});var redshift_exports={};__export(redshift_exports,{conf:()=>conf58,language:()=>language59});var conf58,language59;var init_redshift=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/redshift/redshift.js"(){conf58={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]};language59={defaultToken:"",tokenPostfix:".sql",ignoreCase:true,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["AES128","AES256","ALL","ALLOWOVERWRITE","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","AUTHORIZATION","AZ64","BACKUP","BETWEEN","BINARY","BLANKSASNULL","BOTH","BYTEDICT","BZIP2","CASE","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","CREDENTIALS","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURRENT_USER_ID","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DELTA","DELTA32K","DESC","DISABLE","DISTINCT","DO","ELSE","EMPTYASNULL","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","END","EXCEPT","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GRANT","GROUP","GZIP","HAVING","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTERSECT","INTO","IS","ISNULL","JOIN","LANGUAGE","LEADING","LEFT","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","LZO","LZOP","MINUS","MOSTLY16","MOSTLY32","MOSTLY8","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","OR","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RAW","READRATIO","RECOVER","REFERENCES","RESPECT","REJECTLOG","RESORT","RESTORE","RIGHT","SELECT","SESSION_USER","SIMILAR","SNAPSHOT","SOME","SYSDATE","SYSTEM","TABLE","TAG","TDES","TEXT255","TEXT32K","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","TRUNCATECOLUMNS","UNION","UNIQUE","USER","USING","VERBOSE","WALLET","WHEN","WHERE","WITH","WITHOUT"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL","INTERSECT","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["current_schema","current_schemas","has_database_privilege","has_schema_privilege","has_table_privilege","age","current_time","current_timestamp","localtime","isfinite","now","ascii","get_bit","get_byte","set_bit","set_byte","to_ascii","approximate percentile_disc","avg","count","listagg","max","median","min","percentile_cont","stddev_samp","stddev_pop","sum","var_samp","var_pop","bit_and","bit_or","bool_and","bool_or","cume_dist","first_value","lag","last_value","lead","nth_value","ratio_to_report","dense_rank","ntile","percent_rank","rank","row_number","case","coalesce","decode","greatest","least","nvl","nvl2","nullif","add_months","at time zone","convert_timezone","current_date","date_cmp","date_cmp_timestamp","date_cmp_timestamptz","date_part_year","dateadd","datediff","date_part","date_trunc","extract","getdate","interval_cmp","last_day","months_between","next_day","sysdate","timeofday","timestamp_cmp","timestamp_cmp_date","timestamp_cmp_timestamptz","timestamptz_cmp","timestamptz_cmp_date","timestamptz_cmp_timestamp","timezone","to_timestamp","trunc","abs","acos","asin","atan","atan2","cbrt","ceil","ceiling","checksum","cos","cot","degrees","dexp","dlog1","dlog10","exp","floor","ln","log","mod","pi","power","radians","random","round","sin","sign","sqrt","tan","to_hex","bpcharcmp","btrim","bttext_pattern_cmp","char_length","character_length","charindex","chr","concat","crc32","func_sha1","initcap","left and rights","len","length","lower","lpad and rpads","ltrim","md5","octet_length","position","quote_ident","quote_literal","regexp_count","regexp_instr","regexp_replace","regexp_substr","repeat","replace","replicate","reverse","rtrim","split_part","strpos","strtol","substring","textlen","translate","trim","upper","cast","convert","to_char","to_date","to_number","json_array_length","json_extract_array_element_text","json_extract_path_text","current_setting","pg_cancel_backend","pg_terminate_backend","set_config","current_database","current_user","current_user_id","pg_backend_pid","pg_last_copy_count","pg_last_copy_id","pg_last_query_id","pg_last_unload_count","session_user","slice_num","user","version","abbrev","acosd","any","area","array_agg","array_append","array_cat","array_dims","array_fill","array_length","array_lower","array_ndims","array_position","array_positions","array_prepend","array_remove","array_replace","array_to_json","array_to_string","array_to_tsvector","array_upper","asind","atan2d","atand","bit","bit_length","bound_box","box","brin_summarize_new_values","broadcast","cardinality","center","circle","clock_timestamp","col_description","concat_ws","convert_from","convert_to","corr","cosd","cotd","covar_pop","covar_samp","current_catalog","current_query","current_role","currval","cursor_to_xml","diameter","div","encode","enum_first","enum_last","enum_range","every","family","format","format_type","generate_series","generate_subscripts","get_current_ts_config","gin_clean_pending_list","grouping","has_any_column_privilege","has_column_privilege","has_foreign_data_wrapper_privilege","has_function_privilege","has_language_privilege","has_sequence_privilege","has_server_privilege","has_tablespace_privilege","has_type_privilege","height","host","hostmask","inet_client_addr","inet_client_port","inet_merge","inet_same_family","inet_server_addr","inet_server_port","isclosed","isempty","isopen","json_agg","json_object","json_object_agg","json_populate_record","json_populate_recordset","json_to_record","json_to_recordset","jsonb_agg","jsonb_object_agg","justify_days","justify_hours","justify_interval","lastval","left","line","localtimestamp","lower_inc","lower_inf","lpad","lseg","make_date","make_interval","make_time","make_timestamp","make_timestamptz","masklen","mode","netmask","network","nextval","npoints","num_nonnulls","num_nulls","numnode","obj_description","overlay","parse_ident","path","pclose","percentile_disc","pg_advisory_lock","pg_advisory_lock_shared","pg_advisory_unlock","pg_advisory_unlock_all","pg_advisory_unlock_shared","pg_advisory_xact_lock","pg_advisory_xact_lock_shared","pg_backup_start_time","pg_blocking_pids","pg_client_encoding","pg_collation_is_visible","pg_column_size","pg_conf_load_time","pg_control_checkpoint","pg_control_init","pg_control_recovery","pg_control_system","pg_conversion_is_visible","pg_create_logical_replication_slot","pg_create_physical_replication_slot","pg_create_restore_point","pg_current_xlog_flush_location","pg_current_xlog_insert_location","pg_current_xlog_location","pg_database_size","pg_describe_object","pg_drop_replication_slot","pg_export_snapshot","pg_filenode_relation","pg_function_is_visible","pg_get_constraintdef","pg_get_expr","pg_get_function_arguments","pg_get_function_identity_arguments","pg_get_function_result","pg_get_functiondef","pg_get_indexdef","pg_get_keywords","pg_get_object_address","pg_get_owned_sequence","pg_get_ruledef","pg_get_serial_sequence","pg_get_triggerdef","pg_get_userbyid","pg_get_viewdef","pg_has_role","pg_identify_object","pg_identify_object_as_address","pg_index_column_has_property","pg_index_has_property","pg_indexam_has_property","pg_indexes_size","pg_is_in_backup","pg_is_in_recovery","pg_is_other_temp_schema","pg_is_xlog_replay_paused","pg_last_committed_xact","pg_last_xact_replay_timestamp","pg_last_xlog_receive_location","pg_last_xlog_replay_location","pg_listening_channels","pg_logical_emit_message","pg_logical_slot_get_binary_changes","pg_logical_slot_get_changes","pg_logical_slot_peek_binary_changes","pg_logical_slot_peek_changes","pg_ls_dir","pg_my_temp_schema","pg_notification_queue_usage","pg_opclass_is_visible","pg_operator_is_visible","pg_opfamily_is_visible","pg_options_to_table","pg_postmaster_start_time","pg_read_binary_file","pg_read_file","pg_relation_filenode","pg_relation_filepath","pg_relation_size","pg_reload_conf","pg_replication_origin_create","pg_replication_origin_drop","pg_replication_origin_oid","pg_replication_origin_progress","pg_replication_origin_session_is_setup","pg_replication_origin_session_progress","pg_replication_origin_session_reset","pg_replication_origin_session_setup","pg_replication_origin_xact_reset","pg_replication_origin_xact_setup","pg_rotate_logfile","pg_size_bytes","pg_size_pretty","pg_sleep","pg_sleep_for","pg_sleep_until","pg_start_backup","pg_stat_file","pg_stop_backup","pg_switch_xlog","pg_table_is_visible","pg_table_size","pg_tablespace_databases","pg_tablespace_location","pg_tablespace_size","pg_total_relation_size","pg_trigger_depth","pg_try_advisory_lock","pg_try_advisory_lock_shared","pg_try_advisory_xact_lock","pg_try_advisory_xact_lock_shared","pg_ts_config_is_visible","pg_ts_dict_is_visible","pg_ts_parser_is_visible","pg_ts_template_is_visible","pg_type_is_visible","pg_typeof","pg_xact_commit_timestamp","pg_xlog_location_diff","pg_xlog_replay_pause","pg_xlog_replay_resume","pg_xlogfile_name","pg_xlogfile_name_offset","phraseto_tsquery","plainto_tsquery","point","polygon","popen","pqserverversion","query_to_xml","querytree","quote_nullable","radius","range_merge","regexp_matches","regexp_split_to_array","regexp_split_to_table","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","right","row_security_active","row_to_json","rpad","scale","set_masklen","setseed","setval","setweight","shobj_description","sind","sprintf","statement_timestamp","stddev","string_agg","string_to_array","strip","substr","table_to_xml","table_to_xml_and_xmlschema","tand","text","to_json","to_regclass","to_regnamespace","to_regoper","to_regoperator","to_regproc","to_regprocedure","to_regrole","to_regtype","to_tsquery","to_tsvector","transaction_timestamp","ts_debug","ts_delete","ts_filter","ts_headline","ts_lexize","ts_parse","ts_rank","ts_rank_cd","ts_rewrite","ts_stat","ts_token_type","tsquery_phrase","tsvector_to_array","tsvector_update_trigger","tsvector_update_trigger_column","txid_current","txid_current_snapshot","txid_snapshot_xip","txid_snapshot_xmax","txid_snapshot_xmin","txid_visible_in_snapshot","unnest","upper_inc","upper_inf","variance","width","width_bucket","xml_is_well_formed","xml_is_well_formed_content","xml_is_well_formed_document","xmlagg","xmlcomment","xmlconcat","xmlelement","xmlexists","xmlforest","xmlparse","xmlpi","xmlroot","xmlserialize","xpath","xpath_exists"],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}}}});var restructuredtext_exports={};__export(restructuredtext_exports,{conf:()=>conf59,language:()=>language60});var conf59,language60;var init_restructuredtext=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/restructuredtext/restructuredtext.js"(){conf59={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*\x3c!--\\s*#?region\\b.*--\x3e"),end:new RegExp("^\\s*\x3c!--\\s*#?endregion\\b.*--\x3e")}}};language60={defaultToken:"",tokenPostfix:".rst",control:/[\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],alphanumerics:/[A-Za-z0-9]/,simpleRefNameWithoutBq:/(?:@alphanumerics[-_+:.]*@alphanumerics)+|(?:@alphanumerics+)/,simpleRefName:/(?:`@phrase`|@simpleRefNameWithoutBq)/,phrase:/@simpleRefNameWithoutBq(?:\s@simpleRefNameWithoutBq)*/,citationName:/[A-Za-z][A-Za-z0-9-_.]*/,blockLiteralStart:/(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,precedingChars:/(?:[ -:/'"<([{])/,followingChars:/(?:[ -.,:;!?/'")\]}>]|$)/,punctuation:/(=|-|~|`|#|"|\^|\+|\*|:|\.|'|_|\+)/,tokenizer:{root:[[/^(@punctuation{3,}$){1,1}?/,"keyword"],[/^\s*([\*\-+‣•]|[a-zA-Z0-9]+\.|\([a-zA-Z0-9]+\)|[a-zA-Z0-9]+\))\s/,"keyword"],[/([ ]::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],[/(::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],{include:"@tables"},{include:"@explicitMarkupBlocks"},{include:"@inlineMarkup"}],explicitMarkupBlocks:[{include:"@citations"},{include:"@footnotes"},[/^(\.\.\s)(@simpleRefName)(::\s)(.*)$/,[{token:"",next:"subsequentLines"},"keyword","",""]],[/^(\.\.)(\s+)(_)(@simpleRefName)(:)(\s+)(.*)/,[{token:"",next:"hyperlinks"},"","","string.link","","","string.link"]],[/^((?:(?:\.\.)(?:\s+))?)(__)(:)(\s+)(.*)/,[{token:"",next:"subsequentLines"},"","","","string.link"]],[/^(__\s+)(.+)/,["","string.link"]],[/^(\.\.)( \|)([^| ]+[^|]*[^| ]*)(\| )(@simpleRefName)(:: .*)/,[{token:"",next:"subsequentLines"},"","string.link","","keyword",""],"@rawBlocks"],[/(\|)([^| ]+[^|]*[^| ]*)(\|_{0,2})/,["","string.link",""]],[/^(\.\.)([ ].*)$/,[{token:"",next:"@comments"},"comment"]]],inlineMarkup:[{include:"@citationsReference"},{include:"@footnotesReference"},[/(@simpleRefName)(_{1,2})/,["string.link",""]],[/(`)([^<`]+\s+)(<)(.*)(>)(`)(_)/,["","string.link","","string.link","","",""]],[/\*\*([^\\*]|\*(?!\*))+\*\*/,"strong"],[/\*[^*]+\*/,"emphasis"],[/(``)((?:[^`]|\`(?!`))+)(``)/,["","keyword",""]],[/(__\s+)(.+)/,["","keyword"]],[/(:)((?:@simpleRefNameWithoutBq)?)(:`)([^`]+)(`)/,["","keyword","","",""]],[/(`)([^`]+)(`:)((?:@simpleRefNameWithoutBq)?)(:)/,["","","","keyword",""]],[/(`)([^`]+)(`)/,""],[/(_`)(@phrase)(`)/,["","string.link",""]]],citations:[[/^(\.\.\s+\[)((?:@citationName))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],citationsReference:[[/(\[)(@citationName)(\]_)/,["","string.link",""]]],footnotes:[[/^(\.\.\s+\[)((?:[0-9]+))(\]\s+.*)/,[{token:"",next:"@subsequentLines"},"string.link",""]],[/^(\.\.\s+\[)((?:#@simpleRefName?))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]],[/^(\.\.\s+\[)((?:\*))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],footnotesReference:[[/(\[)([0-9]+)(\])(_)/,["","string.link","",""]],[/(\[)(#@simpleRefName?)(\])(_)/,["","string.link","",""]],[/(\[)(\*)(\])(_)/,["","string.link","",""]]],blankLineOfLiteralBlocks:[[/^$/,"","@subsequentLinesOfLiteralBlocks"],[/^.*$/,"","@pop"]],subsequentLinesOfLiteralBlocks:[[/(@blockLiteralStart+)(.*)/,["keyword",""]],[/^(?!blockLiteralStart)/,"","@popall"]],subsequentLines:[[/^[\s]+.*/,""],[/^(?!\s)/,"","@pop"]],hyperlinks:[[/^[\s]+.*/,"string.link"],[/^(?!\s)/,"","@pop"]],comments:[[/^[\s]+.*/,"comment"],[/^(?!\s)/,"","@pop"]],tables:[[/\+-[+-]+/,"keyword"],[/\+=[+=]+/,"keyword"]]}}}});var ruby_exports={};__export(ruby_exports,{conf:()=>conf60,language:()=>language61});var conf60,language61;var init_ruby=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/ruby/ruby.js"(){conf60={comments:{lineComment:"#",blockComment:["=begin","=end"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],indentationRules:{increaseIndentPattern:new RegExp(`^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|("|'|/).*\\4)*(#.*)?$`),decreaseIndentPattern:new RegExp("^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)")}};language61={tokenPostfix:".ruby",keywords:["__LINE__","__ENCODING__","__FILE__","BEGIN","END","alias","and","begin","break","case","class","def","defined?","do","else","elsif","end","ensure","for","false","if","in","module","next","nil","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield"],keywordops:["::","..","...","?",":","=>"],builtins:["require","public","private","include","extend","attr_reader","protected","private_class_method","protected_class_method","new"],declarations:["module","class","def","case","do","begin","for","if","while","until","unless"],linedecls:["def","case","do","begin","for","if","while","until","unless"],operators:["^","&","|","<=>","==","===","!~","=~",">",">=","<","<=","<<",">>","+","-","*","/","%","**","~","+@","-@","[]","[]=","`","+=","-=","*=","**=","/=","^=","%=","<<=",">>=","&=","&&=","||=","|="],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],symbols:/[=>"}],[/%([qws])(@delim)/,{token:"string.$1.delim",switchTo:"@qstring.$1.$2.$2"}],[/%r\(/,{token:"regexp.delim",switchTo:"@pregexp.(.)"}],[/%r\[/,{token:"regexp.delim",switchTo:"@pregexp.[.]"}],[/%r\{/,{token:"regexp.delim",switchTo:"@pregexp.{.}"}],[/%r"}],[/%r(@delim)/,{token:"regexp.delim",switchTo:"@pregexp.$1.$1"}],[/%(x|W|Q?)\(/,{token:"string.$1.delim",switchTo:"@qqstring.$1.(.)"}],[/%(x|W|Q?)\[/,{token:"string.$1.delim",switchTo:"@qqstring.$1.[.]"}],[/%(x|W|Q?)\{/,{token:"string.$1.delim",switchTo:"@qqstring.$1.{.}"}],[/%(x|W|Q?)"}],[/%(x|W|Q?)(@delim)/,{token:"string.$1.delim",switchTo:"@qqstring.$1.$2.$2"}],[/%([rqwsxW]|Q?)./,{token:"invalid",next:"@pop"}],[/./,{token:"invalid",next:"@pop"}]],qstring:[[/\\$/,"string.$S2.escape"],[/\\./,"string.$S2.escape"],[/./,{cases:{"$#==$S4":{token:"string.$S2.delim",next:"@pop"},"$#==$S3":{token:"string.$S2.delim",next:"@push"},"@default":"string.$S2"}}]],qqstring:[[/#/,"string.$S2.escape","@interpolated"],{include:"@qstring"}],whitespace:[[/[ \t\r\n]+/,""],[/^\s*=begin\b/,"comment","@comment"],[/#.*$/,"comment"]],comment:[[/[^=]+/,"comment"],[/^\s*=begin\b/,"comment.invalid"],[/^\s*=end\b.*/,"comment","@pop"],[/[=]/,"comment"]]}}}});var rust_exports={};__export(rust_exports,{conf:()=>conf61,language:()=>language62});var conf61,language62;var init_rust=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/rust/rust.js"(){conf61={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}};language62={tokenPostfix:".rust",defaultToken:"invalid",keywords:["as","async","await","box","break","const","continue","crate","dyn","else","enum","extern","false","fn","for","if","impl","in","let","loop","match","mod","move","mut","pub","ref","return","self","static","struct","super","trait","true","try","type","unsafe","use","where","while","catch","default","union","static","abstract","alignof","become","do","final","macro","offsetof","override","priv","proc","pure","sizeof","typeof","unsized","virtual","yield"],typeKeywords:["Self","m32","m64","m128","f80","f16","f128","int","uint","float","char","bool","u8","u16","u32","u64","f32","f64","i8","i16","i32","i64","str","Option","Either","c_float","c_double","c_void","FILE","fpos_t","DIR","dirent","c_char","c_schar","c_uchar","c_short","c_ushort","c_int","c_uint","c_long","c_ulong","size_t","ptrdiff_t","clock_t","time_t","c_longlong","c_ulonglong","intptr_t","uintptr_t","off_t","dev_t","ino_t","pid_t","mode_t","ssize_t"],constants:["true","false","Some","None","Left","Right","Ok","Err"],supportConstants:["EXIT_FAILURE","EXIT_SUCCESS","RAND_MAX","EOF","SEEK_SET","SEEK_CUR","SEEK_END","_IOFBF","_IONBF","_IOLBF","BUFSIZ","FOPEN_MAX","FILENAME_MAX","L_tmpnam","TMP_MAX","O_RDONLY","O_WRONLY","O_RDWR","O_APPEND","O_CREAT","O_EXCL","O_TRUNC","S_IFIFO","S_IFCHR","S_IFBLK","S_IFDIR","S_IFREG","S_IFMT","S_IEXEC","S_IWRITE","S_IREAD","S_IRWXU","S_IXUSR","S_IWUSR","S_IRUSR","F_OK","R_OK","W_OK","X_OK","STDIN_FILENO","STDOUT_FILENO","STDERR_FILENO"],supportMacros:["format!","print!","println!","panic!","format_args!","unreachable!","write!","writeln!"],operators:["!","!=","%","%=","&","&=","&&","*","*=","+","+=","-","-=","->",".","..","...","/","/=",":",";","<<","<<=","<","<=","=","==","=>",">",">=",">>",">>=","@","^","^=","|","|=","||","_","?","#"],escapes:/\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})/,delimiters:/[,]/,symbols:/[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,intSuffixes:/[iu](8|16|32|64|128|size)/,floatSuffixes:/f(32|64)/,tokenizer:{root:[[/r(#*)"/,{token:"string.quote",bracket:"@open",next:"@stringraw.$1"}],[/[a-zA-Z][a-zA-Z0-9_]*!?|_[a-zA-Z0-9_]+/,{cases:{"@typeKeywords":"keyword.type","@keywords":"keyword","@supportConstants":"keyword","@supportMacros":"keyword","@constants":"keyword","@default":"identifier"}}],[/\$/,"identifier"],[/'[a-zA-Z_][a-zA-Z0-9_]*(?=[^\'])/,"identifier"],[/'(\S|@escapes)'/,"string.byteliteral"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],{include:"@numbers"},{include:"@whitespace"},[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}],[/[{}()\[\]<>]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringraw:[[/[^"#]+/,{token:"string"}],[/"(#*)/,{cases:{"$1==$S2":{token:"string.quote",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["#]/,{token:"string"}]],numbers:[[/(0o[0-7_]+)(@intSuffixes)?/,{token:"number"}],[/(0b[0-1_]+)(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(\.[\d][\d_]*)?[eE][+-][\d_]+(@floatSuffixes)?/,{token:"number"}],[/\b(\d\.?[\d_]*)(@floatSuffixes)?\b/,{token:"number"}],[/(0x[\da-fA-F]+)_?(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(@intSuffixes?)?/,{token:"number"}]]}}}});var sb_exports={};__export(sb_exports,{conf:()=>conf62,language:()=>language63});var conf62,language63;var init_sb=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/sb/sb.js"(){conf62={comments:{lineComment:"'"},brackets:[["(",")"],["[","]"],["If","EndIf"],["While","EndWhile"],["For","EndFor"],["Sub","EndSub"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]}]};language63={defaultToken:"",tokenPostfix:".sb",ignoreCase:true,brackets:[{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"keyword.tag-if",open:"If",close:"EndIf"},{token:"keyword.tag-while",open:"While",close:"EndWhile"},{token:"keyword.tag-for",open:"For",close:"EndFor"},{token:"keyword.tag-sub",open:"Sub",close:"EndSub"}],keywords:["Else","ElseIf","EndFor","EndIf","EndSub","EndWhile","For","Goto","If","Step","Sub","Then","To","While"],tagwords:["If","Sub","While","For"],operators:[">","<","<>","<=",">=","And","Or","+","-","*","/","="],identifier:/[a-zA-Z_][\w]*/,symbols:/[=><:+\-*\/%\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},[/(@identifier)(?=[.])/,"type"],[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@operators":"operator","@default":"variable.name"}}],[/([.])(@identifier)/,{cases:{$2:["delimiter","type.member"],"@default":""}}],[/\d*\.\d+/,"number.float"],[/\d+/,"number"],[/[()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/(\').*$/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"C?/,"string","@pop"]]}}}});var scala_exports={};__export(scala_exports,{conf:()=>conf63,language:()=>language64});var conf63,language64;var init_scala=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/scala/scala.js"(){conf63={wordPattern:/(unary_[@~!#%^&*()\-=+\\|:<>\/?]+)|([a-zA-Z_$][\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\w$]*)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}};language64={tokenPostfix:".scala",keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],softKeywords:["as","export","extension","end","derives","on"],constants:["true","false","null","this","super"],modifiers:["abstract","final","implicit","lazy","override","private","protected","sealed"],softModifiers:["inline","opaque","open","transparent","using"],name:/(?:[a-z_$][\w$]*|`[^`]+`)/,type:/(?:[A-Z][\w$]*)/,symbols:/[=>))/,["@brackets","white","variable"]],[/@name/,{cases:{"@keywords":"keyword","@softKeywords":"keyword","@modifiers":"keyword.modifier","@softModifiers":"keyword.modifier","@constants":{token:"constant",next:"@allowMethod"},"@default":{token:"identifier",next:"@allowMethod"}}}],[/@type/,"type","@allowMethod"],{include:"@whitespace"},[/@[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*/,"annotation"],[/[{(]/,"@brackets"],[/[})]/,"@brackets","@allowMethod"],[/\[/,"operator.square"],[/](?!\s*(?:va[rl]|def|type)\b)/,"operator.square","@allowMethod"],[/]/,"operator.square"],[/([=-]>|<-|>:|<:|:>|<%)(?=[\s\w()[\]{},\."'`])/,"keyword"],[/@symbols/,"operator"],[/[;,\.]/,"delimiter"],[/'[a-zA-Z$][\w$]*(?!')/,"attribute.name"],[/'[^\\']'/,"string","@allowMethod"],[/(')(@escapes)(')/,["string","string.escape",{token:"string",next:"@allowMethod"}]],[/'/,"string.invalid"]],import:[[/;/,"delimiter","@pop"],[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/@name|@type/,"type"],[/[(){}]/,"@brackets"],[/[[\]]/,"operator.square"],[/[\.,]/,"delimiter"]],allowMethod:[[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/(?==>[\s\w([{])/,"keyword","@pop"],[/(@name|@symbols)(?=[ \t]*[[({"'`]|[ \t]+(?:[+-]?\.?\d|\w))/,{cases:{"@keywords":{token:"keyword",next:"@pop"},"->|<-|>:|<:|<%":{token:"keyword",next:"@pop"},"@default":{token:"@rematch",next:"@pop"}}}],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],case:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword","@allowMethod"],[/\bif\b|=>/,"keyword","@pop"],[/`[^`]+`/,"identifier","@allowMethod"],[/@name/,"variable","@allowMethod"],[/:::?|\||@(?![a-z_$])/,"keyword"],{include:"@root"}],vardef:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword"],[/@name/,"variable"],[/:::?|\||@(?![a-z_$])/,"keyword"],[/=|:(?!:)/,"operator","@pop"],[/$/,"white","@pop"],{include:"@root"}],string:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],stringt:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],fstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([\-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],fstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([\-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],sstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],sstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],interp:[[/{/,"operator","@push"],[/}/,"operator","@pop"],{include:"@root"}],rawstring:[[/[^"]/,"string"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],rawstringt:[[/[^"]/,"string"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}}});var scheme_exports={};__export(scheme_exports,{conf:()=>conf64,language:()=>language65});var conf64,language65;var init_scheme=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/scheme/scheme.js"(){conf64={comments:{lineComment:";",blockComment:["#|","|#"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]};language65={defaultToken:"",ignoreCase:true,tokenPostfix:".scheme",brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],keywords:["case","do","let","loop","if","else","when","cons","car","cdr","cond","lambda","lambda*","syntax-rules","format","set!","quote","eval","append","list","list?","member?","load"],constants:["#t","#f"],operators:["eq?","eqv?","equal?","and","or","not","null?"],tokenizer:{root:[[/#[xXoObB][0-9a-fA-F]+/,"number.hex"],[/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/,"number.float"],[/(?:\b(?:(define|define-syntax|define-macro))\b)(\s+)((?:\w|\-|\!|\?)*)/,["keyword","white","variable"]],{include:"@whitespace"},{include:"@strings"},[/[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,{cases:{"@keywords":"keyword","@constants":"constant","@operators":"operators","@default":"identifier"}}]],comment:[[/[^\|#]+/,"comment"],[/#\|/,"comment","@push"],[/\|#/,"comment","@pop"],[/[\|#]/,"comment"]],whitespace:[[/[ \t\r\n]+/,"white"],[/#\|/,"comment","@comment"],[/;.*$/,"comment"]],strings:[[/"$/,"string","@popall"],[/"(?=.)/,"string","@multiLineString"]],multiLineString:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string.escape"],[/"/,"string","@popall"],[/\\$/,"string"]]}}}});var scss_exports={};__export(scss_exports,{conf:()=>conf65,language:()=>language66});var conf65,language66;var init_scss=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/scss/scss.js"(){conf65={wordPattern:/(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}};language66={defaultToken:"",tokenPostfix:".scss",ws:"[ \t\n\r\f]*",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@variabledeclaration"},{include:"@warndebug"},["[@](include)",{token:"keyword",next:"@includedeclaration"}],["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["[@](function)",{token:"keyword",next:"@functiondeclaration"}],["[@](mixin)",{token:"keyword",next:"@mixindeclaration"}],["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@controlstatement"},{include:"@selectorname"},["[&\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.curly",next:"@selectorbody"}]],selectorbody:[["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],{include:"@selector"},["[@](extend)",{token:"keyword",next:"@extendbody"}],["[@](return)",{token:"keyword",next:"@declarationbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],selectorname:[["#{",{token:"meta",next:"@variableinterpolation"}],["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@functioninvocation"},{include:"@numbers"},{include:"@strings"},{include:"@variablereference"},["(and\\b|or\\b|not\\b)","operator"],{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","operator"],[",","delimiter"],["!default","literal"],["\\(",{token:"delimiter.parenthesis",next:"@parenthizedterm"}]],rulevalue:[{include:"@term"},["!important","literal"],[";","delimiter","@pop"],["{",{token:"delimiter.curly",switchTo:"@nestedproperty"}],["(?=})",{token:"",next:"@pop"}]],nestedproperty:[["[*_]?@identifier@ws:","attribute.name","@rulevalue"],{include:"@comments"},["}",{token:"delimiter.curly",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],variabledeclaration:[["\\$@identifier@ws:","variable.decl","@declarationbody"]],urldeclaration:[{include:"@strings"},["[^)\r\n]+","string"],["\\)",{token:"meta",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],extendbody:[{include:"@selectorname"},["!optional","literal"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],variablereference:[["\\$@identifier","variable.ref"],["\\.\\.\\.","operator"],["#{",{token:"meta",next:"@variableinterpolation"}]],variableinterpolation:[{include:"@variablereference"},["}",{token:"meta",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],name:[["@identifier","attribute.value"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","number.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","number","@pop"]],functiondeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["{",{token:"delimiter.curly",switchTo:"@functionbody"}]],mixindeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],parameterdeclaration:[["\\$@identifier@ws:","variable.decl"],["\\.\\.\\.","operator"],[",","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],includedeclaration:[{include:"@functioninvocation"},["@identifier","meta"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],keyframedeclaration:[["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.curly",next:"@selectorbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],controlstatement:[["[@](if|else|for|while|each|media)",{token:"keyword.flow",next:"@controlstatementdeclaration"}]],controlstatementdeclaration:[["(in|from|through|if|to)\\b",{token:"keyword.flow"}],{include:"@term"},["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],functionbody:[["[@](return)",{token:"keyword"}],{include:"@variabledeclaration"},{include:"@term"},{include:"@controlstatement"},[";","delimiter"],["}",{token:"delimiter.curly",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"meta",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],strings:[['~?"',{token:"string.delimiter",next:"@stringenddoublequote"}],["~?'",{token:"string.delimiter",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string.delimiter",next:"@pop"}],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string.delimiter",next:"@pop"}],[".","string"]]}}}});var shell_exports={};__export(shell_exports,{conf:()=>conf66,language:()=>language67});var conf66,language67;var init_shell=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/shell/shell.js"(){conf66={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]};language67={defaultToken:"",ignoreCase:true,tokenPostfix:".shell",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],builtins:["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"],startingWithDash:/\-+\w+/,identifiersWithDashes:/[a-zA-Z]\w+(?:@startingWithDash)+/,symbols:/[=>conf67,language:()=>language68});var conf67,language68;var init_solidity=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/solidity/solidity.js"(){conf67={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]};language68={defaultToken:"",tokenPostfix:".sol",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["pragma","solidity","contract","library","using","struct","function","modifier","constructor","address","string","bool","Int","Uint","Byte","Fixed","Ufixed","int","int8","int16","int24","int32","int40","int48","int56","int64","int72","int80","int88","int96","int104","int112","int120","int128","int136","int144","int152","int160","int168","int176","int184","int192","int200","int208","int216","int224","int232","int240","int248","int256","uint","uint8","uint16","uint24","uint32","uint40","uint48","uint56","uint64","uint72","uint80","uint88","uint96","uint104","uint112","uint120","uint128","uint136","uint144","uint152","uint160","uint168","uint176","uint184","uint192","uint200","uint208","uint216","uint224","uint232","uint240","uint248","uint256","byte","bytes","bytes1","bytes2","bytes3","bytes4","bytes5","bytes6","bytes7","bytes8","bytes9","bytes10","bytes11","bytes12","bytes13","bytes14","bytes15","bytes16","bytes17","bytes18","bytes19","bytes20","bytes21","bytes22","bytes23","bytes24","bytes25","bytes26","bytes27","bytes28","bytes29","bytes30","bytes31","bytes32","fixed","fixed0x8","fixed0x16","fixed0x24","fixed0x32","fixed0x40","fixed0x48","fixed0x56","fixed0x64","fixed0x72","fixed0x80","fixed0x88","fixed0x96","fixed0x104","fixed0x112","fixed0x120","fixed0x128","fixed0x136","fixed0x144","fixed0x152","fixed0x160","fixed0x168","fixed0x176","fixed0x184","fixed0x192","fixed0x200","fixed0x208","fixed0x216","fixed0x224","fixed0x232","fixed0x240","fixed0x248","fixed0x256","fixed8x8","fixed8x16","fixed8x24","fixed8x32","fixed8x40","fixed8x48","fixed8x56","fixed8x64","fixed8x72","fixed8x80","fixed8x88","fixed8x96","fixed8x104","fixed8x112","fixed8x120","fixed8x128","fixed8x136","fixed8x144","fixed8x152","fixed8x160","fixed8x168","fixed8x176","fixed8x184","fixed8x192","fixed8x200","fixed8x208","fixed8x216","fixed8x224","fixed8x232","fixed8x240","fixed8x248","fixed16x8","fixed16x16","fixed16x24","fixed16x32","fixed16x40","fixed16x48","fixed16x56","fixed16x64","fixed16x72","fixed16x80","fixed16x88","fixed16x96","fixed16x104","fixed16x112","fixed16x120","fixed16x128","fixed16x136","fixed16x144","fixed16x152","fixed16x160","fixed16x168","fixed16x176","fixed16x184","fixed16x192","fixed16x200","fixed16x208","fixed16x216","fixed16x224","fixed16x232","fixed16x240","fixed24x8","fixed24x16","fixed24x24","fixed24x32","fixed24x40","fixed24x48","fixed24x56","fixed24x64","fixed24x72","fixed24x80","fixed24x88","fixed24x96","fixed24x104","fixed24x112","fixed24x120","fixed24x128","fixed24x136","fixed24x144","fixed24x152","fixed24x160","fixed24x168","fixed24x176","fixed24x184","fixed24x192","fixed24x200","fixed24x208","fixed24x216","fixed24x224","fixed24x232","fixed32x8","fixed32x16","fixed32x24","fixed32x32","fixed32x40","fixed32x48","fixed32x56","fixed32x64","fixed32x72","fixed32x80","fixed32x88","fixed32x96","fixed32x104","fixed32x112","fixed32x120","fixed32x128","fixed32x136","fixed32x144","fixed32x152","fixed32x160","fixed32x168","fixed32x176","fixed32x184","fixed32x192","fixed32x200","fixed32x208","fixed32x216","fixed32x224","fixed40x8","fixed40x16","fixed40x24","fixed40x32","fixed40x40","fixed40x48","fixed40x56","fixed40x64","fixed40x72","fixed40x80","fixed40x88","fixed40x96","fixed40x104","fixed40x112","fixed40x120","fixed40x128","fixed40x136","fixed40x144","fixed40x152","fixed40x160","fixed40x168","fixed40x176","fixed40x184","fixed40x192","fixed40x200","fixed40x208","fixed40x216","fixed48x8","fixed48x16","fixed48x24","fixed48x32","fixed48x40","fixed48x48","fixed48x56","fixed48x64","fixed48x72","fixed48x80","fixed48x88","fixed48x96","fixed48x104","fixed48x112","fixed48x120","fixed48x128","fixed48x136","fixed48x144","fixed48x152","fixed48x160","fixed48x168","fixed48x176","fixed48x184","fixed48x192","fixed48x200","fixed48x208","fixed56x8","fixed56x16","fixed56x24","fixed56x32","fixed56x40","fixed56x48","fixed56x56","fixed56x64","fixed56x72","fixed56x80","fixed56x88","fixed56x96","fixed56x104","fixed56x112","fixed56x120","fixed56x128","fixed56x136","fixed56x144","fixed56x152","fixed56x160","fixed56x168","fixed56x176","fixed56x184","fixed56x192","fixed56x200","fixed64x8","fixed64x16","fixed64x24","fixed64x32","fixed64x40","fixed64x48","fixed64x56","fixed64x64","fixed64x72","fixed64x80","fixed64x88","fixed64x96","fixed64x104","fixed64x112","fixed64x120","fixed64x128","fixed64x136","fixed64x144","fixed64x152","fixed64x160","fixed64x168","fixed64x176","fixed64x184","fixed64x192","fixed72x8","fixed72x16","fixed72x24","fixed72x32","fixed72x40","fixed72x48","fixed72x56","fixed72x64","fixed72x72","fixed72x80","fixed72x88","fixed72x96","fixed72x104","fixed72x112","fixed72x120","fixed72x128","fixed72x136","fixed72x144","fixed72x152","fixed72x160","fixed72x168","fixed72x176","fixed72x184","fixed80x8","fixed80x16","fixed80x24","fixed80x32","fixed80x40","fixed80x48","fixed80x56","fixed80x64","fixed80x72","fixed80x80","fixed80x88","fixed80x96","fixed80x104","fixed80x112","fixed80x120","fixed80x128","fixed80x136","fixed80x144","fixed80x152","fixed80x160","fixed80x168","fixed80x176","fixed88x8","fixed88x16","fixed88x24","fixed88x32","fixed88x40","fixed88x48","fixed88x56","fixed88x64","fixed88x72","fixed88x80","fixed88x88","fixed88x96","fixed88x104","fixed88x112","fixed88x120","fixed88x128","fixed88x136","fixed88x144","fixed88x152","fixed88x160","fixed88x168","fixed96x8","fixed96x16","fixed96x24","fixed96x32","fixed96x40","fixed96x48","fixed96x56","fixed96x64","fixed96x72","fixed96x80","fixed96x88","fixed96x96","fixed96x104","fixed96x112","fixed96x120","fixed96x128","fixed96x136","fixed96x144","fixed96x152","fixed96x160","fixed104x8","fixed104x16","fixed104x24","fixed104x32","fixed104x40","fixed104x48","fixed104x56","fixed104x64","fixed104x72","fixed104x80","fixed104x88","fixed104x96","fixed104x104","fixed104x112","fixed104x120","fixed104x128","fixed104x136","fixed104x144","fixed104x152","fixed112x8","fixed112x16","fixed112x24","fixed112x32","fixed112x40","fixed112x48","fixed112x56","fixed112x64","fixed112x72","fixed112x80","fixed112x88","fixed112x96","fixed112x104","fixed112x112","fixed112x120","fixed112x128","fixed112x136","fixed112x144","fixed120x8","fixed120x16","fixed120x24","fixed120x32","fixed120x40","fixed120x48","fixed120x56","fixed120x64","fixed120x72","fixed120x80","fixed120x88","fixed120x96","fixed120x104","fixed120x112","fixed120x120","fixed120x128","fixed120x136","fixed128x8","fixed128x16","fixed128x24","fixed128x32","fixed128x40","fixed128x48","fixed128x56","fixed128x64","fixed128x72","fixed128x80","fixed128x88","fixed128x96","fixed128x104","fixed128x112","fixed128x120","fixed128x128","fixed136x8","fixed136x16","fixed136x24","fixed136x32","fixed136x40","fixed136x48","fixed136x56","fixed136x64","fixed136x72","fixed136x80","fixed136x88","fixed136x96","fixed136x104","fixed136x112","fixed136x120","fixed144x8","fixed144x16","fixed144x24","fixed144x32","fixed144x40","fixed144x48","fixed144x56","fixed144x64","fixed144x72","fixed144x80","fixed144x88","fixed144x96","fixed144x104","fixed144x112","fixed152x8","fixed152x16","fixed152x24","fixed152x32","fixed152x40","fixed152x48","fixed152x56","fixed152x64","fixed152x72","fixed152x80","fixed152x88","fixed152x96","fixed152x104","fixed160x8","fixed160x16","fixed160x24","fixed160x32","fixed160x40","fixed160x48","fixed160x56","fixed160x64","fixed160x72","fixed160x80","fixed160x88","fixed160x96","fixed168x8","fixed168x16","fixed168x24","fixed168x32","fixed168x40","fixed168x48","fixed168x56","fixed168x64","fixed168x72","fixed168x80","fixed168x88","fixed176x8","fixed176x16","fixed176x24","fixed176x32","fixed176x40","fixed176x48","fixed176x56","fixed176x64","fixed176x72","fixed176x80","fixed184x8","fixed184x16","fixed184x24","fixed184x32","fixed184x40","fixed184x48","fixed184x56","fixed184x64","fixed184x72","fixed192x8","fixed192x16","fixed192x24","fixed192x32","fixed192x40","fixed192x48","fixed192x56","fixed192x64","fixed200x8","fixed200x16","fixed200x24","fixed200x32","fixed200x40","fixed200x48","fixed200x56","fixed208x8","fixed208x16","fixed208x24","fixed208x32","fixed208x40","fixed208x48","fixed216x8","fixed216x16","fixed216x24","fixed216x32","fixed216x40","fixed224x8","fixed224x16","fixed224x24","fixed224x32","fixed232x8","fixed232x16","fixed232x24","fixed240x8","fixed240x16","fixed248x8","ufixed","ufixed0x8","ufixed0x16","ufixed0x24","ufixed0x32","ufixed0x40","ufixed0x48","ufixed0x56","ufixed0x64","ufixed0x72","ufixed0x80","ufixed0x88","ufixed0x96","ufixed0x104","ufixed0x112","ufixed0x120","ufixed0x128","ufixed0x136","ufixed0x144","ufixed0x152","ufixed0x160","ufixed0x168","ufixed0x176","ufixed0x184","ufixed0x192","ufixed0x200","ufixed0x208","ufixed0x216","ufixed0x224","ufixed0x232","ufixed0x240","ufixed0x248","ufixed0x256","ufixed8x8","ufixed8x16","ufixed8x24","ufixed8x32","ufixed8x40","ufixed8x48","ufixed8x56","ufixed8x64","ufixed8x72","ufixed8x80","ufixed8x88","ufixed8x96","ufixed8x104","ufixed8x112","ufixed8x120","ufixed8x128","ufixed8x136","ufixed8x144","ufixed8x152","ufixed8x160","ufixed8x168","ufixed8x176","ufixed8x184","ufixed8x192","ufixed8x200","ufixed8x208","ufixed8x216","ufixed8x224","ufixed8x232","ufixed8x240","ufixed8x248","ufixed16x8","ufixed16x16","ufixed16x24","ufixed16x32","ufixed16x40","ufixed16x48","ufixed16x56","ufixed16x64","ufixed16x72","ufixed16x80","ufixed16x88","ufixed16x96","ufixed16x104","ufixed16x112","ufixed16x120","ufixed16x128","ufixed16x136","ufixed16x144","ufixed16x152","ufixed16x160","ufixed16x168","ufixed16x176","ufixed16x184","ufixed16x192","ufixed16x200","ufixed16x208","ufixed16x216","ufixed16x224","ufixed16x232","ufixed16x240","ufixed24x8","ufixed24x16","ufixed24x24","ufixed24x32","ufixed24x40","ufixed24x48","ufixed24x56","ufixed24x64","ufixed24x72","ufixed24x80","ufixed24x88","ufixed24x96","ufixed24x104","ufixed24x112","ufixed24x120","ufixed24x128","ufixed24x136","ufixed24x144","ufixed24x152","ufixed24x160","ufixed24x168","ufixed24x176","ufixed24x184","ufixed24x192","ufixed24x200","ufixed24x208","ufixed24x216","ufixed24x224","ufixed24x232","ufixed32x8","ufixed32x16","ufixed32x24","ufixed32x32","ufixed32x40","ufixed32x48","ufixed32x56","ufixed32x64","ufixed32x72","ufixed32x80","ufixed32x88","ufixed32x96","ufixed32x104","ufixed32x112","ufixed32x120","ufixed32x128","ufixed32x136","ufixed32x144","ufixed32x152","ufixed32x160","ufixed32x168","ufixed32x176","ufixed32x184","ufixed32x192","ufixed32x200","ufixed32x208","ufixed32x216","ufixed32x224","ufixed40x8","ufixed40x16","ufixed40x24","ufixed40x32","ufixed40x40","ufixed40x48","ufixed40x56","ufixed40x64","ufixed40x72","ufixed40x80","ufixed40x88","ufixed40x96","ufixed40x104","ufixed40x112","ufixed40x120","ufixed40x128","ufixed40x136","ufixed40x144","ufixed40x152","ufixed40x160","ufixed40x168","ufixed40x176","ufixed40x184","ufixed40x192","ufixed40x200","ufixed40x208","ufixed40x216","ufixed48x8","ufixed48x16","ufixed48x24","ufixed48x32","ufixed48x40","ufixed48x48","ufixed48x56","ufixed48x64","ufixed48x72","ufixed48x80","ufixed48x88","ufixed48x96","ufixed48x104","ufixed48x112","ufixed48x120","ufixed48x128","ufixed48x136","ufixed48x144","ufixed48x152","ufixed48x160","ufixed48x168","ufixed48x176","ufixed48x184","ufixed48x192","ufixed48x200","ufixed48x208","ufixed56x8","ufixed56x16","ufixed56x24","ufixed56x32","ufixed56x40","ufixed56x48","ufixed56x56","ufixed56x64","ufixed56x72","ufixed56x80","ufixed56x88","ufixed56x96","ufixed56x104","ufixed56x112","ufixed56x120","ufixed56x128","ufixed56x136","ufixed56x144","ufixed56x152","ufixed56x160","ufixed56x168","ufixed56x176","ufixed56x184","ufixed56x192","ufixed56x200","ufixed64x8","ufixed64x16","ufixed64x24","ufixed64x32","ufixed64x40","ufixed64x48","ufixed64x56","ufixed64x64","ufixed64x72","ufixed64x80","ufixed64x88","ufixed64x96","ufixed64x104","ufixed64x112","ufixed64x120","ufixed64x128","ufixed64x136","ufixed64x144","ufixed64x152","ufixed64x160","ufixed64x168","ufixed64x176","ufixed64x184","ufixed64x192","ufixed72x8","ufixed72x16","ufixed72x24","ufixed72x32","ufixed72x40","ufixed72x48","ufixed72x56","ufixed72x64","ufixed72x72","ufixed72x80","ufixed72x88","ufixed72x96","ufixed72x104","ufixed72x112","ufixed72x120","ufixed72x128","ufixed72x136","ufixed72x144","ufixed72x152","ufixed72x160","ufixed72x168","ufixed72x176","ufixed72x184","ufixed80x8","ufixed80x16","ufixed80x24","ufixed80x32","ufixed80x40","ufixed80x48","ufixed80x56","ufixed80x64","ufixed80x72","ufixed80x80","ufixed80x88","ufixed80x96","ufixed80x104","ufixed80x112","ufixed80x120","ufixed80x128","ufixed80x136","ufixed80x144","ufixed80x152","ufixed80x160","ufixed80x168","ufixed80x176","ufixed88x8","ufixed88x16","ufixed88x24","ufixed88x32","ufixed88x40","ufixed88x48","ufixed88x56","ufixed88x64","ufixed88x72","ufixed88x80","ufixed88x88","ufixed88x96","ufixed88x104","ufixed88x112","ufixed88x120","ufixed88x128","ufixed88x136","ufixed88x144","ufixed88x152","ufixed88x160","ufixed88x168","ufixed96x8","ufixed96x16","ufixed96x24","ufixed96x32","ufixed96x40","ufixed96x48","ufixed96x56","ufixed96x64","ufixed96x72","ufixed96x80","ufixed96x88","ufixed96x96","ufixed96x104","ufixed96x112","ufixed96x120","ufixed96x128","ufixed96x136","ufixed96x144","ufixed96x152","ufixed96x160","ufixed104x8","ufixed104x16","ufixed104x24","ufixed104x32","ufixed104x40","ufixed104x48","ufixed104x56","ufixed104x64","ufixed104x72","ufixed104x80","ufixed104x88","ufixed104x96","ufixed104x104","ufixed104x112","ufixed104x120","ufixed104x128","ufixed104x136","ufixed104x144","ufixed104x152","ufixed112x8","ufixed112x16","ufixed112x24","ufixed112x32","ufixed112x40","ufixed112x48","ufixed112x56","ufixed112x64","ufixed112x72","ufixed112x80","ufixed112x88","ufixed112x96","ufixed112x104","ufixed112x112","ufixed112x120","ufixed112x128","ufixed112x136","ufixed112x144","ufixed120x8","ufixed120x16","ufixed120x24","ufixed120x32","ufixed120x40","ufixed120x48","ufixed120x56","ufixed120x64","ufixed120x72","ufixed120x80","ufixed120x88","ufixed120x96","ufixed120x104","ufixed120x112","ufixed120x120","ufixed120x128","ufixed120x136","ufixed128x8","ufixed128x16","ufixed128x24","ufixed128x32","ufixed128x40","ufixed128x48","ufixed128x56","ufixed128x64","ufixed128x72","ufixed128x80","ufixed128x88","ufixed128x96","ufixed128x104","ufixed128x112","ufixed128x120","ufixed128x128","ufixed136x8","ufixed136x16","ufixed136x24","ufixed136x32","ufixed136x40","ufixed136x48","ufixed136x56","ufixed136x64","ufixed136x72","ufixed136x80","ufixed136x88","ufixed136x96","ufixed136x104","ufixed136x112","ufixed136x120","ufixed144x8","ufixed144x16","ufixed144x24","ufixed144x32","ufixed144x40","ufixed144x48","ufixed144x56","ufixed144x64","ufixed144x72","ufixed144x80","ufixed144x88","ufixed144x96","ufixed144x104","ufixed144x112","ufixed152x8","ufixed152x16","ufixed152x24","ufixed152x32","ufixed152x40","ufixed152x48","ufixed152x56","ufixed152x64","ufixed152x72","ufixed152x80","ufixed152x88","ufixed152x96","ufixed152x104","ufixed160x8","ufixed160x16","ufixed160x24","ufixed160x32","ufixed160x40","ufixed160x48","ufixed160x56","ufixed160x64","ufixed160x72","ufixed160x80","ufixed160x88","ufixed160x96","ufixed168x8","ufixed168x16","ufixed168x24","ufixed168x32","ufixed168x40","ufixed168x48","ufixed168x56","ufixed168x64","ufixed168x72","ufixed168x80","ufixed168x88","ufixed176x8","ufixed176x16","ufixed176x24","ufixed176x32","ufixed176x40","ufixed176x48","ufixed176x56","ufixed176x64","ufixed176x72","ufixed176x80","ufixed184x8","ufixed184x16","ufixed184x24","ufixed184x32","ufixed184x40","ufixed184x48","ufixed184x56","ufixed184x64","ufixed184x72","ufixed192x8","ufixed192x16","ufixed192x24","ufixed192x32","ufixed192x40","ufixed192x48","ufixed192x56","ufixed192x64","ufixed200x8","ufixed200x16","ufixed200x24","ufixed200x32","ufixed200x40","ufixed200x48","ufixed200x56","ufixed208x8","ufixed208x16","ufixed208x24","ufixed208x32","ufixed208x40","ufixed208x48","ufixed216x8","ufixed216x16","ufixed216x24","ufixed216x32","ufixed216x40","ufixed224x8","ufixed224x16","ufixed224x24","ufixed224x32","ufixed232x8","ufixed232x16","ufixed232x24","ufixed240x8","ufixed240x16","ufixed248x8","event","enum","let","mapping","private","public","external","inherited","payable","true","false","var","import","constant","if","else","for","else","for","while","do","break","continue","throw","returns","return","suicide","new","is","this","super"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}}});var sophia_exports={};__export(sophia_exports,{conf:()=>conf68,language:()=>language69});var conf68,language69;var init_sophia=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/sophia/sophia.js"(){conf68={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]};language69={defaultToken:"",tokenPostfix:".aes",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["contract","library","entrypoint","function","stateful","state","hash","signature","tuple","list","address","string","bool","int","record","datatype","type","option","oracle","oracle_query","Call","Bits","Bytes","Oracle","String","Crypto","Address","Auth","Chain","None","Some","bits","bytes","event","let","map","private","public","true","false","var","if","else","throw"],operators:["=",">","<","!","~","?","::",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}}}});var sparql_exports={};__export(sparql_exports,{conf:()=>conf69,language:()=>language70});var conf69,language70;var init_sparql=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/sparql/sparql.js"(){conf69={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"'",close:"'",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"}]};language70={defaultToken:"",tokenPostfix:".rq",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["add","as","asc","ask","base","by","clear","construct","copy","create","data","delete","desc","describe","distinct","drop","false","filter","from","graph","group","having","in","insert","limit","load","minus","move","named","not","offset","optional","order","prefix","reduced","select","service","silent","to","true","undef","union","using","values","where","with"],builtinFunctions:["a","abs","avg","bind","bnode","bound","ceil","coalesce","concat","contains","count","datatype","day","encode_for_uri","exists","floor","group_concat","hours","if","iri","isblank","isiri","isliteral","isnumeric","isuri","lang","langmatches","lcase","max","md5","min","minutes","month","now","rand","regex","replace","round","sameterm","sample","seconds","sha1","sha256","sha384","sha512","str","strafter","strbefore","strdt","strends","strlang","strlen","strstarts","struuid","substr","sum","timezone","tz","ucase","uri","uuid","year"],ignoreCase:true,tokenizer:{root:[[/<[^\s\u00a0>]*>?/,"tag"],{include:"@strings"},[/#.*/,"comment"],[/[{}()\[\]]/,"@brackets"],[/[;,.]/,"delimiter"],[/[_\w\d]+:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])*/,"tag"],[/:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/,"tag"],[/[$?]?[_\w\d]+/,{cases:{"@keywords":{token:"keyword"},"@builtinFunctions":{token:"predefined.sql"},"@default":"identifier"}}],[/\^\^/,"operator.sql"],[/\^[*+\-<>=&|^\/!?]*/,"operator.sql"],[/[*+\-<>=&|\/!?]/,"operator.sql"],[/@[a-z\d\-]*/,"metatag.html"],[/\s+/,"white"]],strings:[[/'([^'\\]|\\.)*$/,"string.invalid"],[/'$/,"string.sql","@pop"],[/'/,"string.sql","@stringBody"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"$/,"string.sql","@pop"],[/"/,"string.sql","@dblStringBody"]],stringBody:[[/[^\\']+/,"string.sql"],[/\\./,"string.escape"],[/'/,"string.sql","@pop"]],dblStringBody:[[/[^\\"]+/,"string.sql"],[/\\./,"string.escape"],[/"/,"string.sql","@pop"]]}}}});var sql_exports={};__export(sql_exports,{conf:()=>conf70,language:()=>language71});var conf70,language71;var init_sql=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/sql/sql.js"(){conf70={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]};language71={defaultToken:"",tokenPostfix:".sql",ignoreCase:true,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ABORT","ABSOLUTE","ACTION","ADA","ADD","AFTER","ALL","ALLOCATE","ALTER","ALWAYS","ANALYZE","AND","ANY","ARE","AS","ASC","ASSERTION","AT","ATTACH","AUTHORIZATION","AUTOINCREMENT","AVG","BACKUP","BEFORE","BEGIN","BETWEEN","BIT","BIT_LENGTH","BOTH","BREAK","BROWSE","BULK","BY","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CHECKPOINT","CLOSE","CLUSTERED","COALESCE","COLLATE","COLLATION","COLUMN","COMMIT","COMPUTE","CONFLICT","CONNECT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTAINS","CONTAINSTABLE","CONTINUE","CONVERT","CORRESPONDING","COUNT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATE","DAY","DBCC","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DENY","DESC","DESCRIBE","DESCRIPTOR","DETACH","DIAGNOSTICS","DISCONNECT","DISK","DISTINCT","DISTRIBUTED","DO","DOMAIN","DOUBLE","DROP","DUMP","EACH","ELSE","END","END-EXEC","ERRLVL","ESCAPE","EXCEPT","EXCEPTION","EXCLUDE","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXPLAIN","EXTERNAL","EXTRACT","FAIL","FALSE","FETCH","FILE","FILLFACTOR","FILTER","FIRST","FLOAT","FOLLOWING","FOR","FOREIGN","FORTRAN","FOUND","FREETEXT","FREETEXTTABLE","FROM","FULL","FUNCTION","GENERATED","GET","GLOB","GLOBAL","GO","GOTO","GRANT","GROUP","GROUPS","HAVING","HOLDLOCK","HOUR","IDENTITY","IDENTITYCOL","IDENTITY_INSERT","IF","IGNORE","IMMEDIATE","IN","INCLUDE","INDEX","INDEXED","INDICATOR","INITIALLY","INNER","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","ISNULL","ISOLATION","JOIN","KEY","KILL","LANGUAGE","LAST","LEADING","LEFT","LEVEL","LIKE","LIMIT","LINENO","LOAD","LOCAL","LOWER","MATCH","MATERIALIZED","MAX","MERGE","MIN","MINUTE","MODULE","MONTH","NAMES","NATIONAL","NATURAL","NCHAR","NEXT","NO","NOCHECK","NONCLUSTERED","NONE","NOT","NOTHING","NOTNULL","NULL","NULLIF","NULLS","NUMERIC","OCTET_LENGTH","OF","OFF","OFFSET","OFFSETS","ON","ONLY","OPEN","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","OPTION","OR","ORDER","OTHERS","OUTER","OUTPUT","OVER","OVERLAPS","PAD","PARTIAL","PARTITION","PASCAL","PERCENT","PIVOT","PLAN","POSITION","PRAGMA","PRECEDING","PRECISION","PREPARE","PRESERVE","PRIMARY","PRINT","PRIOR","PRIVILEGES","PROC","PROCEDURE","PUBLIC","QUERY","RAISE","RAISERROR","RANGE","READ","READTEXT","REAL","RECONFIGURE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELATIVE","RELEASE","RENAME","REPLACE","REPLICATION","RESTORE","RESTRICT","RETURN","RETURNING","REVERT","REVOKE","RIGHT","ROLLBACK","ROW","ROWCOUNT","ROWGUIDCOL","ROWS","RULE","SAVE","SAVEPOINT","SCHEMA","SCROLL","SECOND","SECTION","SECURITYAUDIT","SELECT","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","SESSION","SESSION_USER","SET","SETUSER","SHUTDOWN","SIZE","SMALLINT","SOME","SPACE","SQL","SQLCA","SQLCODE","SQLERROR","SQLSTATE","SQLWARNING","STATISTICS","SUBSTRING","SUM","SYSTEM_USER","TABLE","TABLESAMPLE","TEMP","TEMPORARY","TEXTSIZE","THEN","TIES","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TOP","TRAILING","TRAN","TRANSACTION","TRANSLATE","TRANSLATION","TRIGGER","TRIM","TRUE","TRUNCATE","TRY_CONVERT","TSEQUAL","UNBOUNDED","UNION","UNIQUE","UNKNOWN","UNPIVOT","UPDATE","UPDATETEXT","UPPER","USAGE","USE","USER","USING","VACUUM","VALUE","VALUES","VARCHAR","VARYING","VIEW","VIRTUAL","WAITFOR","WHEN","WHENEVER","WHERE","WHILE","WINDOW","WITH","WITHIN GROUP","WITHOUT","WORK","WRITE","WRITETEXT","YEAR","ZONE"],operators:["ALL","AND","ANY","BETWEEN","EXISTS","IN","LIKE","NOT","OR","SOME","EXCEPT","INTERSECT","UNION","APPLY","CROSS","FULL","INNER","JOIN","LEFT","OUTER","RIGHT","CONTAINS","FREETEXT","IS","NULL","PIVOT","UNPIVOT","MATCHED"],builtinFunctions:["AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","SUM","STDEV","STDEVP","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","COLLATE","COLLATIONPROPERTY","TERTIARY_WEIGHTS","FEDERATION_FILTERING_VALUE","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","CHOOSE","COALESCE","IIF","NULLIF","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASE_PRINCIPAL_ID","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STUFF","SUBSTRING","UNICODE","UPPER","BINARY_CHECKSUM","CHECKSUM","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","ERROR_LINE","ERROR_NUMBER","ERROR_MESSAGE","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GETANSINULL","GET_FILESTREAM_TRANSACTION_CONTEXT","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","XACT_STATE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","CHANGETABLE","CHANGE_TRACKING_CONTEXT","CHANGE_TRACKING_CURRENT_VERSION","CHANGE_TRACKING_IS_COLUMN_IN_MASK","CHANGE_TRACKING_MIN_VALID_VERSION","CONTAINSTABLE","FREETEXTTABLE","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","FILETABLEROOTPATH","GETFILENAMESPACEPATH","GETPATHLOCATOR","PATHNAME","GET_TRANSMISSION_STATUS"],builtinVariables:["@@DATEFIRST","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","@@CURSOR_ROWS","@@FETCH_STATUS","@@DATEFIRST","@@PROCID","@@ERROR","@@IDENTITY","@@ROWCOUNT","@@TRANCOUNT","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACKET_ERRORS","@@PACK_RECEIVED","@@PACK_SENT","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE"],pseudoColumns:["$ACTION","$IDENTITY","$ROWGUID","$PARTITION"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i,"keyword"],[/BEGIN\s+TRY\b/i,{token:"keyword.try"}],[/END\s+TRY\b/i,{token:"keyword.try"}],[/BEGIN\s+CATCH\b/i,{token:"keyword.catch"}],[/END\s+CATCH\b/i,{token:"keyword.catch"}],[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}}}});var st_exports={};__export(st_exports,{conf:()=>conf71,language:()=>language72});var conf71,language72;var init_st=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/st/st.js"(){conf71={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["var","end_var"],["var_input","end_var"],["var_output","end_var"],["var_in_out","end_var"],["var_temp","end_var"],["var_global","end_var"],["var_access","end_var"],["var_external","end_var"],["type","end_type"],["struct","end_struct"],["program","end_program"],["function","end_function"],["function_block","end_function_block"],["action","end_action"],["step","end_step"],["initial_step","end_step"],["transaction","end_transaction"],["configuration","end_configuration"],["tcp","end_tcp"],["recource","end_recource"],["channel","end_channel"],["library","end_library"],["folder","end_folder"],["binaries","end_binaries"],["includes","end_includes"],["sources","end_sources"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"/*",close:"*/"},{open:"'",close:"'",notIn:["string_sq"]},{open:'"',close:'"',notIn:["string_dq"]},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"var",close:"end_var"},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}};language72={defaultToken:"",tokenPostfix:".st",ignoreCase:true,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","end_if","elsif","else","case","of","to","__try","__catch","__finally","do","with","by","while","repeat","end_while","end_repeat","end_case","for","end_for","task","retain","non_retain","constant","with","at","exit","return","interval","priority","address","port","on_channel","then","iec","file","uses","version","packagetype","displayname","copyright","summary","vendor","common_source","from","extends","implements"],constant:["false","true","null"],defineKeywords:["var","var_input","var_output","var_in_out","var_temp","var_global","var_access","var_external","end_var","type","end_type","struct","end_struct","program","end_program","function","end_function","function_block","end_function_block","interface","end_interface","method","end_method","property","end_property","namespace","end_namespace","configuration","end_configuration","tcp","end_tcp","resource","end_resource","channel","end_channel","library","end_library","folder","end_folder","binaries","end_binaries","includes","end_includes","sources","end_sources","action","end_action","step","initial_step","end_step","transaction","end_transaction"],typeKeywords:["int","sint","dint","lint","usint","uint","udint","ulint","real","lreal","time","date","time_of_day","date_and_time","string","bool","byte","word","dword","array","pointer","lword"],operators:["=",">","<",":",":=","<=",">=","<>","&","+","-","*","**","MOD","^","or","and","not","xor","abs","acos","asin","atan","cos","exp","expt","ln","log","sin","sqrt","tan","sel","max","min","limit","mux","shl","shr","rol","ror","indexof","sizeof","adr","adrinst","bitadr","is_valid","ref","ref_to"],builtinVariables:[],builtinFunctions:["sr","rs","tp","ton","tof","eq","ge","le","lt","ne","round","trunc","ctd","сtu","ctud","r_trig","f_trig","move","concat","delete","find","insert","left","len","replace","right","rtc"],symbols:/[=>conf72,language:()=>language73});var conf72,language73;var init_swift=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/swift/swift.js"(){conf72={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]};language73={defaultToken:"",tokenPostfix:".swift",identifier:/[a-zA-Z_][\w$]*/,attributes:["@GKInspectable","@IBAction","@IBDesignable","@IBInspectable","@IBOutlet","@IBSegueAction","@NSApplicationMain","@NSCopying","@NSManaged","@Sendable","@UIApplicationMain","@autoclosure","@actorIndependent","@asyncHandler","@available","@convention","@derivative","@differentiable","@discardableResult","@dynamicCallable","@dynamicMemberLookup","@escaping","@frozen","@globalActor","@inlinable","@inline","@main","@noDerivative","@nonobjc","@noreturn","@objc","@objcMembers","@preconcurrency","@propertyWrapper","@requires_stored_property_inits","@resultBuilder","@testable","@unchecked","@unknown","@usableFromInline","@warn_unqualified_access"],accessmodifiers:["open","public","internal","fileprivate","private"],keywords:["#available","#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning","Any","Protocol","Self","Type","actor","as","assignment","associatedtype","associativity","async","await","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","dynamicType","else","enum","extension","fallthrough","false","fileprivate","final","for","func","get","guard","higherThan","if","import","in","indirect","infix","init","inout","internal","is","isolated","lazy","left","let","lowerThan","mutating","nil","none","nonisolated","nonmutating","open","operator","optional","override","postfix","precedence","precedencegroup","prefix","private","protocol","public","repeat","required","rethrows","return","right","safe","self","set","some","static","struct","subscript","super","switch","throw","throws","true","try","typealias","unowned","unsafe","var","weak","where","while","willSet","__consuming","__owned"],symbols:/[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,operatorstart:/[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/,operatorend:/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,operators:/(@operatorstart)((@operatorstart)|(@operatorend))*/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},{include:"@attribute"},{include:"@literal"},{include:"@keyword"},{include:"@invokedmethod"},{include:"@symbol"}],whitespace:[[/\s+/,"white"],[/"""/,"string.quote","@endDblDocString"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string.quote","@popall"],[/"/,"string"]],symbol:[[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/[.]/,"delimiter"],[/@operators/,"operator"],[/@symbols/,"operator"]],comment:[[/\/\/\/.*$/,"comment.doc"],[/\/\*\*/,"comment.doc","@commentdocbody"],[/\/\/.*$/,"comment"],[/\/\*/,"comment","@commentbody"]],commentdocbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment.doc","@pop"],[/\:[a-zA-Z]+\:/,"comment.doc.param"],[/./,"comment.doc"]],commentbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment","@pop"],[/./,"comment"]],attribute:[[/@@@identifier/,{cases:{"@attributes":"keyword.control","@default":""}}]],literal:[[/"/,{token:"string.quote",next:"@stringlit"}],[/0[b]([01]_?)+/,"number.binary"],[/0[o]([0-7]_?)+/,"number.octal"],[/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/,"number.hex"],[/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/,"number.float"],[/(\d_?)+/,"number"]],stringlit:[[/\\\(/,{token:"operator",next:"@interpolatedexpression"}],[/@escapes/,"string"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}],[/./,"string"]],interpolatedexpression:[[/\(/,{token:"operator",next:"@interpolatedexpression"}],[/\)/,{token:"operator",next:"@pop"}],{include:"@literal"},{include:"@keyword"},{include:"@symbol"}],keyword:[[/`/,{token:"operator",next:"@escapedkeyword"}],[/@identifier/,{cases:{"@keywords":"keyword","[A-Z][a-zA-Z0-9$]*":"type.identifier","@default":"identifier"}}]],escapedkeyword:[[/`/,{token:"operator",next:"@pop"}],[/./,"identifier"]],invokedmethod:[[/([.])(@identifier)/,{cases:{$2:["delimeter","type.identifier"],"@default":""}}]]}}}});var systemverilog_exports={};__export(systemverilog_exports,{conf:()=>conf73,language:()=>language74});var conf73,language74;var init_systemverilog=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/systemverilog/systemverilog.js"(){conf73={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["begin","end"],["case","endcase"],["casex","endcase"],["casez","endcase"],["checker","endchecker"],["class","endclass"],["clocking","endclocking"],["config","endconfig"],["function","endfunction"],["generate","endgenerate"],["group","endgroup"],["interface","endinterface"],["module","endmodule"],["package","endpackage"],["primitive","endprimitive"],["program","endprogram"],["property","endproperty"],["specify","endspecify"],["sequence","endsequence"],["table","endtable"],["task","endtask"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:false,markers:{start:new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:begin|case(x|z)?|class|clocking|config|covergroup|function|generate|interface|module|package|primitive|property|program|sequence|specify|table|task)\\b"),end:new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:end|endcase|endclass|endclocking|endconfig|endgroup|endfunction|endgenerate|endinterface|endmodule|endpackage|endprimitive|endproperty|endprogram|endsequence|endspecify|endtable|endtask)\\b")}}};language74={defaultToken:"",tokenPostfix:".sv",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default","defparam","design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate","genvar","global","highz0","highz1","if","iff","ifnone","ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","null","or","output","package","packed","parameter","pmos","posedge","primitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specparam","static","string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","wor","xnor","xor"],builtin_gates:["and","nand","nor","or","xor","xnor","buf","not","bufif0","bufif1","notif1","notif0","cmos","nmos","pmos","rcmos","rnmos","rpmos","tran","tranif1","tranif0","rtran","rtranif1","rtranif0"],operators:["=","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>+","<<<=",">>>=","?",":","+","-","!","~","&","~&","|","~|","^","~^","^~","+","-","*","/","%","==","!=","===","!==","==?","!=?","&&","||","**","<","<=",">",">=","&","|","^",">>","<<",">>>","<<<","++","--","->","<->","inside","dist","::","+:","-:","*>","&&&","|->","|=>","#=#"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],{include:"@numbers"},[/[;,.]/,"delimiter"],{include:"@strings"}],identifier_or_keyword:[[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}]],numbers:[[/\d+?[\d_]*(?:\.[\d_]+)?[eE][\-+]?\d+/,"number.float"],[/\d+?[\d_]*\.[\d_]+(?:\s*@timeunits)?/,"number.float"],[/(?:\d+?[\d_]*\s*)?'[sS]?[dD]\s*[0-9xXzZ?]+?[0-9xXzZ?_]*/,"number"],[/(?:\d+?[\d_]*\s*)?'[sS]?[bB]\s*[0-1xXzZ?]+?[0-1xXzZ?_]*/,"number.binary"],[/(?:\d+?[\d_]*\s*)?'[sS]?[oO]\s*[0-7xXzZ?]+?[0-7xXzZ?_]*/,"number.octal"],[/(?:\d+?[\d_]*\s*)?'[sS]?[hH]\s*[0-9a-fA-FxXzZ?]+?[0-9a-fA-FxXzZ?_]*/,"number.hex"],[/1step/,"number"],[/[\dxXzZ]+?[\dxXzZ_]*(?:\s*@timeunits)?/,"number"],[/'[01xXzZ]+/,"number"]],module_instance:[{include:"@whitespace"},[/(#?)(\()/,["",{token:"@brackets",next:"@port_connection"}]],[/@identifier\s*[;={}\[\],]/,{token:"@rematch",next:"@pop"}],[/@symbols|[;={}\[\],]/,{token:"@rematch",next:"@pop"}],[/@identifier/,"type"],[/;/,"delimiter","@pop"]],port_connection:[{include:"@identifier_or_keyword"},{include:"@whitespace"},[/@systemcall/,"variable.predefined"],{include:"@numbers"},{include:"@strings"},[/[,]/,"delimiter"],[/\(/,"@brackets","@port_connection"],[/\)/,"@brackets","@pop"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],strings:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],include:[[/(\s*)(")([\w*\/*]*)(.\w*)(")/,["","string.include.identifier","string.include.identifier","string.include.identifier",{token:"string.include.identifier",next:"@pop"}]],[/(\s*)(<)([\w*\/*]*)(.\w*)(>)/,["","string.include.identifier","string.include.identifier","string.include.identifier",{token:"string.include.identifier",next:"@pop"}]]],table:[{include:"@whitespace"},[/[()]/,"@brackets"],[/[:;]/,"delimiter"],[/[01\-*?xXbBrRfFpPnN]/,"variable.predefined"],["endtable","keyword.endtable","@pop"]]}}}});var tcl_exports={};__export(tcl_exports,{conf:()=>conf74,language:()=>language75});var conf74,language75;var init_tcl=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/tcl/tcl.js"(){conf74={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]};language75={tokenPostfix:".tcl",specialFunctions:["set","unset","rename","variable","proc","coroutine","foreach","incr","append","lappend","linsert","lreplace"],mainFunctions:["if","then","elseif","else","case","switch","while","for","break","continue","return","package","namespace","catch","exit","eval","expr","uplevel","upvar"],builtinFunctions:["file","info","concat","join","lindex","list","llength","lrange","lsearch","lsort","split","array","parray","binary","format","regexp","regsub","scan","string","subst","dict","cd","clock","exec","glob","pid","pwd","close","eof","fblocked","fconfigure","fcopy","fileevent","flush","gets","open","puts","read","seek","socket","tell","interp","after","auto_execok","auto_load","auto_mkindex","auto_reset","bgerror","error","global","history","load","source","time","trace","unknown","unset","update","vwait","winfo","wm","bind","event","pack","place","grid","font","bell","clipboard","destroy","focus","grab","lower","option","raise","selection","send","tk","tkwait","tk_bisque","tk_focusNext","tk_focusPrev","tk_focusFollowsMouse","tk_popup","tk_setPalette"],symbols:/[=>conf75,language:()=>language76});var conf75,language76;var init_twig=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/twig/twig.js"(){conf75={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{#","#}"]},brackets:[["{#","#}"],["{%","%}"],["{{","}}"],["(",")"],["[","]"],["\x3c!--","--\x3e"],["<",">"]],autoClosingPairs:[{open:"{# ",close:" #}"},{open:"{% ",close:" %}"},{open:"{{ ",close:" }}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]};language76={defaultToken:"",tokenPostfix:"",ignoreCase:true,keywords:["apply","autoescape","block","deprecated","do","embed","extends","flush","for","from","if","import","include","macro","sandbox","set","use","verbatim","with","endapply","endautoescape","endblock","endembed","endfor","endif","endmacro","endsandbox","endset","endwith","true","false"],tokenizer:{root:[[/\s+/],[/{#/,"comment.twig","@commentState"],[/{%[-~]?/,"delimiter.twig","@blockState"],[/{{[-~]?/,"delimiter.twig","@variableState"],[/)/,["delimiter.html","tag.html","","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/|>=|<=/,"operators.twig"],[/(starts with|ends with|matches)(\s+)/,["operators.twig",""]],[/(in)(\s+)/,["operators.twig",""]],[/(is)(\s+)/,["operators.twig",""]],[/\||~|:|\.{1,2}|\?{1,2}/,"operators.twig"],[/[^\W\d][\w]*/,{cases:{"@keywords":"keyword.twig","@default":"variable.twig"}}],[/\d+(\.\d+)?/,"number.twig"],[/\(|\)|\[|\]|{|}|,/,"delimiter.twig"],[/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/,"string.twig"],[/"/,"string.twig","@stringState"],[/=>/,"operators.twig"],[/=/,"operators.twig"]],doctype:[[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name.html","@scriptAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter.html","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name.html","@styleAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter.html","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}}}});var vb_exports={};__export(vb_exports,{conf:()=>conf76,language:()=>language77});var conf76,language77;var init_vb=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/vb/vb.js"(){conf76={comments:{lineComment:"'",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"],["addhandler","end addhandler"],["class","end class"],["enum","end enum"],["event","end event"],["function","end function"],["get","end get"],["if","end if"],["interface","end interface"],["module","end module"],["namespace","end namespace"],["operator","end operator"],["property","end property"],["raiseevent","end raiseevent"],["removehandler","end removehandler"],["select","end select"],["set","end set"],["structure","end structure"],["sub","end sub"],["synclock","end synclock"],["try","end try"],["while","end while"],["with","end with"],["using","end using"],["do","loop"],["for","next"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"<",close:">",notIn:["string","comment"]}],folding:{markers:{start:new RegExp("^\\s*#Region\\b"),end:new RegExp("^\\s*#End Region\\b")}}};language77={defaultToken:"",tokenPostfix:".vb",ignoreCase:true,brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.angle",open:"<",close:">"},{token:"keyword.tag-addhandler",open:"addhandler",close:"end addhandler"},{token:"keyword.tag-class",open:"class",close:"end class"},{token:"keyword.tag-enum",open:"enum",close:"end enum"},{token:"keyword.tag-event",open:"event",close:"end event"},{token:"keyword.tag-function",open:"function",close:"end function"},{token:"keyword.tag-get",open:"get",close:"end get"},{token:"keyword.tag-if",open:"if",close:"end if"},{token:"keyword.tag-interface",open:"interface",close:"end interface"},{token:"keyword.tag-module",open:"module",close:"end module"},{token:"keyword.tag-namespace",open:"namespace",close:"end namespace"},{token:"keyword.tag-operator",open:"operator",close:"end operator"},{token:"keyword.tag-property",open:"property",close:"end property"},{token:"keyword.tag-raiseevent",open:"raiseevent",close:"end raiseevent"},{token:"keyword.tag-removehandler",open:"removehandler",close:"end removehandler"},{token:"keyword.tag-select",open:"select",close:"end select"},{token:"keyword.tag-set",open:"set",close:"end set"},{token:"keyword.tag-structure",open:"structure",close:"end structure"},{token:"keyword.tag-sub",open:"sub",close:"end sub"},{token:"keyword.tag-synclock",open:"synclock",close:"end synclock"},{token:"keyword.tag-try",open:"try",close:"end try"},{token:"keyword.tag-while",open:"while",close:"end while"},{token:"keyword.tag-with",open:"with",close:"end with"},{token:"keyword.tag-using",open:"using",close:"end using"},{token:"keyword.tag-do",open:"do",close:"loop"},{token:"keyword.tag-for",open:"for",close:"next"}],keywords:["AddHandler","AddressOf","Alias","And","AndAlso","As","Async","Boolean","ByRef","Byte","ByVal","Call","Case","Catch","CBool","CByte","CChar","CDate","CDbl","CDec","Char","CInt","Class","CLng","CObj","Const","Continue","CSByte","CShort","CSng","CStr","CType","CUInt","CULng","CUShort","Date","Decimal","Declare","Default","Delegate","Dim","DirectCast","Do","Double","Each","Else","ElseIf","End","EndIf","Enum","Erase","Error","Event","Exit","False","Finally","For","Friend","Function","Get","GetType","GetXMLNamespace","Global","GoSub","GoTo","Handles","If","Implements","Imports","In","Inherits","Integer","Interface","Is","IsNot","Let","Lib","Like","Long","Loop","Me","Mod","Module","MustInherit","MustOverride","MyBase","MyClass","NameOf","Namespace","Narrowing","New","Next","Not","Nothing","NotInheritable","NotOverridable","Object","Of","On","Operator","Option","Optional","Or","OrElse","Out","Overloads","Overridable","Overrides","ParamArray","Partial","Private","Property","Protected","Public","RaiseEvent","ReadOnly","ReDim","RemoveHandler","Resume","Return","SByte","Select","Set","Shadows","Shared","Short","Single","Static","Step","Stop","String","Structure","Sub","SyncLock","Then","Throw","To","True","Try","TryCast","TypeOf","UInteger","ULong","UShort","Using","Variant","Wend","When","While","Widening","With","WithEvents","WriteOnly","Xor"],tagwords:["If","Sub","Select","Try","Class","Enum","Function","Get","Interface","Module","Namespace","Operator","Set","Structure","Using","While","With","Do","Loop","For","Next","Property","Continue","AddHandler","RemoveHandler","Event","RaiseEvent","SyncLock"],symbols:/[=>conf77,language:()=>language78});function qw(str){let result=[];const words=str.split(/\t+|\r+|\n+| +/);for(let i=0;i0){result.push(words[i])}}return result}var conf77,atoms,keywords3,reserved,predeclared_enums,predeclared_types,predeclared_type_generators,predeclared_type_aliases,predeclared_intrinsics,operators,directive_re,ident_re,predefined_token,language78;var init_wgsl=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/wgsl/wgsl.js"(){conf77={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"}]};atoms=qw("true false");keywords3=qw(`\n\t\t\t alias\n\t\t\t break\n\t\t\t case\n\t\t\t const\n\t\t\t const_assert\n\t\t\t continue\n\t\t\t continuing\n\t\t\t default\n\t\t\t diagnostic\n\t\t\t discard\n\t\t\t else\n\t\t\t enable\n\t\t\t fn\n\t\t\t for\n\t\t\t if\n\t\t\t let\n\t\t\t loop\n\t\t\t override\n\t\t\t requires\n\t\t\t return\n\t\t\t struct\n\t\t\t switch\n\t\t\t var\n\t\t\t while\n\t\t\t `);reserved=qw(`\n\t\t\t NULL\n\t\t\t Self\n\t\t\t abstract\n\t\t\t active\n\t\t\t alignas\n\t\t\t alignof\n\t\t\t as\n\t\t\t asm\n\t\t\t asm_fragment\n\t\t\t async\n\t\t\t attribute\n\t\t\t auto\n\t\t\t await\n\t\t\t become\n\t\t\t binding_array\n\t\t\t cast\n\t\t\t catch\n\t\t\t class\n\t\t\t co_await\n\t\t\t co_return\n\t\t\t co_yield\n\t\t\t coherent\n\t\t\t column_major\n\t\t\t common\n\t\t\t compile\n\t\t\t compile_fragment\n\t\t\t concept\n\t\t\t const_cast\n\t\t\t consteval\n\t\t\t constexpr\n\t\t\t constinit\n\t\t\t crate\n\t\t\t debugger\n\t\t\t decltype\n\t\t\t delete\n\t\t\t demote\n\t\t\t demote_to_helper\n\t\t\t do\n\t\t\t dynamic_cast\n\t\t\t enum\n\t\t\t explicit\n\t\t\t export\n\t\t\t extends\n\t\t\t extern\n\t\t\t external\n\t\t\t fallthrough\n\t\t\t filter\n\t\t\t final\n\t\t\t finally\n\t\t\t friend\n\t\t\t from\n\t\t\t fxgroup\n\t\t\t get\n\t\t\t goto\n\t\t\t groupshared\n\t\t\t highp\n\t\t\t impl\n\t\t\t implements\n\t\t\t import\n\t\t\t inline\n\t\t\t instanceof\n\t\t\t interface\n\t\t\t layout\n\t\t\t lowp\n\t\t\t macro\n\t\t\t macro_rules\n\t\t\t match\n\t\t\t mediump\n\t\t\t meta\n\t\t\t mod\n\t\t\t module\n\t\t\t move\n\t\t\t mut\n\t\t\t mutable\n\t\t\t namespace\n\t\t\t new\n\t\t\t nil\n\t\t\t noexcept\n\t\t\t noinline\n\t\t\t nointerpolation\n\t\t\t noperspective\n\t\t\t null\n\t\t\t nullptr\n\t\t\t of\n\t\t\t operator\n\t\t\t package\n\t\t\t packoffset\n\t\t\t partition\n\t\t\t pass\n\t\t\t patch\n\t\t\t pixelfragment\n\t\t\t precise\n\t\t\t precision\n\t\t\t premerge\n\t\t\t priv\n\t\t\t protected\n\t\t\t pub\n\t\t\t public\n\t\t\t readonly\n\t\t\t ref\n\t\t\t regardless\n\t\t\t register\n\t\t\t reinterpret_cast\n\t\t\t require\n\t\t\t resource\n\t\t\t restrict\n\t\t\t self\n\t\t\t set\n\t\t\t shared\n\t\t\t sizeof\n\t\t\t smooth\n\t\t\t snorm\n\t\t\t static\n\t\t\t static_assert\n\t\t\t static_cast\n\t\t\t std\n\t\t\t subroutine\n\t\t\t super\n\t\t\t target\n\t\t\t template\n\t\t\t this\n\t\t\t thread_local\n\t\t\t throw\n\t\t\t trait\n\t\t\t try\n\t\t\t type\n\t\t\t typedef\n\t\t\t typeid\n\t\t\t typename\n\t\t\t typeof\n\t\t\t union\n\t\t\t unless\n\t\t\t unorm\n\t\t\t unsafe\n\t\t\t unsized\n\t\t\t use\n\t\t\t using\n\t\t\t varying\n\t\t\t virtual\n\t\t\t volatile\n\t\t\t wgsl\n\t\t\t where\n\t\t\t with\n\t\t\t writeonly\n\t\t\t yield\n\t\t\t `);predeclared_enums=qw(`\n\t\tread write read_write\n\t\tfunction private workgroup uniform storage\n\t\tperspective linear flat\n\t\tcenter centroid sample\n\t\tvertex_index instance_index position front_facing frag_depth\n\t\t\tlocal_invocation_id local_invocation_index\n\t\t\tglobal_invocation_id workgroup_id num_workgroups\n\t\t\tsample_index sample_mask\n\t\trgba8unorm\n\t\trgba8snorm\n\t\trgba8uint\n\t\trgba8sint\n\t\trgba16uint\n\t\trgba16sint\n\t\trgba16float\n\t\tr32uint\n\t\tr32sint\n\t\tr32float\n\t\trg32uint\n\t\trg32sint\n\t\trg32float\n\t\trgba32uint\n\t\trgba32sint\n\t\trgba32float\n\t\tbgra8unorm\n`);predeclared_types=qw(`\n\t\tbool\n\t\tf16\n\t\tf32\n\t\ti32\n\t\tsampler sampler_comparison\n\t\ttexture_depth_2d\n\t\ttexture_depth_2d_array\n\t\ttexture_depth_cube\n\t\ttexture_depth_cube_array\n\t\ttexture_depth_multisampled_2d\n\t\ttexture_external\n\t\ttexture_external\n\t\tu32\n\t\t`);predeclared_type_generators=qw(`\n\t\tarray\n\t\tatomic\n\t\tmat2x2\n\t\tmat2x3\n\t\tmat2x4\n\t\tmat3x2\n\t\tmat3x3\n\t\tmat3x4\n\t\tmat4x2\n\t\tmat4x3\n\t\tmat4x4\n\t\tptr\n\t\ttexture_1d\n\t\ttexture_2d\n\t\ttexture_2d_array\n\t\ttexture_3d\n\t\ttexture_cube\n\t\ttexture_cube_array\n\t\ttexture_multisampled_2d\n\t\ttexture_storage_1d\n\t\ttexture_storage_2d\n\t\ttexture_storage_2d_array\n\t\ttexture_storage_3d\n\t\tvec2\n\t\tvec3\n\t\tvec4\n\t\t`);predeclared_type_aliases=qw(`\n\t\tvec2i vec3i vec4i\n\t\tvec2u vec3u vec4u\n\t\tvec2f vec3f vec4f\n\t\tvec2h vec3h vec4h\n\t\tmat2x2f mat2x3f mat2x4f\n\t\tmat3x2f mat3x3f mat3x4f\n\t\tmat4x2f mat4x3f mat4x4f\n\t\tmat2x2h mat2x3h mat2x4h\n\t\tmat3x2h mat3x3h mat3x4h\n\t\tmat4x2h mat4x3h mat4x4h\n\t\t`);predeclared_intrinsics=qw(`\n bitcast all any select arrayLength abs acos acosh asin asinh atan atanh atan2\n ceil clamp cos cosh countLeadingZeros countOneBits countTrailingZeros cross\n degrees determinant distance dot exp exp2 extractBits faceForward firstLeadingBit\n firstTrailingBit floor fma fract frexp inverseBits inverseSqrt ldexp length\n log log2 max min mix modf normalize pow quantizeToF16 radians reflect refract\n reverseBits round saturate sign sin sinh smoothstep sqrt step tan tanh transpose\n trunc dpdx dpdxCoarse dpdxFine dpdy dpdyCoarse dpdyFine fwidth fwidthCoarse fwidthFine\n textureDimensions textureGather textureGatherCompare textureLoad textureNumLayers\n textureNumLevels textureNumSamples textureSample textureSampleBias textureSampleCompare\n textureSampleCompareLevel textureSampleGrad textureSampleLevel textureSampleBaseClampToEdge\n textureStore atomicLoad atomicStore atomicAdd atomicSub atomicMax atomicMin\n atomicAnd atomicOr atomicXor atomicExchange atomicCompareExchangeWeak pack4x8snorm\n pack4x8unorm pack2x16snorm pack2x16unorm pack2x16float unpack4x8snorm unpack4x8unorm\n unpack2x16snorm unpack2x16unorm unpack2x16float storageBarrier workgroupBarrier\n workgroupUniformLoad\n`);operators=qw(`\n\t\t\t\t\t &\n\t\t\t\t\t &&\n\t\t\t\t\t ->\n\t\t\t\t\t /\n\t\t\t\t\t =\n\t\t\t\t\t ==\n\t\t\t\t\t !=\n\t\t\t\t\t >\n\t\t\t\t\t >=\n\t\t\t\t\t <\n\t\t\t\t\t <=\n\t\t\t\t\t %\n\t\t\t\t\t -\n\t\t\t\t\t --\n\t\t\t\t\t +\n\t\t\t\t\t ++\n\t\t\t\t\t |\n\t\t\t\t\t ||\n\t\t\t\t\t *\n\t\t\t\t\t <<\n\t\t\t\t\t >>\n\t\t\t\t\t +=\n\t\t\t\t\t -=\n\t\t\t\t\t *=\n\t\t\t\t\t /=\n\t\t\t\t\t %=\n\t\t\t\t\t &=\n\t\t\t\t\t |=\n\t\t\t\t\t ^=\n\t\t\t\t\t >>=\n\t\t\t\t\t <<=\n\t\t\t\t\t `);directive_re=/enable|requires|diagnostic/;ident_re=/[_\p{XID_Start}]\p{XID_Continue}*/u;predefined_token="variable.predefined";language78={tokenPostfix:".wgsl",defaultToken:"invalid",unicode:true,atoms:atoms,keywords:keywords3,reserved:reserved,predeclared_enums:predeclared_enums,predeclared_types:predeclared_types,predeclared_type_generators:predeclared_type_generators,predeclared_type_aliases:predeclared_type_aliases,predeclared_intrinsics:predeclared_intrinsics,operators:operators,symbols:/[!%&*+\-\.\/:;<=>^|_~,]+/,tokenizer:{root:[[directive_re,"keyword","@directive"],[ident_re,{cases:{"@atoms":predefined_token,"@keywords":"keyword","@reserved":"invalid","@predeclared_enums":predefined_token,"@predeclared_types":predefined_token,"@predeclared_type_generators":predefined_token,"@predeclared_type_aliases":predefined_token,"@predeclared_intrinsics":predefined_token,"@default":"identifier"}}],{include:"@commentOrSpace"},{include:"@numbers"},[/[{}()\[\]]/,"@brackets"],["@","annotation","@attribute"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/./,"invalid"]],commentOrSpace:[[/\s+/,"white"],[/\/\*/,"comment","@blockComment"],[/\/\/.*$/,"comment"]],blockComment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],attribute:[{include:"@commentOrSpace"},[/\w+/,"annotation","@pop"]],directive:[{include:"@commentOrSpace"},[/[()]/,"@brackets"],[/,/,"delimiter"],[ident_re,"meta.content"],[/;/,"delimiter","@pop"]],numbers:[[/0[fh]/,"number.float"],[/[1-9][0-9]*[fh]/,"number.float"],[/[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+[eE][+-]?[0-9]+[fh]?/,"number.float"],[/0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?/,"number.hex"],[/0[xX][0-9a-fA-F]+[iu]?/,"number.hex"],[/[1-9][0-9]*[iu]?/,"number"],[/0[iu]?/,"number"]]}}}});var xml_exports={};__export(xml_exports,{conf:()=>conf78,language:()=>language79});var __defProp11,__getOwnPropDesc11,__getOwnPropNames11,__hasOwnProp11,__copyProps11,__reExport10,monaco_editor_core_exports10,conf78,language79;var init_xml=__esm({"node_modules/monaco-editor/esm/vs/basic-languages/xml/xml.js"(){init_editor_api();__defProp11=Object.defineProperty;__getOwnPropDesc11=Object.getOwnPropertyDescriptor;__getOwnPropNames11=Object.getOwnPropertyNames;__hasOwnProp11=Object.prototype.hasOwnProperty;__copyProps11=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames11(from))if(!__hasOwnProp11.call(to,key)&&key!==except)__defProp11(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc11(from,key))||desc.enumerable})}return to};__reExport10=(target,mod,secondTarget)=>(__copyProps11(target,mod,"default"),secondTarget&&__copyProps11(secondTarget,mod,"default"));monaco_editor_core_exports10={};__reExport10(monaco_editor_core_exports10,editor_api_exports);conf78={comments:{blockComment:["\x3c!--","--\x3e"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:monaco_editor_core_exports10.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:monaco_editor_core_exports10.languages.IndentAction.Indent}}]};language79={defaultToken:"",tokenPostfix:".xml",ignoreCase:true,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/